Buy phone number
Buy a new caller ID. With campaignId it is assigned to that campaign at once: the campaign determines the agent and project, and the campaign must already have an agent. Without campaignId it stays in the agency pool, billed from purchase, until you assign it with Assign phone number; pass locationId to buy it for one client project. Pass phoneNumber from Search available phone numbers to choose a specific number, or use the available number preferences. If that number was taken between the search and this call, the call answers 409: search again and pick another. This is a paid action: it buys a real number on the agency account, and the agency needs a payment method on file. To use a number you already own, use Assign phone number. Not for a TFU Live rep: a TFU Live campaign is refused here, and its number is bought with Buy a TFU Live number. Allowed customer role: agency_admin.
Required API key scope: phone_numbers:write.
Authorizations
Send your API key as Authorization: Bearer YOUR_API_KEY.
Body
Optional campaign, and number purchase constraints.
Campaign that will receive the purchased caller ID. Leave it out to keep the number in the agency pool and assign it later.
"campaign_speed_to_lead_123"
With no campaignId: the client project the number is for. Must be one of the agency's projects. Ignored when campaignId is set, because the campaign names its project.
1"loc_9f7a123"
Three-digit area code preference.
200 <= x <= 999415
Country for the new phone number.
US, CA "US"
Request a toll-free number.
false
Specific E.164 number selected from search.
^\+\d{10,15}$"+14155559876"
