## 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 PUT https://api.writer.com/v1/graphs/{graph_id} \
 --header "Authorization: Bearer <token>" \
 --header "Content-Type: application/json" \
--data-raw '{"name":"string", "description":"string", "urls":[{"url":"https://example.com/docs", "type":"sub_pages", "exclude_urls":["https://example.com/docs/private"]}]}'
```

```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.update(
    graph_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    name="name",
    description="description",
)
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.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
    { name: 'name', description: 'description' }
  );

console.log(graph.id);
}

main();
```

200

```json
{
  "id": "50daa3d0-e7d9-44a4-be42-b53e2379ebf7",
  "created_at": "2024-07-10T15:03:48.785843Z",
  "name": "Updated graph name",
  "description": "Updated graph description",
  "urls": [
    {
      "url": "https://example.com/docs",
      "status": {
        "status": "success",
        "error_type": null
      },
      "type": "sub_pages"
    }
  ]
}
```

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

### Body

**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**  
update_graph_web_url · object[]  
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.

### Response

200 - application/json

**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**  
web_connector_url · object[]  
An array of web connector URLs associated with this Knowledge Graph.
