---
title: "Add a dependency (this task depends on another)"
method: POST
path: "/tasks/{id}/dependencies"
tags: ["Tasks"]
---

# Add a dependency (this task depends on another)

`POST /tasks/{id}/dependencies`

## Request

- Base URL: `https://tasg.app/api/v1`
- URL: `https://tasg.app/api/v1/tasks/{id}/dependencies`
- Auth: HTTP bearer

Both tasks must be in the same workspace; cycles are rejected. If the depended-on task is incomplete, this task becomes `blocked`.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `depends_on_task_id` string, uuid, required
  - `dependency_type` 'finish_to_start' | 'start_to_start' | 'finish_to_finish'
  - `lag_days` integer

## Response `201`

Created.

- object
  - `dependency` object, required: Raw dependency row (camelCase).
    - `id` string, uuid, required
    - `dependentTaskId` string, uuid, required
    - `dependsOnTaskId` string, uuid, required
    - `dependencyType` 'finish_to_start' | 'start_to_start' | 'finish_to_finish'
    - `lagDays` integer
    - `createdAt` string, date-time

## Other responses

- `400`: Validation failed: the body or query did not match the schema, or a business rule was violated. `error` says which.
- `401`: Missing, invalid, expired or revoked credentials.
- `403`: Authenticated, but not allowed: not a member, insufficient project role or the API token lacks the required scope.
- `404`: Not found, or not visible to the caller (tenancy is enforced: foreign resources look identical to missing ones).
- `429`: Rate limited. Back off and retry after the window in the `RateLimit-*` headers.

---

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