Prepare an entry-attachment upload
Prepare an upload for an attachment field. Returns a one-time upload_id
and an upload_url.
Send the file to upload_url with an HTTP PUT: the raw file bytes as the
request body and the Content-Type header set to the value you declared in
content_type (it must match). Use the upload_url exactly as returned.
Then submit the returned upload_id under the attachment field in
field_values when creating the entry — the entry-create endpoint registers
the attachment. No PAT scope required.
Authorizations
Personal Access Token prefixed with fh_. Sent as Authorization: Bearer fh_xxx.
The scope required by each endpoint is listed in that endpoint's description.
Path Parameters
Form token
Body
api_code of the target attachment field on this form.
"field_3"
Original file name (with extension).
"design.pdf"
MIME type. Must satisfy the field's media_type configuration and not be in the global blacklist (text/html, text/css, text/javascript, application/x-httpd-php).
"application/pdf"
File size in bytes. Must be ≤ field.max_size * 1MB.
5242880
api_code of the matrix/table dimension when the target field is tabular (e.g. file column inside a table field). Omit for non-tabular attachment fields.
"col_a"
Response
Init for an attachment field inside a table field (tabular)
Prepare-step response for the 2-step entry-attachment upload. Send the file to upload_url with an HTTP PUT: the raw file bytes as the request body and the Content-Type header set to the value you declared in content_type (it must match). Use upload_url exactly as returned. Then submit the upload_id under the matching attachment field in field_values when creating the entry — the entry-create endpoint registers the attachment. upload_id is a self-describing handle (<form_token>.<field_api_code>[.<dimension_api_code>].<random>).