v2

Get the data and status of a number

GEThttps://{ourserver.com}/api/resellers/checkNumber

Returns the data of one of your numbers (including numbers connected through equipment): status, income, services, bans and, on request, the history of operations.

The request also confirms that your server is up.

Parameters

query4
NameTypeDescription
number*string

Phone number with the country code (an optional leading + is ignored)

with_historyboolean

Adds your completed operations on the number to history. The parameter works by its presence: any value, even 0, turns it on.

as_textboolean

Returns used_service and banned_service as comma-separated strings. Works by its presence, like with_history.

teststring

Test mode. It can also be passed in the request body.

  • test1 — the request is executed and answered as usual, but its database changes are rolled back. Effects outside the database still happen.
  • test2 — the request is not executed: the answer is a debug dump (HTML, HTTP 200) of the request headers and body as our server received them.

A request with any non-empty test value does not confirm that your server is up.

Enum:test1test2
header1
NameTypeDescription
Authorization*string

see more here

Responses

200The data of the number with "response": "1", or {"response": "0"} if you have no such number
Content-Typeapplication/json
Schema
schemaoneOf
One Of
[0]objectData of one of your numbers.
[1]object

Examples

withHistory35 lines

A working number, requested with with_history

{
  "id": 110251,
  "balance": 0,
  "country_id": 46,
  "errors": 0,
  "number": "4605091080",
  "port_id": "Port1",
  "equipment_id": "2130706433",
  "sum": 26,
  "used_service": {
    "telegram": "tg"
  },
  "banned_service": {
    "whatsapp": "wa"
  },
  "history": [
    {
      "id": 1027,
      "number": 4605091080,
      "service": "telegram",
      "sum": 26.6,
      "created_at": "2024-06-11 17:33:26",
      "updated_at": "2024-06-11 17:48:37",
      "history": true
    }
  ],
  "banned": false,
  "reseller_id": 12345,
  "rent": "no",
  "status": 1,
  "status_text": "work",
  "clearable": true,
  "created_at": "2024-06-11T14:33:26.000000Z",
  "response": "1"
}
justAdded21 lines

A number waiting for activation, account without rent access

{
  "id": 110252,
  "balance": 0,
  "country_id": 1,
  "errors": 0,
  "number": "15555555555",
  "port_id": "Port2",
  "equipment_id": "2130706433",
  "sum": 0,
  "used_service": {},
  "banned_service": {},
  "history": [],
  "banned": false,
  "reseller_id": 12345,
  "rent": null,
  "status": 2,
  "status_text": "wait",
  "clearable": false,
  "created_at": "2024-06-01T09:00:00.000000Z",
  "response": "1"
}
notFound

You have no such number

{
  "response": "0"
}
401No API key, or the key does not exist. The body is the plain text Unauthorized. A request with Accept: application/json gets HTTP 200 with {"response":"ERROR_WRONG_KEY"} instead.
Content-Typetext/html
Schema
schemastring
Enum:Unauthorized.Example:Unauthorized.
403Forbidden: the API key is valid, but the request is refused. Error codes:
  • ERROR_DISABLED — the partner account is not activated;
  • ERROR_BANNED — the partner account is blocked;
  • ERROR_IP — the request comes from an IP address that is not in the account's allowlist;
  • ERROR_RENT — rent is requested, but the account has no rent access (addNumber only).
Content-Typeapplication/json
Schema
schemaobject
responsestringRequired
Error codeEnum:ERROR_DISABLEDERROR_BANNEDERROR_IPERROR_RENT
messagestringRequired
The same error code

Examples

ERROR_IP

Request from an IP address outside the allowlist

{
  "response": "ERROR_IP",
  "message": "ERROR_IP"
}

Code Samples

Generating examples...