Store the secret of a number provider
Changed onStores the secret (for example the API token) of the given number provider, encrypted. The secret is write-only: it is never returned, logged or placed in an event. The response tells only has_secret, the key_version that encrypted it and who changed it. The value is trimmed of surrounding whitespace, and must be 1 to 1024 bytes long after that (multi-byte characters count per byte). The provider's required config keys must already be set (see PUT /number_providers/{provider_name}), otherwise the request is rejected with 400. When the platform has no encryption key the request is answered with 503 before the config rule is checked. Replacing the secret with the token of another account makes the numbers purchased through the previous account impossible to release. Requires the project super admin permission.
Request
- Base URLhttps://api.voipbin.net/v1.0
- URLhttps://api.voipbin.net/v1.0/number_providers/{provider_name}/secret
- Authnone declared
Path parameters
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
Example request
{
"secret": "example-secret-token"
}Response
The number provider with the secret stored. The secret is not included.
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
- info
endpoint added
- info