---
title: "Send SMS message"
method: POST
path: "/api/v1/sms"
tags: ["SMS"]
---

# Send SMS message

`POST /api/v1/sms`

## Request

- Base URL: `https://app.didlogic.com`
- URL: `https://app.didlogic.com/api/v1/sms`
- Auth: HTTP bearer

Send an SMS message from a DID number owned by the authenticated user.

**Requirements:**
- Source DID must be owned by user
- Source DID must have SMS enabled
- Sufficient account balance for SMS cost
- Valid destination phone number

**Cost:**
- Charged per segment (160 characters)
- Price varies by destination country

`sms.id` feeds sms_show. See also: numbers_search_show, to find SMS-enabled numbers to buy.

## Request body

- object
  - `sm` object, required
    - `source` string, required: Source number from numbers_index, purchases_index; it must be one of your numbers with SMS enabled (in numbers_index its `services` include `sms`) or one of your approved sender IDs
    - `destination` string, required: Destination phone number (must be a valid international number)
    - `message` string, required: SMS text content (160 chars per segment)
  - `dlr` object
    - `callback_endpoint` string: Optional DLR (Delivery Receipt) callback URL

## Response `200`

Successfully sends SMS message and returns details with ID

- object
  - `sms` object, required: Created SMS details
    - `id` integer, required: SMS ID
    - `destination` string, required: Destination number
    - `message` string, required: Message content
    - `status` 'created' | 'failed' | 'sent' | 'dlr_error' | 'delivered' | 'not_delivered' | 'interrupted', required: Delivery status
    - `charge` number, float, required: SMS cost
    - `segments_count` integer, required: Number of segments
    - `error_code` integer, nullable, required: Why the SMS failed, as an SMPP command_status; `null` unless `status` is `failed`. A failure with no more specific code reads `255`. - `10` (`ESME_RINVSRCADR`) — Invalid sender ID: the sender ID is not accepted for this destination - `11` (`ESME_RINVDSTADR`) — Invalid destination number: the destination number is not valid - `69` (`ESME_RSUBMITFAIL`) — Submit failed: the message was rejected and not delivered - `255` (`ESME_RUNKNOWNERR`) — Unknown error: the message failed for any other reason
    - `error_description` string, nullable, required: The text for `error_code` ("Invalid sender ID", "Invalid destination number", "Submit failed", "Unknown error"); `null` unless `status` is `failed`.

## Other responses

- `400`: The request body must be valid JSON.
- `403`: Returns 403 error when destination number is blocked
- `422`: Returns 422 error when destination phone number is invalid

---

[API](https://skmtc.dev/didlogic/apis/get-started.md) · [All operations](https://skmtc.dev/didlogic/apis/get-started/llms.txt) · [OpenAPI document](https://skmtc.dev/didlogic/apis/get-started/revisions/dc972d592b34?raw)
