Skip to main content

Query Contact Groups

Endpoint

GET  /sms/contact-lists

Description

The /sms/contact-lists endpoint provides a paginated query of all contact groups available to on your account. The filters below are available to the endpoint

Query Parameters (optional)

ParameterTypeDescription
pageNumberThe page number to retrieve.
per_pageNumberThe number of results per page.
queryStringA search term to filter the names of contact groups.
date_createdStringThe time period to filter contact groups by. Use one of the following options: today, yesterday, this-week, this-month, or custom.
start_dateStringRequired when date_created is set to custom. The start date for filtering contact groups.
end_dateStringRequired when date_created is set to custom. The end date for filtering contact groups.

Example Request

curl -X GET "https://service-prod.api.comms360.africa/api/sms/contact-lists?date_created=custom&end_date=2025-01-15&page=1&per_page=10&query=contact-name&start_date=2025-01-15"

Example Response

HTTP/1.1 200 OK
Content-Type: application/json

{
"responsecode": 200,
"data": {
"data": [
{
"id": 1,
"name": "Contact group 1",
"meta": {
"placeholders": [
"phone number",
"first name",
"last name",
"pet"
],
"count": 3
},
"created_at": "2025-01-01T00:00:00.000000Z"
},
{
"id": 2,
"name": "Contact group 2",
"meta": {
"count": 1
},
"created_at": "2025-01-01T00:00:00.000000Z"
},
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 10,
"to": 3,
"total": 3
}
},
"responsemessage": "Contact lists retrieved"
}