## 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 GET https://api.writer.com/v1/files/{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"),
)
file = client.files.retrieve(
    "file_id",
)
print(file.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 file = await client.files.retrieve('file_id');

console.log(file.id);
}

main();
```

### Response Example

```json
{
  "id": "7c36a365-392f-43ba-840d-8f3103b42572",
  "created_at": "2024-07-10T13:34:28.301201Z",
  "name": "example.pdf",
  "graph_ids": [
    "704ffd94-de04-4de2-9f8b-f9fc04831edd"
  ],
  "status": "completed"
}
```

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

**file_id**

- `string`
- required
- The unique identifier of the file.

### Response

**200 - application/json**

- **id**: `string` (required) - A unique identifier of the file.
- **created_at**: `string<date-time>` (required) - The timestamp when the file was uploaded.
- **name**: `string` (required) - The name of the file.
- **graph_ids**: `string<uuid>[]` (required) - A list of Knowledge Graph IDs that the file is associated with.
- **status**: `string` (required) - The processing status of the file.
