---
docId: doc_0f6f8fea1eed4aa988e92f01847a5001
title: Contacts
description: Endpoints to manage your contacts' information in Platica.
---

<script>
  import { Ways, Note } from '$lib/components';
</script>

# Contacts

Contacts are the people who interact with your agents. The API calls them `clients` (`/v1/clients`). Store their profiles, custom fields and tags to organize them.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl https://api.platic.ai/v1/clients \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phoneNumber": "5215512345678", "name": "Ana" }'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.clients.create({ phoneNumber: "5215512345678", name: "Ana" });
```

</Ways.Way>
</Ways>

## What you need to know

- Every error under `/v1/clients` uses the standard format, with a `details.code`. See [Errors](/api-reference/errors).
- `GET` and `PATCH /v1/clients/{id}` accept the contact's ID, phone number or email.
- A blocked contact stops receiving automatic replies.

## Endpoints

| Method | Endpoint | Description |
|--------|----------|-------------|
| `GET` | [`/v1/clients`](/api-reference/contacts/list) | List all contacts |
| `POST` | [`/v1/clients/search`](/api-reference/contacts/search) | Search contacts by text and filters |
| `POST` | [`/v1/clients/tags`](/api-reference/contacts/tag) | Add or remove tags on many contacts |
| `GET` | [`/v1/clients/{id}`](/api-reference/contacts/get) | Get a contact by ID, phone number or email |
| `POST` | [`/v1/clients`](/api-reference/contacts/create) | Create a contact |
| `PATCH` | [`/v1/clients/{id}`](/api-reference/contacts/update) | Update a contact by ID, phone number or email |
| `DELETE` | [`/v1/clients/{id}`](/api-reference/contacts/delete) | Delete a contact by ID or phone number |
| `GET` | [`/v1/clients/{clientId}/conversations`](/api-reference/contacts/conversations) | List all the conversations of a contact |
| `PATCH` | [`/v1/clients/{id}/moderation`](/api-reference/contacts/moderate) | Block, unblock or reset strikes |

<Note type="tip">

Contacts can have custom fields defined per workspace. See [Custom fields](/api-reference/custom-fields) to list, create, update or delete them.

</Note>

## Status and moderation

Each contact has a `status` (`active` or `blocked`) and a `moderation` object with its history. A blocked contact stops receiving automatic replies: its new conversations are born marked as spam and agents skip them.

Violations of the agent's safety rules add strikes to the contact. Exceeding the agent's limit blocks them automatically. Use [Moderate a contact](/api-reference/contacts/moderate) to change their status manually.

<Note type="important">

Unblocking resets strikes to zero. Resetting strikes alone keeps the contact blocked.

</Note>

<Note type="tip">

`GET` and `PATCH /v1/clients/{id}` accept the contact's ID, phone number or email. That way you find an email contact, which may not have a phone number. `/moderation` accepts the ID or the phone number.

</Note>
