v6

latestOpenAPI 3.1.02026-08-047720752.5 KB
Files

List files

Lists internal files, externally connected files and folders for a specific record. Use the object and record_id query parameters to specify the record. Optional query parameters may be provided to filter results by storage provider or parent folder.

This endpoint is in beta. We will aim to avoid breaking changes, but small updates may be made as we roll out to more users.

Required scopes: object_configuration:read, record_permission:read, file:read.

get/v2/files

Query parameters

objectstring required

The object slug or ID.

record_idstring uuid required

The record ID for the specific record whose files you want to list.

storage_provider'attio' | 'dropbox' | 'box' | 'google-drive' | 'microsoft-onedrive'

Filter results by storage provider.

parent_folder_idstring uuid

Filter by parent folder ID. Each file entry has provided optioanl parent_folder_id that can be used to filter results by folder. When omitted, entries at all nesting levels are returned.

limitinteger

The maximum number of files to return. Must be between 1 and 200. Defaults to 50.

Example:50
cursorstring

A pagination cursor used to fetch the next page of files. Responses with more files will include a cursor for you to use here. If not provided, the first page will be returned.

Response

Success

Example response

{
  "data": [
    {
      "id": {
        "workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
        "file_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
      },
      "object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
      "object_slug": "people",
      "record_id": "bf071e1f-6035-429d-b874-d83ea64ea13b",
      "storage_provider": "attio",
      "created_by_actor": {
        "type": "workspace-member",
        "id": "50cf242c-7fa3-4cad-87d0-75b1af71c57b"
      },
      "created_at": "2023-01-01T15:00:00.000000000Z",
      "name": "document.pdf",
      "content_type": "application/pdf",
      "content_size": 1024
    }
  ]
}