{
  "openapi": "3.0.0",
  "info": {
    "title": "Numbers",
    "description": "API endpoints for managing dedicated numbers as sender IDs for messaging services."
  },
  "servers": [
    {
      "url": "https://rest.clicksend.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "schemas": {
      "pagination": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "The total number of items available for viewing.",
            "example": 2
          },
          "per_page": {
            "type": "integer",
            "description": "The number of items returned per page. This is specified in the limit parameter. You can have 100 items at maximum, and 15 at minimum.",
            "example": 15
          },
          "current_page": {
            "type": "integer",
            "description": "The current page number.",
            "example": 1
          },
          "last_page": {
            "type": "integer",
            "description": "The last page number.",
            "example": 1
          },
          "next_page_url": {
            "type": "string",
            "nullable": true,
            "description": "A URL of the next page. It will return **null** if there’s no next page.",
            "example": null
          },
          "prev_page_url": {
            "type": "string",
            "nullable": true,
            "description": "A URL of the previous page. It will return **null** if there’s no previous page.",
            "example": null
          },
          "from": {
            "type": "integer",
            "description": "The number of the first result in the current page.",
            "example": 1
          },
          "to": {
            "type": "integer",
            "description": "The number of the last result in the current page.",
            "example": 2
          }
        }
      },
      "currency": {
        "type": "object",
        "description": "The parameters related to currency.",
        "properties": {
          "currency_name_short": {
            "type": "string",
            "description": "The currency used for the sender in three-letter format (e.g. USD, EUR, AUD, NZD, etc).",
            "example": "AUD"
          },
          "currency_prefix_d": {
            "type": "string",
            "description": "The symbol used to indicate the currency of the sender (e.g. $ , €, etc).",
            "example": "$"
          },
          "currency_prefix_c": {
            "type": "string",
            "description": "The currency basic unit (e.g. cents).",
            "example": "c"
          },
          "currency_name_long": {
            "type": "string",
            "description": "The full name of the currency.",
            "example": "Australian Dollars"
          },
          "min_recharge_amount": {
            "type": "string",
            "description": "The minimum amount that can be used to recharge the account, in this currency.",
            "example": "20.00"
          },
          "max_recharge_amount": {
            "type": "string",
            "description": "The maximum amount that can be used to recharge the account, in this currency.",
            "example": "10000.00"
          }
        }
      },
      "view-your-numbers": {
        "type": "object",
        "properties": {
          "http_code": {
            "type": "integer",
            "description": "The HTTP status code of the response.",
            "example": 200
          },
          "response_code": {
            "type": "string",
            "description": "The response code indicating the status of the operation.",
            "example": "SUCCESS"
          },
          "response_msg": {
            "type": "string",
            "description": "A message describing the outcome of the operation.",
            "example": "Here are you dedicated numbers."
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pagination"
              },
              {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "dedicated_number": {
                          "type": "string",
                          "description": "The dedicated number.",
                          "example": "+61411111111"
                        },
                        "country": {
                          "type": "string",
                          "description": "The country.",
                          "example": "AU"
                        },
                        "price": {
                          "type": "string",
                          "description": "The price.",
                          "example": "18.59"
                        },
                        "_country_name": {
                          "type": "string",
                          "description": "The country name.",
                          "example": "Australia"
                        },
                        "notes": {
                          "type": "string",
                          "description": "Optional notes about the number.",
                          "nullable": true,
                          "example": "Business line"
                        },
                        "type": {
                          "type": "string",
                          "description": "The type of messages this number can send.",
                          "example": "sms"
                        },
                        "number_type": {
                          "type": "string",
                          "description": "The classification of the number.",
                          "example": "longcode"
                        },
                        "number_category": {
                          "type": "string",
                          "nullable": true,
                          "description": "The category of the number.",
                          "example": null
                        },
                        "number_guid": {
                          "type": "string",
                          "description": "Unique identifier for the number.",
                          "example": "60744953-781E-463C-A7FF-F194228674BB"
                        },
                        "form_submission_id": {
                          "type": "string",
                          "nullable": true,
                          "description": "ID of any associated form submission.",
                          "example": null
                        },
                        "status": {
                          "type": "object",
                          "description": "The registration status of the number.",
                          "properties": {
                            "value": {
                              "type": "integer",
                              "description": "Numeric status code (0-5):\n- 0: Your number is ready to go.\n- 1: Your number is unregistered. You will not be able to send messages to certain countries.\n- 2: Your number registration is in progress. Email updates will follow.\n- 3: Action required on your number registration. Please resolve to start using it.\n- 4: You can send to all countries but may get restricted to some before full registration.\n- 5: Your number is registered and you can start using it immediately.\n",
                              "enum": [
                                0,
                                1,
                                2,
                                3,
                                4,
                                5
                              ],
                              "example": 0
                            },
                            "label": {
                              "type": "string",
                              "description": "Status label identifier corresponding to the numeric value above, following the same order.",
                              "enum": [
                                "REGISTRATION_NOT_REQUIRED",
                                "REGISTRATION_NOT_INITIATED",
                                "REGISTRATION_INITIATED",
                                "CUST_ACTION_REQUIRED",
                                "REGISTRATION_SUBMITTED",
                                "REGISTERED"
                              ],
                              "example": "REGISTRATION_NOT_REQUIRED"
                            },
                            "description": {
                              "type": "string",
                              "description": "Human readable description of the status.",
                              "example": "Your number is ready to go."
                            },
                            "name": {
                              "type": "string",
                              "description": "Display name for the status corresponding to the numeric value above, following the same order.",
                              "enum": [
                                "Ready to use",
                                "Unregistered",
                                "Decision Pending",
                                "Action Required",
                                "Limited Availability",
                                "Registered"
                              ],
                              "example": "Ready to use"
                            }
                          }
                        }
                      }
                    },
                    "example": [
                      {
                        "dedicated_number": "+61411111111",
                        "country": "AU",
                        "price": "18.59",
                        "_country_name": "Australia",
                        "notes": null,
                        "type": "sms",
                        "number_type": "longcode",
                        "number_category": null,
                        "number_guid": "60744953-781E-463C-A7FF-F194228674BB",
                        "form_submission_id": null,
                        "status": {
                          "value": 0,
                          "label": "REGISTRATION_NOT_REQUIRED",
                          "description": "Your number is ready to go.",
                          "name": "Ready to use"
                        }
                      },
                      {
                        "dedicated_number": "+61422222222",
                        "country": "AU",
                        "price": "20.99",
                        "_country_name": "Australia",
                        "notes": "Business line",
                        "type": "mms",
                        "number_type": "longcode",
                        "number_category": null,
                        "number_guid": "83955064-892F-574D-B8GG-G2053339785CC",
                        "form_submission_id": null,
                        "status": {
                          "value": 1,
                          "label": "REGISTRATION_NOT_INITIATED",
                          "description": "Your number is unregistered. You will not be able to send messages to certain countries.",
                          "name": "Unregistered"
                        }
                      }
                    ]
                  },
                  "_currency": {
                    "$ref": "#/components/schemas/currency"
                  }
                }
              }
            ]
          }
        }
      },
      "buy-number-request": {
        "type": "object",
        "properties": {
          "dedicated_number": {
            "type": "string",
            "description": "Phone number to purchase",
            "example": "+614197651956"
          },
          "type": {
            "type": "string",
            "description": "Service type for the number",
            "example": "sms",
            "enum": [
              "sms",
              "mms"
            ]
          },
          "registration_data": {
            "type": "object",
            "description": "Optional registration data for number compliance",
            "properties": {
              "business_name": {
                "type": "string",
                "description": "Name of the business (2 - 100 characters)",
                "minLength": 2,
                "maxLength": 100,
                "example": "ABD"
              },
              "business_address": {
                "type": "string",
                "description": "Business address (5 - 150 characters)",
                "minLength": 5,
                "maxLength": 150,
                "example": "242 Exhibition Street"
              },
              "suburb": {
                "type": "string",
                "description": "Suburb/City (2 - 50 characters)",
                "minLength": 2,
                "maxLength": 50,
                "example": "Melbourne"
              },
              "postcode": {
                "type": "string",
                "description": "Postal code (2 - 20 characters)",
                "minLength": 2,
                "maxLength": 20,
                "example": "3000"
              },
              "state": {
                "type": "string",
                "description": "State/Province (2 - 50 characters)",
                "minLength": 2,
                "maxLength": 50,
                "example": "Victoria"
              },
              "contact_name": {
                "type": "string",
                "description": "Contact person name (2 - 100 characters)",
                "minLength": 2,
                "maxLength": 100,
                "example": "ABD"
              },
              "contact_number": {
                "type": "string",
                "description": "Contact phone number (valid local or international phone number)",
                "pattern": "^\\+?[1-9]\\d{1,14}$",
                "example": "+614197651956"
              },
              "country": {
                "type": "string",
                "description": "Country code (ISO 3166-1 alpha-2)",
                "example": "AU",
                "pattern": "^[A-Z]{2}$"
              }
            },
            "required": [
              "business_name",
              "business_address",
              "suburb",
              "postcode",
              "state",
              "contact_name",
              "contact_number",
              "country"
            ]
          }
        },
        "required": [
          "dedicated_number",
          "type"
        ],
        "example": {
          "dedicated_number": "+614197651956",
          "type": "sms",
          "registration_data": {
            "business_name": "ABD",
            "business_address": "242 Exhibition Street",
            "suburb": "Melbourne",
            "postcode": "3000",
            "state": "Victoria",
            "contact_name": "ABD",
            "contact_number": "+614197651956",
            "country": "AU"
          }
        }
      },
      "purchase-dedicated-number": {
        "type": "object",
        "properties": {
          "http_code": {
            "type": "integer",
            "description": "The HTTP status code of the response.",
            "example": 200
          },
          "response_code": {
            "type": "string",
            "description": "The response code indicating the status of the operation.",
            "example": "SUCCESS"
          },
          "response_msg": {
            "type": "string",
            "description": "A message describing the outcome of the operation.",
            "example": "Here is your new number."
          },
          "data": {
            "type": "object",
            "properties": {
              "dedicated_number": {
                "type": "string",
                "description": "The new dedicated number.",
                "example": "+12282060576"
              },
              "country": {
                "type": "string",
                "description": "The country code of the new dedicated number.",
                "example": "US"
              },
              "price_total": {
                "type": "string",
                "description": "The total price of the new dedicated number.",
                "example": "8.98"
              },
              "_price_setup": {
                "type": "string",
                "description": "The setup price of the new dedicated number.",
                "example": "22.22"
              },
              "_price_monthly": {
                "type": "string",
                "description": "The monthly price of the new dedicated number.",
                "example": "11.11"
              },
              "_currency": {
                "$ref": "#/components/schemas/currency"
              }
            },
            "example": {
              "dedicated_number": "+12282060576",
              "country": "US",
              "price_total": "8.98",
              "_price_setup": "22.22",
              "_price_monthly": "11.11",
              "_currency": {
                "currency_name_short": "USD",
                "currency_prefix_d": "$",
                "currency_prefix_c": "¢",
                "currency_name_long": "US Dollar"
              }
            }
          }
        }
      },
      "view-available-numbers": {
        "type": "object",
        "properties": {
          "http_code": {
            "type": "integer",
            "description": "The HTTP status code of the response.",
            "example": 200
          },
          "response_code": {
            "type": "string",
            "description": "The response code indicating the status of the operation.",
            "example": "SUCCESS"
          },
          "response_msg": {
            "type": "string",
            "description": "A message describing the outcome of the operation.",
            "example": "Here are some numbers."
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pagination"
              },
              {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "string",
                          "description": "The country code of the number."
                        },
                        "country_name": {
                          "type": "string",
                          "description": "The country name of the number."
                        },
                        "dedicated_number": {
                          "type": "string",
                          "description": "The dedicated number."
                        },
                        "price_setup": {
                          "type": "string",
                          "description": "The setup price of the number."
                        },
                        "price_monthly": {
                          "type": "string",
                          "description": "The monthly price of the number."
                        },
                        "price_total": {
                          "type": "string",
                          "description": "The total price of the number."
                        },
                        "address_requirement": {
                          "type": "string",
                          "description": "The address requirement for the number.  <br> `local`: requires an address that corresponds  to the phone number's prefix.",
                          "nullable": true
                        }
                      }
                    },
                    "example": [
                      {
                        "country": "AU",
                        "country_name": "Australia",
                        "dedicated_number": "+61280662298",
                        "price_setup": "0.0000",
                        "price_monthly": "20.7100",
                        "price_total": "20.7100",
                        "address_requirement": "local"
                      },
                      {
                        "country": "AU",
                        "country_name": "Australia",
                        "dedicated_number": "+61280662299",
                        "price_setup": "0.0000",
                        "price_monthly": "20.7100",
                        "price_total": "20.7100",
                        "address_requirement": "local"
                      }
                    ]
                  },
                  "_currency": {
                    "$ref": "#/components/schemas/currency",
                    "example": {
                      "currency_name_short": "USD",
                      "currency_prefix_d": "$",
                      "currency_prefix_c": "¢",
                      "currency_name_long": "US Dollar"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "register_numbers": {
        "type": "object",
        "properties": {
          "http_code": {
            "type": "integer",
            "description": "HTTP status code of the response.",
            "example": 200
          },
          "response_code": {
            "type": "string",
            "description": "Code indicating the result of the response.",
            "example": "SUCCESS"
          },
          "response_msg": {
            "type": "string",
            "description": "Message providing additional information.",
            "example": "10DLC number registration notification sent successfully."
          },
          "data": {
            "type": "object",
            "nullable": true,
            "example": null
          }
        },
        "required": [
          "http_code",
          "response_code",
          "response_msg"
        ]
      },
      "400_error": {
        "type": "object",
        "properties": {
          "http_code": {
            "type": "integer",
            "description": "HTTP status code of the response.",
            "example": 400
          },
          "response_code": {
            "type": "string",
            "description": "Code indicating the result of the response.",
            "example": "BAD_REQUEST"
          },
          "response_msg": {
            "type": "string",
            "description": "Message providing additional information.",
            "example": "Invalid input."
          },
          "data": {
            "type": "object",
            "nullable": true,
            "example": {
              "name": "Name field is required.",
              "email": "Email field is required."
            }
          }
        },
        "required": [
          "http_code",
          "response_code",
          "response_msg"
        ]
      }
    }
  },
  "paths": {
    "/v3/numbers": {
      "get": {
        "summary": "View Your Numbers",
        "operationId": "view-your-numbers",
        "description": "_Get all available dedicated numbers_\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| page | query | integer(int32) | false | [Page number](/#pagination) |\n| limit | query | integer(int32) | false | [Number of records per page](/#pagination) |\n| q | query | string | false | Filter numbers based on multiple criteria. The query string should be formatted as key-value pairs separated by commas. Available filter keys: `type`, `number_type`, `country` |\n| q2 | query | string | false | Filter numbers based on multiple criteria. The query string should be formatted as key-value pairs separated by commas. Available filter keys: `type` |\n| excluding_number_type | query | string | false | Exclude specific number types from the results. Available number types: `shortcode`, `tollfree`, `10DLC` |\n| exclude_10dlc_campaign | query | boolean | false | When set to true, excludes all numbers that are associated with 10DLC campaigns |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number",
            "example": "1"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 15,
              "default": 15
            },
            "description": "Number of records per page",
            "example": "100"
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter numbers based on multiple criteria. The query string should be formatted as key-value pairs separated by commas.\nAvailable filter keys:\n- `type`: Message type (e.g., `SMS`, `MMS`)\n- `number_type`: Number classification (e.g., `longcode`, `shortcode`, `tollfree`, `10DLC`)\n- `country`: Two-letter country code (e.g., `AU`, `US`)\n",
            "example": "type:sms,number_type:longcode,country:AU"
          },
          {
            "name": "q2",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "type:mms"
          },
          {
            "name": "excluding_number_type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Exclude specific number types from the results.\nAvailable number types:\n- `shortcode`\n- `tollfree`\n- `10DLC`\n",
            "example": "10DLC"
          },
          {
            "name": "exclude_10dlc_campaign",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "When set to true, excludes all numbers that are associated with 10DLC campaigns",
            "example": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/view-your-numbers"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n\n'https://rest.clicksend.com/v3/numbers'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\NumberApi(new GuzzleHttp\\Client(),$config);\n$page = 1; // int | Page number\n$limit = 10; // int | Number of records per page\n\ntry {\n    $result = $apiInstance->numbersGet($page, $limit);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling NumberApi->numbersGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar numberApi = new NumberApi(configuration);\nvar response = numberApi.NumbersGet();"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.NumberApi;\n\npublic class view_numbers {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    NumberApi apiInstance = new NumberApi(defaultClient);\n    Integer page = 1; // Integer | Page number\n    Integer limit = 10; // Integer | Number of records per page\n    try {\n        String result = apiInstance.numbersGet(page, limit);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling NumberApi#numbersGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar numberApi = new api.NumberApi(\"USERNAME\", \"API_KEY\");\n\nvar page = 1;\nvar limit = 10;\n\nnumberApi.numbersGet(page, limit).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::NumberApi.new\n\nopts = {\n  page: 1,  # Integer | Page number\n  limit: 10 # Integer | Number of records per page\n}\n\nbegin\n  # Get all available dedicated numbers\n  result = api_instance.numbers_get(opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling NumberApi->numbers_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.NumberApi(clicksend_client.ApiClient(configuration))\npage = 1 # int | Page number (optional) (default to 1)\nlimit = 10 # int | Number of records per page (optional) (default to 10)\n\ntry:\n    # Get all available dedicated numbers_get\n    api_response = api_instance.numbers_get(page=page, limit=limit)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling NumberApi->numbers_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::NumberApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::NumberApi->new(username => $username, password => $password);\n\nmy $json_output = $api->numbers_get('page' => '1', 'limit' => '10');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSNumberApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *page = [[NSNumber alloc] initWithInt:1];\nNSNumber *limit = [[NSNumber alloc] initWithInt:15];\n\nCSNumberApi *numberApiInstance = [[CSNumberApi alloc] init];\n[numberApiInstance numbersGetWithPage:page limit:limit completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nNumberAPI.numbersGet(page: nil, limit: nil) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/numbers/buy/{dedicated_number}": {
      "post": {
        "summary": "Purchase Dedicated Number",
        "operationId": "purchase-dedicated-number",
        "description": "_Buy dedicated number_\n\nThis endpoint allows you to purchase a dedicated phone number for messaging services. You can optionally include registration data for compliance purposes.\n\n### Request Body\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| dedicated_number | string | true | Phone number to purchase |\n| type | string | true | Service type (sms, mms) |\n| registration_data | object | false | Registration data for compliance (AU SMS/MMS numbers only) |\n\n#### Registration Data Fields (Optional)\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| business_name | string | true | Name of the business (2 - 100 characters) |\n| business_address | string | true | Business address (5 - 150 characters) |\n| suburb | string | true | Suburb/City (2 - 50 characters) |\n| postcode | string | true | Postal code (2 - 20 characters) |\n| state | string | true | State/Province (2 - 50 characters) |\n| contact_name | string | true | Contact person name (2 - 100 characters) |\n| contact_number | string | true | Contact phone number (valid local or international phone number) |\n| country | string | true | Country code (ISO 3166-1 alpha-2) |\n\n\n### Path Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| dedicated_number | path | string | true | Phone number to purchase |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/buy-number-request"
              }
            }
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "sms"
          },
          {
            "name": "dedicated_number",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Phone number to purchase",
            "example": "+614197651956"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/purchase-dedicated-number"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\" \\\n     --header \"Content-Type: application/json\" \\\n     --request POST \\\n     --data '{\n       \"dedicated_number\": \"+614197651956\",\n       \"type\": \"sms\",\n       \"registration_data\": {\n         \"business_name\": \"ABD\",\n         \"business_address\": \"242 Exhibition Street\",\n         \"suburb\": \"Melbourne\",\n         \"postcode\": \"3000\",\n         \"state\": \"Victoria\",\n         \"contact_name\": \"ABD\",\n         \"contact_number\": \"+614197651956\",\n         \"country\": \"AU\"\n       }\n     }' \\\n'https://rest.clicksend.com/v3/numbers/buy/{dedicated_number}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\NumberApi(new GuzzleHttp\\Client(),$config);\n\n// Define the request body\n$buy_number_request = array(\n    \"dedicated_number\" => \"+614197651956\",\n    \"type\" => \"sms\",\n    \"registration_data\" => array(\n        \"business_name\" => \"ABD\",\n        \"business_address\" => \"242 Exhibition Street\", \n        \"suburb\" => \"Melbourne\",\n        \"postcode\" => \"3000\",\n        \"state\" => \"Victoria\",\n        \"contact_name\" => \"ABD\",\n        \"contact_number\" => \"+614197651956\",\n        \"country\" => \"AU\"\n    )\n);\n\n$dedicated_number = \"+614197651956\"; // string | Phone number to purchase\n\ntry {\n    $result = $apiInstance->numbersBuyByDedicatedNumberPost($dedicated_number, $buy_number_request);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling NumberApi->numbersBuyByDedicatedNumberPost: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\n\nvar numberApi = new NumberApi(configuration);\n\n// Define the request body\nvar buyNumberRequest = new\n{\n    dedicated_number = \"+614197651956\",\n    type = \"sms\",\n    registration_data = new\n    {\n        business_name = \"ABD\",\n        business_address = \"242 Exhibition Street\",\n        suburb = \"Melbourne\",\n        postcode = \"3000\",\n        state = \"Victoria\",\n        contact_name = \"ABD\",\n        contact_number = \"+614197651956\",\n        country = \"AU\"\n    }\n};\n\nvar response = numberApi.NumbersBuyByDedicatedNumberPost(\"+614197651956\", buyNumberRequest);\n"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.NumberApi;\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic class post {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    NumberApi apiInstance = new NumberApi(defaultClient);\n    \n    // Define the request body\n    Map<String, Object> registrationData = new HashMap<>();\n    registrationData.put(\"business_name\", \"ABD\");\n    registrationData.put(\"business_address\", \"242 Exhibition Street\");\n    registrationData.put(\"suburb\", \"Melbourne\");\n    registrationData.put(\"postcode\", \"3000\");\n    registrationData.put(\"state\", \"Victoria\");\n    registrationData.put(\"contact_name\", \"ABD\");\n    registrationData.put(\"contact_number\", \"+614197651956\");\n    registrationData.put(\"country\", \"AU\");\n    \n    Map<String, Object> buyNumberRequest = new HashMap<>();\n    buyNumberRequest.put(\"dedicated_number\", \"+614197651956\");\n    buyNumberRequest.put(\"type\", \"sms\");\n    buyNumberRequest.put(\"registration_data\", registrationData);\n    \n    String dedicatedNumber = \"+614197651956\"; // String | Phone number to purchase\n    try {\n        String result = apiInstance.numbersBuyByDedicatedNumberPost(dedicatedNumber, buyNumberRequest);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling NumberApi#numbersBuyByDedicatedNumberPost\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar numberApi = new api.NumberApi(\"USERNAME\", \"API_KEY\");\n\n// Define the request body\nvar buyNumberRequest = {\n  dedicated_number: \"+614197651956\",\n  type: \"sms\",\n  registration_data: {\n    business_name: \"ABD\",\n    business_address: \"242 Exhibition Street\",\n    suburb: \"Melbourne\",\n    postcode: \"3000\",\n    state: \"Victoria\",\n    contact_name: \"ABD\",\n    contact_number: \"+614197651956\",\n    country: \"AU\"\n  }\n};\n\nvar dedicatedNumber = \"+614197651956\";\n\nnumberApi.numbersBuyByDedicatedNumberPost(dedicatedNumber, buyNumberRequest).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::NumberApi.new\n\n# Define the request body\nbuy_number_request = {\n  dedicated_number: \"+614197651956\",\n  type: \"sms\",\n  registration_data: {\n    business_name: \"ABD\",\n    business_address: \"242 Exhibition Street\",\n    suburb: \"Melbourne\",\n    postcode: \"3000\",\n    state: \"Victoria\",\n    contact_name: \"ABD\",\n    contact_number: \"+614197651956\",\n    country: \"AU\"\n  }\n}\n\ndedicated_number = \"+614197651956\" # String | Phone number to purchase\n\nbegin\n  # Buy dedicated number\n  result = api_instance.numbers_buy_by_dedicated_number_post(dedicated_number, buy_number_request)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling NumberApi->numbers_buy_by_dedicated_number_post: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.NumberApi(clicksend_client.ApiClient(configuration))\n\n# Define the request body\nbuy_number_request = {\n    \"dedicated_number\": \"+614197651956\",\n    \"type\": \"sms\",\n    \"registration_data\": {\n        \"business_name\": \"ABD\",\n        \"business_address\": \"242 Exhibition Street\",\n        \"suburb\": \"Melbourne\",\n        \"postcode\": \"3000\",\n        \"state\": \"Victoria\",\n        \"contact_name\": \"ABD\",\n        \"contact_number\": \"+614197651956\",\n        \"country\": \"AU\"\n    }\n}\n\ndedicated_number = '+614197651956' # str | Phone number to purchase\n\ntry:\n    # Buy dedicated number\n    api_response = api_instance.numbers_buy_by_dedicated_number_post(dedicated_number, buy_number_request)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling NumberApi->numbers_buy_by_dedicated_number_post: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::NumberApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::NumberApi->new(username => $username, password => $password);\n\n# Define the request body\nmy %buy_number_request = (\n    'dedicated_number' => '+614197651956',\n    'type' => 'sms',\n    'registration_data' => {\n        'business_name' => 'ABD',\n        'business_address' => '242 Exhibition Street',\n        'suburb' => 'Melbourne',\n        'postcode' => '3000',\n        'state' => 'Victoria',\n        'contact_name' => 'ABD',\n        'contact_number' => '+614197651956',\n        'country' => 'AU'\n    }\n);\n\nmy $json_output = $api->numbers_buy_by_dedicated_number_post('dedicated_number' => '+614197651956', 'buy_number_request' => \\%buy_number_request);\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSNumberApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\n// Define the request body\nNSDictionary *registrationData = @{\n    @\"business_name\": @\"ABD\",\n    @\"business_address\": @\"242 Exhibition Street\",\n    @\"suburb\": @\"Melbourne\",\n    @\"postcode\": @\"3000\",\n    @\"state\": @\"Victoria\",\n    @\"contact_name\": @\"ABD\",\n    @\"contact_number\": @\"+614197651956\",\n    @\"country\": @\"AU\"\n};\n\nNSDictionary *buyNumberRequest = @{\n    @\"dedicated_number\": @\"+614197651956\",\n    @\"type\": @\"sms\",\n    @\"registration_data\": registrationData\n};\n\nCSNumberApi *numberApiInstance = [[CSNumberApi alloc] init];\n[numberApiInstance numbersBuyByDedicatedNumberPostWithDedicatedNumber:@\"+614197651956\" \n                                                    buyNumberRequest:buyNumberRequest \n                                                   completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\n// Define the request body\nlet registrationData: [String: Any] = [\n    \"business_name\": \"ABD\",\n    \"business_address\": \"242 Exhibition Street\",\n    \"suburb\": \"Melbourne\",\n    \"postcode\": \"3000\",\n    \"state\": \"Victoria\",\n    \"contact_name\": \"ABD\",\n    \"contact_number\": \"+614197651956\",\n    \"country\": \"AU\"\n]\n\nlet buyNumberRequest: [String: Any] = [\n    \"dedicated_number\": \"+614197651956\",\n    \"type\": \"sms\",\n    \"registration_data\": registrationData\n]\n\nNumberAPI.numbersBuyByDedicatedNumberPost(dedicatedNumber: \"+614197651956\", buyNumberRequest: buyNumberRequest) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/numbers/search/{country}": {
      "get": {
        "summary": "View Available Numbers",
        "operationId": "view-available-numbers",
        "description": "_Get all dedicated numbers by country_\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| country | path | string | true | Country code to search |\n| search | query | string | false | Your search pattern or query. |\n| search_type | query | integer(int32) | false | Your strategy for searching, 0 = starts with, 1 = anywhere, 2 = ends with. |\n| page | query | integer(int32) | false | [Page number](/#pagination) |\n| limit | query | integer(int32) | false | [Number of records per page](/#pagination) |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "country",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/view-available-numbers"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n\n'https://rest.clicksend.com/v3/numbers/search/{country}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\NumberApi(new GuzzleHttp\\Client(),$config);\n$country = \"US\"; // string | Country code to search\n$search = \"\"; // string | Your search pattern or query.\n$search_type = 56; // int | Your strategy for searching, 0 = starts with, 1 = anywhere, 2 = ends with.\n$page = 1; // int | Page number\n$limit = 10; // int | Number of records per page\n\ntry {\n    $result = $apiInstance->numbersSearchByCountryGet($country, $search, $search_type, $page, $limit);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling NumberApi->numbersSearchByCountryGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar numberApi = new NumberApi(configuration);\nvar response = numberApi.NumbersSearchByCountryGet(\"CA\");"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.NumberApi;\n\npublic class view_available_numbers {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    NumberApi apiInstance = new NumberApi(defaultClient);\n    String country = \"US\"; // String | Country code to search\n    String search = \"\"; // String | Your search pattern or query.\n    Integer searchType = 1; // Integer | Your strategy for searching, 0 = starts with, 1 = anywhere, 2 = ends with.\n    Integer page = 1; // Integer | Page number\n    Integer limit = 10; // Integer | Number of records per page\n    try {\n        String result = apiInstance.numbersSearchByCountryGet(country, search, searchType, page, limit);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling NumberApi#numbersSearchByCountryGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar numberApi = new api.NumberApi(\"USERNAME\", \"API_KEY\");\n\nvar country = \"US\";\nvar search = \"\";\nvar searchType = 1;\nvar page = 1;\nvar limit = 10;\n\nnumberApi.numbersSearchByCountryGet(country, search, searchType, page, limit).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::NumberApi.new\n\ncountry = \"US\"    # String | Country code to search\n\nopts = {\n  \"search\": \"88\",   # String | Your search pattern or query.\n  \"search_type\": 1, # Integer | Your strategy for searching,\n                  # 0 = starts with, 1 = anywhere, 2 = ends with.\n  \"page\": 1,        # Integer | Page number\n  \"limit\": 10       # Integer | Number of records per page\n}\n\nbegin\n  # Get all dedicated numbers by country\n  result = api_instance.numbers_search_by_country_get(country, opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling NumberApi->numbers_search_by_country_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.NumberApi(clicksend_client.ApiClient(configuration))\ncountry = 'country_example' # str | Country code to search\nsearch = 'search_example' # str | Your search pattern or query. (optional)\nsearch_type = 56 # int | Your strategy for searching, 0 = starts with, 1 = anywhere, 2 = ends with. (optional)\npage = 1 # int | Page number (optional) (default to 1)\nlimit = 10 # int | Number of records per page (optional) (default to 10)\n\ntry:\n    # Get all dedicated numbers by country\n    api_response = api_instance.numbers_search_by_country_get(country, search=search, search_type=search_type, page=page, limit=limit)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling NumberApi->numbers_search_by_country_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::NumberApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::NumberApi->new(username => $username, password => $password);\n\nmy $json_output = $api->numbers_search_by_country_get('country' => 'AU' ,'search' => '' ,'search_type'  => '', 'page' => '','limit' => '' );\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSNumberApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *searchType = [[NSNumber alloc] initWithInt:1];\nNSNumber *page = [[NSNumber alloc] initWithInt:1];\nNSNumber *limit = [[NSNumber alloc] initWithInt:15];\n\nCSNumberApi *numberApiInstance = [[CSNumberApi alloc] init];\n[numberApiInstance numbersSearchByCountryGetWithCountry: @\"country\" search:@\"search\" searchType:searchType page:page limit:limit completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nNumberAPI.numbersSearchByCountryGet(country: \"country\", search: \"search\", searchType: nil, page: 1, limit: 15) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/numbers/registrations/number-types/{number_type}/country/{country_code}": {
      "post": {
        "summary": "Register Numbers",
        "operationId": "register-numbers",
        "description": "<div style=\"background-color: #e8f4ff; padding: 15px; border-radius: 4px; border-left: 4px solid #0066cc;\">\nThis endpoint is currently only available for <b>Canada 10DLC</b> number registration.\n</div>\n\nRegisters a number that requires additional verification information. This endpoint facilitates the registration process for numbers requiring special compliance documentation.\n\nAfter submission, ClickSend's compliance team will review the registration and notify you of the approval status.\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "full_name": {
                    "type": "string",
                    "description": "Legal full name of the individual registering the number. Must be a personal name, not a business name.",
                    "example": "John Doe"
                  },
                  "company_name": {
                    "type": "string",
                    "description": "Legal business name of the organization requesting registration",
                    "example": "ClickSend"
                  },
                  "email": {
                    "type": "string",
                    "description": "Contact email address for registration communications and notifications",
                    "example": "john.doe@clicksend.com"
                  },
                  "website_url": {
                    "type": "string",
                    "description": "Official business website URL",
                    "example": "https://clicksend.com"
                  },
                  "sample_message": {
                    "type": "string",
                    "description": "Representative example of messages that will be sent using this number",
                    "example": "Get 20% off on your next purchase! Visit our website for details."
                  },
                  "primary_use_case": {
                    "type": "string",
                    "description": "Primary intended purpose for the registered number (e.g., Marketing, Notifications, Authentication)",
                    "example": "Marketing"
                  },
                  "company_number": {
                    "type": "string",
                    "description": "Official support phone number of the organization requesting registration",
                    "example": "+1-800-555-0199"
                  },
                  "area_code": {
                    "type": "string",
                    "description": "Your area codes, please provide your top 3 area codes in case your 1st choice is not available",
                    "example": "416, 647, 905"
                  }
                },
                "required": [
                  "full_name",
                  "company_name",
                  "email",
                  "website_url",
                  "sample_message",
                  "primary_use_case",
                  "company_number",
                  "area_code"
                ],
                "example": {
                  "full_name": "John Doe",
                  "company_name": "ClickSend",
                  "email": "john.doe@clicksend.com",
                  "website_url": "https://clicksend.com",
                  "sample_message": "Get 20% off on your next purchase! Visit our website for details.",
                  "primary_use_case": "Marketing",
                  "company_number": "+1-800-555-0199",
                  "area_code": "416, 647, 905"
                }
              }
            }
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "number_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The type of number being registered",
            "example": "10dlc"
          },
          {
            "name": "country_code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2,
              "pattern": "^[A-Z]{2}$"
            },
            "description": "Two-character ISO country code",
            "example": "US, CA"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/register_numbers"
                },
                "example": {
                  "http_code": 200,
                  "response_code": "SUCCESS",
                  "response_msg": "Number registration notification sent successfully.",
                  "data": null
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/400_error"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request POST \\\n     --header \"Content-Type: application/json\" \\\n     --data-binary \"    {\n        \\\"full_name\\\": \\\"John Doe\\\",\n        \\\"company_name\\\": \\\"Clicksend\\\",\n        \\\"email\\\": \\\"john.doe@clicksend.com\\\",\n        \\\"website_url\\\": \\\"https://clicksend.com\\\",\n        \\\"sample_message\\\": \\\"Get 20% off on your next purchase! Visit our website for details.\\\",\n        \\\"primary_use_case\\\": \\\"Marketing\\\"\n    }\" \\\n'https://rest.clicksend.com/v3/numbers/registrations/number-types/{number_type}/country/{country_code}'"
          }
        ]
      }
    }
  }
}