---
title: "Link a dependency edge"
method: POST
path: "/api/goal/deps"
tags: ["Goal"]
---

# Link a dependency edge

`POST /api/goal/deps`

## Request

- Base URL: `http://localhost:38200`
- URL: `http://localhost:38200/api/goal/deps`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `token`

## Request body

- object
  - `from_node_id` integer, required
  - `to_node_id` integer, required
  - `kind` 'blocks' | 'informs'

## Response `201`

Created edge.

- GoalDep: A `goal_deps` DAG edge — cuts across the containment tree.
  - `id` integer
  - `tenantId` integer
  - `fromNodeId` integer
  - `toNodeId` integer
  - `kind` 'blocks' | 'informs'
  - `createdAt` string, date-time

## Other responses

- `400`: Request body/query failed Zod validation.
- `401`: Missing or invalid credentials.
- `409`: The edge would introduce a cycle.

---

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