Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Send your API key as Authorization: Bearer YOUR_API_KEY.

Path Parameters

id
string
required

Agent id returned by the Agents API.

Minimum string length: 1

Body

application/json

Number purchase constraints.

areaCode
integer

Three-digit area code preference.

Required range: 200 <= x <= 999
Example:

415

countryCode
enum<string>

Country for the new phone number.

Available options:
US,
CA
Example:

"US"

tollFree
boolean

Request a toll-free number.

Example:

false

phoneNumber
string

Specific E.164 number selected from search.

Pattern: ^\+\d{10,15}$
Example:

"+14155559876"

locationId
string

Project location id used to disambiguate shared-agent contexts.

Example:

"loc_9f7a123"

campaignId
string

Campaign id used to attach the number to one campaign.

Example:

"campaign_speed_to_lead_123"

Response

Phone number purchased and attached.

success
boolean
required
phoneNumber
object
required