List phone numbers

Updated

Retrieves the phone numbers in your project.

Preview documentation

You're reading the Conversational AI Platform (Preview) docs. Switch to Main.
GET
https://preview.ai.agora.io/conversational-ai/v1/projects/{appid}/numbers

Path Parameters

appidstring
Required

The App ID of your project.

Query Parameters

limitinteger

The maximum number of phone numbers to return on each page.

cursorstring

The next_cursor value from the previous page of results. Omit it to get the first page. The cursor is opaque, so pass it back unchanged.

orderstring

The sort order of the results:

  • create_ts.desc: Newest first.
  • create_ts.asc: Oldest first.

Response Body

The request was successful. The response body contains a page of phone numbers.

Response Headers

Agora-Request-Idstring

A unique ID for the request. Include it when you contact Agora support.

dataobject
has_moreboolean

Whether more results are available after this page.

next_cursorstring | null

The cursor for the next page. Pass it in the cursor query parameter of your next request. null on the last page.

Authorization

This endpoint requires authentication.

Request examples

Example Request
curl -X GET 'https://preview.ai.agora.io/conversational-ai/v1/projects/string/numbers'

Response example

Example Response
{  "data": {    "count": 1,    "list": [      {        "number_id": "92e68758-3d3a-4f27-8b93-3fd8d834467c",        "number": "+14155550100",        "description": "Primary customer support line for North America.",        "sip_trunk": {          "name": "support-line",          "hostname": "acme.pstn.example.com",          "port": 5061,          "transport": "tls"        },        "inbound": {          "agent": "3f6c2a9e-8d1b-4e7a-9c55-0b2f7d1e4a10",          "call_policy": {            "max_call_duration_seconds": 1800,            "max_silence_duration_ms": 60000,            "end_call": {              "on_user_request": true            }          }        },        "create_ts": 1787223852      }    ]  },  "has_more": false,  "next_cursor": null}