## 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}/file/{file_id} \
 --header "Authorization: Bearer <token>"
```

### Python Example

```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"),
)
response = client.graphs.remove_file_from_graph(
    file_id="file_id",
    graph_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(response.id)
```

### JavaScript Example

```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 response = await client.graphs.removeFileFromGraph('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 'file_id');

console.log(response.id);
}

main();
```

### Response

```json
{
  "id": "7c36a365-392f-43ba-840d-8f3103b42572",
  "deleted": true
}
```

### Path Parameters

- **graph_id**  _string<uuid>_  required  The unique identifier of the Knowledge Graph to which the files belong.
- **file_id**  _string_  required  The unique identifier of the file.

### Response Structure

**Response 200 - application/json**
- **id**  _string_  required  A unique identifier of the deleted file.
- **deleted**  _boolean_  required  Indicates whether the file was successfully deleted.
