Skip to main content
POST
Prepare a form-element attachment upload

Authorizations

Authorization
string
header
required

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.

Body

application/json
purpose
enum<string>
required

What this attachment is for. header_image / wallpaper_image are theme images consumed by a theme update; rich_text_image is finalized via POST /api/v1/attachment_commitments; choice_image / product_image / booking_image are field-element images referenced from the form create / update fields payload.

Available options:
header_image,
wallpaper_image,
rich_text_image,
choice_image,
product_image,
booking_image
file_name
string
required

Original file name (with extension).

Example:

"cover.png"

content_type
string
required

MIME type. Must be one of image/jpeg, image/png, image/webp, image/gif. Pinned into the upload URL — the PUT must send this exact Content-Type.

Example:

"image/png"

file_size
integer
required

File size in bytes. Must be ≤ 5 MB.

Example:

123456

Response

Upload credentials issued

data
object
required

Prepare-step response for the 2-step form-element 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 consume the upload_id per its purpose: theme images in a theme update; rich_text_image via POST /api/v1/attachment_commitments; field-element images (choice_image / product_image / booking_image) inside the form create / update fields payload.

Last modified on July 24, 2026