> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeplo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GET List Contacts

> Retrieve contacts with pagination, filtering, and search.

## List Contacts

`GET /api/contacts`

Retrieve a paginated list of contacts.

### Headers

**Cookie** `string` *required*

Session cookie (login via POST /api/auth/login)

```bash cURL theme={null}
curl "https://zeplo.ai/api/contacts?search=john&limit=20" \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
```

### Query parameters

**page** `integer` (default: 1)

Page number for pagination.

**limit** `integer` (default: 20)

Items per page (max: 100).

**search** `string`

Search name, phone, or email.

**groupId** `integer`

Filter by group.

**tags** `string`

Comma-separated tags.

**sortBy** `string` (default: created\_at)

Sort field.

**sortOrder** `string` (default: desc)

`asc` or `desc`.

```json Response theme={null}
{
  "success": true,
  "data": [
    {
      "id": 5,
      "name": "John Doe",
      "phone": "919876543210",
      "email": "john@example.com",
      "avatar": null,
      "tags": ["vip", "customer"],
      "groups": [{ "id": 1, "name": "Customers" }],
      "lastMessageAt": "2026-01-15T10:30:00Z",
      "createdAt": "2026-01-01T08:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 500,
    "totalPages": 25
  }
}
```

***

## Get all contacts (no pagination)

`GET /api/contacts-all`

Returns all contacts without pagination. Useful for exports.

```bash cURL theme={null}
curl https://zeplo.ai/api/contacts-all \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
```

***

## Get contacts by user

`GET /api/user/contacts/:userId`

Retrieve contacts associated with a specific user.

```bash cURL theme={null}
curl https://zeplo.ai/api/user/contacts/1 \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.