agentlyleads docs
Tags API

List, create, update and delete tags

Tag IDs are fenced by workspace: an ID from another workspace returns the same 404 as one that does not exist.

GET /api/v1/tags

Every tag, sorted by name, with usage counts. Requires read:tags.

GET /api/v1/tags HTTP/1.1
Host: agentlyleads.com
Authorization: Bearer alk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{ "tags": [ { "id": "cmq5tag00alk34567890", "name": "VIP", "color": "amber", "createdAt": "2026-09-27T14:02:00.000Z", "counts": { "contacts": 42, "leads": 3, "companies": 5, "deals": 7 } } ] }

POST /api/v1/tags

Create a tag. Requires write:tags.

{ "name": "VIP", "color": "amber" }

Returns 201 with { "tag": {...}, "created": true }. If a tag with that exact name already exists, it is returned with 200 and "created": false, so the call is safe to repeat.

PATCH /api/v1/tags/{id}

Rename, recolor, or both. "color": null clears the color. Requires write:tags.

{ "name": "Key account" }

Returns { "tag": {...} }. Renaming to a name another tag already has returns 409.

DELETE /api/v1/tags/{id}

Deletes the tag and removes it from every record that carried it. The records themselves are not touched. Requires write:tags.

{ "deleted": 1, "id": "cmq5tag00alk34567890" }

On this page