# HTTP IN Trunk

HTTP IN SMS trunks allow you to forward incoming SMS messages from your Direct Inward Dialing (DID) numbers to a
specified web server or application endpoint. Each message is delivered as an HTTP request.

**Create Trunk**

Create and configure a new SMS to HTTP IN Trunk.

[Create HTTP IN Trunk](#user-panel-sms-to-http-in-trunk-create)

**Edit Trunk**

Update the settings of an existing trunk.

[Edit HTTP IN Trunk](#user-panel-sms-to-http-in-trunk-edit)

**Delete Trunk(s)**

Remove one or more trunks from your account.

[Delete HTTP IN Trunk(s)](#user-panel-sms-to-http-in-trunk-delete)

---



## Create HTTP IN Trunk

### Step 1: Start Creating HTTP IN Trunk

In the user panel menu, navigate to **SMS > SMS Trunks**. Click the **Create New** button in the top-right corner and
select **HTTP IN** from the dropdown menu.

[![Navigating to create a new SMS to HTTP IN Trunk.](../../_images/fig168.png)](../../_images/fig168.png)


**Fig. 1.** Navigating to create a new SMS to HTTP IN Trunk.

### Step 2: Configure HTTP IN Trunk

Enter the general information required to set up your SMS to HTTP IN trunk. Provide a descriptive friendly name and
define how incoming SMS messages should be delivered to your HTTP endpoint.

[![SMS to HTTP IN Trunk configuration page.](../../_images/fig253.png)](../../_images/fig253.png)


**Fig. 2.** Create HTTP IN Trunk Settings.



#### General Settings

| Setting | Description |
| --- | --- |
| **Friendly name** | Enter a unique name to identify this trunk. |
| **HTTP method** | Select the HTTP method for delivering messages: `GET`, `POST`, or `PUT`. |
| **Validate HTTPS certificate** | Enable to validate the SSL certificate of the destination server for secure transactions. |
| **Follow redirect** | Enable to allow the system to follow HTTP 3xx redirect status codes. |
| **Request URL** | Specify the destination URL of your web server or application endpoint.   Example: `https://example.com/sms-handler` |
| **Query Parameters** | Add custom key-value pairs to be sent as query parameters in the URL. |
| **Headers** | Add custom HTTP headers to include in the request. |
| **Body type** | Available for `POST` and `PUT` methods only. Defines the format method of HTTP request body:   - **JSON** - Sends a raw JSON object. - **HTML-Multipart** - Sends data as `multipart/form-data` with key-value pairs. - **HTML URL Encoded** - Sends data as `application/x-www-form-urlencoded` with key-value pairs. - **RAW**: Sends a raw, unformatted payload. |

Note

You can use the following variables in the **Request URL**, **Query Parameters**, **Headers**, and **Body** fields to
customize the request:

> - `{SMS_TIME}`: The time the SMS was received.
> - `{SMS_SRC_ADDR}`: The sender's phone number.
> - `{SMS_DST_ADDR}`: The recipient DID number.
> - `{SMS_TEXT}`: The raw text of the SMS message.
> - `{SMS_TEXT_BASE64_ENCODED}`: The SMS message content encoded in Base64.

#### Trunk Group Configuration (Optional)

You may assign the trunk to an existing trunk group in order to enable failover or load-balancing. Within the trunk
group, you can also define the trunk's **priority**, which determines the order in which trunks will be used.

Note

The system attempts to contact the target SMS trunk with the highest-numbered priority first.

### Step 3: Create the HTTP IN Trunk

Click **Create** at the bottom of the page to save the new trunk.

### Step 4: Assign the HTTP IN Trunk to DIDs

To receive messages, assign the new trunk to one or more DIDs that support inbound SMS. For detailed steps, see [Assign
an SMS trunk](../../phone-numbers/my-numbers/how-to-guides/assign-sms-trunk.html#assigning-sms-trunk).

---

## Edit HTTP IN Trunk

> 1. In the user panel menu, navigate to **SMS > SMS Trunks**.
> 2. Locate the trunk you wish to edit and click the [![Actions button](../../_images/three_dots_action_button1.png)](../../_images/three_dots_action_button1.png)
>    button next to it.
> 3. Select **Edit** from the dropdown menu.
> 4. On the **Edit HTTP IN Trunk** page, modify the settings as needed.
> 5. Click **Save** to apply your changes.

[![Accessing the Edit option for an SMS to HTTP IN Trunk.](../../_images/actions_edit1.png)](../../_images/actions_edit1.png)


**Fig. 3.** Accessing the Edit option for an SMS to HTTP IN Trunk.



---

## Delete HTTP IN Trunk(s)

You can delete a single SMS to HTTP IN trunk or multiple trunks at once by using batch actions.

Note

A trunk that is currently assigned to any DID number cannot be deleted until it is unassigned.

*Delete a Single Trunk*

1. Navigate to the **SMS Trunks** list page.
2. Locate the trunk you wish to remove and click the [![Actions button](../../_images/three_dots_action_button1.png)](../../_images/three_dots_action_button1.png)
   button next to it.
3. Select **Delete** from the dropdown menu.
4. In the confirmation pop-up window, click **Delete** to permanently remove the trunk.

[![Accessing the Delete option for an SMS to HTTP IN Trunk.](../../_images/actions_delete2.png)](../../_images/actions_delete2.png)


**Fig. 4.** Accessing the Delete option for an SMS to HTTP IN Trunk.


*Delete Multiple Trunks*

1. Navigate to the **SMS Trunks** list page.
2. Select the trunks you wish to delete by checking the boxes next to them.
3. At the bottom of the page, click **Batch Actions** and select **Delete Trunks**.
4. In the confirmation pop-up window, click **Delete** to permanently remove the selected trunks.

[![Using Batch Actions to delete multiple SMS to HTTP IN Trunks.](../../_images/delete_batch_actions1.png)](../../_images/delete_batch_actions1.png)


**Fig. 5.** Using Batch Actions to delete multiple SMS to HTTP IN Trunks.

---

## Related Resources

**Assign an SMS trunk**

Learn how to assign your newly created trunk to one or more DID numbers to start receiving messages.

[Assign an SMS trunk](../../phone-numbers/my-numbers/how-to-guides/assign-sms-trunk.html#assigning-sms-trunk)

**Create an SMS Trunk Group**

Discover how to group multiple SMS trunks together for failover and load-balancing purposes.

[SMS Trunk Groups](trunk-group.html#user-panel-sms-trunk-group)

**SMS HTTP Specification**

View the technical specification for HTTP-based SMS delivery.

[HTTP Specification](technical-data/http-specification.html#user-panel-sms-http-specification)

On this page
