import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "zudoku/ui/Card";
import { Button } from "zudoku/ui/Button";

## What is SMS API?

The SMS API enables you to send and receive SMS messages globally with high reliability and delivery rates. Whether you need to send transactional messages, marketing campaigns, or two-way SMS conversations, our API provides the infrastructure and tools to integrate SMS capabilities into your applications.

## How It Works

The SMS API operates on a robust messaging infrastructure that ensures reliable message delivery:

### Message Sending

- **Single SMS**: Send individual messages to one or multiple recipients
- **Bulk SMS**: Send messages to large lists of recipients efficiently
- **Scheduled SMS**: Schedule messages to be sent at specific times
- **Personalization**: Customize messages with dynamic content and variables

### Message Receiving

- **Inbound SMS**: Receive and process incoming SMS messages
- **Two-way messaging**: Enable conversations with your users via SMS
- **Webhooks**: Real-time notifications when messages are received
- **Message routing**: Route incoming messages based on keywords or sender

### Delivery Tracking

- **Delivery Reports (DLRs)**: Real-time status updates for sent messages
- **Message status**: Track pending, delivered, failed, and expired messages
- **Analytics**: Monitor delivery rates, response times, and engagement metrics

## Key Features

<div className="not-prose my-6 grid grid-cols-1 gap-4 md:grid-cols-2">
  <Card>
    <CardHeader>
      <CardTitle>Global Coverage</CardTitle>
    </CardHeader>
    <CardContent>
      <p>Send SMS messages to over 200 countries and territories worldwide with reliable delivery through our network of carrier partners.</p>
    </CardContent>
  </Card>

  <Card>
    <CardHeader>
      <CardTitle>High Reliability</CardTitle>
    </CardHeader>
    <CardContent>
      <p>Built on enterprise-grade infrastructure with 99.9% uptime guarantee and automatic failover for maximum reliability.</p>
    </CardContent>
  </Card>

  <Card>
    <CardHeader>
      <CardTitle>Real-time Delivery Reports</CardTitle>
    </CardHeader>
    <CardContent>
      <p>Receive instant delivery status updates via webhooks or polling, including delivery confirmations and failure reasons.</p>
    </CardContent>
  </Card>

  <Card>
    <CardHeader>
      <CardTitle>Two-way Messaging</CardTitle>
    </CardHeader>
    <CardContent>
      <p>Enable bidirectional SMS conversations with your users, supporting customer support, notifications, and interactive services.</p>
    </CardContent>
  </Card>

  <Card>
    <CardHeader>
      <CardTitle>Sender ID Management</CardTitle>
    </CardHeader>
    <CardContent>
      <p>Use custom alphanumeric sender IDs or dedicated short codes for brand recognition and improved deliverability.</p>
    </CardContent>
  </Card>

  <Card>
    <CardHeader>
      <CardTitle>Advanced Features</CardTitle>
    </CardHeader>
    <CardContent>
      <p>Support for Unicode, long messages (concatenated SMS), scheduled sending, and message templates for efficient operations.</p>
    </CardContent>
  </Card>
</div>

## Authentication

The SMS API uses Bearer Token authentication:

- **Header**: `Authorization: Bearer {your_api_token}`
- **Token**: Obtain your API token from [OmaxTelecom Console](https://console.omaxtelecom.com)

## Getting Started

To start using the SMS API:

1. **Get your API credentials**: Log in to [OmaxTelecom Console](https://console.omaxtelecom.com) and navigate to your API settings to obtain your API token.

2. **Choose your environment**:
   - **Sandbox**: For testing and development
   - **Production**: For live operations

3. **Review the API documentation**: Explore all available endpoints, request/response formats, and authentication requirements.

4. **Start sending**: Begin with simple message sending, then integrate delivery reports and inbound message handling.

## API Documentation

<div className="not-prose my-6">
  <Card>
    <CardHeader>
      <CardTitle>Complete API Reference</CardTitle>
      <CardDescription>
        Explore the full API documentation with interactive examples, request/response schemas, and authentication details.
      </CardDescription>
    </CardHeader>
    <CardContent>
      <Button asChild>
        <a href="/api/sms">View API Documentation →</a>
      </Button>
    </CardContent>
  </Card>
</div>

## Need Help?

If you have any questions or need assistance with the SMS API, please contact our support team at [support@omaxtelecom.com](mailto:support@omaxtelecom.com).
