TryzenAPI
Leads

Add tags to a lead

POST
/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.

Adds the named tags and keeps the lead's others; a tag it already has is a no-op. 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 POST '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"    }  ]}