Skip to content

Tags

Tags define structured schemas that can be applied to thogits. Each tag has a name, optional description, and a set of typed fields. When a tag is applied to a thogit, the thogit gains those fields with validated values.

Each field in a tag schema has one of the following types:

TypeValueDescription
String"String"Free-text string
Number"Number"Numeric value (integer or float)
Boolean"Boolean"True or false
Date"Date"ISO 8601 date string
Reference"Reference"ULID referencing another thogit
Select{"type": "Select", "variants": [...]}Single choice from defined variants
MultiSelect{"type": "MultiSelect", "variants": [...]}Multiple choices from string variants

Select variants can optionally define their own sub-fields:

{
"type": "Select",
"variants": [
{"name": "Bug", "fields": {"severity": "String"}},
"Feature",
"Chore"
]
}

MultiSelect variants are simple string arrays:

{
"type": "MultiSelect",
"variants": ["frontend", "backend", "infrastructure"]
}

Create a new tag with a typed schema.

Auth required: Yes

Request body:

FieldTypeRequiredDescription
namestringYesTag name
descriptionstringNoDescription of the tag’s purpose
fieldsobjectYesMap of field names to schema types
Terminal window
curl -X POST https://app.thogits.com/api/tags \
-H "Content-Type: application/json" \
-b cookies.txt -c cookies.txt \
-d '{
"name": "Task",
"description": "Track work items",
"fields": {
"status": {"type": "Select", "variants": ["Todo", "In Progress", "Done"]},
"priority": "String",
"due_date": "Date",
"assignee": "Reference",
"labels": {"type": "MultiSelect", "variants": ["bug", "feature", "docs"]}
}
}'

Response (200): The full tag object including its generated id and schema_version: 1.

{
"id": "01HQ3K5P7YGXJV8N2M4W6R0T1S",
"name": "Task",
"description": "Track work items",
"fields": {
"status": {"type": "Select", "variants": ["Todo", "In Progress", "Done"]},
"priority": "String",
"due_date": "Date",
"assignee": "Reference",
"labels": {"type": "MultiSelect", "variants": ["bug", "feature", "docs"]}
},
"schema_version": 1,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z"
}

Retrieve a single tag by its ULID.

Auth required: Yes

Terminal window
curl https://app.thogits.com/api/tags/01HQ3K5P7YGXJV8N2M4W6R0T1S \
-b cookies.txt -c cookies.txt

Response (200): The full tag object.

Errors:

StatusCause
404Tag not found or soft-deleted

Update a tag’s name, description, or fields. Changing the fields schema increments the tag’s schema_version.

Auth required: Yes

Request body:

FieldTypeRequiredDescription
namestringNoNew name
descriptionstringNoNew description
fieldsobjectNoUpdated field schema (replaces all fields)
Terminal window
curl -X PUT https://app.thogits.com/api/tags/01HQ3K5P7YGXJV8N2M4W6R0T1S \
-H "Content-Type: application/json" \
-b cookies.txt -c cookies.txt \
-d '{
"fields": {
"status": {"type": "Select", "variants": ["Todo", "In Progress", "Review", "Done"]},
"priority": "String",
"due_date": "Date",
"assignee": "Reference",
"labels": {"type": "MultiSelect", "variants": ["bug", "feature", "docs", "security"]}
}
}'

Response (200): The updated tag object with incremented schema_version.


Soft-delete a tag. The tag is removed from all thogits that currently use it.

Auth required: Yes

Terminal window
curl -X DELETE https://app.thogits.com/api/tags/01HQ3K5P7YGXJV8N2M4W6R0T1S \
-b cookies.txt -c cookies.txt

Response (200): The deleted tag object.

Errors:

StatusCause
404Tag not found

Search for tags using a filter.

Auth required: Yes

Request body:

FieldTypeRequiredDescription
filterTagFilter | nullNoFilter criteria

Supported filter shapes:

  • {"search": "text"} — full-text search across name and description
  • {"name": {"contains": "text"}} — name substring match
  • {"and": [filter, ...]} — logical AND
  • {"or": [filter, ...]} — logical OR
  • {"not": filter} — logical NOT
Terminal window
curl -X POST https://app.thogits.com/api/tags/search \
-H "Content-Type: application/json" \
-b cookies.txt -c cookies.txt \
-d '{"filter": {"name": {"contains": "task"}}}'

Response (200):

[
{
"id": "01HQ3K5P7YGXJV8N2M4W6R0T1S",
"name": "Task",
"description": "Track work items",
"fields": { ... },
"schema_version": 2,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-16T14:00:00Z"
}
]