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

# Send SMS API: Transactional Message Delivery

> Send SMS to a destination number. Use for OTPs, alerts, or any transactional text. Sender ID must be registered; unregistered sends use the default sender ID.

<Note>
  You would need to register a sender ID with the endpoint mentioned below. All messages sent before then will be delivered with the default sender ID.
</Note>

### Request

```http [POST] theme={null}
{{baseUrl}}api/v1/messaging/sms
```

### Header

| Header        | Type   | Description                                                                                         |
| ------------- | ------ | --------------------------------------------------------------------------------------------------- |
| AppId         | string | Create an app to get your app ID on dashboard [here](https://app.dojah.io/developers/configuration) |
| Authorization | string | Private/secret key. Use `<key>` not `Bearer <key>`                                                  |

### Body parameter

| Parameter   | Type    | Description                                                     | Required |
| ----------- | ------- | --------------------------------------------------------------- | -------- |
| destination | number  | Phone number of recipient                                       | required |
| message     | string  | body of message                                                 | required |
| channel     | string  | can be either whatsapp or sms                                   | required |
| sender\_id  | string  | Sender ID                                                       | optional |
| priority    | boolean | Indicate if you want to send in priority mode. Default is false | optional |

<Note>
  There is the priority feature. You can automatically resend messages via any of the channels if one doesn't get delivered. If the priority is set to true, the default setup is sms, and then whatsapp. You can choose to set it however way you want in the channel parameter.
</Note>

### Sample response

```json Response theme={null}
{
    "entity": {
        "status": true,
        "mobile": "2348054810238",
        "message_id": "true_2348468713228@c.us_3EB092F69064FG74BC76",
        "reference_id": "81512"
    }
}
```

### Response Fields

| Field                | Type    | Description                                                           |
| -------------------- | ------- | --------------------------------------------------------------------- |
| entity               | object  | Contains the message delivery result                                  |
| entity.status        | boolean | `true` if the message was accepted for delivery                       |
| entity.mobile        | string  | Destination phone number the message was sent to                      |
| entity.message\_id   | string  | Unique identifier for the sent message, used to track delivery status |
| entity.reference\_id | string  | Reference identifier for the message transaction                      |
