LemuAI

Overview

Create and manage contacts and contact lists via the API

A contact represents a person you call or message. Contacts are organized into contact lists — named groups used by campaigns and automation triggers. A contact can belong to multiple lists.

MethodEndpointPurpose
GET/contactsList contacts, with filters and pagination
POST/contactsCreate a new contact
POST/contacts/bulk-upsertBulk upsert up to 5000 contacts into a named list
POST/contacts/upsertUpsert a single contact and add it to a named list
GET/contacts/{contact_id}Get a contact by ID, including list memberships
PUT/contacts/{contact_id}Update an existing contact
DELETE/contacts/{contact_id}Delete a contact
GET/contacts/{contact_id}/listsGet all lists a contact belongs to
GET/contacts/{contact_id}/eventsGet inbound events for a contact, newest first
GET/contacts/{contact_id}/callsGet voice calls placed to a contact, newest first
GET/contacts/custom-field-keysGet all editable contact columns for the organization
GET/contacts/listsList contact lists, with pagination
POST/contacts/listsCreate a new contact list
GET/contacts/lists/{list_id}Get a contact list by ID
PUT/contacts/lists/{list_id}Update an existing contact list
DELETE/contacts/lists/{list_id}Delete a contact list
GET/contacts/lists/{list_id}/contactsGet contacts in a list, with pagination and search
POST/contacts/lists/{list_id}/contactsAdd existing contacts to a list
DELETE/contacts/lists/{list_id}/contacts/{contact_id}Remove a contact from a list

Contact fields#

FieldDescription
external_idID from an external system (CRM, etc)
phonePhone number — the upsert key for /contacts/upsert
emailEmail address
first_name / last_nameName fields
companyCompany name
titleJob title
tagsList of tags for categorization
custom_fieldsArbitrary key-value pairs

Bulk upsert contacts#

/contacts/bulk-upsert is the fastest way to load or refresh a contact list — it matches each contact by phone, then external_id, creating or updating as needed, and creates the list automatically if it doesn't exist. Any field beyond the standard set (e.g. a CSV column like mobile or signup_date) is automatically folded into custom_fields.

curl -X POST https://app.lemuai.com/api/v1/contacts/bulk-upsert \
  -H "X-API-Key: lemu_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "list_name": "Q3 leads",
    "contacts": [
      { "phone": "+14155550100", "first_name": "Ana", "company": "Acme Co" },
      { "phone": "+14155550101", "first_name": "Ben", "tags": ["vip"] }
    ]
  }'
{
  "created": 2,
  "updated": 0,
  "failed": 0,
  "errors": [],
  "list_created": true,
  "contacts": [
    {
      "id": 901,
      "organization_id": 7,
      "external_id": null,
      "phone": "+14155550100",
      "email": null,
      "first_name": "Ana",
      "last_name": null,
      "company": "Acme Co",
      "title": null,
      "tags": null,
      "custom_fields": {},
      "created_at": "2026-08-20T10:00:00Z",
      "updated_at": "2026-08-20T10:00:00Z"
    }
  ]
}

Upsert a single contact#

/contacts/upsert looks up a contact by phone within the org, merging custom_fields and updating scalar fields if found, or creating it if not. Either phone or external_id is required.

curl -X POST https://app.lemuai.com/api/v1/contacts/upsert \
  -H "X-API-Key: lemu_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "list_name": "Q3 leads",
    "phone": "+14155550100",
    "first_name": "Ana",
    "tags": ["vip"]
  }'
{
  "contact": {
    "id": 901,
    "organization_id": 7,
    "external_id": null,
    "phone": "+14155550100",
    "email": null,
    "first_name": "Ana",
    "last_name": null,
    "company": "Acme Co",
    "title": null,
    "tags": ["vip"],
    "custom_fields": {},
    "created_at": "2026-08-20T10:00:00Z",
    "updated_at": "2026-08-20T10:05:00Z"
  },
  "contact_list": {
    "id": 55,
    "organization_id": 7,
    "name": "Q3 leads",
    "description": null,
    "metadata": {},
    "column_schema": [],
    "created_at": "2026-08-20T10:00:00Z",
    "updated_at": "2026-08-20T10:00:00Z"
  },
  "contact_created": false,
  "list_created": false
}

© 2026 LemuAI. Built with our own docs platform.