# Enable SMS/10DLC on a Number

## Overview

This method allows you to enable SMS on (almost) any number with TSG Global.

{% hint style="success" %}
Numbers that are searched and ordered in your cart are already SMS enabled, and you do not need to perform this function to make them SMS enabled.
{% endhint %}

## Authentication

{% hint style="info" %}
Authentication is done by passing your TSG Global API key via the Authorization header in the format "Authorization: Bearer \<api\_key>"
{% endhint %}

## Method

## Enable SMS on a phone number.

<mark style="color:green;">`POST`</mark> `https://api-service.tsgglobal.world/v2/sms-enablement`

#### Request Body

| Name                                     | Type   | Description                                                                                                                                                                                                                                           |
| ---------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| did<mark style="color:red;">\*</mark>    | String | The DID you would like to modify"                                                                                                                                                                                                                     |
| action<mark style="color:red;">\*</mark> | String | \[add \| update] (use update if you need to ammend information for already SMS-enabled number - eg. change webhook url or add campaign id)                                                                                                            |
| use\_case\_type                          | String | \[a2p \| p2p \| account\_default] - p2p can be used only if you have p2p use-case approved                                                                                                                                                            |
| p2p\_nnid                                | String | to be used with use\_case\_type p2p and approved nnid for p2p traffic                                                                                                                                                                                 |
| mms\_enable                              | String | \[true \| false] - if not set, account default value will be used                                                                                                                                                                                     |
| mms\_routing                             | String | http, https, mm4, mm4s url to deliver inbound mms to - if not set, account default value will be used                                                                                                                                                 |
| webhook\_url                             | String | http or https SMS webhook url if you want inbound SMS delivered via webhook (leave blank for SMPP or account default value)                                                                                                                           |
| webhook\_type                            | String | \[smpp, postv1, postv2, post3jam] - leave blank for account default settings. It determines inbound message format. postv2 recommended for http(s) deliveries (if webhook url set)                                                                    |
| x\_api\_key\_header                      | String | This value will be passed as x-api-key header in the webhook http call. Can be used to secure your webhook API. (should not be provided if webhook\_type is smpp)                                                                                     |
| campaign\_id                             | String | If the number is needs to be 10DLC registered and assigned to an active campaign, the campaign id should be provided here to complete 10DLC provisioning. Note: sole proprietor campaigns only allow 1 number at a time.                              |
| campaign\_sub\_id                        | String | In case your campaign is associated with the sub id please provide one. Otherwise, do not provide this parameter.                                                                                                                                     |
| skip\_number\_validation                 | String | Setting this optional prop to "true" allows you to provision number that you provided LOA for and you got confirmation from TSG team that it was accepted. Using this prop without TSG confirmation will have no effect - your request will be stale. |

{% hint style="info" %}
Please be aware that this API endpoint has strict parameter parsing. In case an unknown or invalid parameter is provided in the request body, the request will be rejected with an error.
{% endhint %}

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
Success
```

{% endtab %}
{% endtabs %}
