---
title: "Update a spec node"
method: PATCH
path: "/api/v1/projects/{projectId}/spec/nodes/{nodeId}"
tags: ["Projects"]
---

# Update a spec node

`PATCH /api/v1/projects/{projectId}/spec/nodes/{nodeId}`

## Request

- Base URL: `https://app.khotan.com`
- URL: `https://app.khotan.com/api/v1/projects/{projectId}/spec/nodes/{nodeId}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Updates a node's title, sibling position, parent, or milestone plan. A move is applied first so a node that is becoming a phase can then accept dates. Each field is optional; omitted fields are left alone.

## Path parameters

- `projectId` string, required
- `nodeId` string, required

## Request body

- object
  - `title` string
  - `position` integer
  - `parentId` string: Move the node under this parent before applying the other fields.
  - `startDate` string, nullable: Milestone plan start. Only valid on a phase.
  - `targetDate` string, nullable: Milestone plan target. Only valid on a phase.
  - `dependsOnNodeId` string, nullable: Milestone this phase waits on. Only valid on a phase.

## Response `200`

The updated node.

- object
  - `id` string, required
  - `parentId` string, nullable, required
  - `depth` number, required
  - `position` number, required
  - `title` string, required
  - `sectionKey` string, nullable, required
  - `documentId` string, nullable, required
  - `linearMilestoneId` string, nullable, required
  - `startDate` string, nullable, required
  - `targetDate` string, nullable, required
  - `dependsOnNodeId` string, nullable, required

## Other responses

- `401`: Authentication is missing or invalid.
- `403`: The caller is not permitted to perform this action.
- `404`: The resource was not found.
- `422`: Response.
- `429`: Too many requests; retry after the indicated delay.

---

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