TryzenAPI
Leads

Replace a lead's tags as a set

PUT
/v1/leads/{leadId}/tags

Access: an API key (or an org-wide key naming the workspace) with manage on leads.

Batch: through an API key, tagIds holds at most 100 items.

The named tags become the lead's whole set (empty lists remove every tag). Name tags by tagIds, by names, or both (at most 100 each). A name the workspace doesn't have is 422 tag_not_found unless createMissing (then it is created with color, default blue). A lead carries at most 100 tags (422 too_many_tags). A real change fires the lead_tag_updated webhook; a no-op fires nothing.

Authorization

apiKey
headerx-api-key<token>

Workspace API key (nrk_…), shown once when created

Path Parameters

leadId*string
Match^[0-9a-f]{24}$

Request Body

application/json
  1. body
tagIds?array<>
Itemsitems <= 100
Default[]
names?array<>
Itemsitems <= 100
Default[]
createMissing?boolean
Defaultfalse
color?string
Default"blue"
Value in"gray""red""orange""yellow""green""blue""purple""pink"

Response Body

Default Response

application/json
  1. response
leadId*string
Match^[0-9a-f]{24}$
tags*array<>
added*array<>
removed*array<>
created*array<>
Example Request
curl -X PUT 'https://api.tryzen.co/v1/leads/string/tags' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "leadId": "string",  "tags": [    {      "id": "string",      "name": "string",      "color": "gray"    }  ],  "added": [    "string"  ],  "removed": [    "string"  ],  "created": [    {      "id": "string",      "name": "string",      "color": "gray"    }  ]}