API & WebhooksTags

Tags

List, create, read, update, and delete tags via the API.

Tags API

Manage tags and organize them into groups. All endpoints require an API token with the appropriate tags.* ability.


List Tags

GET /api/v1/tags — Permission: tags.view

Returns tags sorted alphabetically by name.

Query Parameters

ParameterTypeRequiredDescription
searchstringNoSearch by tag name (case-insensitive partial match)
per_pageintegerNoResults per page, 1–100 (default: 25)

Example Request

curl -X GET "https://your-domain.com/api/v1/tags?search=vip" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Example Response

{
  "data": [
    {
      "id": 3,
      "name": "VIP",
      "slug": "vip",
      "color": "blue",
      "group_id": 1,
      "group_name": "Priority",
      "created_at": "2025-01-10T08:00:00.000000Z",
      "updated_at": "2025-01-10T08:00:00.000000Z"
    }
  ],
  "meta": { "current_page": 1, "last_page": 1, "per_page": 25, "total": 1 },
  "links": { "first": "...", "last": "...", "prev": null, "next": null }
}

Create Tag

POST /api/v1/tags — Permission: tags.create

Request Body

FieldTypeRequiredDescription
namestringYesTag name (max 255). Slug is auto-generated.
colorstringNoTag color (max 50, defaults to gray)
tag_group_idintegerNoID of a tag group to organize this tag under

Example Request

curl -X POST "https://your-domain.com/api/v1/tags" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Enterprise",
    "color": "purple",
    "tag_group_id": 1
  }'

Example Response 201 Created

{
  "data": {
    "id": 15,
    "name": "Enterprise",
    "slug": "enterprise",
    "color": "purple",
    "group_id": 1,
    "group_name": "Priority",
    "created_at": "2025-03-20T14:00:00.000000Z",
    "updated_at": "2025-03-20T14:00:00.000000Z"
  }
}

Get Tag

GET /api/v1/tags/{id} — Permission: tags.view

Example Request

curl -X GET "https://your-domain.com/api/v1/tags/3" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Returns the same shape as a single item in the list response.


Update Tag

PUT /api/v1/tags/{id} — Permission: tags.edit

Send only the fields you want to change. Updating the name automatically regenerates the slug.

Request Body

FieldTypeRequiredDescription
namestringSometimesTag name (max 255)
colorstringNoTag color (max 50)
tag_group_idintegerNoTag group ID (set to null to remove from group)

Example Request

curl -X PUT "https://your-domain.com/api/v1/tags/15" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "color": "gold"
  }'

Delete Tag

DELETE /api/v1/tags/{id} — Permission: tags.delete

Example Request

curl -X DELETE "https://your-domain.com/api/v1/tags/15" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Returns 204 No Content on success.

Was this article helpful?