---
title: "Add a task link"
method: POST
path: "/api/v0/tasks/{id}/links"
tags: ["Tasks"]
---

# Add a task link

`POST /api/v0/tasks/{id}/links`

## Request

- Base URL: `https://app.vibeflow.tools`
- URL: `https://app.vibeflow.tools/api/v0/tasks/{id}/links`
- Auth: HTTP bearer

New endpoint shape (biggest genuine gap). Locally links ride on create/update/detach today. Write — Phase 3.

## Path parameters

- `id` string, required

## Request body

- TaskLinkInput: Body of POST /api/v0/tasks/{id}/links. Field names match what BOTH implementations actually read (the cloud v0 route and the local /api/tasks/:id handler): `taskId` is the id of the task to link TO. The earlier `target` spelling was wrong — a client following it got a 400.
  - `type` 'parent' | 'relates' | 'blocks', required
  - `taskId` string, required: Id of the task to link to (external id on the cloud, local id locally)

## Response `201`

Add a task link — success

- Task: v0 canonical task = local Task fields plus external id, counts, and createdAt alias. D3: responses carry BOTH id and externalId.
  - `id` string, required: External id (cli_id ?? id on cloud; the local id locally)
  - `externalId` string, required: Universal external id — equal to id on the local surface
  - `title` string, required
  - `description` string
  - `status` 'backlog' | 'todo' | 'in-progress' | 'review' | 'done' | 'cancelled', required
  - `selector` string
  - `priority` string
  - `verified` boolean, nullable
  - `links` TaskLink[]
    - `taskId` string, required
    - `type` 'parent' | 'relates' | 'blocks', required
  - `commentCount` integer
  - `fileCount` integer
  - `createdAt` string, date-time

## Other responses

- `400`: Malformed request (includes invalid task/comment id form)
- `401`: Missing or invalid principal
- `403`: Lacking scope or membership
- `404`: Unknown id
- `429`: Rate limited — cloud per-token quota exceeded (reads 300/min, writes 60/min, token creation 10/hour); counters are per-replica, so the effective limit is the configured value × replicas. The response carries Retry-After.

---

[API](https://skmtc.dev/vibeflow/apis/vibeflow-api-v0.md) · [All operations](https://skmtc.dev/vibeflow/apis/vibeflow-api-v0/llms.txt) · [OpenAPI document](https://skmtc.dev/vibeflow/apis/vibeflow-api-v0/revisions/efd4ba944b0b?raw)
