---
title: How to send SMS using API? (Sending SMS using Postman)
slug: messaging-apis/how-to-send-sms-using-api-sending-sms-using-postman
docTags: 
createdAt: 2025-10-11T04:15:05.629Z
---

To send an SMS through our API, you will need to make an HTTP POST request to
**https\://\<your\_api\_key>:\<your\_api\_token>\<subdomain>/v1/Accounts/\<your\_sid>/Sms/send**

- Replace \<your\_api\_key> and \<your\_api\_token> with the API key and token created by you or use the default API and token.
- Replace \<your\_sid> with your “Account sid”
- Replace \<subdomain> with the region of your account
  - \<subdomain> of Singapore cluster is @api.exotel.com
  - \<subdomain> of Mumbai cluster is @api.in.exotel.com

\<your\_api\_key>, \<your\_api\_token> and \<your\_sid> are available on the API settings page of your Exotel Dashboard&#x20;

![](https://api.archbee.com/api/optimize/SK2urIgCC2ml99YyqWOSl/4j0L17eYqLfpQJCpLSv3o-20260729-063407.png?1639792770)

The HTTP request, available parameters, and sample responses can be viewed on our [developer channel](https://developer.exotel.com/api/#send-sms).

Following are the mandatory parameters to be added along with the SMS API Request.

\- **From: Specify one of your ExoPhone or the Sender ID (header) linked to it.**
**- To: Mobile number to which SMS has to be sent.**
**- Body: Content (Template) of your SMS.&#x20;**&#xA;****

![](https://api.archbee.com/api/optimize/SK2urIgCC2ml99YyqWOSl/DjiiP6icy-LxUyypcvPjA-20260729-063408.png?1639792771)

**Errors:**

When there are errors with the SMS submission, the HTTP code will be not 200. Like any good REST API, we give appropriate HTTP codes which give you hints on what type of errors it is and how you can handle it. You can refer here for more details on HTTP codes.

In addition to the HTTP Status code, the body of the SMS contains an XML with the details of the error

The XML (in the HTTP body) is of this form:

| \<TwilioResponse><br />\<RestException><br />\<Status>xxx\</Status><br />\<Message>Detailed error message\</Message><br />\</RestException><br />\</TwilioResponse> |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

The 'Status' is the HTTP code itself again

The 'Message' gives you more details on the error.&#x20;

Example Status and Messages are below.

| Status | Message                              |
| ------ | ------------------------------------ |
| 400    | Invalid Parameters                   |
| 400    | Invalid Recipient \[xxxx]            |
| 403    | The account is not active            |
| 403    | Insufficient balance to send the SMS |
| 403    | Account validity has expired         |
| 429    | Too Many Requests                    |
| 500    | Internal Server Error                |

**NOTE:** Do not rely on the "Message" while doing your integration. Always rely only on the HTTP 'Status' code.

Sample PHP and Java code to send SMS is available on [Github](https://github.com/KarthikKrish/ExotelAPI/)

**Before you start sending transactional SMS through this API, Please test whether your content is matching a template. Otherwise, the SMS ends up becoming promotional and this causes a lot of confusion.**

For a detailed description of these Statues, See Exotel SMS status codes

## Watch a short video

:::Iframe{iframeHeight="0" code="<div style=&#x22;position: relative;padding-bottom: 56.25%;height: 0;border-radius: 0;box-shadow: 0 15px 40px rgba(63,58,79,.3);overflow: hidden;min-width:320px&#x22;><iframe src=&#x22;https://learn.exotel.com/share/cMf0zmR2dy5zAuhUXxTyWg/embed?autoplay=false&#x22; frameborder=&#x22;0&#x22; webkitallowfullscreen mozallowfullscreen allowfullscreen allow=&#x22;autoplay; fullscreen&#x22; style=&#x22;position: absolute; top: 0; left: 0; width: 100%; height: 100%;&#x22;></iframe></div>"}

:::
