> For the complete documentation index, see [llms.txt](https://doc.opentact.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.opentact.org/opentact-api-documentation/sip-connection/update-number-for-a-sip-connection.md).

# Assign Number to a SIP Connection

## Assign number to a SIP connection

<mark style="color:green;">`POST`</mark> `https://api.opentact.org/rest/sip/connection/UUID/tnlease`

This api is used to assign the number for a SIP Connection.

#### Query Parameters

| Name                                     | Type   | Description                                                                                                                                          |
| ---------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| UUID<mark style="color:red;">\*</mark>   | String | This field contains the UUID of the sip connection which the user needs to remove the number                                                         |
| UUID<mark style="color:red;">\*</mark>   | String | This field contains the uuid of the number that the user going to add to the sip connection.                                                         |
| REMOVE<mark style="color:red;">\*</mark> | String | <p>This field is used to ADD the number from the sip connection. it should be used in the below format.</p><p>"ADD": \[ "UUID", "UUID", "UUID" ]</p> |

#### Headers

| Name                                            | Type   | Description      |
| ----------------------------------------------- | ------ | ---------------- |
| Authorization<mark style="color:red;">\*</mark> | String | JWT\_Token       |
| Content-Type                                    | String | Application/json |

{% tabs %}
{% tab title="200: OK TN leases" %}

```javascript
{
  "success": true,
  "payload": [
    "b243f4a2-1bf0-4173-b822-0426486edf3a",
    "b243f4a2-1bf0-4173-b822-0426486edf3b"
  ]
}
```

{% 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": 500,
  "meta": "string",
  "fields": {
    "params.to": {
      "message": "invalid integer number",
      "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 %}
{% endtabs %}
