Add multiple phone numbers to the existing list
POSThttps://{ourserver.com}/api/resellers/addNumbers
This request allows you to add new numbers the list of existing ones to the Onlinesim server in bulk.
Parameters
header1
| Name | Type | Description |
|---|---|---|
Authorization* | string | see more here |
Request Body
Content-Type
application/jsonSchema
schemaobject
numbersobject[]
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:test1test2Responses
200Onlinesim server response
Content-Type
application/jsonSchema
schemaobject
responseoneOf1, if request was successful, otherwise error message will come up
idsobjectObject where keys are phone numbers (in international format, e.g. "+234112233445") and values are the corresponding IDs assigned by the server
Examples
Onlinesim server response example (successfuly added few numbers, others were passed with incorrect country code)
{
"response": 1,
"ids": {
"234112233445": 1042,
"234112233446": 1043,
"234112233447": "fail"
}
}Incorrect key passed
[
{
"response": "ERROR_WRONG_KEY"
}
]401Unauthorized. 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-Type
text/plainSchema
schemastring
Enum:Unauthorized403Forbidden. The request was understood but refused due to insufficient permissions
Content-Type
application/jsonSchema
schemaobject
errorobjectRequired
messagestringRequired
Enum:ERROR_DISABLEDERROR_IPERROR_RENTdetailsobject[]Required
Code Samples
Generating examples...