Purchase Phone Number
Purchase a phone number for your workspace.
POST
Headers
x-api-keystringrequiredAPI key used for authenticating requests to the API.
x-workspace-idstringrequiredWorkspace identifier for the API.
Request Body
countrystringrequiredCountry code for the phone number (e.g., "US", "CA").
typestringrequiredType of phone number. Options: "local", "tollFree", "mobile".
phoneNumberstringrequiredThe specific phone number to purchase in E.164 format.
addressSidstringAddress SID for regulatory compliance (required for some countries).
couponstringCoupon code for a discount.
Response Fields
successbooleanWhether the purchase was successful.
phoneNumberobjectThe purchased phone number details.
_idstringUnique identifier for the phone number record.
phoneNumberstringThe purchased phone number in E.164 format.
countrystringCountry code.
typestringPhone number type.
{
"success": true,
"phoneNumber": {
"_id": "665a1b2c3d4e5f6a7b8c9d0e",
"phoneNumber": "+14155551234",
"country": "US",
"type": "local",
"status": "active",
"workspaceId": "664a1b2c3d4e5f6a7b8c9d0e"
}
}