Skip to content

Tags

Tags are organization-scoped labels used to categorize contacts. Each tag has a unique name and a predefined color. Tags are identified by their name in the URL path (not a UUID), so renaming or deleting a tag is done via /api/tags/{name}.

Valid colors are: blue, red, green, yellow, purple, gray. An empty color defaults to gray.

Get all tags in your organization.

Terminal window
GET /api/tags
ParameterTypeDescription
searchstringCase-insensitive filter by tag name or color
pageintegerPage number (default 1)
limitintegerResults per page
{
"status": "success",
"data": {
"tags": [
{
"name": "VIP",
"color": "purple",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
],
"total": 1,
"page": 1,
"limit": 20
}
}

Create a new tag.

Terminal window
POST /api/tags
{
"name": "VIP",
"color": "purple"
}
FieldTypeRequiredDescription
namestringYesUnique tag name (max 50 characters)
colorstringNoOne of blue, red, green, yellow, purple, gray (defaults to gray)
{
"status": "success",
"data": {
"name": "VIP",
"color": "purple",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
}

Update a tag's name and/or color. If the name changes, every contact using the old tag is updated to reference the new name.

Terminal window
PUT /api/tags/{name}
{
"name": "VIP Customer",
"color": "blue"
}
FieldTypeRequiredDescription
namestringNoNew tag name (max 50 characters). Omit to keep the current name
colorstringNoNew color. Omit to keep the current color
{
"status": "success",
"data": {
"name": "VIP Customer",
"color": "blue",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-02T00:00:00Z"
}
}

Delete a tag. The tag is also removed from every contact that references it.

Terminal window
DELETE /api/tags/{name}
{
"status": "success",
"data": {
"message": "Tag deleted"
}
}
  • Contacts API - Assign tags to contacts via PUT /api/contacts/{id}/tags