# Overview

> Keep your Lemu AI contacts and contact lists in sync with your CRM

URL: https://docs.lemuai.com/api-reference/contacts/overview

A **contact** is a person you call or message. Contacts are grouped into **contact lists**, which campaigns and journeys use as their audience. One contact can be in several lists.

The contacts API is for keeping Lemu AI in step with your own system (a CRM, a spreadsheet, a signup form):

| Method | Endpoint | Purpose |
|---|---|---|
| `POST` | `/contacts/upsert` | [Add or update one contact](https://docs.lemuai.com/api-reference/contacts/upsert) and put it in a list |
| `POST` | `/contacts/bulk-upsert` | [Add or update up to 5,000 contacts](https://docs.lemuai.com/api-reference/contacts/bulk-upsert) in one list |
| `GET` | `/contacts` | [List and search contacts](https://docs.lemuai.com/api-reference/contacts/list) |
| `GET` | `/contacts/{contact_id}` | [Get one contact](https://docs.lemuai.com/api-reference/contacts/get) and the lists it is in |
| `GET` | `/contacts/lists` | [List your contact lists](https://docs.lemuai.com/api-reference/contacts/lists) |
| `GET` | `/contacts/lists/{list_id}/contacts` | [List the contacts in one list](https://docs.lemuai.com/api-reference/contacts/list-members) |
| `GET` | `/contacts/{contact_id}/consents` | [Get a contact's consent](https://docs.lemuai.com/api-reference/contacts/consents) for each channel |
| `PUT` | `/contacts/{contact_id}/consents/{channel}` | [Record an opt-in or opt-out](https://docs.lemuai.com/api-reference/contacts/consents#record-consent-for-one-channel) |
| `GET` | `/contacts/{contact_id}/activity` | [Get a contact's activity](https://docs.lemuai.com/api-reference/contacts/activity) from every source |
| `GET` | `/contacts/{contact_id}/messages` | [List a contact's messages and calls](https://docs.lemuai.com/api-reference/contacts/messages) |

Editing lists, deleting contacts, and importing from Google Sheets are done in the dashboard under **Contacts**.

## Contact fields

| Field | Type | Description |
|---|---|---|
| `id` | integer | The contact's id in Lemu AI. |
| `organization_id` | integer | Your organization's id. |
| `phone` | string or null | Phone number in international format, for example `+919876543210`. Used to match existing contacts when upserting. |
| `phone_last4` | string or null | The last four digits of the phone number. |
| `phone_masked` | boolean | `true` if `phone` is partly hidden (see below). |
| `external_id` | string or null | Your own id for this person, for example the CRM record id. Must be unique in your organization. |
| `email` | string or null | Email address. |
| `first_name`, `last_name` | string or null | Name. |
| `company` | string or null | Company name. |
| `title` | string or null | Job title. |
| `tags` | array of strings or null | Labels for grouping and filtering. |
| `custom_fields` | object | Any other values you store on the contact, as key-value pairs. Agents can use them as template variables when calling the contact. |
| `created_at`, `updated_at` | string | Timestamps (ISO 8601, UTC). |

## Hidden phone numbers

Phone numbers are personal data. If the person who created the API key isn't allowed to view personal data in your organization, responses show the number partly hidden (for example `•••• 3210`) and set `phone_masked` to `true`. Organization owners and admins, and team members with permission to view personal data, see full numbers.

## Plan limits

Your plan sets how many contacts your organization can store. Requests that would go over the limit return `402`.
