# Single SMS

Send message to a single recipient using the default or dedicated gateway number.

{% hint style="warning" %}
The default gateway number doesn't deliver messages to black listed number, however a dedicated gateway number can be purchased to overcome this limitation.
{% endhint %}

## SMS Single

<mark style="color:green;">`POST`</mark> `https://api.bitel.rest/api/v2/sms/single`

#### Request Body

| Name          | Type   | Description                                    |
| ------------- | ------ | ---------------------------------------------- |
| gatewayNumber | string | Gateway number from which the SMS will be sent |
| message       | string | Message ex. "Hi there"                         |
| phoneNumber   | string | User phone number ex. 0912xxxxxxx              |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "result": {
    "id": "5c6f6f7984d440d3a02663857447205a",
    "gatewayNumber": "10009909",
    "phoneNumber": "0912*******",
    "message": "Hello from Bitel!",
    "requestDate": 1564573464,
    "status": 0,
    "statusText": "Waiting",
    "partCount": 1,
    "price": 0.0 // price is 0 because the message is waiting
  },
  "error": null
}
```

{% endtab %}
{% endtabs %}

#### Sample Request

```javascript
{
    "message": "Hi there",
    "phoneNumber": "0912*******",
    "gatewayNumber": "10007200" // optional
}
```

#### Sample Response

```javascript
{
  "result": {
    "id": "5c6f6f7984d440d3a02663857447205a",
    "gatewayNumber": "10009909",
    "phoneNumber": "0912*******",
    "message": "Hello from Bitel!",
    "requestDate": 1564573464,
    "status": 0,
    "statusText": "Waiting",
    "partCount": 1,
    "price": 0.0 // price is 0 because the message is waiting
  },
  "error": null
}
```

{% hint style="info" %}

#### **Getting SMS Status**

In order to get the detail of a request, including the delivery status, price  and more please refer to [**Sms Status**](/bitel/sms/sms-detail.md)  API.
{% endhint %}

#### Error Codes

| Code           | Description                                                        |
| -------------- | ------------------------------------------------------------------ |
| InvalidRequest | Submitted data is invalid                                          |
| InvalidGateway | Gateway number is invalid, or the client doesn't have access to it |


---

# 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://bitel.gitbook.io/bitel/sms/single-sms.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.
