Purchase a new phone number for the account. You can specify search criteria or let the system select a random number.
Authorization
authorization In: header
Path Parameters
The account for which the phone number should be created.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://api.surge.app/accounts/acct_01j9a43avnfqzbjfch6pygv1td/phone_numbers" \ -H "Content-Type: application/json" \ -d '{ "description": "Purchase any available local number", "summary": "Random local number", "value": { "type": "local" } }'{
"campaign_id": "cpn_01jjnn7s0zfx5tdcsxjfy93et2",
"id": "pn_01jsjwe4d9fx3tpymgtg958d9w",
"name": "(801) 555-1234",
"number": "+18015551234",
"type": "local"
}{
"error": {
"message": "The requested resource could not be found.",
"type": "not_found"
}
}