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

# Contacts

> Manage customer contacts and contact lists

All endpoints require authentication.

## Contacts

### List Contacts

```http theme={null}
GET /api/contacts
```

***

### Create Contact

```http theme={null}
POST /api/contacts
```

**Body**

| Field    | Type   | Required | Description                                   |
| -------- | ------ | -------- | --------------------------------------------- |
| `name`   | string | Yes      | Contact full name                             |
| `phone`  | string | No       | Phone number with country code (for WhatsApp) |
| `email`  | string | No       | Email address                                 |
| `source` | string | No       | `whatsapp`, `facebook`, `manual`              |

***

### Get Contact

```http theme={null}
GET /api/contacts/:id
```

***

### Update Contact

```http theme={null}
PATCH /api/contacts/:id
```

Updatable fields include `name`, `phone`, `email`, `optIn`, `replyBot`, `status`.

| Field      | Type    | Description                                      |
| ---------- | ------- | ------------------------------------------------ |
| `optIn`    | boolean | Whether the contact consents to receive messages |
| `replyBot` | boolean | Enable/disable bot auto-replies for this contact |
| `status`   | string  | `open`, `pending`, `resolved`                    |

***

### Delete Contact

```http theme={null}
DELETE /api/contacts/:id
```

***

## Contact Lists

### List Contact Lists

```http theme={null}
GET /api/contact-lists
```

***

### Create Contact List

```http theme={null}
POST /api/contact-lists
```

**Body**

| Field  | Type   | Required | Description |
| ------ | ------ | -------- | ----------- |
| `name` | string | Yes      | List label  |
