POST
/
v1
/
inbound
/
purchase
curl --request POST \
  --url https://api.bland.ai/v1/inbound/purchase \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '{
  "area_code": "<string>",
  "prompt": "<string>",
  "country_code": "<string>",
  "webhook": "<string>",
  "phone_number": "<string>"
}'
{
  "phone_number": "+18582814611"
}

Headers

authorization
string
required

Your API key for authentication.

Body

area_code
string
default: "415"

Choose a three-digit area code for your phone number. If set as a parameter, a number will only be purchased by exact match if available.

prompt
string

This defines how the AI will start the conversation, information available to it, and its behaviors. Matches how the outbound task parameter functions.

country_code
string
default: "US"

Choose a country code for your phone number.

Options: "US" or "CA" for Canada. For others, please contact support.

webhook
string

The webhook should be a http / https callback url. We will send the call_id and transcript to this URL after the call completes. This can be useful if you want to have real time notifications when calls finish.

phone_number
string

Specify an exact phone number you’d like to use. If provided, will override the area_code parameter and does not fall back to any other number.

Example of the correct format (Note the "+1" is mandatory): "+12223334444"

Response

phone_number
string

The created phone number, will be in the following format: +1XXXXXXXXXX

Example: +18582814611