> For the complete documentation index, see [llms.txt](https://docs.etelecom.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.etelecom.vn/api-etelecom-english/api-integration/vpbx/pbx-rest-apis/get-extension-list.md).

# Get extension list

This API is used to get the list of extensions created on the tenant.

{% hint style="info" %}
**Note:**

* For APIs used for Shop, the API key is: [`<api_key>`](https://docs.etelecom.vn/api-etelecom-english/api-integration/shop/account.md). The base\_url information of the [Shop](https://docs.etelecom.vn/api-etelecom-english/api-integration/shop/account.md).
* For APIs used for Partner, the API key is: [`<shop_key>`](https://docs.etelecom.vn/api-etelecom-english/api-integration/partner/usage.md#retrieve-the-shop_key-information). The base\_url information of the [Partner](https://docs.etelecom.vn/api-etelecom-english/api-integration/partner/account.md).
  {% endhint %}

{% openapi src="/files/98tvgFAALfk6gcxXW2re" path="$BASE\_URL.ETelecom/GetExtensions" method="post" %}
[Etelecom.swagger.json](https://1712041776-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzzTMjVbVjwTuSbEGC7Ya%2Fuploads%2Fgit-blob-a79f1cdcdf6c0710885851e38f1e6c641fafb69b%2FEtelecom.swagger.json?alt=media)
{% endopenapi %}

**Request:**

```
curl --location '$BASE_URL.Etelecom/GetExtensions' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API-KEY' \
--data '{
  "paging": {
    "after": "<string>",
    "before": "<string>",
    "limit": "<integer>",
    "sort": "<string>"
  }
}'
```

**Response:**

```
{
  "extensions": [
    {
      "account_id": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "expires_at": "2019-08-24T14:15:22Z",
      "extension_number": "string",
      "extension_password": "string",
      "hotline_id": "string",
      "id": "string",
      "state": "Z",
      "subscription_id": "string",
      "tenant_domain": "string",
      "tenant_id": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "user_id": "string"
    }
  ],
  "paging": {
    "after": "string",
    "before": "string",
    "limit": 0,
    "next": "string",
    "prev": "string",
    "sort": "string"
  }
}
```

**Return data attribute structure:**

<table><thead><tr><th width="208">School name</th><th width="121">Data type</th><th>Describe</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Extension ID</td></tr><tr><td>extension_number</td><td>string</td><td>Extension number</td></tr><tr><td>extension_password</td><td>string</td><td>Extension password</td></tr><tr><td>tenant_domain</td><td>string</td><td>Switchboard domain</td></tr><tr><td>hotline_id</td><td>string</td><td>Hotline ID assigned to extension</td></tr><tr><td>created_at</td><td>string</td><td>Extension creation date</td></tr><tr><td><p>expires_at</p><p><br></p></td><td>string</td><td>Extension Expiration Date (eg: "2021-03-10T17:07:19+07:00")</td></tr></tbody></table>
