Get a file
SDK platic.files.get()
Retrieves file details. Use include to add its processed text, a download link or the list of agents that use it.
Example
curl "https://api.platic.ai/v1/files/$FILE_ID?include=content,affectedAgents" \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.files.get("file_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
fileId | string | The file | ✓ |
Query parameters
| Parameter | Type | Description |
|---|---|---|
include | string | What to add, comma-separated and in this order: content, download, affectedAgents (for example content,affectedAgents). |
affectedLimit | integer | With affectedAgents: how many agents per page, from 1 to 200. |
affectedPageToken | string | With affectedAgents: affectedAgents.nextPageToken of the previous page. |
downloadTarget | string | With download: current (the text agents use, the default), original (the document as it was uploaded) or candidate (the text of a processing that did not finish). |
uploadId | string | With downloadTarget original or candidate: which processing. |
acknowledgeUnreviewed | string | With downloadTarget original or candidate: true. Confirms you are asking for something that did not pass the security review. |
original and candidate go alone (include=download), with uploadId and acknowledgeUnreviewed=true.
Response
{
"status": "success",
"data": {
"fileId": "fH3kL9mQ2xR7",
"title": "Return policies",
"description": "Deadlines, conditions and exceptions for returning a product.",
"kind": "url",
"lifecycle": "available",
"activeVersionId": "vr_2Lp9Qs",
"pipelineStatus": "ready",
"latestUploadId": "up_4Tn8Vb2Kc1",
"attachmentCount": 2,
"createdAt": "2026-10-30T16:02:11.000Z",
"updatedAt": "2026-11-01T10:12:45.000Z",
"sourceUrl": "https://acme.com/policies/returns",
"refresh": {
"intervalHours": 24,
"nextRunAt": "2026-11-02T10:12:45.000Z",
"lastRunAt": "2026-11-01T10:12:45.000Z",
"lastResult": "unchanged",
"lastError": null
},
"tags": [],
"fileName": null,
"contentType": null,
"byteSize": 3420
}
} With include=content,affectedAgents these are added:
{
"status": "success",
"data": {
"fileId": "fH3kL9mQ2xR7",
"content": {
"versionId": "vr_2Lp9Qs",
"text": "# Returns\n\nYou have 30 days to return a product...",
"mediaType": "text/markdown"
},
"affectedAgents": {
"data": [
{ "agentId": "Xq8mTe2LwP4kZ1aB9cDf", "displayName": "Sales" },
{ "agentId": "Lm4Rt8Wq2Zp6Yb1Nc3Vd", "displayName": "Support" }
],
"nextPageToken": null,
"total": 2,
"confirmationToken": "del1...."
}
}
} Response fields
| Field | Type | Description |
|---|---|---|
fileId | string | File ID. |
title | string | Name, 1 to 200 characters. |
description | string | What it is about and when to consult it, up to 1024 characters. It can be empty while it is being generated. |
kind | string | text, url or file. |
lifecycle | string | available, or deleting while it is being deleted. |
activeVersionId | string | null | The content agents use. null if there is no content ready yet. |
pipelineStatus | string | null | The state of the last processing (see states). |
latestUploadId | string | null | The last processing. Use it to read its progress. |
attachmentCount | integer | How many agents have it connected, with the connection active or paused. |
createdAt, updatedAt | string | Dates in UTC. |
sourceUrl | string | null | The page of a url file. null in the others. |
refresh | object | null | Only in url files that are kept up to date; otherwise null. |
refresh.intervalHours | integer | Every how many hours the page is re-read. |
refresh.nextRunAt | string | null | When the next read is due. null while a read is in progress. |
refresh.lastRunAt | string | null | The last time the page was read (automatic or with Reprocess a file). |
refresh.lastResult | string | null | updated (it changed and was updated), unchanged (it did not change) or failed. |
refresh.lastError | string | null | With failed: why. |
tags | string[] | Organization tags in Storage. Agents do not see them. |
fileName | string | null | Original name of the document in file files; null in text and url. |
contentType | string | null | MIME type of the document in file files; null in text and url. |
byteSize | integer | null | Size in bytes that counts against the workspace's storage (null until it is calculated). |
content | object | null | With include=content: the Markdown text agents use (versionId, text, mediaType). null without content ready. |
download | object | null | With include=download: url (valid for 5 minutes), expiresAt, target, uploadId, versionId, fileName (contenido.md or original.bin), mediaType, byteSize and reviewStatus (pending, approved or rejected). |
affectedAgents | object | With include=affectedAgents: the agents that use it (agentId, displayName), in pages, with total. |
affectedAgents.confirmationToken | string | null | Only on the last page: the permission to delete the file. Valid for 10 minutes. |
deletion | object | Only with lifecycle: "deleting": { operationId, status: "pending" }. |
Errors
| Status | details.code | When |
|---|---|---|
400 | INVALID_INPUT | A combination of parameters is not valid; for example, affectedLimit without include=affectedAgents. |
403 | RESOURCE_NOT_ACCESSIBLE | You do not have Integrations nor can you edit all the agents that use it. |
404 | RESOURCE_NOT_ACCESSIBLE | The file does not exist in this workspace. |
409 | DOWNLOAD_NOT_READY | You asked to download something that is still being processed. |
409 | DOWNLOAD_BLOCKED | The content did not pass the review: it cannot be downloaded. |
409 | FILE_UNAVAILABLE | You asked to download a file that is being deleted. |
410 | FILE_DELETED | The file was already deleted. |
410 | DOWNLOAD_GONE | What you asked to download no longer exists. |
422 | CONTENT_REQUIRES_DOWNLOAD | The text is over 1 MiB: ask for it with include=download. |
The ones that apply to all operations are in common errors.
Note
To delete a file, request include=affectedAgents through the last page, show the person which agents use it and use the confirmationToken from that page. If the set of agents changes in the meantime, the next page or the delete answers with a conflict (409) and you have to start again.