# SMS API

## POST /messages

> Send message via REST integration

```json
{"openapi":"3.0.1","info":{"title":"SMS API","version":"1.0.0"},"tags":[{"name":"SMS API"}],"servers":[{"url":"https://platform.clickatell.com"}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SendMessageRequest":{"type":"object","properties":{"content":{"type":"string","xml":{"name":"Content"}},"to":{"uniqueItems":true,"type":"array","xml":{"name":"To"},"items":{"type":"string","xml":{"name":"To"}}},"from":{"type":"string","xml":{"name":"From"}},"binary":{"type":"boolean","xml":{"name":"Binary"}},"clientMessageId":{"type":"string","xml":{"name":"ClientMessageId"}},"scheduledDeliveryTime":{"type":"string","xml":{"name":"ScheduledDeliveryTime"}},"userDataHeader":{"maxLength":2147483647,"minLength":1,"type":"string","xml":{"name":"UserDataHeader"}},"validityPeriod":{"type":"integer","format":"int32","xml":{"name":"ValidityPeriod"}},"charset":{"type":"string","xml":{"name":"Charset"}}},"description":"Send sms request","xml":{"name":"SendMessageRequest"}},"SendMessagesListResponse":{"type":"object","properties":{"messages":{"type":"array","xml":{"name":"Messages","wrapped":true},"items":{"$ref":"#/components/schemas/SendMessageResponse"}},"errorCode":{"type":"integer","format":"int32","xml":{"name":"ErrorCode"}},"error":{"type":"string","xml":{"name":"Error"}},"errorDescription":{"type":"string","xml":{"name":"ErrorDescription"}}},"xml":{"name":"SendMessagesResponse"}},"SendMessageResponse":{"type":"object","properties":{"apiMessageId":{"type":"string","xml":{"name":"ApiMessageId"}},"accepted":{"type":"boolean","xml":{"name":"Accepted"}},"to":{"type":"string","xml":{"name":"To"}},"errorCode":{"type":"integer","format":"int32","xml":{"name":"ErrorCode"}},"error":{"type":"string","xml":{"name":"Error"}},"errorDescription":{"type":"string","xml":{"name":"ErrorDescription"}}}}}},"paths":{"/messages":{"post":{"tags":["SMS API"],"summary":"Send message via REST integration","operationId":"sendMessageREST_1","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}},"required":true},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessagesListResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SendMessagesListResponse"}}}}}}}}}
```

## POST /messages/rest/bulk

> Send bulk messages via REST integration

```json
{"openapi":"3.0.1","info":{"title":"SMS API","version":"1.0.0"},"tags":[{"name":"SMS API"}],"servers":[{"url":"https://platform.clickatell.com"}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SendBulkMessageRequest":{"type":"object","properties":{"messageList":{"type":"array","items":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"SendMessageRequest":{"type":"object","properties":{"content":{"type":"string","xml":{"name":"Content"}},"to":{"uniqueItems":true,"type":"array","xml":{"name":"To"},"items":{"type":"string","xml":{"name":"To"}}},"from":{"type":"string","xml":{"name":"From"}},"binary":{"type":"boolean","xml":{"name":"Binary"}},"clientMessageId":{"type":"string","xml":{"name":"ClientMessageId"}},"scheduledDeliveryTime":{"type":"string","xml":{"name":"ScheduledDeliveryTime"}},"userDataHeader":{"maxLength":2147483647,"minLength":1,"type":"string","xml":{"name":"UserDataHeader"}},"validityPeriod":{"type":"integer","format":"int32","xml":{"name":"ValidityPeriod"}},"charset":{"type":"string","xml":{"name":"Charset"}}},"description":"Send sms request","xml":{"name":"SendMessageRequest"}},"SendMessagesListResponse":{"type":"object","properties":{"messages":{"type":"array","xml":{"name":"Messages","wrapped":true},"items":{"$ref":"#/components/schemas/SendMessageResponse"}},"errorCode":{"type":"integer","format":"int32","xml":{"name":"ErrorCode"}},"error":{"type":"string","xml":{"name":"Error"}},"errorDescription":{"type":"string","xml":{"name":"ErrorDescription"}}},"xml":{"name":"SendMessagesResponse"}},"SendMessageResponse":{"type":"object","properties":{"apiMessageId":{"type":"string","xml":{"name":"ApiMessageId"}},"accepted":{"type":"boolean","xml":{"name":"Accepted"}},"to":{"type":"string","xml":{"name":"To"}},"errorCode":{"type":"integer","format":"int32","xml":{"name":"ErrorCode"}},"error":{"type":"string","xml":{"name":"Error"}},"errorDescription":{"type":"string","xml":{"name":"ErrorDescription"}}}}}},"paths":{"/messages/rest/bulk":{"post":{"tags":["SMS API"],"summary":"Send bulk messages via REST integration","operationId":"sendBulkMessageREST","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBulkMessageRequest"}}},"required":true},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SendMessagesListResponse"}}}}}}}}}}
```

## GET /messages/http/send

> Send message via HTTP integration

```json
{"openapi":"3.0.1","info":{"title":"SMS API","version":"1.0.0"},"tags":[{"name":"SMS API"}],"servers":[{"url":"https://platform.clickatell.com"}],"paths":{"/messages/http/send":{"get":{"tags":["SMS API"],"summary":"Send message via HTTP integration","operationId":"sendMessageHTTP","parameters":[{"name":"apiKey","in":"query","description":"Integration API key.","required":true,"schema":{"type":"string"}},{"name":"to","in":"query","description":"Receiver number.","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","description":"Sender number in two-way integration.","schema":{"type":"string"}},{"name":"content","in":"query","description":"Message content.","required":true,"schema":{"type":"string"}},{"name":"clientMessageId","in":"query","description":"Client message id","schema":{"type":"string"}}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessagesListResponse"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SendMessagesListResponse"}}}}}}}},"components":{"schemas":{"SendMessagesListResponse":{"type":"object","properties":{"messages":{"type":"array","xml":{"name":"Messages","wrapped":true},"items":{"$ref":"#/components/schemas/SendMessageResponse"}},"errorCode":{"type":"integer","format":"int32","xml":{"name":"ErrorCode"}},"error":{"type":"string","xml":{"name":"Error"}},"errorDescription":{"type":"string","xml":{"name":"ErrorDescription"}}},"xml":{"name":"SendMessagesResponse"}},"SendMessageResponse":{"type":"object","properties":{"apiMessageId":{"type":"string","xml":{"name":"ApiMessageId"}},"accepted":{"type":"boolean","xml":{"name":"Accepted"}},"to":{"type":"string","xml":{"name":"To"}},"errorCode":{"type":"integer","format":"int32","xml":{"name":"ErrorCode"}},"error":{"type":"string","xml":{"name":"Error"}},"errorDescription":{"type":"string","xml":{"name":"ErrorDescription"}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.clickatell.com/developers-api-reference/sms-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
