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

# Create SMS campaign

> Create an SMS campaign with post-call message templates

Creates an SMS campaign that automatically dispatches SMS follow-up messages based on agent call outcomes (e.g. sending different text messages when a call was answered vs unanswered).

<Note>
  Only one SMS campaign is allowed per agent. To modify templates or settings, use [`PUT /sms-agent/campaigns/{id}`](/docs/api-reference/campaigns/update-sms-campaign).
</Note>

### Body parameters

<ParamField body="agentId" type="string" required>
  UUID of the AI agent to bind this SMS campaign to.
</ParamField>

<ParamField body="name" type="string">
  Campaign display name (letters, numbers, and spaces only, up to 120 characters).
</ParamField>

<ParamField body="senderNumber" type="string">
  Sender phone number or alphanumeric sender ID.
</ParamField>

<ParamField body="senderProvider" type="string">
  Connected SMS provider name (e.g. `TWILIO`, `PLIVO`, `PINNACLE`).
</ParamField>

<ParamField body="isActive" type="boolean" default="true">
  Whether the SMS campaign is active.
</ParamField>

<ParamField body="templates" type="object[]" required>
  Array of SMS message templates.

  <Expandable title="SMS Template">
    <ParamField body="callStatus" type="string" required>
      Call outcome trigger — `ANSWERED` or `UNANSWERED`.
    </ParamField>

    <ParamField body="messageBody" type="string" required>
      SMS message text (up to 1,600 characters). Supports `{{name}}` interpolation placeholders.
    </ParamField>

    <ParamField body="dltSenderId" type="string">
      DLT Header / Sender ID for India SMS routing.
    </ParamField>

    <ParamField body="dltTemplateId" type="string">
      DLT Content Template ID registered on telecom operator portal.
    </ParamField>
  </Expandable>
</ParamField>

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.agentic-os.com/api/v1/sms-agent/campaigns \
    -H "Authorization: Bearer $AGENTIC_OS_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Post-Call SMS Follow-up",
      "agentId": "11111111-1111-1111-1111-111111111111",
      "senderNumber": "+15550199",
      "senderProvider": "TWILIO",
      "templates": [
        {
          "callStatus": "ANSWERED",
          "messageBody": "Hi {{name}}, thanks for your time today! You can book your onboarding session here: https://agentic-os.com/onboarding"
        },
        {
          "callStatus": "UNANSWERED",
          "messageBody": "Hi {{name}}, we tried reaching you regarding your inquiry. Please call us back or reply to this message!"
        }
      ]
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.agentic-os.com/api/v1/sms-agent/campaigns",
      headers={
          "Authorization": f"Bearer {API_KEY}",
          "Content-Type": "application/json",
      },
      json={
          "name": "Post-Call SMS Follow-up",
          "agentId": "11111111-1111-1111-1111-111111111111",
          "senderNumber": "+15550199",
          "senderProvider": "TWILIO",
          "templates": [
              {
                  "callStatus": "ANSWERED",
                  "messageBody": "Hi {{name}}, thanks for your time today! You can book your onboarding session here: https://agentic-os.com/onboarding",
              },
              {
                  "callStatus": "UNANSWERED",
                  "messageBody": "Hi {{name}}, we tried reaching you regarding your inquiry. Please call us back or reply to this message!",
              },
          ],
      },
  )
  print(response.json())
  ```

  ```javascript Node theme={null}
  const response = await fetch(
    "https://api.agentic-os.com/api/v1/sms-agent/campaigns",
    {
      method: "POST",
      headers: {
        Authorization: `Bearer ${API_KEY}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        name: "Post-Call SMS Follow-up",
        agentId: "11111111-1111-1111-1111-111111111111",
        senderNumber: "+15550199",
        senderProvider: "TWILIO",
        templates: [
          {
            callStatus: "ANSWERED",
            messageBody: "Hi {{name}}, thanks for your time today! You can book your onboarding session here: https://agentic-os.com/onboarding",
          },
          {
            callStatus: "UNANSWERED",
            messageBody: "Hi {{name}}, we tried reaching you regarding your inquiry. Please call us back or reply to this message!",
          },
        ],
      }),
    },
  );
  const data = await response.json();
  console.log(data);
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "id": "66666666-6666-6666-6666-666666666666",
  "tenantId": "990e8400-e29b-41d4-a716-446655440000",
  "agentId": "11111111-1111-1111-1111-111111111111",
  "name": "Post-Call SMS Follow-up",
  "senderNumber": "+15550199",
  "senderProvider": "TWILIO",
  "isActive": true,
  "templates": [
    {
      "id": "sms_tpl_1",
      "callStatus": "ANSWERED",
      "messageBody": "Hi {{name}}, thanks for your time today! You can book your onboarding session here: https://agentic-os.com/onboarding",
      "dltSenderId": null,
      "dltTemplateId": null
    },
    {
      "id": "sms_tpl_2",
      "callStatus": "UNANSWERED",
      "messageBody": "Hi {{name}}, we tried reaching you regarding your inquiry. Please call us back or reply to this message!",
      "dltSenderId": null,
      "dltTemplateId": null
    }
  ],
  "createdAt": "2026-06-01T12:00:00.000Z",
  "updatedAt": "2026-06-01T12:00:00.000Z"
}
```
