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

```
curl --location --request PUT https://api.writer.com/v1/applications/{application_id}/graphs \
 --header "Authorization: Bearer <token>" \
 --header "Content-Type: application/json" \
--data-raw '{"graph_ids":["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e","182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e","182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}'
```

### Python Code Example

```
import os
from writerai import Writer

client = Writer(
    api_key=os.environ.get("WRITER_API_KEY"),  # This is the default and can be omitted
)
application_graphs_response = client.applications.graphs.update(
    application_id="application_id",
    graph_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
)
print(application_graphs_response.graph_ids)
```

### JavaScript Code Example

```
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 applicationGraphsResponse = await client.applications.graphs.update('application_id', {
    graph_ids: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
  });

console.log(applicationGraphsResponse.graph_ids);
}

main();
```

### Response Example

```
200

{
  "graph_ids": [\
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"\
  ]
}
```

### API Endpoint

PUT 
/v1 
/applications 
/{application_id} 
/graphs

### No-code agents

No-code applications are now called [no-code agents](https://dev.writer.com/no-code/introduction). The [Applications API](https://dev.writer.com/api-reference/application-api/api-reference/application-api/applications) still uses the term `application` to minimize breaking changes.

### Authorizations

**Authorization**
- Type: header
- Required: Yes
- Format: `Bearer <token>`, where `<token>` is your [Writer API key](https://dev.writer.com/api-reference/api-keys).

### Path Parameters

- **application_id**: The ID of the no-code agent to update (required).
  - Only no-code agents with chat capabilities can have associated Knowledge Graphs. No-code agents with text generation and research capabilities do not support Knowledge Graphs.

### Body

- **graph_ids**: A list of Knowledge Graph IDs to associate with the application (required).
  - This will replace the existing list of Knowledge Graphs associated with the application, not add to it.

### Response

**200 - application/json**
- Successful response returns a list of Knowledge Graphs associated with the application.
