Delete graph - Writer AI Studio

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

cURL

curl --location --request DELETE https://api.writer.com/v1/graphs/{graph_id} \
 --header "Authorization: Bearer <token>"

Python

import os
from writerai import Writer

client = Writer(
    # This is the default and can be omitted
    api_key=os.environ.get("WRITER_API_KEY"),
)
graph = client.graphs.delete(
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(graph.id)

JavaScript

import Writer from 'writer-sdk';

const client = new Writer({
  apiKey: process.env['WRITER_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const graph = await client.graphs.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

console.log(graph.id);
}

main();

Response

200

{
  "id": "e7392337-1c4e-4bc9-aaf5-b719bf1e938a",
  "deleted": true
}

Knowledge Graphs

Knowledge Graphs deployed to a specific team aren’t accessible via the API or SDK. To use a Knowledge Graph via the API or SDK, configure it with “All Teams” access in AI Studio.

Authorizations

Authorization
string
header
required
Bearer authentication header of the form Bearer <token>, where <token> is your Writer API key.

Path Parameters

graph_id
string<uuid>
required
The unique identifier of the Knowledge Graph.

Response Format

200 - application/json
id
string<uuid>
required
A unique identifier of the deleted Knowledge Graph.

deleted
boolean
required
Indicates whether the Knowledge Graph was successfully deleted.