/leads/tags
Sync the full set of tags assigned to a lead. The request body is treated as the source of truth:
- Tags present in
tagsthat the lead does not have are created (find-or-create by slug) and assigned. - Tags currently assigned to the lead that are absent from
tagsare unassigned. - Send
"tags": []to clear all tags from the lead.
lead_id or email. The three fields (lead_id, email, tags) may also be nested anywhere inside the request body. The server will find them automatically.
Authenticate every request with the X-API-Key header. See Authentication.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
lead_id | string (uuid) | Yes* | Lead ID |
email | string | Yes* | Lead email (case-insensitive) |
tags | string[] | Yes | Complete list of tag names that should be active on the lead. Missing tags are unassigned; new names are created. Use [] to clear all tags. |
lead_id or email. If both are present, lead_id takes precedence.
Responses
200 Tags synced successfully
| Field | Description |
|---|---|
tags | Full current tag set after the sync |
added | IDs of tags newly assigned by this request |
removed | IDs of tags unassigned by this request |
400 Validation error
Returned when tags is not an array, or when neither lead_id nor email is provided.