Numbers
Buy Number
Numbers
Buy Number
POST
/
v1
/
numbers
/
buy
curl --request POST \
--url https://api.vocode.dev/v1/numbers/buy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"area_code": "<string>",
"telephony_provider": "vonage",
"telephony_account_connection": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active": true,
"label": "<string>",
"inbound_agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"prompt": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": "<string>",
"collect_fields": [
{
"field_type": "field_type_email",
"label": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"context_endpoint": "<string>",
"prompt_template": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"required_context_keys": [
"<string>"
]
}
},
"language": "en",
"actions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "action_transfer_call",
"config": {
"phone_number": "<string>"
},
"action_trigger": {
"type": "action_trigger_function_call",
"config": {}
}
}
],
"voice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "voice_azure",
"voice_name": "<string>",
"pitch": 123,
"rate": 123
},
"initial_message": "<string>",
"webhook": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscriptions": [
"event_message"
],
"url": "<string>",
"method": "GET"
},
"vector_database": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "vector_database_pinecone",
"index": "<string>",
"api_key": "<string>",
"api_environment": "<string>"
},
"interrupt_sensitivity": "low",
"context_endpoint": "<string>",
"noise_suppression": true,
"endpointing_sensitivity": "auto",
"ivr_navigation_mode": "default",
"conversation_speed": 123,
"initial_message_delay": 123,
"openai_model_name_override": "<string>",
"ask_if_human_present_on_idle": true,
"openai_account_connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": {
"openai_api_key": "<string>"
},
"type": "account_connection_openai"
},
"run_do_not_call_detection": true,
"llm_temperature": 123
},
"outbound_only": true,
"example_context": {},
"number": "<string>",
"telephony_provider": "vonage",
"telephony_account_connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": {
"twilio_account_sid": "<string>",
"twilio_auth_token": "<string>"
},
"type": "account_connection_twilio",
"steering_pool": [
"<string>"
],
"account_supports_any_caller_id": true
}
}
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
area_code
string
telephony_provider
enum<string>
default: vonageAvailable options:
vonage
, twilio
telephony_account_connection
string
Response
200 - application/json
id
string
requireduser_id
string
requiredactive
boolean
default: truelabel
string
default: inbound_agent
object
requiredinbound_agent.id
string
requiredinbound_agent.user_id
string
requiredinbound_agent.name
string
inbound_agent.prompt
object
requiredinbound_agent.prompt.id
string
requiredinbound_agent.prompt.user_id
string
requiredinbound_agent.prompt.content
string
default: inbound_agent.prompt.collect_fields
object[]
inbound_agent.prompt.collect_fields.field_type
enum<string>
requiredAvailable options:
field_type_email
inbound_agent.prompt.collect_fields.label
string
requiredinbound_agent.prompt.collect_fields.name
string
requiredinbound_agent.prompt.collect_fields.description
string
inbound_agent.prompt.context_endpoint
string
inbound_agent.prompt.prompt_template
object
inbound_agent.prompt.prompt_template.id
string
requiredinbound_agent.prompt.prompt_template.user_id
string
requiredinbound_agent.prompt.prompt_template.label
string
default: inbound_agent.prompt.prompt_template.required_context_keys
string[]
requiredinbound_agent.language
enum<string>
An enumeration.
Available options:
en
, es
, de
, hi
, pt
, fr
, nl
, id
, it
, ja
, ko
inbound_agent.actions
object[]
requiredinbound_agent.actions.id
string
requiredinbound_agent.actions.user_id
string
requiredinbound_agent.actions.type
enum<string>
requiredAvailable options:
action_transfer_call
inbound_agent.actions.config
object
requiredinbound_agent.actions.config.phone_number
string
requiredinbound_agent.actions.action_trigger
object
inbound_agent.actions.action_trigger.type
enum<string>
requiredAvailable options:
action_trigger_function_call
inbound_agent.actions.action_trigger.config
object
inbound_agent.voice
object
requiredinbound_agent.voice.id
string
requiredinbound_agent.voice.user_id
string
requiredinbound_agent.voice.type
enum<string>
requiredAvailable options:
voice_azure
inbound_agent.voice.voice_name
string
requiredinbound_agent.voice.pitch
integer
default: 0inbound_agent.voice.rate
integer
default: 15inbound_agent.initial_message
string
inbound_agent.webhook
object
inbound_agent.webhook.id
string
requiredinbound_agent.webhook.user_id
string
requiredinbound_agent.webhook.subscriptions
enum<string>[]
requiredAvailable options:
event_message
, event_action
, event_phone_call_connected
, event_phone_call_ended
, event_phone_call_did_not_connect
, event_transcript
, event_recording
, event_human_detection
inbound_agent.webhook.url
string
requiredinbound_agent.webhook.method
enum<string>
An enumeration.
Available options:
GET
, POST
inbound_agent.vector_database
object
inbound_agent.vector_database.id
string
requiredinbound_agent.vector_database.user_id
string
requiredinbound_agent.vector_database.type
enum<string>
requiredAvailable options:
vector_database_pinecone
inbound_agent.vector_database.index
string
requiredinbound_agent.vector_database.api_key
string
requiredinbound_agent.vector_database.api_environment
string
requiredinbound_agent.interrupt_sensitivity
enum<string>
An enumeration.
Available options:
low
, high
inbound_agent.context_endpoint
string
inbound_agent.noise_suppression
boolean
default: falseinbound_agent.endpointing_sensitivity
enum<string>
default: autoAvailable options:
auto
, relaxed
, sensitive
inbound_agent.ivr_navigation_mode
enum<string>
default: offAvailable options:
default
, off
inbound_agent.conversation_speed
number
default: 1inbound_agent.initial_message_delay
number
default: 0inbound_agent.openai_model_name_override
string
inbound_agent.ask_if_human_present_on_idle
boolean
default: falseinbound_agent.openai_account_connection
object
inbound_agent.openai_account_connection.id
string
requiredinbound_agent.openai_account_connection.user_id
string
requiredinbound_agent.openai_account_connection.credentials
object
requiredinbound_agent.openai_account_connection.credentials.openai_api_key
string
requiredinbound_agent.openai_account_connection.type
enum<string>
requiredAvailable options:
account_connection_openai
inbound_agent.run_do_not_call_detection
boolean
default: falseinbound_agent.llm_temperature
number
default: 0outbound_only
boolean
default: falseexample_context
object
number
string
requiredtelephony_provider
enum<string>
default: vonageAvailable options:
vonage
, twilio
telephony_account_connection
object
telephony_account_connection.id
string
requiredtelephony_account_connection.user_id
string
requiredtelephony_account_connection.credentials
object
requiredtelephony_account_connection.credentials.twilio_account_sid
string
requiredtelephony_account_connection.credentials.twilio_auth_token
string
requiredtelephony_account_connection.type
enum<string>
requiredAvailable options:
account_connection_twilio
telephony_account_connection.steering_pool
string[]
telephony_account_connection.account_supports_any_caller_id
boolean
default: falsecurl --request POST \
--url https://api.vocode.dev/v1/numbers/buy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"area_code": "<string>",
"telephony_provider": "vonage",
"telephony_account_connection": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active": true,
"label": "<string>",
"inbound_agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"prompt": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": "<string>",
"collect_fields": [
{
"field_type": "field_type_email",
"label": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"context_endpoint": "<string>",
"prompt_template": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"required_context_keys": [
"<string>"
]
}
},
"language": "en",
"actions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "action_transfer_call",
"config": {
"phone_number": "<string>"
},
"action_trigger": {
"type": "action_trigger_function_call",
"config": {}
}
}
],
"voice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "voice_azure",
"voice_name": "<string>",
"pitch": 123,
"rate": 123
},
"initial_message": "<string>",
"webhook": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscriptions": [
"event_message"
],
"url": "<string>",
"method": "GET"
},
"vector_database": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "vector_database_pinecone",
"index": "<string>",
"api_key": "<string>",
"api_environment": "<string>"
},
"interrupt_sensitivity": "low",
"context_endpoint": "<string>",
"noise_suppression": true,
"endpointing_sensitivity": "auto",
"ivr_navigation_mode": "default",
"conversation_speed": 123,
"initial_message_delay": 123,
"openai_model_name_override": "<string>",
"ask_if_human_present_on_idle": true,
"openai_account_connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": {
"openai_api_key": "<string>"
},
"type": "account_connection_openai"
},
"run_do_not_call_detection": true,
"llm_temperature": 123
},
"outbound_only": true,
"example_context": {},
"number": "<string>",
"telephony_provider": "vonage",
"telephony_account_connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": {
"twilio_account_sid": "<string>",
"twilio_auth_token": "<string>"
},
"type": "account_connection_twilio",
"steering_pool": [
"<string>"
],
"account_supports_any_caller_id": true
}
}