NumberProvider

Update a number provider

Changed on

Updates the enabled, priority and config of the given number provider. Omitted fields keep their current value, and at least one of the three fields is required (an empty body returns 400). A request that removes a config key the provider requires while a secret is stored is rejected with 400. config is merged key by key. A key whose value is an empty string is removed. Only the keys the provider allows are accepted, and they are not secrets. When the provider has no stored setting yet, it is created with the provider defaults for the fields that are not sent. Concurrent updates of the same provider's config are not serialized: the last write wins. Requires the project super admin permission.

put/number_providers/{provider_name}

Request

  • Base URL
    https://api.voipbin.net/v1.0
  • URL
    https://api.voipbin.net/v1.0/number_providers/{provider_name}
  • Auth
    none declared

Path parameters

provider_namestring required
Example:telnyx

The name of the number provider. Returned from the provider_name field of the GET /number_providers response. Only the providers the platform supports are accepted (for example telnyx).

Request body

enabledboolean

Whether the provider takes part in the number purchase.

priorityinteger

The purchase order. A lower value is tried first.

configobject

The non-secret settings, merged key by key. A key with an empty string value is removed. At most 8 keys, key up to 32 bytes and value up to 256 bytes. Only the keys the provider allows are accepted (Telnyx: connection_id, profile_id; Twilio: sid, trunk_sid).

Example request

{
  "enabled": true,
  "priority": 10,
  "config": {
    "connection_id": "1234567890123456789",
    "profile_id": "9876543210987654321"
  }
}

Response

The updated number provider.

provider_namestring

The name of the number provider.

enabledboolean

Whether the provider takes part in the number purchase.

priorityinteger

The purchase order. A lower value is tried first; ties are ordered by provider_name.

configobject

The non-secret settings of the provider (for example the Telnyx connection_id). Omitted when empty.

has_secretboolean

Whether a secret is stored through the API. The secret itself is never returned.

key_versioninteger

The version of the encryption key that encrypted the stored secret. 0 when no secret is stored.

credential_source'db' | 'env' | 'none' | 'db_undecryptable'

Where the credentials of the number provider come from. db is the secret stored through the API, env is the platform environment, none means no credential exists, and db_undecryptable means a stored secret exists but cannot be decrypted (the provider is unusable until the encryption key is restored or the stored secret is deleted).

usableboolean

Whether the provider can currently serve (enabled, with a usable credential and its required config; Twilio needs sid and trunk_sid, which the environment credentials cannot give). An enabled and usable provider takes part in number purchase.

updated_bystring uuid

The agent who last changed enabled, priority or config. The agent ID returned from the GET /agents response. Omitted when never changed.

secret_updated_bystring uuid

The agent who last changed the secret. The agent ID returned from the GET /agents response. Omitted when never changed.

tm_updatestring date-time

The timestamp of the last change of the setting, including a secret change. Omitted when never changed.

tm_secret_updatestring date-time

The timestamp of the last secret change. Omitted when never changed.

Example response

{
  "provider_name": "telnyx",
  "enabled": true,
  "priority": 10,
  "config": {
    "connection_id": "1234567890123456789"
  },
  "has_secret": true,
  "key_version": 1,
  "credential_source": "db",
  "usable": true,
  "updated_by": "550e8400-e29b-41d4-a716-446655440000",
  "secret_updated_by": "00000000-0000-4000-8000-000000000002",
  "tm_update": "2026-01-02T03:04:05.000000Z",
  "tm_secret_update": "2026-01-03T04:05:06.000000Z"
}

Changes