> For the complete documentation index, see [llms.txt](https://doc.globalsms.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.globalsms.io/english-how-to/how-to-buy-numbers-using-api.md).

# How to buy Numbers using API

You can use API to buy Number

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

<mark style="color:blue;">`POST`</mark><https://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.                                                               |

{% hint style="info" %}
Example API calls for placing number order

```bash
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"
}' 
```

{% endhint %}

This API will return order\_uuid.  You can use the order\_uuid to get the list of Numbers assigned to each order.&#x20;
