إرسال
Project

List Project Contacts

Retrieve contacts from a specific contact group in the project

Endpoint

GET /api/project/contacts/{group_id}

Path parameters

FieldTypeDescription
group_idstring (UUID)The ID of the contact group

Query parameters

FieldTypeRequiredDescription
pageintegerNoPage number (default: 1)
per_pageintegerNoResults per page (default: 10)
fromdateNoFilter contacts created on/after this date (YYYY-MM-DD)
todateNoFilter contacts created on/before this date (YYYY-MM-DD)

Example

curl "https://sms.lamah.com/api/project/contacts/9db1f9a3-3b8e-4a7d-91d0-4c0ccf7c0b12?page=1&per_page=10" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

The response is wrapped in a data key containing a Laravel paginator object:

{
  "data": {
    "current_page": 1,
    "data": [
      {
        "name": "أحمد محمد",
        "phone": "00218912345678",
        "sex": "male",
        "birthdate": "1992-03-12T00:00:00Z",
        "city": null
      }
    ],
    "per_page": 10,
    "last_page": 2,
    "total": 30
  }
}

Top-level response fields

FieldTypeDescription
dataobjectLaravel paginator object

Pagination fields

FieldTypeDescription
current_pageintegerCurrent page number
per_pageintegerResults per page
last_pageintegerTotal number of pages
totalintegerTotal number of contacts in the group

Contact object fields

FieldTypeDescription
namestringContact name
phonestringPhone number in international format
sexstringGender if provided
birthdatestring|nullBirthdate if provided (ISO 8601)
citystring|nullCity if provided

On this page