# Create or Update a Requester

> Find a LemuTickets requester by email, phone or other ids, or create one

URL: https://docs.lemuai.com/tickets-api/requesters/upsert

A **requester** is the customer who raises tickets: a person with a name, email, phone, WhatsApp number and, optionally, an account (their company). This endpoint finds the requester that matches the details you send, or creates one.

**Endpoint:** `POST /v1/requesters`

Needs the `requesters.write` scope.

To keep requesters in step with records in your ERP, [Upsert a requester by external ID](https://docs.lemuai.com/tickets-api/requesters/upsert-by-external-id) is usually simpler: it matches on your own id and updates exactly the fields you send.

## How the requester is found

LemuTickets looks for an existing requester in this order and uses the first match:

1. `lemu_contact_id`
2. `email` (not case sensitive)
3. `phone` (formatting is ignored; numbers without a country code are read as `+91`)
4. `whatsapp_id`
5. `external_id`

If there is a match, empty details on it are filled in from your request. Details that are already set (by your team or an earlier request) are **not** overwritten. If there is no match, a new requester is created. A new requester whose email domain matches an [account's](https://docs.lemuai.com/tickets-api/accounts/list) domain is added to that account.

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | string | No | Full name. |
| `email` | string | No | Email address. |
| `phone` | string | No | Phone number, ideally in international format. |
| `whatsapp_id` | string | No | WhatsApp number. |
| `external_id` | string | No | Your own id for the customer. |
| `account_id` | string (UUID) | No | The account (company) the requester belongs to. |
| `language` | string | No | Preferred language, for example `en` or `hi`. |
| `lemu_contact_id` | integer | No | The contact's id in Lemu AI, if you use both products. |
| `is_vip` | boolean | No | Mark as VIP. Default `false`. |
| `tags` | array of strings | No | Tags. |
| `custom_fields` | object | No | Extra values. Merged into existing custom fields. |

Send at least one of `email`, `phone`, `whatsapp_id`, `external_id` or `lemu_contact_id`, or every request creates a new requester.

**Note:** `is_vip` and `tags` always replace the stored values, even on an existing requester. If you leave them out, the requester's VIP flag is set to `false` and its tags are cleared. Send the current values, or use [Upsert a requester by external ID](https://docs.lemuai.com/tickets-api/requesters/upsert-by-external-id), which only changes the fields you send.

**Example request:**
```bash
curl -X POST https://api.tickets.lemuai.com/v1/requesters \
  -H "Authorization: Bearer ltk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Priya Sharma",
    "email": "priya@example.com",
    "phone": "98765 43210",
    "account_id": "4a6c8e0b-2d1f-4b3a-8c5e-9f7d1b3a5c6e",
    "language": "en",
    "is_vip": true,
    "tags": ["distributor"],
    "custom_fields": { "gstin": "29ABCDE1234F1Z5" }
  }'
```

## Response

**`201`** with the requester, whether it was created or found.
```json
{
  "id": "8b4d6f2a-0c1e-4a3b-9d5f-7e6a8c0b2d4f",
  "name": "Priya Sharma",
  "email": "priya@example.com",
  "phone": "+919876543210",
  "whatsapp_id": null,
  "account_id": "4a6c8e0b-2d1f-4b3a-8c5e-9f7d1b3a5c6e",
  "language": "en",
  "is_vip": true,
  "external_id": null,
  "lemu_contact_id": null,
  "tags": ["distributor"],
  "custom_fields": { "gstin": "29ABCDE1234F1Z5" },
  "anonymised": false,
  "created_at": "2026-11-25T09:05:12.330000+00:00",
  "open_tickets": null
}
```

## Requester fields

| Field | Type | Description |
|---|---|---|
| `id` | string | The requester's id. Use it as `requester_id` when [creating tickets](https://docs.lemuai.com/tickets-api/tickets/create). |
| `name` | string | Full name. |
| `email` | string or null | Email, stored in lower case. Partly hidden without the `pii.read` scope. |
| `phone` | string or null | Phone in international format. Partly hidden without `pii.read`. |
| `whatsapp_id` | string or null | WhatsApp number. Partly hidden without `pii.read`. |
| `account_id` | string or null | The account (company). |
| `language` | string or null | Preferred language. |
| `is_vip` | boolean | Marked as VIP. Find their tickets with the TQL query `requester.vip = true`. |
| `external_id` | string or null | Your own id. |
| `lemu_contact_id` | integer or null | The matching Lemu AI contact, if any. |
| `tags` | array of strings | Tags. |
| `custom_fields` | object | Extra values. |
| `anonymised` | boolean | `true` if the requester's personal data was erased. |
| `created_at` | string | When the requester was created. |
| `open_tickets` | integer or null | Tickets that are not done. Filled in by [List requesters](https://docs.lemuai.com/tickets-api/requesters/list); `null` here. |

## Errors

| Status | `code` | When |
|---|---|---|
| `403` | `missing_capability` | The key does not have `requesters.write` |
| `422` | `invalid_fields` | A field has the wrong type |
