Skip to main content
GET
/
api
/
v2
/
platform
/
telephony
/
providers
Get Telephony Providers
curl --request GET \
  --url http://localhost:3001/api/v2/platform/telephony/providers/ \
  --header 'Authorization: <api-key>' \
  --header 'Org-Handle: <org-handle>'
{
  "status_code": 200,
  "message": "Voice infra providers fetched successfully.",
  "data": [
    {
      "id": 1,
      "name": "Twilio",
      "slug": "twilio"
    },
    {
      "id": 2,
      "name": "Plivo",
      "slug": "plivo"
    }
  ]
}
{
  "status_code": 200,
  "message": "Voice infra providers fetched successfully.",
  "data": [
    {
      "id": 1,
      "name": "Twilio",
      "slug": "twilio"
    },
    {
      "id": 2,
      "name": "Plivo",
      "slug": "plivo"
    }
  ]
}

Get Telephony Providers

Retrieve a list of all available telephony providers in the system. These are the supported providers that you can configure credentials for using the Provider Configurations endpoints.
Prerequisites: Make sure you have your API Token and Org-Handle ready. See Authentication for details.

Get Telephony Providers

Retrieve all supported telephony providers available for configuration.
GET /api/v2/platform/telephony/providers/

Headers

NameTypeRequiredDescription
AuthorizationstringYesAPI Key format: Token <token>
Org-HandlestringYesOrganization domain handle
You can get the Org-Handle by hitting the Get All Organizations API. The domain_handle field in the response is your Org-Handle.

Response Fields

FieldTypeDescription
status_codeintegerHTTP status code
messagestringResponse message
dataarrayArray of provider objects

Provider Object Fields

FieldTypeDescription
idintegerProvider unique identifier
namestringProvider display name
slugstringURL-friendly provider identifier used in config API

Common Error Codes

Status CodeDescription
200Success - Providers fetched successfully
401Unauthorized - Invalid or missing API token
403Forbidden - Invalid organization handle
500Internal Server Error - Server-side error

Code Examples

const axios = require('axios');

const headers = {
  'Authorization': 'Token your-api-token',
  'Org-Handle': 'your-org-handle'
};

// Get all available telephony providers
const getTelephonyProviders = async () => {
  const response = await axios.get(
    'https://unpod.dev/api/v2/platform/telephony/providers/',
    { headers }
  );
  console.log(`Available providers: ${response.data.data.length}`);
  response.data.data.forEach(provider => {
    console.log(`${provider.name} (id: ${provider.id}, slug: ${provider.slug})`);
  });
  return response.data.data;
};

// Example usage
getTelephonyProviders();

Best Practices

  1. Provider ID: Use the id field when creating provider configurations via the Create Provider endpoint
  2. Provider Selection: Choose the provider that best suits your region and call volume requirements
  3. Caching: Cache the providers list locally since it changes infrequently
  4. Error Handling: Always handle potential errors and implement retry logic
  5. Security: Keep API tokens secure and rotate them regularly

Authorizations

Authorization
string
header
required

Format: Token

Headers

Org-Handle
string
required

Organization domain handle

Example:

"unpod"

Response

List of available telephony providers