APIFiles

Upload a file

Uploads a file of up to 3 MB and optionally attaches it to an account or opportunity. Send the content as `content` (plain text) or `content_base64` (binary). Text is extracted and the file is summarized before the response is returned, so the file is immediately searchable.

POST
/v1/files

Uploads a file of up to 3 MB and optionally attaches it to an account or opportunity. Send the content as content (plain text) or content_base64 (binary). Text is extracted and the file is summarized before the response is returned, so the file is immediately searchable.

X-Api-Key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/files" \  -H "Content-Type: application/json" \  -d '{    "filename": "implementation-plan.md"  }'
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "title": "Implementation plan",
    "description": "string",
    "summary": "string",
    "type": "document",
    "tags": [
      "string"
    ],
    "created_at": "2026-01-15T10:30:00.000Z",
    "records": [
      {
        "record_type": "opportunities",
        "record_id": "8bf519b6-a3e0-49d2-8e42-039542d9a489",
        "record_name": "Acme Corp - Enterprise Plan"
      }
    ],
    "files": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "filename": "implementation-plan.pdf",
        "mime_type": "application/pdf",
        "bytes": 48213,
        "download_url": "string",
        "extracted_text_status": "pending",
        "extracted_text": "string"
      }
    ]
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty
Empty
{
  "error": "string"
}
{
  "error": "string"
}