Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/0m1n3m/contacts-db/llms.txt

Use this file to discover all available pages before exploring further.

The tags API is a pure JSON layer designed for use by the Blade frontend and external integrations alike. Every endpoint under the /api/tags and /api/tasks/{task}/tags prefixes returns application/json regardless of the request’s Accept header. The web-form variants at /tags and /tasks/{task}/tags behave identically but redirect instead of returning JSON — use the /api/ prefix when building programmatic clients. All endpoints require session authentication and email verification. Tag creation and modification require the admin or editor role; tag deletion requires admin.

Tag Management

GET /api/tags

Returns all tags in the system as a flat JSON array, ordered by insertion order. Role: any authenticated user Response:
[
  {
    "id": 1,
    "name": "bug",
    "color": "#fc4539",
    "created_at": "2026-07-20T10:00:00.000000Z",
    "updated_at": "2026-07-20T10:00:00.000000Z"
  },
  {
    "id": 2,
    "name": "feature",
    "color": "#3B82F6",
    "created_at": "2026-07-20T10:05:00.000000Z",
    "updated_at": "2026-07-20T10:05:00.000000Z"
  }
]

POST /api/tags

Creates a new tag. If no color is provided, the default #3B82F6 (blue) is applied. Role: admin or editor (returns 403 for viewers)
name
string
required
Tag label. Maximum 50 characters. Must be non-empty.
color
string
Hex colour code for the tag badge, in the format #RRGGBB (case-insensitive). For example: #fc4539 or #3B82F6. Defaults to #3B82F6 if omitted.
Example request:
POST /api/tags
Content-Type: application/json
X-XSRF-TOKEN: your-csrf-token

{
  "name": "bug",
  "color": "#fc4539"
}
Example response (201 Created):
{
  "id": 5,
  "name": "bug",
  "color": "#fc4539",
  "created_at": "2026-07-20T10:00:00Z",
  "updated_at": "2026-07-20T10:00:00Z"
}

PATCH /api/tags/

Updates an existing tag’s name, colour, or both. Fields are optional — omitted fields are left unchanged. Role: admin or editor
name
string
Updated tag label. Maximum 50 characters.
color
string
Updated hex colour code in #RRGGBB format.
Example request:
PATCH /api/tags/5
Content-Type: application/json
X-XSRF-TOKEN: your-csrf-token

{
  "color": "#22c55e"
}
Example response (200 OK):
{
  "id": 5,
  "name": "bug",
  "color": "#22c55e",
  "created_at": "2026-07-20T10:00:00Z",
  "updated_at": "2026-07-20T11:30:00Z"
}

DELETE /api/tags/

Permanently deletes a tag. Existing task–tag relationships are also removed (cascade). Role: admin only (returns 403 for editors and viewers) Example response (200 OK):
{"ok": true}
Deleting a tag removes it from all tasks that currently have it attached. This action cannot be undone.

Task Tags

GET /api/tasks//tags

Returns all tags currently attached to the specified task. Role: any authenticated user
task
integer
required
The ID of the task whose tags you want to retrieve.
Response:
[
  {
    "id": 2,
    "name": "feature",
    "color": "#3B82F6",
    "created_at": "2026-07-20T10:05:00Z",
    "updated_at": "2026-07-20T10:05:00Z"
  }
]

POST /api/tasks//tags/

Attaches an existing tag to a task. Idempotent — attaching a tag that is already attached does not create a duplicate. Role: admin, or editor who created the task. Returns 403 for viewers and for editors who did not create the task.
task
integer
required
The ID of the task to tag.
tag
integer
required
The ID of the tag to attach.
For the web-form variant at POST /tasks/{task}/tags, pass the tag ID in a tag_id body parameter rather than in the URL path.
Example request:
POST /api/tasks/42/tags/5
X-XSRF-TOKEN: your-csrf-token
Example response (200 OK):
{"ok": true}

DELETE /api/tasks//tags/

Detaches a tag from a task. Role: admin, or editor who created the task.
task
integer
required
The ID of the task to remove the tag from.
tag
integer
required
The ID of the tag to detach.
Example response (200 OK):
{"ok": true}

Task Dependencies

Task dependencies track prerequisite relationships between tasks. Each dependency record links a task to another task that must be completed before it.

GET /api/tasks//dependencies

Returns all dependencies and subtasks for the specified task. The response object has two keys: dependencies (tasks that this task depends on) and subtasks (tasks that depend on this task). Role: any authenticated user
task
integer
required
The ID of the task whose dependency graph you want to retrieve.
Example response (200 OK):
{
  "dependencies": [
    {
      "id": 3,
      "task_id": 42,
      "dependent_task_id": 37,
      "type": "depends_on",
      "created_at": "2026-07-20T09:00:00Z",
      "updated_at": "2026-07-20T09:00:00Z",
      "dependent_task": {
        "id": 37,
        "title": "Set up CI pipeline"
      }
    }
  ],
  "subtasks": []
}

POST /api/tasks//dependencies

Adds a dependency relationship to a task. The CreateTaskDependencyAction checks for circular dependencies and raises a 422 if one is detected. Role: admin, or editor who created the task.
task
integer
required
The ID of the task that gains a dependency (i.e. the task that depends on another).
dependent_task_id
integer
required
The ID of the prerequisite task — the task that must be completed first.
type
string
default:"depends_on"
Relationship type. One of: depends_on, blocks, relates_to. Defaults to depends_on if omitted.
Example request:
POST /api/tasks/42/dependencies
Content-Type: application/json
X-XSRF-TOKEN: your-csrf-token

{
  "dependent_task_id": 37,
  "type": "depends_on"
}
Example response (201 Created):
{
  "id": 3,
  "task_id": 42,
  "dependent_task_id": 37,
  "type": "depends_on",
  "created_at": "2026-07-20T09:00:00Z",
  "updated_at": "2026-07-20T09:00:00Z"
}
Example error response (422 Unprocessable Entity):
{"message": "Circular dependency detected."}

DELETE /api/tasks//dependencies/

Removes a dependency record from a task. Role: admin, or editor who created the task. Also validates that the dependency belongs to the given task (returns 403 if not).
task
integer
required
The ID of the parent task.
dependency
integer
required
The ID of the dependency record to remove.
Example response (200 OK):
{"ok": true}

Build docs developers (and LLMs) love