Phonebooks
The Marsol API includes an endpoint for retrieving all phonebooks within a specific project. This GET endpoint allows you to access a comprehensive list of phonebooks associated with a particular project, enabling efficient organization and management of your contact data. By using this endpoint, you can easily fetch all the phonebooks in a project, making it simple to structure your SMS and OTP services.
GET /public/phonebooks HTTP/1.1
Host: api.marsol.ly
x-auth-token: YOUR_API_KEY
Accept: */*
[
{
"id": "text",
"name": "text",
"createdAt": "2025-12-06T03:04:49.825Z",
"accountId": "text",
"contactsCount": 1
}
]Endpoint: /public/phonebooks
Method: GET
This endpoint is used to obtain a list of all phonebooks associated with the authenticated user. Each phonebook contains information about its contacts and associated metadata.
Request Parameters
This endpoint does not require any parameters.
GET /public/phonebook 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 phonebook objects, each containing:
id(string): The unique identifier of the phonebook.name(string): The name of the phonebook.createdAt(string, date-time): The timestamp when the phonebook was created.accountId(string): The unique identifier of the account.contactsCount(number): The total count of contacts in the phonebook.
[
{
"id": "string",
"name": "string",
"createdAt": "2024-08-08T12:15:54.062Z",
"accountId": "string",
"contactsCount": 0
}
]Last updated