Browse the docs Open

Tags

Label and group your templates.

Tags organise templates. Create them, search them, and attach them to templates. All tags are scoped to your company.

GET /v1/tags

List tags

Returns up to 15 tags, ordered by name, optionally filtered by a search term.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

Parameters

Name In Type Required Description
search query string No Case-insensitive substring match on tag name.

Example request

curl

curl 'https://snapsbrew.com/api/v1/tags?search=launch' \
  -H 'Authorization: Bearer <your-token>'

Example responses

200 Matching tags.
{
    "data": [
        {
            "id": 1,
            "name": "Launch",
            "slug": "launch"
        }
    ]
}

POST /v1/tags

Create a tag

Creates a tag. The slug is generated from the name; collisions get a numeric suffix.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

Request body

Content-Type: application/json

Field Type Required Validation Description
name string Yes required, string, max:255 Display name of the tag.

Example request

curl

curl -X POST https://snapsbrew.com/api/v1/tags \
  -H 'Authorization: Bearer <your-token>' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Launch"}'

Example responses

201 Tag created.
{
    "data": {
        "id": 1,
        "name": "Launch",
        "slug": "launch"
    }
}
422 Validation failed.
{
    "message": "The name field is required."
}

POST /v1/templates/{templateUuid}/tags

Sync template tags

Replaces all tags on a template with the supplied set. Send an empty array to clear every tag.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

Parameters

Name In Type Required Description
templateUuid path string Yes UUID of the template.

Request body

Content-Type: application/json

Field Type Required Validation Description
tag_ids integer[] No array Tag IDs to attach. Replaces the existing set.
tag_ids.* integer No integer, exists tags.id scoped to company Each ID must belong to your company.

Example request

curl

curl -X POST https://snapsbrew.com/api/v1/templates/<uuid>/tags \
  -H 'Authorization: Bearer <your-token>' \
  -H 'Content-Type: application/json' \
  -d '{"tag_ids":[1,2]}'

Example responses

200 Tags synced.
{
    "message": "Tags updated successfully.",
    "tags": [
        {
            "id": 1,
            "name": "Launch",
            "slug": "launch"
        }
    ]
}
404 Template not found in your company.
{
    "message": "Not found."
}
422 A tag ID is invalid or not yours.
{
    "message": "The selected tag_ids.0 is invalid."
}