> ## Documentation Index
> Fetch the complete documentation index at: https://developers.senderz.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a message

> Send an outbound SMS via a registered Sender ID.

**Required permission:** `messaging:send`

## Request body

<ParamField body="to" type="string" required>
  Recipient phone number in E.164 format (e.g. `+61412345678`).
</ParamField>

<ParamField body="sender_id" type="string" required>
  Registered alphanumeric Sender ID. Max 11 characters. Must be a SID registered to your organisation.
</ParamField>

<ParamField body="body" type="string" required>
  Message content. Auto-encoded GSM-7 or UCS-2. Auto-concatenated if longer than 160 (GSM-7) or 70 (UCS-2) characters.
</ParamField>

<ParamField body="market" type="string" required>
  ISO 3166-1 alpha-2 country code. Determines routing and compliance rules.
</ParamField>

<ParamField body="reference" type="string">
  Your internal reference. Returned in callbacks. Max 255 characters.
</ParamField>

<ParamField body="callback_url" type="string">
  Per-message webhook override. Falls back to organisation-level webhook if not set.
</ParamField>

<ParamField body="scheduled_at" type="string">
  ISO 8601 timestamp. Schedule for future delivery. Max 7 days ahead.
</ParamField>

## Examples

<Tabs>
  <Tab title="OTP / 2FA">
    ```bash theme={null}
    curl -X POST https://api.senderz.ai/v1/messaging/messages \
      -H "Authorization: Bearer sz_live_xxxxxxxxxxxxx" \
      -H "Content-Type: application/json" \
      -d '{
        "to": "+61412345678",
        "sender_id": "SecurBank",
        "body": "483291 is your verification code. It expires in 5 minutes. Do not share this code.",
        "market": "AU",
        "reference": "otp-login-user-8821"
      }'
    ```
  </Tab>

  <Tab title="Logistics">
    ```bash theme={null}
    curl -X POST https://api.senderz.ai/v1/messaging/messages \
      -H "Authorization: Bearer sz_live_xxxxxxxxxxxxx" \
      -H "Content-Type: application/json" \
      -d '{
        "to": "+61400123456",
        "sender_id": "TrackFast",
        "body": "Your order SYD-90421 has been dispatched. Expected delivery: tomorrow by 5pm. Track at trackfast.com.au/SYD90421",
        "market": "AU",
        "reference": "shipment-SYD-90421"
      }'
    ```
  </Tab>

  <Tab title="Promotional">
    ```bash theme={null}
    curl -X POST https://api.senderz.ai/v1/messaging/messages \
      -H "Authorization: Bearer sz_live_xxxxxxxxxxxxx" \
      -H "Content-Type: application/json" \
      -d '{
        "to": "+61498765432",
        "sender_id": "StyleHaus",
        "body": "Flash sale: 30% off all winter styles. Ends midnight AEST. Shop now at stylehaus.com.au/sale. Reply STOP to opt out.",
        "market": "AU",
        "reference": "promo-winter-2026-batch3"
      }'
    ```
  </Tab>
</Tabs>

## Response

<ResponseExample>
  ```json 201 theme={null}
  {
    "ok": true,
    "data": {
      "id": "msg_a1b2c3d4e5",
      "status": "queued",
      "to": "+61412345678",
      "sender_id": "SecurBank",
      "body": "483291 is your verification code. It expires in 5 minutes. Do not share this code.",
      "segments": 1,
      "encoding": "GSM-7",
      "market": "AU",
      "reference": "otp-login-user-8821",
      "created_at": "2026-07-17T14:30:00+10:00"
    },
    "meta": {
      "request_id": "req_abc123",
      "timestamp": "2026-07-17T14:30:00+10:00"
    }
  }
  ```
</ResponseExample>
