Surge
GET
/accounts/{account_id}/phone_numbers

List all phone numbers for an account with cursor-based pagination.

Authorization

authorization
AuthorizationBearer <token>

In: header

Path Parameters

account_id*string

The account ID to list phone numbers for.

Query Parameters

after?string

Cursor for forward pagination. Use the next_cursor from a previous response.

before?string

Cursor for backward pagination. Use the previous_cursor from a previous response.

Response Body

application/json

application/json

curl -X GET "https://api.surge.app/accounts/acct_01j9a43avnfqzbjfch6pygv1td/phone_numbers"
{
  "data": [
    {
      "campaign_id": null,
      "id": "pn_01jsjwe4d9fx3tpymgtg958d9w",
      "name": "(801) 555-1234",
      "number": "+18015551234",
      "type": "local"
    }
  ],
  "pagination": {
    "next_cursor": null,
    "previous_cursor": null
  }
}
{
  "error": {
    "message": "The requested resource could not be found.",
    "type": "not_found"
  }
}