> ## Documentation Index
> Fetch the complete documentation index at: https://docs-sms.mifumolabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Campaign

Create a new SMS campaign.

<ParamField body="name" type="string" required>
  Campaign name
</ParamField>

<ParamField body="message" type="string" required>
  SMS message content
</ParamField>

<ParamField body="recipients" type="array">
  Array of recipient phone numbers
</ParamField>

<ParamField body="sender_id" type="string" required>
  Sender ID
</ParamField>

<ParamField body="scheduled_at" type="string">
  Scheduled send time (ISO 8601 format)
</ParamField>

<ParamField body="segment_ids" type="array">
  Array of segment IDs
</ParamField>

<ParamField body="contact_ids" type="array">
  Array of contact IDs
</ParamField>

## Request Example

<RequestExample>
  ```json theme={null}
  {
    "name": "Holiday Promotion",
    "message": "Special holiday offer! Get 20% off",
    "recipients": [
      "+255614853618",
      "+255712345678"
    ],
    "sender_id": "MIFUMO",
    "scheduled_at": "2025-12-01T10:00:00Z",
    "segment_ids": [],
    "contact_ids": []
  }
  ```
</RequestExample>

## Success Response (201)

<ResponseExample>
  ```json theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Holiday Promotion",
    "message": "Special holiday offer! Get 20% off",
    "status": "scheduled",
    "scheduled_at": "2025-12-01T10:00:00Z",
    "total_recipients": 2,
    "sent": 0,
    "delivered": 0,
    "failed": 0,
    "created_at": "2025-11-27T10:30:00Z",
    "updated_at": "2025-11-27T10:30:00Z"
  }
  ```
</ResponseExample>
