Voiceflow bearer token
curl --request POST \
--url https://realtime-api.voiceflow.com/v1/stable/phone-number \
--header 'Authorization: Bearer <token>'
--header 'Content-Type: application/json' \
--data '{
"name": "",
"workspaceID": "<string>",
"provider": "voiceflow-telnyx",
"areaCode": 0,
"country": "CA"
}'const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/phone-number', {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "",
"workspaceID": "<string>",
"provider": "voiceflow-telnyx",
"areaCode": 0,
"country": "CA"
}),
});
const data = await response.json();import requests
response = requests.post(
'https://realtime-api.voiceflow.com/v1/stable/phone-number',
headers={'Authorization': 'Bearer <token>'},
json={
"name": "",
"workspaceID": "<string>",
"provider": "voiceflow-telnyx",
"areaCode": 0,
"country": "CA"
},
)
data = response.json()vf phone-number create \
< body.json{
"phoneNumber": {
"id": "<string>",
"sms": {
"version": "draft",
"projectID": "<string>",
"environmentAlias": "<string>"
},
"name": "<string>",
"value": "<string>",
"voice": {
"version": "draft",
"projectID": "<string>",
"environmentAlias": "<string>"
},
"provider": "twilio",
"workspaceID": "<string>",
"providerResourceID": "<string>",
"createdAt": "2026-09-10T00:00:00.000Z",
"updatedAt": "2026-09-10T00:00:00.000Z"
}
}Create phone number
Adds a phone number to a workspace, either by buying one through Voiceflow or by connecting a number you already own with its provider credentials. A new number is assigned to nothing and answers nothing until you assign it.
curl --request POST \
--url https://realtime-api.voiceflow.com/v1/stable/phone-number \
--header 'Authorization: Bearer <token>'
--header 'Content-Type: application/json' \
--data '{
"name": "",
"workspaceID": "<string>",
"provider": "voiceflow-telnyx",
"areaCode": 0,
"country": "CA"
}'const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/phone-number', {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "",
"workspaceID": "<string>",
"provider": "voiceflow-telnyx",
"areaCode": 0,
"country": "CA"
}),
});
const data = await response.json();import requests
response = requests.post(
'https://realtime-api.voiceflow.com/v1/stable/phone-number',
headers={'Authorization': 'Bearer <token>'},
json={
"name": "",
"workspaceID": "<string>",
"provider": "voiceflow-telnyx",
"areaCode": 0,
"country": "CA"
},
)
data = response.json()vf phone-number create \
< body.json{
"phoneNumber": {
"id": "<string>",
"sms": {
"version": "draft",
"projectID": "<string>",
"environmentAlias": "<string>"
},
"name": "<string>",
"value": "<string>",
"voice": {
"version": "draft",
"projectID": "<string>",
"environmentAlias": "<string>"
},
"provider": "twilio",
"workspaceID": "<string>",
"providerResourceID": "<string>",
"createdAt": "2026-09-10T00:00:00.000Z",
"updatedAt": "2026-09-10T00:00:00.000Z"
}
}Authorizations
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
201 - application/jsonReturns the new phone number with its ID, value, and provider. Its voice and sms targets are null because it is not assigned to a project yet.
Show child attributes
Where incoming SMS go, or null when nothing handles SMS on this number.
Show child attributes
The alias of the environment this side of the number reaches (e.g. main). Null in two cases: the number is assigned to the project with no environment pinned, or the environment it was pinned to has since been deleted — version is still whatever the pin asked for, so a null alias beside a non-null version is the second case.
Where incoming calls go, or null when nothing handles calls on this number.
Show child attributes
The alias of the environment this side of the number reaches (e.g. main). Null in two cases: the number is assigned to the project with no environment pinned, or the environment it was pinned to has since been deleted — version is still whatever the pin asked for, so a null alias beside a non-null version is the second case.
Was this page helpful?
Thanks for your feedback.