---
title: "Update display name or tags"
method: PATCH
path: "/api/leads/{id}"
tags: ["Leads"]
---

# Update display name or tags

`PATCH /api/leads/{id}`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/leads/{id}`
- Auth: one of:
  - API key in cookie `luca.session_token`
  - API key in header `x-api-key`
  - HTTP bearer

Only `displayName` and `tags` are writable here. Stage, consents, and identities each move through their own endpoint, so every change lands in the audit log under its own action.

**API key scopes:** `leads:write`. You also need an `Idempotency-Key` header.

## Path parameters

- `id` string, uuid, required

## Headers

- `Luca-API-Version` '1'

## Request body

- LeadPatch
  - `displayName` string
  - `stage` string
  - `customFields` object
  - `tags` string[]

## Response `200`

ok

- LeadUpdateResponse
  - `id` string, uuid, required
  - `lead` object, required
    - `id` string, uuid, required
    - `coachId` string, uuid, required
    - `channel` 'telegram' | 'instagram' | 'messenger' | 'whatsapp', required
    - `externalUserId` string, required
    - `displayName` string, nullable, required
    - `profilePhotoUrl` string, uri, nullable
    - `customFields` unknown, required
    - `tags` string[], required
    - `score` integer, required
    - `createdAt` string, required
    - `lastSeenAt` string, required

## Other responses

- `400`: bad request
- `401`: unauthorized
- `404`: not found
- `429`: rate limited
- `500`: internal error
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
