---
title: "Update graph"
method: PUT
path: "/v1/graphs/{graph_id}"
tags: ["KG API"]
---

# Update graph

`PUT /v1/graphs/{graph_id}`

## Request

- Base URL: `https://api.writer.com`
- URL: `https://api.writer.com/v1/graphs/{graph_id}`
- Auth: HTTP bearer

Update the name, description, web connector URLs, or team assignment of a Knowledge Graph.

Including a `team_ids` array replaces the whole team assignment: an empty array makes the Knowledge Graph org-wide, one or more team IDs scope it to exactly those teams. Omitting `team_ids` leaves the current team assignment unchanged. Team-scoped API keys cannot change the team assignment of a Knowledge Graph.

## Path parameters

- `graph_id` string, uuid, required

## Request body

- UpdateGraphRequest
  - `name` string: The name of the Knowledge Graph (max 255 characters). Omitting this field leaves the name unchanged.
  - `description` string: A description of the Knowledge Graph (max 255 characters). Omitting this field leaves the description unchanged.
  - `urls` UpdateGraphWebUrl[]: An array of web connector URLs to update for this Knowledge Graph. You can only connect URLs to Knowledge Graphs with the type `web`. To clear the list of URLs, set this field to an empty array.
    - `url` string, required: The URL to be processed by the web connector.
    - `exclude_urls` string[]: An array of URLs to exclude from processing within this web connector.
    - `type` 'single_page' | 'sub_pages', required: The type of web connector processing for a URL.
  - `team_ids` integer[]: Optional list of team IDs the Knowledge Graph is deployed to. Omitting this field leaves the current team assignment unchanged. Passing an array replaces the whole team assignment: an empty array makes the graph org-wide, one or more team IDs scope it to exactly those teams. Not accepted from team-scoped API keys.

## Response `200`

- GraphResponse
  - `id` string, uuid, required: A unique identifier of the Knowledge Graph.
  - `created_at` string, date-time, required: The timestamp when the Knowledge Graph was created.
  - `name` string, required: The name of the Knowledge Graph (max 255 characters).
  - `description` string: A description of the Knowledge Graph (max 255 characters).
  - `urls` WebConnectorUrl[]: An array of web connector URLs associated with this Knowledge Graph.
    - `url` string, required: The URL to be processed by the web connector.
    - `status` WebConnectorUrlState, required: The state of a web connector URL processing.
      - `status` 'validating' | 'success' | 'error', required: The status of web connector URL processing.
      - `error_type` 'invalid_url' | 'not_searchable' | 'not_found' | 'paywall_or_login_page' | 'unexpected_error': The type of error that can occur during web connector URL processing.
    - `exclude_urls` string[]: An array of URLs to exclude from processing within this web connector.
    - `type` 'single_page' | 'sub_pages', required: The type of web connector processing for a URL.
  - `team_ids` integer[]: The team IDs the Knowledge Graph is deployed to. An empty array indicates an org-wide Knowledge Graph accessible to every team in the organization.

## Changes

- **2026-08-28** `55e7d6385506`: 2 info
  - added the new optional request property `team_ids`
  - added the optional property `team_ids` to the response with the `200` status
- **2025-08-12** `0bbaae2a6920`: 2 info
  - added the new optional request property `urls`
  - added the optional property `urls` to the response with the `200` status
- **2025-02-25** `3d3b2fe43375`: 1 info
  - the request property `name` became optional
- **2024-10-03** `4a11c63c7cb5`: 1 breaking
  - the request property `name` became required
- **2024-08-08** `4a89aa730a0c`: 1 info
  - the request property `name` became optional

[Operation history](https://skmtc.dev/writer/apis/writer-api/changes/v1/graphs/:graph_id/put.md)

---

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