How to buy Numbers using API

You can use API to buy Number

To buy numbers, you can access from the following url:

POSThttps://api.globalsms.io/api/orders/create_number_order

Query Parameters

Name
Type
Description

counter

string

This is the UUID for your number.

duration

integer

This is the number of days you want these numbers.

condition

string

This is the condition of the number. Allowed values are "new" and "used"

pay_method

string

This is the type of order. Allowed values are : 'pay_per_did','pay_per_sms'

type

string

This is tyep tpe of SMS. We support both "sms" or "voice" verification.

country

string

This is the country where you want to buy number from. Allowed values are 'US' or 'CA'.

vendor_uuid

string

This is the vendor's uuid.

Example API calls for placing number order

curl -X 'POST'  
  'https://api.globalsms.io/api/orders/create_number_order'  
  -H 'accept: */*'  
  -H 'Authorization: Bearer eyJhbGciOiJsssssNiIsInR5cCI6IkpXVCJ9.dr3dfs2lkIjo3MSwiZmlyc3RfbmFtZSI6bnVsbCwibGFzdF9uYW1lIjpudWxsLCJlbWFpbCI6InBldGVkYW9AZ21haWwuY29tIiwiaXNfYWRtaW4iOmZhbHNlLCJsYXN0X2ZlIjp0cnVlLCJjcmVhdGVkX29uIjoiMjAyNC0wNi0xMlQxMjowNToyNC45MjRaIiwiaXNfcGVyc2lzdCI6bnVsbCwiYWxlcnRfb25fZGVsaXZlcnlfZXJyb3IiOm51bGwsImFsZXJ0X29uX29yZGVyX2V4cGlyYXRpb24iOm51bGwsImxvZ2luX2lwIjoiMTI3LjAuMC4xIiwicmVnaXN0ZXJfaXAiOm51bGwsInJlZ2lzdGVyZWRfb24iOm51bGwsImRlbGV0ZWQiOmZhbHNlLCJkZWxldGVkX29uIjpudWxsLCJpc19zdXBlcnVzZXIiOm51bGwsImlzX3Jlc2VsbGVyIjpudWxsLCJyZXNlbGxlcl91dWlkIjpudWxsLCJpYXQiOjE3MTkzMzAzMDQsImV4cCI6MTcxOTQxNjcwNH0.zLaCSoG59y90TVOyTw5V83JDvQVln8KXlBkIpl781HA' \
  -H 'Content-Type: application/json'  
  -d '{
  "app_uuid": [
    "a8933a9b-749e-4eca-8a22-be4dd1056cbb"
  ],
  "count": 5,
  "duration": 5,
  "condition": "new",
  "pay_method": "pay_per_did",
  "type": "sms",
  "country": "US",
  "vendor_uuid": "f307233e-d2ba-4eb0-bede-edb2cef9f8dd"
}' 

This API will return order_uuid. You can use the order_uuid to get the list of Numbers assigned to each order.

Last updated

Was this helpful?