> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# Setup and send one-way and two-way SMS

Sending messages with Voximplant can be incredibly useful for informing customers about price fluctuations, policy changes, and other relevant updates. Additionally, it can be employed for customer verification purposes. While most phone numbers support SMS, it’s essential to refer to the [How to choose a phone number](/guides/features/sms/phone-numbers) article for specific details.

## Enable SMS functionality

Enable SMS messaging via the [ControlSms](https://voximplant.com/docs/references/httpapi/sms#controlsms) HTTP API before sending or receiving SMS. If SMS is supported and enabled, you can send SMS from a phone number via the [SendSmsMessage](https://voximplant.com/docs/references/httpapi/sms#sendsmsmessage) HTTP API and receive via the [IncomingSmsCallback](https://voximplant.com/docs/references/httpapi/inboundsmscallback) property of the HTTP callback. Each incoming SMS message is billed according to the [pricing](https://voximplant.com/pricing).

After you buy a phone number, go to **Numbers** —> **My phone numbers**. There is an **SMS Enabled** checkbox which is not selected by default. To enable it, choose **Edit** from the phone number's menu. Here, toggle **Disable/Enable SMS** and click **Save**.

![SMS enabled](https://files.buildwithfern.com/voximplant.docs.buildwithfern.com/5e9a171989f3b88a4d4de2de7fd0f8def68d9c9e8e5e9186848fae84211fa451/docs/assets/guides/features/sms/guides-sms-send-enabled.png)

![Toggle SMS](https://files.buildwithfern.com/voximplant.docs.buildwithfern.com/4c0bd6788ea9776e366ebaff948b88e85b55040a48f0c7288ac1f9c0c7d717eb/docs/assets/guides/features/sms/guides-sms-send-toggle.jpg)

To perform this action via HTTP API, use the [ControlSms](https://voximplant.com/docs/references/httpapi/sms#controlsms) method.

To enable SMS, use this command:

```curl title="Enabling SMS — Request"
curl "https://api.voximplant.com/platform_api/ControlSms/?api_key=API_KEY&account_id=1&phone_number=447443332211&command=enable"
```

```json title="Enabling SMS — Response"
{
  "result": 1
}
```

To disable SMS, use this command:

```curl title="Disabling SMS — Request"
curl "https://api.voximplant.com/platform_api/ControlSms/?api_key=API_KEY&account_id=1&phone_number=447443332211&command=disable"
```

```json title="Disabling SMS — Response"
{
  "result": 1
}
```

If you want to save outgoing SMS text in your control panel, please enable the **Always save the text of outgoing messages** setting in your control panel → Settings → [SMS configuration](https://manage.voximplant.com/settings/sms_configuration).

## Send one-way SMS

To send one-way SMS, use the [A2PSendSms](https://voximplant.com/docs/references/httpapi/sms#a2psendsms) method with the following parameters:

* **src\_number** – the SenderID. Please contact support for installing a SenderID.
* **dst\_numbers** – destination phone numbers separated by the ';' symbol.
* **text** – message text, up to 1600 characters. We split long messages greater than 160 GSM-7 characters or 70 UTF-16 characters into multiple segments. Each segment is billed as one message.

Let us see how to send a message with the text "Test one-way messages" 447443332211 to the phone numbers 447443332212 and 447443332213.

```curl title="Sending one-way SMS — Request"
curl "https://api.voximplant.com/platform_api/A2PSendSms?api_key=API_KEY&account_id=1&src_number=447443332211&dst_numbers=447443332212;447443332213&text=Test%20message"
```

```json title="Sending one-way SMS — Response"
{
  "result": [
    {
      "transaction_id": 3996474,
      "destination_number": "447443332213"
    }
  ],
  "fragments_count": 1,
  "failed": [
    {
      "destination_number": "447443332212",
      "error_description": "SMS failed to send.",
      "error_code": 385
    }
  ]
}
```

## Send two-way SMS

To send two-way SMS, use the [SendSmsMessage](https://voximplant.com/docs/references/httpapi/sms#sendsmsmessage) method with the following parameters:

* **source** – source phone number
* **destination** – destination phone number
* **sms\_body** – message text, up to 765 characters. We split long messages greater than 160 GSM-7 characters or 70 UTF-16 characters into multiple segments. Each segment is billed as one message.

Let us see how to send a message with the text "Test message" from the phone number 447443332211 to the phone number 447443332212:

```curl title="Sending two-way SMS — Request"
curl "https://api.voximplant.com/platform_api/SendSmsMessage/?api_key=API_KEY&account_id=1&source=447443332211&destination=447443332212&sms_body=Test%20message"
```

```json title="Sending two-way SMS — Response"
{
  "result": 1,
  "fragments_count": 1
}
```

**Fragments\_count** in the response is the number of fragments into which the message was divided.