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
Authorizations
x-auth-tokenstringRequired
Responses
200Success
application/json
get
/public/virtual-numbers
GET /public/virtual-numbers HTTP/1.1
Host: api.marsol.ly
x-auth-token: YOUR_API_KEY
Accept: */*
200Success
[
  {
    "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/json

Security

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 number

  • number (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: 2 for SMS, 4 for flash calls, and 8 for voice messages. Note: A combination of these values indicates support for multiple operations. For example, 6 (2 + 4) means the virtual number supportsSMS and flash call, while 14 (2 + 4 + 8) means SMS, flash call, and voice call are 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