API reference / v2.1 / Credentials
API credentials.
Every VoiceTel account is provisioned with a single API key that authorizes every REST endpoint. Retrieve it from the portal, then attach it to each request using either an Authorization header or an apikey field in the JSON body.
Authentication
Two interchangeable schemes are supported. Pick whichever fits your client:
Bearer header (recommended)
RFC 6750 bearer token. The standard Authorization header keeps secrets out of request bodies, query strings, and access logs that capture URLs but not headers.
curl -X POST 'https://api.voicetel.com/v2.1/info/cnam' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ "cid": 2015551234 }'
JSON payload
For clients that cannot set custom request headers, the API key may be passed as an apikey field on the JSON request body. Functionally equivalent; choose only when the Bearer header is impractical.
curl -X POST 'https://api.voicetel.com/v2.1/info/cnam' \
-H 'Content-Type: application/json' \
-d '{
"apikey": "YOUR_API_KEY",
"cid": 2015551234
}'
If both are present, the header takes precedence.
Retrieve via API
The portal is the simplest path, but you can also retrieve the key programmatically by POSTing your account credentials to /v2.1/account/apikey/. This is the bootstrap call — the only v2.1 endpoint that accepts username and password in the request body. Every other request uses the resulting key via Bearer header or the apikey JSON field.
Request
POST https://api.voicetel.com/v2.1/account/apikey/
Content-Type: application/json
{
"username": 1234567890,
"password": "your-account-password"
}
Response
200 OK
Content-Type: application/json
{
"statusCode": "200",
"status": "Success",
"apikey": "abc123abc123abc123abc123abc123ab"
}
Try it
Submit your account credentials below. The request runs from this browser straight to api.voicetel.com; nothing passes through the VoiceTel website backend. The password field is cleared on success.