Skip to main content
POST
/
api
/
v1
/
attachment_commitments
Finalize prepared rich-text image uploads
curl --request POST \
  --url https://formhug.ai/api/v1/attachment_commitments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "upload_ids": [
    "rich_text_image.ab12cd34ef567890"
  ]
}
'
{
  "data": {
    "attachments": [
      {
        "upload_id": "<string>",
        "id": "<string>",
        "image_url": "<string>",
        "file_name": "<string>"
      }
    ]
  }
}

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
upload_ids
string[]
required

upload_ids from POST /api/v1/attachments (purpose rich_text_image), each after its file was PUT to the upload_url. Finalized atomically: any invalid entry rejects the whole request, and already-processed entries are remembered so an identical retry does not duplicate them.

Required array length: 1 - 20 elements
Minimum string length: 1

Response

Images stored

data
object
required

Finalize-step response: the stored rich-text images, in the same order as the request upload_ids. Embed each image_url into your rich-text HTML (e.g. <img src="...">).

Last modified on June 18, 2026