> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get file metadata

> Retrieve metadata for a single file by file ID.

`GET /api/v1/cloud/files/{file_id}`

Retrieves a single [File object](/cloud-agents/api/files/schemas#file-object). Files in `deleted` status are not returned by this endpoint.

## Path parameters

| Parameter | Type   | Required | Description                     |
| --------- | ------ | -------- | ------------------------------- |
| `file_id` | string | Yes      | File ID with the `file_` prefix |

## Headers

| Header          | Required | Description         |
| --------------- | -------- | ------------------- |
| `Authorization` | Yes      | `Bearer $QODER_PAT` |

## Example request

```bash theme={null}
curl -X GET "https://api.qoder.com/api/v1/cloud/files/file_019e3bb8c1387743bf4ef115aae5acb1" \
  -H "Authorization: Bearer $QODER_PAT"
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "id": "file_019e3bb8c1387743bf4ef115aae5acb1",
  "type": "file",
  "filename": "qoder-test-upload.txt",
  "mime_type": "text/plain",
  "size_bytes": 110,
  "downloadable": true,
  "scope": {
    "id": "sess_019e3bb8e6c47d18",
    "type": "session"
  },
  "metadata": {
    "project": "demo"
  },
  "created_at": "2026-05-18T15:33:44Z"
}
```

## Response fields

| Field          | Type           | Description                                                                                                           |
| -------------- | -------------- | --------------------------------------------------------------------------------------------------------------------- |
| `id`           | string         | File ID with the `file_` prefix                                                                                       |
| `type`         | string         | Always `"file"`                                                                                                       |
| `filename`     | string         | Stored file name                                                                                                      |
| `size_bytes`   | integer        | File size in bytes                                                                                                    |
| `mime_type`    | string         | MIME type supplied by the upload or detected from the file name                                                       |
| `downloadable` | boolean        | Whether this file can be downloaded through the `/content` endpoint                                                   |
| `scope`        | object \| null | Scope object when the file is associated with another resource, for example `{ "id": "sess_...", "type": "session" }` |
| `metadata`     | object         | Custom metadata object supplied on upload; defaults to `{}`                                                           |
| `created_at`   | string         | UTC creation time in RFC 3339 format                                                                                  |

## Errors

| HTTP | Type                   | Trigger                                                         |
| ---- | ---------------------- | --------------------------------------------------------------- |
| 401  | `authentication_error` | Missing or invalid authentication token                         |
| 404  | `not_found_error`      | File with the given ID does not exist or is in `deleted` status |

See [Errors](/cloud-agents/api/conventions/errors) for the full error envelope.

## Related

<CardGroup cols={2}>
  <Card title="Attach and download files" icon="paperclip" href="/cloud-agents/files">
    Upload files to give your agent context, and download files it produces.
  </Card>
</CardGroup>
