Files

Uploads a file to native Attio storage for a record. Send multipart/form-data with a single binary field named file together with the body fields object, record_id, and optional parent_folder_id. Maximum file size is 50 MB.

This endpoint is rate limited to 1 request per second.

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: file:read-write, object_configuration:read, record_permission:read.

Supported token levels: workspace, user.

post/v2/files/upload

Request

  • Base URL
    https://api.attio.com
  • URL
    https://api.attio.com/v2/files/upload
  • Auth
    OAuth 2
    Authorization code: https://app.attio.com/authorize
    Token URL: https://app.attio.com/oauth/token scopes: file:read-write, object_configuration:read, record_permission:read

Request body multipart/form-data

filestring binary required

The file to upload.

objectstring required

The object slug or ID.

record_idstring uuid required

The ID of the record to upload the file to.

parent_folder_idstring uuid

Optional parent folder ID. Omit to upload to the root folder.

Example request

{
  "object": "people",
  "record_id": "bf071e1f-6035-429d-b874-d83ea64ea13b",
  "parent_folder_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Response

Created

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
  }
}

Changes

    • breaking

      the response's property type changed from string to no type for status

    • info

      added subschema #1 subschema #2 to the response property anyOf list for the response status

    • info

      removed the billing_error enum value from the response property for the response status

    • info

      added the non-success response with the status