## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://dev.writer.com/llms.txt)

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

### cURL

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

### Python

```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

```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

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

### Knowledge Graphs

[Knowledge Graphs](https://support.writer.com/article/242-how-to-create-and-manage-a-knowledge-graph#Managing-a-Knowledge-Graph-R4Mg5) 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](https://app.writer.com/aistudio).

#### Authorizations

**Authorization**  
`string`  
header  
required  
Bearer authentication header of the form `Bearer <token>`, where `<token>` is your [Writer API key](https://dev.writer.com/api-reference/api-keys).

#### 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.
