Virtual numbers
Marsol API provides functionality to manage virtual numbers, which are essential for various messaging and OTP services. Virtual numbers are phone numbers that are not directly associated with a physical phone line but can be used for sending messages.
GET /public/virtual-numbers HTTP/1.1
Host: api.marsol.ly
x-auth-token: YOUR_API_KEY
Accept: */*
[
{
"id": "text",
"name": "text",
"number": "text",
"preference": "LIBYANA",
"operationPreference": 1,
"enabled": true,
"available": true,
"senderId": "text"
}
]Endpoint: /public/virtual-numbers
Method: GET
This endpoint is used to obtain a list of virtual numbers that are available for a user's account. Virtual numbers can be used for sending and receiving SMS messages and for OTP (One-Time Password) verification requests.
Request
This endpoint does not require any parameters.
GET /public/virtual-numbers HTTP/1.1
Host: api.marsol.ly
x-auth-token: your_api_token_here
Content-Type: application/jsonSecurity
This endpoint requires authentication. Include the x-auth-token in the request headers to authenticate your request.
Response
The response will include an array of virtual number objects, each containing:
id(string): The unique identifier of the virtual number.name(string): The name of the virtual numbernumber(string): The actual phone number of the virtual number.preference(enum): The supported networks of which the virtual number will be communicating with (LIBYANA, ALMADAR, null) with null indicating that it can communicate with both.operationPreference(number): refers to the types of operations a virtual number supports, which can be:2forSMS,4forflash calls, and8forvoice messages. Note: A combination of these values indicates support for multiple operations. For example,6(2+4) means the virtual number supportsSMSandflash call, while14(2+4+8) meansSMS,flash call, andvoice callare all supported.enabled(boolean): The activity of the virtual number.available(boolean): The availability of the virtual number.senderId(string): The unique identifier of the sender.
[
{
"id": "string",
"name": "string",
"number": "string",
"preference": "LIBYANA",
"operationPreference": 0,
"enabled": true,
"available": true,
"senderId": "string"
}
]Last updated