---
title: "Legacy partial canvas graph extension"
method: POST
path: "/v1/collections/{id}/canvases/{canvasId}/graph/extend"
tags: ["Canvases"]
deprecated: true
---

# Legacy partial canvas graph extension

`POST /v1/collections/{id}/canvases/{canvasId}/graph/extend`

## Request

- Base URL: `https://api.masko.ai`
- URL: `https://api.masko.ai/v1/collections/{id}/canvases/{canvasId}/graph/extend`
- Auth: HTTP bearer

> **Deprecated.**

Deprecated compatibility endpoint. New authoring clients should read the complete graph and graph_content_hash, reconcile locally, and PATCH the complete graph with expected_graph_hash.

## Path parameters

- `id` string, uuid, required
- `canvasId` string, uuid, required

## Headers

- `Idempotency-Key` string

## Request body

- ExtendCanvasGraphBody
  - `add_nodes` object[]: Nodes to append. Fails if any node ID already exists.
    - `id` string, required
    - `generationVariantId` string, uuid: Approved variant in the same collection used by generate-all for a new pose. Existing pose identity is preserved; completed assets are not regenerated.
  - `add_edges` object[]: Edges to append. Fails if any edge ID already exists.
    - `id` string, required
  - `update_edges` object[]: Partial edge patches keyed by id. Existing edge fields are preserved unless explicitly overwritten.
    - `id` string, required
  - `add_inputs` object[]: Inputs to append. Existing input names are left unchanged.
    - `name` string, required

## Response `200`

Canvas graph extended

- CanvasGraphExtendResponse
  - `data` CanvasGraphExtendData, required
    - `id` string, uuid, required
    - `name` string, required
    - `graph` object, required
    - `updated_at` string, required
    - `added` object, required
      - `nodes` number, required
      - `edges` number, required
      - `inputs` number, required
    - `updated` object, required
      - `edges` number, required

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict

---

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