deletehttps://{ourserver.com}/api/resellers/removeNumber

DELETE /api/resellers/removeNumber

Remove phone number from Onlinesim server list

This request allows to delete specific numbers from the list of your current numbers. Please note, that either the phone number in international format or its ID, specified when it was added, must be passed in the request. Simultaneous passing of both parameters is not allowed.

You can use it instead of sendNumbersOnline request to modify the list of numbers precisely, by deleting the numbers that are on the list.

Parameters

query3
NameTypeDescription
numberstring

Phone number in international format (including country code). Required if id parameter is not passed. Cannot be passed simultaneously with id parameter.

idinteger

ID of the phone number, specified when it was added. Required if number parameter is not passed. Cannot be passed simultaneously with number parameter.

teststring

Optional field for the request body of Reseller API v2. Allowed values are test1, test2.

While being assigned, test1 value will allow the request to be passed, however the data won't be saved by our server (the function will not be executed by this request).

While being assigned, test2 value will print out your request's payload in response.

Can be passed as query parameter (for GET) or as a field in request's body (for POST). Both ways are equivalent, but using them simultaneously is not recommended.

Enum:test1test2
header1
NameTypeDescription
Authorization*string

see more here

Responses

200

Onlinesim server response

Content-Typeapplication/json
Schema
Responseobject
responseoneOf

1, if request was successful, otherwise error message will come up

One Of
[0]string
[1]integer

Examples

Example response from Onlinesim server when number was successfuly removed from the list
{
  "response": "1"
}
Example response from Onlinesim server when trying to remove a number that was not found on the list (either it wasn't added previously or it was already removed)
{
  "response": "0"
}
Incorrect key passed
[
  {
    "response": "ERROR_WRONG_KEY"
  }
]
400

Missing or incorred parameters (request must contain parameters in it's body with proper names as described in documentation)

Content-Typeapplication/json
Schema
Responseobject
responsestringRequired
Enum:ERROR_PARAMS
messagestringRequired
401

Unauthorized. The request is missing or uses an invalid API key. Some endpoints may return a 200 status with an ERROR_WRONG_KEY message instead of 401 — check the response body

Content-Typetext/plain
Schema
Responsestring
Enum:Unauthorized
403

Forbidden. The request was understood but refused due to insufficient permissions

Content-Typeapplication/json
Schema
Responseobject
errorobjectRequired
statusinteger

HTTP response code in text format

codestring
messagestring

Possible error codes: - ERROR_DISABLED - partner account is not activated - ERROR_IP - IP address is not in the list of allowed addresses - allowlist (see Access from IP field) - ERROR_RENT - account has no access to rent

Enum:ERROR_DISABLEDERROR_IPERROR_RENT
messagestringRequired
Enum:ERROR_DISABLEDERROR_IPERROR_RENT
detailsobject[]Required
itemsobject

Code Samples

Generating examples...