Skip to main content
POST
/
twilio
/
buy
/
number
Twilio Buy Number
curl --request POST \
  --url https://app.closerx.ai/api/twilio/buy/number/ \
  --header 'Company-Name: <company-name>' \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '
{
  "twilio_sid": "<string>",
  "auth_token": "<string>",
  "phone_number": "+12154346029",
  "friendly_name": "ttesting",
  "new_number": true
}
'
{
  "success": true,
  "message": "contact number added",
  "data": {}
}

Authorizations

api_key
string
header
required

Headers

Company-Name
string
required

Schema name for multi-tenancy

Body

application/json
twilio_sid
string
required

Twilio account SID used to authenticate.

auth_token
string
required

Twilio Auth Token for the given SID.

phone_number
string
required

The Twilio phone number to be purchased.

Example:

"+12154346029"

friendly_name
string
required

Custom nickname for the phone number.

Example:

"ttesting"

new_number
boolean
required

Flag indicating if a new number is being purchased.

Response

Contact number added successfully

success
boolean
Example:

true

message
string
Example:

"contact number added"

data
object

Contains additional data if any