Skip to main content
POST
https://api.getmalakai.com/api/
/
api
/
callers
/
buy-phone-number
Buy a phone number
curl --request POST \
  --url https://api.getmalakai.com/api/api/callers/buy-phone-number \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <x-access-token>' \
  --data '
{
  "phone_number": "<string>",
  "address_sid": "<string>",
  "bundle_sid": "<string>"
}
'
{
  "message": "<string>",
  "data": [
    {}
  ]
}

Headers

Authorization
string
required
Your API key for authentication. Prefix with Bearer .
x-access-token
string
required
Your access token for authentication.

Body

The request body must contain a phone_number.
phone_number
string
required
The phone number to be bought.
address_sid
string
The geographical prefix for the number to be bought. This can be fetched from the GetTwilioAddress api (only in the case of UK number)
bundle_sid
string
The bundle sid that can be fetched from GetTwilioBundle api (only in the case of UK number)

Request Example

{
    "phone_number": "+17123123123",
    "address_sid": "",
    "bundle_sid": ""
}

Response

message
string
Status of the request in the form of a short message.
data
object[]
Information related to the phone number returned