Skip to main content

Buy Numbers

Book a phone number, view your active numbers, and cancel orders.

Book a Number​

POST /numbers/

Request Body​

{
"product": "mixin",
"service_code": "tg",
"country_code": 187,
"period_code": 0
}

Parameters​

ParameterRequiredDescription
productYesmixin or residential
service_codeYesFrom GET /numbers/mixed/
country_codeYesFrom GET /numbers/mixed/countries/
period_codeResidential onlyFrom GET /numbers/residential/

Response​

{
"id": "640170a4-8188-468e-be5f-b2281170deed",
"status": "waiting",
"product": "mixin",
"service_code": "tg",
"country_code": "187",
"phone_number": "13111111119",
"last_sms_code": null,
"expiration_time": "2023-08-31T14:21:20Z"
}

List Active Numbers​

GET /numbers/

Returns all purchased numbers along with received SMS codes.

Response​

[
{
"id": "640170a4-8188-468e-be5f-b2281170deed",
"status": "waiting",
"product": "mixin",
"service_code": "tg",
"country_code": "187",
"phone_number": "13111111119",
"last_sms_code": null,
"expiration_time": "2023-08-31T14:21:20Z"
}
]

Status Values​

StatusDescription
waitingNumber is active, waiting for an SMS
receivedSMS code has been received
expiredNumber has expired
cancelledNumber was cancelled

Cancel a Number​

PUT /numbers/{id}/

Cancel or delete a purchased number by its ID.

Response​

Returns 204 No Content on success.