List files

SDK platic.files.list()

Find a file by type or state and use its fileId to read, edit or connect it to an agent. The list includes workspace files in pages. To see only an agent’s files, use List agent files.

Example

await platic.files.list();

Query parameters

ParameterTypeDescriptionDefault
kindstringOnly one type: text, url or file(all)
lifecyclestringavailable or deleting (being deleted)(all)
limitintegerFrom 1 to 20050
pageTokenstringnextPageToken of the previous page-

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
    }
  ],
  "nextPageToken": null
}

Response fields

Each element of data is a file, with the fields of Get a file (without content, download or affectedAgents). nextPageToken is null on the last page.

Errors

Statusdetails.codeWhen
400INVALID_INPUTA parameter is not valid. details.fields names it.
403RESOURCE_NOT_ACCESSIBLEThe person does not have Integrations.
409KNOWLEDGE_NOT_ENABLEDFiles are not enabled in this workspace.

The ones that apply to all operations are in common errors.

Notes

  • It requires Integrations. Someone who only edits agents sees their files with List agent files.
  • attachmentCount counts the connected agents, with the connection active or paused.