> ## 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/POST Contacts (v1)

> Manage contacts via the external API with interactive testing.

## List contacts

`GET /api/v1/contacts`

Full CRUD operations for contacts.

### Headers

**x-api-key** `string` *required*

Your API key

**x-api-secret** `string` *required*

Your API secret key

**x-channel-id** `string` *required*

WhatsApp channel ID

```bash cURL theme={null}
curl https://zeplo.ai/api/v1/contacts \
  -H "x-api-key: zeplo_ak_abc123..." \
  -H "x-api-secret: zeplo_as_abc123..." \
  -H "x-channel-id: 647015955153740"
```

***

## Create contact

`POST /api/v1/contacts`

### Body parameters

**name** `string` *required*

Contact name.

**phone** `string` *required*

Phone number with country code.

**email** `string`

Contact email address.

```json theme={null}
{
  "name": "John Doe",
  "phone": "919876543210",
  "email": "john@example.com"
}
```

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/v1/contacts \
  -H "x-api-key: zeplo_ak_abc123..." \
  -H "x-api-secret: zeplo_as_abc123..." \
  -H "x-channel-id: 647015955153740" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "phone": "919876543210",
    "email": "john@example.com"
  }'
```

***

## Get contact

`GET /api/v1/contacts/:id`

**id** `integer` *required*

Contact ID.

```bash cURL theme={null}
curl https://zeplo.ai/api/v1/contacts/1 \
  -H "x-api-key: zeplo_ak_abc123..." \
  -H "x-api-secret: zeplo_as_abc123..." \
  -H "x-channel-id: 647015955153740"
```

***

## Update contact

`PUT /api/v1/contacts/:id`

**id** `integer` *required*

Contact ID.

### Body parameters

**name** `string`

Updated contact name.

**tags** `string[]`

Array of tags.

```json theme={null}
{
  "name": "John Doe Jr.",
  "tags": ["customer", "premium"]
}
```

```bash cURL theme={null}
curl -X PUT https://zeplo.ai/api/v1/contacts/1 \
  -H "x-api-key: zeplo_ak_abc123..." \
  -H "x-api-secret: zeplo_as_abc123..." \
  -H "x-channel-id: 647015955153740" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe Jr.",
    "tags": ["customer", "premium"]
  }'
```

***

## Delete contact

`DELETE /api/v1/contacts/:id`

**id** `integer` *required*

Contact ID.

```bash cURL theme={null}
curl -X DELETE https://zeplo.ai/api/v1/contacts/1 \
  -H "x-api-key: zeplo_ak_abc123..." \
  -H "x-api-secret: zeplo_as_abc123..." \
  -H "x-channel-id: 647015955153740"
```

***

## List groups

`GET /api/v1/contacts/groups`

```bash cURL theme={null}
curl https://zeplo.ai/api/v1/contacts/groups \
  -H "x-api-key: zeplo_ak_abc123..." \
  -H "x-api-secret: zeplo_as_abc123..." \
  -H "x-channel-id: 647015955153740"
```

***

## Add contact to group

`POST /api/v1/contacts/groups/:groupId/add`

**groupId** `integer` *required*

Group ID.

### Body parameters

**contactId** `integer` *required*

Contact ID to add to the group.

```json theme={null}
{
  "contactId": 5
}
```

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/v1/contacts/groups/1/add \
  -H "x-api-key: zeplo_ak_abc123..." \
  -H "x-api-secret: zeplo_as_abc123..." \
  -H "x-channel-id: 647015955153740" \
  -H "Content-Type: application/json" \
  -d '{
    "contactId": 5
  }'
```


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