Skip to content

uploadFormRecordAttachment

POST
/api/v1/data-sources/{id}/records/{recordId}/attachments
curl --request POST \
--url https://example.com/api/v1/data-sources/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/records/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/attachments \
--header 'Content-Type: application/json' \
--data '{ "fieldKey": "example", "fileName": "example", "contentType": "example", "data": "example", "version": 1 }'

Uploads a base64-encoded image as a dedicated form attachment bound to an image field, returning the updated record detail with its incremented version. Uses optimistic concurrency — the request body must carry the record’s current version, and a mismatch returns 409. Because image fields are single-valued, uploading to a field that already has an attachment replaces it. Authorization matches record editing. Form attachments are never exposed through the general Media library.

id
required
string format: uuid
recordId
required
string format: uuid
Media typeapplication/json
object
fieldKey
required
string
fileName
string
contentType
string
data
required

Base64-encoded image bytes

string
version
required

The record’s current version

integer
Examplegenerated
{
"fieldKey": "example",
"fileName": "example",
"contentType": "example",
"data": "example",
"version": 1
}

Updated record detail after the attachment change

Not permitted to edit this record

Record version conflict

Not an image, unsupported type, or too large