Create project work relation
POST
/v1/projects/{projectId}/work-relationsCreates a normalized task relation. Blocks relations are mirrored into the target task dependency list and rejected when they would create a cycle.
How to call this endpoint
Every ACP API request uses bearer authentication. The examples here show the actual request path, auth header, and body shape that the platform expects.
Path, query, and header parameters
These parameters control which ACP object the endpoint acts on and how the request is processed.
Path parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| projectId | path | string | Yes | Project ID |
Query parameters
None.
Body schema
Content type: application/json · Required
| Field | Type | Required | Description |
|---|---|---|---|
| sourceTaskId | string | Yes | — |
| targetTaskId | string | Yes | — |
| relationType | blocks | parent_of | duplicates | relates_to | Yes | — |
| metadata | object | No | Free-form metadata object. |
What the API returns
Each response code below includes the documented payload shape for the ACP API.
201Project work relation createdapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| relation | object | No | — |
| relation.id | string | Yes | Unique identifier. |
| relation.userId | string | Yes | User ID. |
| relation.organizationId | string | No | — |
| relation.createdByUserId | string | No | — |
| relation.projectId | string | Yes | Project ID. |
| relation.sourceTaskId | string | Yes | — |
| relation.targetTaskId | string | Yes | — |
| relation.relationType | blocks | parent_of | duplicates | relates_to | Yes | — |
| relation.metadata | object | No | Free-form metadata object. |
| relation.createdAt | string | Yes | ISO 8601 timestamp. |
| relation.updatedAt | string | Yes | ISO 8601 timestamp. |
400Response
None.
404Resource not foundapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | No | — |
409Relation would create a dependency cycle
None.