Overview
Upload file attachments to records in Elementum. Files are stored as attachments on the record and accessible through the record’s attachments block.
File Size Limit: Maximum file size is 250MB per attachment.
Endpoint
POST https://api.elementum.io/v1/elements/{elementname}/{record-handle}/attachments
Request
The request body should be multipart/form-data containing the file to upload.
Path Parameters:
elementname - The namespace of your element (e.g., testelement)
record-handle - The unique identifier for the record (e.g., TTE-11)
Headers:
Authorization: Bearer {access_token}
Content-Type: multipart/form-data
Body:
file (required) - The file to upload
description (optional) - Description for the attachment
Example Request
curl -X POST 'https://api.elementum.io/v1/elements/testelement/TTE-11/attachments' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-F 'file=@/path/to/document.pdf' \
-F 'description=Contract document'
Response
Success (202 Accepted):
{
"id": "att_abc123xyz",
"name": "document.pdf",
"description": "Contract document",
"mediaType": "application/pdf",
"size": 2458624,
"state": "processing",
"createdAt": "2025-01-08T14:30:00Z"
}
The 202 Accepted status indicates the file upload has been accepted and is being processed asynchronously.
Common Errors:
400 - Invalid file or exceeds size limit
401 - Invalid or expired access token
404 - Record not found
413 - File exceeds 250MB size limit
File Uploads Guide
Comprehensive guide to working with files and attachments
Add a Link
Add a URL link as an attachment
Delete Attachment
Remove an attachment from a record
API Introduction
Authentication and getting started
The access token received from the authorization server in the OAuth 2.0 flow.
'apps', 'elements', 'tasks', or 'transactions'
the attachment to be uploaded