OrgDocuments

Upload a file

Stores one file, as multipart form data, and returns its record. The id is what a send names in `document_ids`. Uploading is deliberately its own step: a large file is already up by the time the message is written, and a refused send does not cost the upload twice. Capped at 25MB, which is the ceiling email itself imposes.

POST
/org/documents

Stores one file, as multipart form data, and returns its record. The id is what a send names in document_ids. Uploading is deliberately its own step: a large file is already up by the time the message is written, and a refused send does not cost the upload twice. Capped at 25MB, which is the ceiling email itself imposes.

AuthorizationBearer <token>

API key (sk_live_... prefix). Generate keys in the UI under Settings > API Keys, then send it as Authorization: Bearer sk_live_...

In: header

Request Body

multipart/form-data

file*file
Formatbinary
folder?string
Default"email-attachments"

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/org/documents" \  -F file="string"
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "folder": "string",
    "filename": "string",
    "mime_type": "string",
    "size_bytes": -9007199254740991,
    "created_at": "string"
  }
}
{
  "error": "string",
  "message": "string",
  "statusCode": -9007199254740991
}
{
  "error": "string",
  "message": "string",
  "statusCode": -9007199254740991
}
{
  "error": "module_required",
  "module": "string",
  "message": "string",
  "contact": "string"
}