AvailableNumberGroup

The following actions can be performed with the AvailableNumberGroup APIs. The available numbers are grouped together according to their country, number type, area code/prefix and pricing. Each number group is available as a resource from which numbers can be ordered.

BaseURI: https://api.plivo.com/v1/Account/{auth_id}/AvailableNumberGroup/

Rent a Number

The group id parameter that is obtained from the number search API above should be passed as a parameter to this POST request.

    URI: https://api.plivo.com/v1/Account/{auth_id}/AvailableNumberGroup/{group_id}/
    Method: POST

Parameters

There are no mandatory parameters for this API. The following optional parameters can be specified:

Optional Parameters

Parameter Description
quantity The quantity of numbers that are to be ordered from the number group. Default value is 1.
app_id The id of the application that you want assigned to the Number. If not specified, then it is assigned to the default application of the Account.

Response

HTTP status: 201

JSON:
{
  "numbers": [{"number": "553139560512", "status": "Success"}, {"number": "553139560513", "status": "Success"}],
  "status": "fulfilled"
}

In certain countries where there are address regulations, you will receive a response similar to the following response:

HTTP status: 201

JSON:
{
  "details": "Order for 2 numbers(Region: AMIENS, FRANCE, number_type: local, Prefix:  3) initiated. For this order, some additional information is required by the telecom regulatory authorities. Our support team will get in touch with you soon.",
  "message": "created",
  "status": "pending"
}