# Enable SMS on Numbers

## Enable SMS ON numbers

<mark style="color:green;">`POST`</mark> `https://api.opentact.org/rest/lease/tn/Number/subscription/sms`

This API is used to Enable the SMS on  Numbers

#### Query Parameters

| Name                                           | Type   | Description |
| ---------------------------------------------- | ------ | ----------- |
| X-auth Token<mark style="color:red;">\*</mark> | String | JWT-Token   |

#### Headers

| Name                                        | Type    | Description                                                                                    |
| ------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------- |
| Tn\_lease<mark style="color:red;">\*</mark> | Varchar | This field contains the both Tn\_lease UUID and Phone number to enable the sms for that number |

#### Request Body

| Name                                                 | Type   | Description                                     |
| ---------------------------------------------------- | ------ | ----------------------------------------------- |
| Messaging\_profile<mark style="color:red;">\*</mark> | String | This field contains the Messaging\_profile UUID |
| SMS\_campaign<mark style="color:red;">\*</mark>      | String | This field contains the SMS\_campaign UUID      |

{% tabs %}
{% tab title="200: OK Subscription created" %}

```javascript
{
  "success": true,
  "payload": {
    "uuid": "c5cc6326-0023-43d8-81a5-e7b7e019919d",
    "type": "sms",
    "created_on": "2023-01-04T07:52:58.189Z",
    "modified_on": "2023-01-04T07:52:58.189Z",
    "messaging_profile": {
      "uuid": "c5cc6326-0023-43d8-81a5-e7b7e019919d",
      "created_on": "2023-01-04T07:52:58.189Z",
      "modified_on": "2023-01-04T07:52:58.189Z",
      "callback_url": null,
      "name": "default messaging profile",
      "operators": [
        {
          "name": "TMobile",
          "surcharge_sms": 0.001,
          "country": {
            "created_on": "2023-01-04T07:52:58.189Z",
            "modified_on": "2023-01-04T07:52:58.189Z",
            "a2": "US",
            "a3": "USA",
            "name": "UNITED STATES",
            "n": 840,
            "country_code": 1,
            "national_code": null
          },
          "sms": true,
          "created_on": "2023-01-04T07:52:58.189Z",
          "modified_on": "2023-01-04T07:52:58.189Z"
        }
      ]
    },
    "sms_campaign": {
      "is_active": false,
      "campaignId": "CHEOGK3",
      "vertical": "FINANCIAL",
      "description": "Campaign description",
      "usecase": "MARKETING",
      "sample1": "Verification code {number}",
      "sample2": "Account balance {number}",
      "sample3": "Account verification url {url}",
      "sample4": "Welcome {word}, login url {url}",
      "sample5": "Welcome {word}{cr}login url {url}",
      "subscriberHelp": true,
      "helpMessage": "help message",
      "subscriberOptin": true,
      "subscriberOptout": true,
      "autoRenewal": true,
      "embeddedLink": false,
      "embeddedPhone": false,
      "numberPool": false,
      "ageGated": false,
      "directLending": false,
      "affiliateMarketing": false,
      "deleted_on": null,
      "messageFlow": null,
      "mnoIds": [],
      "expired_on": "2023-01-04T07:52:58.189Z",
      "created_on": "2023-01-04T07:52:58.189Z",
      "modified_on": "2023-01-04T07:52:58.189Z",
      "subUsecases": [],
      "blacklist_count": 0,
      "stop_sms_count": 0,
      "sms_sent_count": 0,
      "dca_share": [
        {
          "created_on": "2023-01-04T07:52:58.189Z",
          "modified_on": "2023-01-04T07:52:58.189Z",
          "uuid": "7b8f87f1-8988-4e83-9608-3285b448a05f",
          "status": "ACCEPTED",
          "downstream": "STLTZVV",
          "upstream": "SYNIV",
          "upstream_status": "REGISTERED",
          "upstream_registered_on": "2023-01-04T07:52:58.189Z",
          "upstream_failed_on": "2023-01-04T07:52:58.189Z",
          "upstream_expired_on": null,
          "upstream_reason": null
        }
      ],
      "sms_brand": {
        "brandId": "BERV56F",
        "is_active": true,
        "brand_type": "PUBLIC_PROFIT",
        "brandRelationship": "BASIC_ACCOUNT",
        "displayName": "ABC inc",
        "companyName": "ABC inc",
        "stockExchange": "NASDAQ",
        "stockSymbol": "ABC",
        "vertical": "COMMUNICATION",
        "ein": "123456",
        "einIssuingCountry": {
          "created_on": "2023-01-04T07:52:58.189Z",
          "modified_on": "2023-01-04T07:52:58.189Z",
          "a2": "US",
          "a3": "USA",
          "name": "UNITED STATES",
          "n": 840,
          "country_code": 1,
          "national_code": null
        },
        "altBusinessId": "654321",
        "altBusinessIdType": "NONE",
        "phone": "+15555551234",
        "street": "Wall str",
        "city": "New York",
        "state": "NY",
        "postalCode": "1234",
        "country": {
          "created_on": "2023-01-04T07:52:58.189Z",
          "modified_on": "2023-01-04T07:52:58.189Z",
          "a2": "US",
          "a3": "USA",
          "name": "UNITED STATES",
          "n": 840,
          "country_code": 1,
          "national_code": null
        },
        "email": "abc@ggmail.com",
        "website": "https://google.com",
        "firstName": "Name",
        "lastName": "Last name",
        "identityStatus": "UNVERIFIED",
        "feedback": [
          {
            "id": "TAX_ID",
            "displayName": "Tax Id",
            "description": "Tax id does not match with the company name or business type.",
            "fields": [
              "ein",
              "companyName",
              "entityType"
            ]
          }
        ],
        "vetting": [
          {
            "evpId": "AEGIS",
            "vettingId": "02310c7b-1349-4bdd-997e-08da4e7eba4b",
            "vettingClass": "STANDARD",
            "vettedDate": null,
            "vettingStatus": "ACTIVE",
            "vettingScore": 80,
            "vettingToken": null,
            "vettingDetails": {},
            "reasons": null
          }
        ]
      },
      "created_by": {
        "uuid": "0116f6d1-1280-44b2-9134-da48509ec575",
        "email": "info@opentact.org",
        "wss_online": true,
        "role": "User",
        "created_on": "2023-01-04T07:52:58.189Z",
        "modified_on": "2023-01-04T07:52:58.189Z",
        "deleted_on": null,
        "phone_number": "+1234567890",
        "dob": "2023-01-04T07:52:58.189Z",
        "avatar": "https://google/image.png",
        "first_name": "First Name",
        "last_name": "Last Name",
        "gender": "Female"
      },
      "modified_by": {
        "uuid": "0116f6d1-1280-44b2-9134-da48509ec575",
        "email": "info@opentact.org",
        "wss_online": true,
        "role": "User",
        "created_on": "2023-01-04T07:52:58.189Z",
        "modified_on": "2023-01-04T07:52:58.189Z",
        "deleted_on": null,
        "phone_number": "+1234567890",
        "dob": "2023-01-04T07:52:58.189Z",
        "avatar": "https://google/image.png",
        "first_name": "First Name",
        "last_name": "Last Name",
        "gender": "Female"
      }
    },
    "created_by": {
      "uuid": "0116f6d1-1280-44b2-9134-da48509ec575",
      "email": "info@opentact.org",
      "wss_online": true,
      "role": "User",
      "created_on": "2023-01-04T07:52:58.189Z",
      "modified_on": "2023-01-04T07:52:58.189Z",
      "deleted_on": null,
      "phone_number": "+1234567890",
      "dob": "2023-01-04T07:52:58.189Z",
      "avatar": "https://google/image.png",
      "first_name": "First Name",
      "last_name": "Last Name",
      "gender": "Female"
    }
  }
}

```

{% endtab %}

{% tab title="403: Forbidden Forbidden" %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 500,
  "meta": "string",
  "fields": {
    "params.to": {
      "message": "invalid integer number",
      "value": "qwerty123456789"
    }
  }
}
```

{% endtab %}

{% tab title="404: Not Found Not Found" %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 404,
  "meta": "string",
  "fields": {
    "params.to": {
      "message": "Not Found",
      "value": "qwerty123456789"
    }
  }
}
```

{% endtab %}

{% tab title="500: Internal Server Error Internal server error" %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 500,
  "meta": "string",
  "fields": {
    "params.to": {
      "message": "invalid integer number",
      "value": "qwerty123456789"
    }
  }
}
```

{% endtab %}

{% tab title="400: Bad Request Bad Request" %}

```javascript
{
  "success": false,
  "status": 400,
  "message": "ValidateError"
}
```

{% endtab %}
{% endtabs %}


---

# 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://doc.opentact.org/opentact-api-documentation/untitled-3/sms-enabled-numbers.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.
