---
title: "Get Agent File"
method: GET
path: "/api/agents/{agent_id}/files/{content_hash}"
tags: ["agent-files"]
---

# Get Agent File

`GET /api/agents/{agent_id}/files/{content_hash}`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/agents/{agent_id}/files/{content_hash}`
- Auth: none declared

Return one vaulted file's metadata by its content hash.

``content_hash`` is the sha256 of the file's bytes - also its record key
and object-store key, so it is the stable identifier to pass here and to
the delete route. Only a file vaulted under the CALLER's own identity is
visible, never another owner's, regardless of agent co-ownership. Returns
404 if no such file is vaulted for the caller. Never returns raw bytes -
use the returned ``source`` provenance for follow-up, not file content.

## Path parameters

- `agent_id` string, uuid, required
- `content_hash` string, required

## Headers

- `x-impersonate-identity-id` string, nullable

## Response `200`

Successful Response

- AgentFileMetadata: One vaulted file's metadata. Never carries the file's raw bytes.
  - `content_hash` string, required
  - `file_name` string, required
  - `mime_type` string, required
  - `size_bytes` integer, required
  - `retention` string, required
  - `source` object, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/5387b4ded614?raw)
