{
"error": "Content type \"text/html\" is not allowed"
}
{
"error": "<string>"
}
{
"error": "File too large (max 5 MB)"
}
{
"error": "Invalid field input",
"error_details": [
{
"attribute": "purpose",
"message": "must be one of: header_image, wallpaper_image, rich_text_image, choice_image, product_image, booking_image, opensearch_header_image"
}
]
}
Attachments
Prepare a form-element attachment upload
Prepare a 2-step upload for a form-element image. purpose selects the kind:
header_image / wallpaper_image (theme images), rich_text_image, a
field-element image (choice_image, product_image, booking_image), or a
public query header image (opensearch_header_image).
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 consume the upload_id: theme images go into a theme update
(header.images[].upload_id / wallpaper.image.upload_id); rich_text_image
is finalized via POST /api/v1/attachment_commitments; field-element images go
into the form create / update fields payload (choices[].image.upload_id,
goods_items[].images[].upload_id, reservation_items[].images[].upload_id);
a public query header image goes into header.background_image.upload_id on
the public query create / update request.
No PAT scope required.
{
"error": "Content type \"text/html\" is not allowed"
}
{
"error": "<string>"
}
{
"error": "File too large (max 5 MB)"
}
{
"error": "Invalid field input",
"error_details": [
{
"attribute": "purpose",
"message": "must be one of: header_image, wallpaper_image, rich_text_image, choice_image, product_image, booking_image, opensearch_header_image"
}
]
}
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,
opensearch_header_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.
Show child attributes
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"FormHug","description":"Build smart, beautiful forms for you and your audience.","colors":{"primary":"#6366F1","light":"#818CF8","dark":"#4F46E5"},"logo":{"light":"https://mintcdn.com/formhug-8bc4ebd1/QkuMZ3dKhwrJ6Thy/logo/light.svg?fit=max\u0026auto=format\u0026n=QkuMZ3dKhwrJ6Thy\u0026q=85\u0026s=88284690f11209ca0abb5239bc7f1179","dark":"https://mintcdn.com/formhug-8bc4ebd1/QkuMZ3dKhwrJ6Thy/logo/dark.svg?fit=max\u0026auto=format\u0026n=QkuMZ3dKhwrJ6Thy\u0026q=85\u0026s=18b178b7a4ba46472029621b10203014","href":"https://formhug.ai"},"favicon":{"light":"https://mintcdn.com/formhug-8bc4ebd1/QkuMZ3dKhwrJ6Thy/favicon.svg?fit=max\u0026auto=format\u0026n=QkuMZ3dKhwrJ6Thy\u0026q=85\u0026s=5f2ad4abbddc4fcd7fefb3230c9fb236","dark":"https://mintcdn.com/formhug-8bc4ebd1/QkuMZ3dKhwrJ6Thy/images/favicon-dark.svg?fit=max\u0026auto=format\u0026n=QkuMZ3dKhwrJ6Thy\u0026q=85\u0026s=1c1c281ed3ac1524d0543dd2dfcddb68"},"appearance":{"default":"system"},"background":{"decoration":"gradient"},"navbar":{"links":[{"href":"mailto:support@formhug.ai","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://formhug.ai/?ref=docs"}},"footer":{"socials":{"x":"https://x.com/FormHug","youtube":"https://www.youtube.com/@formhug","instagram":"https://www.instagram.com/formhug","facebook":"https://www.facebook.com/profile.php?id=61586802254413"},"links":[{"header":"General","items":[{"label":"Pricing","href":"https://formhug.ai/pricing"},{"label":"Docs","href":"https://formhug.ai/docs"},{"label":"Blog","href":"https://formhug.ai/blog"},{"label":"Templates","href":"https://formhug.ai/templates"},{"label":"Integrations","href":"https://formhug.ai/integrations"},{"label":"Quizzes","href":"https://formhug.ai/quizzes"}]},{"header":"Product","items":[{"label":"AI Quiz Maker","href":"https://formhug.ai/quiz-maker"},{"label":"MCP for Agents","href":"https://formhug.ai/mcp-for-agents"},{"label":"AI Form Builder","href":"https://formhug.ai/ai-form-builder"},{"label":"AI Survey Maker","href":"https://formhug.ai/survey-maker"},{"label":"ChatGPT Form Builder","href":"https://formhug.ai/chatgpt-form-builder"},{"label":"Claude Form Builder","href":"https://formhug.ai/claude-form-builder"}]},{"header":"Compare","items":[{"label":"Compare All","href":"https://formhug.ai/vs"},{"label":"Jotform Alternative","href":"https://formhug.ai/vs/jotform-alternative"},{"label":"Typeform Alternative","href":"https://formhug.ai/vs/typeform-alternative"},{"label":"Google Forms Alternative","href":"https://formhug.ai/vs/google-forms-alternative"},{"label":"Tally Alternative","href":"https://formhug.ai/vs/tally-alternative"},{"label":"Fillout Alternative","href":"https://formhug.ai/vs/fillout-alternative"}]},{"header":"Resources","items":[{"label":"About","href":"https://formhug.ai/about"},{"label":"Privacy","href":"https://formhug.ai/privacy-policy"},{"label":"Terms","href":"https://formhug.ai/terms-of-service"}]}]},"search":{"prompt":"Search FormHug docs..."},"seo":{"metatags":{"canonical":"https://formhug.ai/docs"},"indexing":"all"},"fonts":{"family":"Inter"},"icons":{"library":"fontawesome"},"integrations":{"ga4":{"measurementId":"G-ZVVSLQ785E"}},"thumbnails":{"appearance":"light"},"interaction":{"drilldown":true},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"formhug-8bc4ebd1","hasAudioNarration":false,"actualSubdomain":"formhug-8bc4ebd1","customDomains":["formhug.ai"],"gitSource":{"type":"github","owner":"formhug","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{},"buildId":"6ad6e449807fa967a0983e6d","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"API Reference","count":51},{"language":"default","tag":"Features","count":34},{"language":"default","tag":"Integrations","count":16},{"language":"default","tag":"Builder","count":13},{"language":"default","tag":"Form Settings","count":10},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Field Types","count":9},{"language":"default","tag":"Use Cases","count":9},{"language":"default","tag":"Apps \u0026 Automation","count":9},{"language":"default","tag":"Entries","count":9}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/attachments/prepare-a-form-element-attachment-upload","slug":"/api-reference/attachments/prepare-a-form-element-attachment-upload","pageMetadata":{"title":"Prepare a form-element attachment upload","description":"Prepare a 2-step upload for a form-element image. `purpose` selects the kind:\n`header_image` / `wallpaper_image` (theme images), `rich_text_image`, a\nfield-element image (`choice_image`, `product_image`, `booking_image`), or a\npublic query header image (`opensearch_header_image`).\nReturns a one-time `upload_id` and an `upload_url`.\n\nSend the file to `upload_url` with an HTTP `PUT`: the raw file bytes as the\nrequest body and the `Content-Type` header set to the value you declared in\n`content_type` (it must match). Use the `upload_url` exactly as returned.\n\nThen consume the `upload_id`: theme images go into a theme update\n(`header.images[].upload_id` / `wallpaper.image.upload_id`); `rich_text_image`\nis finalized via POST /api/v1/attachment_commitments; field-element images go\ninto the form create / update `fields` payload (`choices[].image.upload_id`,\n`goods_items[].images[].upload_id`, `reservation_items[].images[].upload_id`);\na public query header image goes into `header.background_image.upload_id` on\nthe public query create / update request.\nNo PAT scope required.\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v1/attachments","href":"/api-reference/attachments/prepare-a-form-element-attachment-upload","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Prepare a 2-step upload for a form-element image. \", _jsx(_components.code, {\n children: \"purpose\"\n }), \" selects the kind:\\n\", _jsx(_components.code, {\n children: \"header_image\"\n }), \" / \", _jsx(_components.code, {\n children: \"wallpaper_image\"\n }), \" (theme images), \", _jsx(_components.code, {\n children: \"rich_text_image\"\n }), \", a\\nfield-element image (\", _jsx(_components.code, {\n children: \"choice_image\"\n }), \", \", _jsx(_components.code, {\n children: \"product_image\"\n }), \", \", _jsx(_components.code, {\n children: \"booking_image\"\n }), \"), or a\\npublic query header image (\", _jsx(_components.code, {\n children: \"opensearch_header_image\"\n }), \").\\nReturns a one-time \", _jsx(_components.code, {\n children: \"upload_id\"\n }), \" and an \", _jsx(_components.code, {\n children: \"upload_url\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Send the file to \", _jsx(_components.code, {\n children: \"upload_url\"\n }), \" with an HTTP \", _jsx(_components.code, {\n children: \"PUT\"\n }), \": the raw file bytes as the\\nrequest body and the \", _jsx(_components.code, {\n children: \"Content-Type\"\n }), \" header set to the value you declared in\\n\", _jsx(_components.code, {\n children: \"content_type\"\n }), \" (it must match). Use the \", _jsx(_components.code, {\n children: \"upload_url\"\n }), \" exactly as returned.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Then consume the \", _jsx(_components.code, {\n children: \"upload_id\"\n }), \": theme images go into a theme update\\n(\", _jsx(_components.code, {\n children: \"header.images[].upload_id\"\n }), \" / \", _jsx(_components.code, {\n children: \"wallpaper.image.upload_id\"\n }), \"); \", _jsx(_components.code, {\n children: \"rich_text_image\"\n }), \"\\nis finalized via POST /api/v1/attachment_commitments; field-element images go\\ninto the form create / update \", _jsx(_components.code, {\n children: \"fields\"\n }), \" payload (\", _jsx(_components.code, {\n children: \"choices[].image.upload_id\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"goods_items[].images[].upload_id\"\n }), \", \", _jsx(_components.code, {\n children: \"reservation_items[].images[].upload_id\"\n }), \");\\na public query header image goes into \", _jsx(_components.code, {\n children: \"header.background_image.upload_id\"\n }), \" on\\nthe public query create / update request.\\nNo PAT scope required.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Prepare a form-element attachment upload","description":"Prepare a 2-step upload for a form-element image. `purpose` selects the kind:\n`header_image` / `wallpaper_image` (theme images), `rich_text_image`, a\nfield-element image (`choice_image`, `product_image`, `booking_image`), or a\npublic query header image (`opensearch_header_image`).\nReturns a one-time `upload_id` and an `upload_url`.\n\nSend the file to `upload_url` with an HTTP `PUT`: the raw file bytes as the\nrequest body and the `Content-Type` header set to the value you declared in\n`content_type` (it must match). Use the `upload_url` exactly as returned.\n\nThen consume the `upload_id`: theme images go into a theme update\n(`header.images[].upload_id` / `wallpaper.image.upload_id`); `rich_text_image`\nis finalized via POST /api/v1/attachment_commitments; field-element images go\ninto the form create / update `fields` payload (`choices[].image.upload_id`,\n`goods_items[].images[].upload_id`, `reservation_items[].images[].upload_id`);\na public query header image goes into `header.background_image.upload_id` on\nthe public query create / update request.\nNo PAT scope required.\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v1/attachments","href":"/api-reference/attachments/prepare-a-form-element-attachment-upload","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/formhug-8bc4ebd1/4e6b7b0101f2c4d1/external-links.js"],"openApiReferenceData":{"operation":{"summary":"Prepare a form-element attachment upload","tags":["Attachments"],"description":"Prepare a 2-step upload for a form-element image. `purpose` selects the kind:\n`header_image` / `wallpaper_image` (theme images), `rich_text_image`, a\nfield-element image (`choice_image`, `product_image`, `booking_image`), or a\npublic query header image (`opensearch_header_image`).\nReturns a one-time `upload_id` and an `upload_url`.\n\nSend the file to `upload_url` with an HTTP `PUT`: the raw file bytes as the\nrequest body and the `Content-Type` header set to the value you declared in\n`content_type` (it must match). Use the `upload_url` exactly as returned.\n\nThen consume the `upload_id`: theme images go into a theme update\n(`header.images[].upload_id` / `wallpaper.image.upload_id`); `rich_text_image`\nis finalized via POST /api/v1/attachment_commitments; field-element images go\ninto the form create / update `fields` payload (`choices[].image.upload_id`,\n`goods_items[].images[].upload_id`, `reservation_items[].images[].upload_id`);\na public query header image goes into `header.background_image.upload_id` on\nthe public query create / update request.\nNo PAT scope required.\n","security":["9e9d0734-c802-4ebd-9051-a697c0d7388e"],"parameters":[],"responses":{"200":"4145bf12-65c6-40ab-9fa8-81080e3959b6","400":"105b680e-d41b-4a57-a316-71796a0da817","401":"6f8bbd3a-bb68-4319-b5d7-83de680e70cb","413":"414b65b1-d7a6-4b44-a2b3-4c60d7d0d789","422":"7125d097-0918-4131-9828-9df2ada78fd6"},"requestBody":"9a915530-75bc-44d3-867e-ad0a845dbb9f","method":"post","type":"path","servers":["8e8bfda0-f1ef-4ae4-afa9-25e9767fdcdc"],"path":"/api/v1/attachments","baseUrlOptions":["https://formhug.ai"],"title":"Prepare a form-element attachment upload","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["purpose","file_name","content_type","file_size"],"additionalProperties":false,"properties":{"purpose":{"type":"string","enum":["header_image","wallpaper_image","rich_text_image","choice_image","product_image","booking_image","opensearch_header_image"],"description":"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.","isRequired":true,"uniqueKey":"purpose","typeLabel":"enum\u003cstring>"},"file_name":{"type":"string","description":"Original file name (with extension).","example":"cover.png","isRequired":true,"uniqueKey":"file_name","typeLabel":"string"},"content_type":{"type":"string","description":"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","isRequired":true,"uniqueKey":"content_type","typeLabel":"string"},"file_size":{"type":"integer","description":"File size in bytes. Must be ≤ 5 MB.","example":123456,"isRequired":true,"uniqueKey":"file_size","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"file_name":"cover.png","content_type":"image/png","file_size":123456}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"4145bf12-65c6-40ab-9fa8-81080e3959b6":{"description":"Upload credentials issued","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["upload_id","upload_url","expires_at","purpose"],"description":"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.","properties":{"upload_id":{"type":"string","description":"One-time id. Reference it as `header.images[].upload_id` or `wallpaper.image.upload_id`.","isRequired":true,"uniqueKey":"data.upload_id","typeLabel":"string"},"upload_url":{"type":"string","format":"uri","description":"URL to PUT the file bytes to (Content-Type matching the declared value). Use it exactly as returned.","isRequired":true,"uniqueKey":"data.upload_url","typeLabel":"string\u003curi>"},"expires_at":{"type":"string","format":"date-time","description":"When the upload credential expires (UTC, ISO 8601).","isRequired":true,"uniqueKey":"data.expires_at","typeLabel":"string\u003cdate-time>"},"purpose":{"type":"string","enum":["header_image","wallpaper_image","rich_text_image","choice_image","product_image","booking_image","opensearch_header_image"],"description":"Echo of the requested purpose.","isRequired":true,"uniqueKey":"data.purpose","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{"upload_id":"\u003cstring>","upload_url":"\u003cstring>","expires_at":"2023-11-07T05:31:56Z","purpose":"header_image"}}}},"exampleType":"generated"}},"exampleType":"generated"},"105b680e-d41b-4a57-a316-71796a0da817":{"description":"Disallowed content type","content":{"application/json":{"examples":{"invalid_content_type":{"title":"invalid_content_type","value":{"error":"Content type \"text/html\" is not allowed"}}},"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Error message","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"exampleType":"examples"},"6f8bbd3a-bb68-4319-b5d7-83de680e70cb":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Error message","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"414b65b1-d7a6-4b44-a2b3-4c60d7d0d789":{"description":"File exceeds 5 MB","content":{"application/json":{"examples":{"too_large":{"title":"too_large","value":{"error":"File too large (max 5 MB)"}}},"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Error message","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"exampleType":"examples"},"7125d097-0918-4131-9828-9df2ada78fd6":{"description":"Invalid purpose (not one of the allowed values)","content":{"application/json":{"examples":{"invalid_purpose":{"title":"invalid_purpose","value":{"error":"Invalid field input","error_details":[{"attribute":"purpose","message":"must be one of: header_image, wallpaper_image, rich_text_image, choice_image, product_image, booking_image, opensearch_header_image"}]}}},"schema":{"type":"object","required":["error","error_details"],"description":"Returned on model validation failures. error_details lists per-field errors.","properties":{"error":{"type":"string","example":"Name can't be blank","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_details":{"type":"array","items":{"type":"object","required":["attribute","message"],"properties":{"attribute":{"type":"string","example":"name","isRequired":true,"uniqueKey":"error_details.items.[INDEX].attribute","typeLabel":"string"},"message":{"type":"string","example":"can't be blank","isRequired":true,"uniqueKey":"error_details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"error_details.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error_details","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"9e9d0734-c802-4ebd-9051-a697c0d7388e":{"PersonalAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"PAT","description":"Personal Access Token prefixed with `fh_`. Sent as `Authorization: Bearer fh_xxx`.\nThe scope required by each endpoint is listed in that endpoint's description.\n","scopes":[],"schemeName":"PersonalAccessToken"}}},"servers":{"8e8bfda0-f1ef-4ae4-afa9-25e9767fdcdc":{"url":"https://formhug.ai"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"PAT","description":"Personal Access Token prefixed with `fh_`. Sent as `Authorization: Bearer fh_xxx`.\nThe scope required by each endpoint is listed in that endpoint's description.\n","scopes":[],"schemeName":"PersonalAccessToken"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Personal Access Token prefixed with `fh_`. Sent as `Authorization: Bearer fh_xxx`.\nThe scope required by each endpoint is listed in that endpoint's description.\n","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"PersonalAccessToken","name":"Authorization"}],"title":"PersonalAccessToken"}]},"originalFileLocation":"api-reference/openapi.yaml"},"subdomain":"formhug-8bc4ebd1","siteName":"FormHug","title":"Prepare a form-element attachment upload - FormHug","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"api-reference/attachments/prepare-a-form-element-attachment-upload.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Prepare a 2-step upload for a form-element image. purpose selects the kind: header_image / wallpaper_image (theme images), rich_text_image, a field-element image (choice_image, product_image, booking_image), or a public query header image (opensearch_header_image). 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 consume the upload_id: theme images go into a theme update (header.images[].upload_id / wallpaper.image.upload_id); rich_text_image is finalized via POST /api/v1/attachment_commitments; field-element images go into the form create / update fields payload (choices[].image.upload_id, goods_items[].images[].upload_id, reservation_items[].images[].upload_id); a public query header image goes into header.background_image.upload_id on the public query create / update request. No PAT scope required.\">\u003cmeta data-mint-head name=\"application-name\" content=\"FormHug\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/formhug-8bc4ebd1/jD1CdRXGDAEeP28F/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/formhug-8bc4ebd1/jD1CdRXGDAEeP28F/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/formhug-8bc4ebd1/jD1CdRXGDAEeP28F/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/formhug-8bc4ebd1/jD1CdRXGDAEeP28F/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/formhug-8bc4ebd1/jD1CdRXGDAEeP28F/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/formhug-8bc4ebd1/jD1CdRXGDAEeP28F/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/formhug-8bc4ebd1/jD1CdRXGDAEeP28F/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/formhug-8bc4ebd1/jD1CdRXGDAEeP28F/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/formhug-8bc4ebd1/jD1CdRXGDAEeP28F/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Prepare a form-element attachment upload - FormHug\">\u003cmeta data-mint-head property=\"og:description\" content=\"Prepare a 2-step upload for a form-element image. purpose selects the kind: header_image / wallpaper_image (theme images), rich_text_image, a field-element image (choice_image, product_image, booking_image), or a public query header image (opensearch_header_image). 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 consume the upload_id: theme images go into a theme update (header.images[].upload_id / wallpaper.image.upload_id); rich_text_image is finalized via POST /api/v1/attachment_commitments; field-element images go into the form create / update fields payload (choices[].image.upload_id, goods_items[].images[].upload_id, reservation_items[].images[].upload_id); a public query header image goes into header.background_image.upload_id on the public query create / update request. No PAT scope required.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"FormHug\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://formhug.ai/docs/api-reference/attachments/prepare-a-form-element-attachment-upload\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://formhug-8bc4ebd1.mintlify.site/docs/_mintlify/api/og/v2?division=Attachments\u0026amp;title=Prepare+a+form-element+attachment+upload\u0026amp;description=Prepare+a+2-step+upload+for+a+form-element+image.+%60purpose%60+selects+the+kind%3A%0A%60header_image%60+%2F+%60wallpaper_image%60+%28theme+images%29%2C+%60rich_text_image%60%2C+a%0Afield-elem\u0026amp;theme=b198728a958a76812071320e\u0026amp;signature=8da2a5cfe54060db1c59a2fed65d2e851653b6b3c52c76b702935149ba34f400\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Prepare a form-element attachment upload - FormHug\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Prepare a 2-step upload for a form-element image. purpose selects the kind: header_image / wallpaper_image (theme images), rich_text_image, a field-element image (choice_image, product_image, booking_image), or a public query header image (opensearch_header_image). 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 consume the upload_id: theme images go into a theme update (header.images[].upload_id / wallpaper.image.upload_id); rich_text_image is finalized via POST /api/v1/attachment_commitments; field-element images go into the form create / update fields payload (choices[].image.upload_id, goods_items[].images[].upload_id, reservation_items[].images[].upload_id); a public query header image goes into header.background_image.upload_id on the public query create / update request. No PAT scope required.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://formhug-8bc4ebd1.mintlify.site/docs/_mintlify/api/og/v2?division=Attachments\u0026amp;title=Prepare+a+form-element+attachment+upload\u0026amp;description=Prepare+a+2-step+upload+for+a+form-element+image.+%60purpose%60+selects+the+kind%3A%0A%60header_image%60+%2F+%60wallpaper_image%60+%28theme+images%29%2C+%60rich_text_image%60%2C+a%0Afield-elem\u0026amp;theme=b198728a958a76812071320e\u0026amp;signature=8da2a5cfe54060db1c59a2fed65d2e851653b6b3c52c76b702935149ba34f400\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/formhug-8bc4ebd1/jD1CdRXGDAEeP28F/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"FormHug\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366F1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://formhug.ai/docs/api-reference/attachments/prepare-a-form-element-attachment-upload\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/attachments/prepare-a-form-element-attachment-upload.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://formhug.ai/#organization\",\"name\":\"FormHug\",\"url\":\"https://formhug.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/formhug-8bc4ebd1/QkuMZ3dKhwrJ6Thy/logo/light.svg?fit=max\u0026auto=format\u0026n=QkuMZ3dKhwrJ6Thy\u0026q=85\u0026s=88284690f11209ca0abb5239bc7f1179\"}},{\"@type\":\"WebSite\",\"@id\":\"https://formhug.ai/docs#website\",\"name\":\"FormHug\",\"url\":\"https://formhug.ai/docs\",\"publisher\":{\"@id\":\"https://formhug.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://formhug.ai/docs/api-reference/attachments/prepare-a-form-element-attachment-upload#webpage\",\"url\":\"https://formhug.ai/docs/api-reference/attachments/prepare-a-form-element-attachment-upload\",\"name\":\"Prepare a form-element attachment upload\",\"description\":\"Prepare a 2-step upload for a form-element image. purpose selects the kind: header_image / wallpaper_image (theme images), rich_text_image, a field-element image (choice_image, product_image, booking_image), or a public query header image (opensearch_header_image). 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 consume the upload_id: theme images go into a theme update (header.images[].upload_id / wallpaper.image.upload_id); rich_text_image is finalized via POST /api/v1/attachment_commitments; field-element images go into the form create / update fields payload (choices[].image.upload_id, goods_items[].images[].upload_id, reservation_items[].images[].upload_id); a public query header image goes into header.background_image.upload_id on the public query create / update request. No PAT scope required.\",\"isPartOf\":{\"@id\":\"https://formhug.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://formhug.ai/docs/api-reference/attachments/prepare-a-form-element-attachment-upload#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://formhug.ai/docs/api-reference/attachments/prepare-a-form-element-attachment-upload#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"FormHug\",\"item\":\"https://formhug.ai/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Prepare a form-element attachment upload\",\"item\":\"https://formhug.ai/docs/api-reference/attachments/prepare-a-form-element-attachment-upload\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://formhug.ai/docs/api-reference/attachments/prepare-a-form-element-attachment-upload#apireference\",\"headline\":\"Prepare a form-element attachment upload\",\"name\":\"Prepare a form-element attachment upload\",\"description\":\"Prepare a 2-step upload for a form-element image. purpose selects the kind: header_image / wallpaper_image (theme images), rich_text_image, a field-element image (choice_image, product_image, booking_image), or a public query header image (opensearch_header_image). 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 consume the upload_id: theme images go into a theme update (header.images[].upload_id / wallpaper.image.upload_id); rich_text_image is finalized via POST /api/v1/attachment_commitments; field-element images go into the form create / update fields payload (choices[].image.upload_id, goods_items[].images[].upload_id, reservation_items[].images[].upload_id); a public query header image goes into header.background_image.upload_id on the public query create / update request. No PAT scope required.\",\"url\":\"https://formhug.ai/docs/api-reference/attachments/prepare-a-form-element-attachment-upload\",\"mainEntityOfPage\":{\"@id\":\"https://formhug.ai/docs/api-reference/attachments/prepare-a-form-element-attachment-upload#webpage\"},\"publisher\":{\"@id\":\"https://formhug.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://formhug.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"FormHug\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"FormHug\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/attachments/prepare-a-form-element-attachment-upload.md","siteName":"FormHug","nav":{"global":null,"tabs":[{"tab":"Introduction","icon":"book-open","pages":[{"title":"Introduction","href":"/introduction/welcome"}]},{"tab":"Features","icon":"sparkles","pages":[{"title":"Features","href":"/features/building/overview"}]},{"tab":"Integrations","icon":"plug","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"Guides","icon":"graduation-cap","pages":[{"title":"Guides","href":"/guides/use-cases/registration-form"}]},{"tab":"API Reference","icon":"code","groups":[{"group":"Overview","pages":[{"title":"API Reference","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"},{"group":"Models","expanded":false,"pages":[{"title":"Form Field","href":"/api-reference/models/form-field"}]}]},{"group":"Forms","pages":[{"title":"List the current user forms","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/forms","href":"/api-reference/forms/list-the-current-user-forms"},{"title":"Create a form","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v1/forms","href":"/api-reference/forms/create-a-form"},{"title":"Get a form","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/forms/{token}","href":"/api-reference/forms/get-a-form"},{"title":"Update a form","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v1/forms/{token}","href":"/api-reference/forms/update-a-form"},{"title":"Delete a form","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v1/forms/{token}","href":"/api-reference/forms/delete-a-form"},{"title":"Move a form between folders","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v1/forms/{form_token}/folder","href":"/api-reference/form-folder/move-a-form-between-folders"}]},{"group":"Form Themes","pages":[{"title":"Get the form theme","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/forms/{form_token}/theme","href":"/api-reference/form-themes/get-the-form-theme"},{"title":"Update the form theme","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v1/forms/{form_token}/theme","href":"/api-reference/form-themes/update-the-form-theme"}]},{"group":"Field Rules","pages":[{"title":"Get field rules","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/forms/{form_token}/rules","href":"/api-reference/field-rules/get-field-rules"},{"title":"Replace field rules","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v1/forms/{form_token}/rules","href":"/api-reference/field-rules/replace-field-rules"}]},{"group":"Form Settings","pages":[{"title":"Get form settings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/forms/{form_token}/settings","href":"/api-reference/form-settings/get-form-settings"},{"title":"Update form settings","description":"**Required scope:** `form:write`. Field-level merge within each group; null clears the corresponding feature.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /api/v1/forms/{form_token}/settings","href":"/api-reference/form-settings/update-form-settings"}]},{"group":"Attachments","pages":[{"title":"Prepare a form-element attachment upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v1/attachments","href":"/api-reference/attachments/prepare-a-form-element-attachment-upload"},{"title":"Finalize prepared rich-text image uploads","description":"Turn prepared `rich_text_image` uploads into stored images and get back their\npublic `image_url`s, in request order. Call this after PUTting each file to\nits `upload_url` from POST /api/v1/attachments (purpose `rich_text_image`).\n\nAll-or-nothing: if any entry is invalid the whole request fails (422) with a\nper-entry error under `error_details`, and nothing is consumed. Entries that\nwere already processed are remembered, so retrying with the same `upload_ids`\ndoes not create duplicates. Embed the returned `image_url`s into your\nrich-text HTML. No PAT scope required.\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v1/attachment_commitments","href":"/api-reference/attachments/finalize-prepared-rich-text-image-uploads"},{"title":"Prepare an entry-attachment upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v1/f/{form_token}/entry_attachments","href":"/api-reference/entry-attachments/prepare-an-entry-attachment-upload"}]},{"group":"Entries","pages":[{"title":"List entries of a form","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/forms/{form_token}/entries","href":"/api-reference/entries/list-entries-of-a-form"},{"title":"Submit an entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v1/forms/{form_token}/entries","href":"/api-reference/entries/submit-an-entry"},{"title":"Get an entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/forms/{form_token}/entries/{serial_number}","href":"/api-reference/entries/get-an-entry"},{"title":"Update an entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /api/v1/forms/{form_token}/entries/{serial_number}","href":"/api-reference/entries/update-an-entry"},{"title":"Delete an entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v1/forms/{form_token}/entries/{serial_number}","href":"/api-reference/entries/delete-an-entry"},{"title":"Create entries in batch","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v1/forms/{form_token}/entries/batch","href":"/api-reference/entries/create-entries-in-batch"},{"title":"Update entries in batch","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /api/v1/forms/{form_token}/entries/batch","href":"/api-reference/entries/update-entries-in-batch"},{"title":"Delete entries in batch","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v1/forms/{form_token}/entries/batch","href":"/api-reference/entries/delete-entries-in-batch"},{"title":"Get the JSON Schema for writing an entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/forms/{form_token}/entry_schema","href":"/api-reference/entry-schemas/get-the-json-schema-for-writing-an-entry"}]},{"group":"Folders","pages":[{"title":"List the current user folders","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/folders","href":"/api-reference/folders/list-the-current-user-folders"},{"title":"Create a folder","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v1/folders","href":"/api-reference/folders/create-a-folder"},{"title":"Update a folder","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /api/v1/folders/{token}","href":"/api-reference/folders/update-a-folder"},{"title":"Delete a folder","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v1/folders/{token}","href":"/api-reference/folders/delete-a-folder"}]},{"group":"Published Forms","pages":[{"title":"Get a published form's public structure","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/f/{form_token}","href":"/api-reference/published-forms/get-a-published-forms-public-structure"}]},{"group":"Published Form Entries","pages":[{"title":"List your entries on a published form","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/f/{form_token}/entries","href":"/api-reference/published-form-entries/list-your-entries-on-a-published-form"},{"title":"Submit an entry to a published form","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v1/f/{form_token}/entries","href":"/api-reference/published-form-entries/submit-an-entry-to-a-published-form"},{"title":"Get the JSON Schema for submitting to a published form","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/f/{form_token}/entry_schema","href":"/api-reference/entry-schemas/get-the-json-schema-for-submitting-to-a-published-form"},{"title":"Discover candidate entries for a linked_form field","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/f/{form_token}/associated_entry_options","href":"/api-reference/linked-form-options/discover-candidate-entries-for-a-linked_form-field"}]},{"group":"Participated Forms","pages":[{"title":"List forms you have participated in","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/participated_forms","href":"/api-reference/participated-forms/list-forms-you-have-participated-in"}]},{"group":"Public Queries","pages":[{"title":"List your public queries","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/opensearch/queries","href":"/api-reference/public-queries/list-your-public-queries"},{"title":"Create a public query","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v1/opensearch/queries","href":"/api-reference/public-queries/create-a-public-query"},{"title":"Get a public query","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/opensearch/queries/{token}","href":"/api-reference/public-queries/get-a-public-query"},{"title":"Update a public query","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /api/v1/opensearch/queries/{token}","href":"/api-reference/public-queries/update-a-public-query"},{"title":"Delete a public query","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v1/opensearch/queries/{token}","href":"/api-reference/public-queries/delete-a-public-query"}]},{"group":"Me","pages":[{"title":"Get current user info","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/me","href":"/api-reference/me/get-current-user-info"}]},{"group":"Webhooks","pages":[{"title":"List webhook integrations of a form","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/forms/{form_token}/integrations/webhooks","href":"/api-reference/webhooks/list-webhook-integrations-of-a-form"},{"title":"Create a webhook integration","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v1/forms/{form_token}/integrations/webhooks","href":"/api-reference/webhooks/create-a-webhook-integration"},{"title":"Update a webhook integration","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /api/v1/forms/{form_token}/integrations/webhooks/{id}","href":"/api-reference/webhooks/update-a-webhook-integration"},{"title":"Delete a webhook integration","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v1/forms/{form_token}/integrations/webhooks/{id}","href":"/api-reference/webhooks/delete-a-webhook-integration"},{"title":"Get a sample payload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/forms/{form_token}/integrations/webhooks/sample_payload","href":"/api-reference/webhooks/get-a-sample-payload"}]},{"group":"OAuth","pages":[{"title":"Start an OAuth authorization request (PKCE)","openapi":"GET /api/v1/oauth/authorize","playground":"none","href":"/api-reference/oauth/authorize"},{"title":"Exchange for access_token","openapi":"POST /api/v1/oauth/token","playground":"none","href":"/api-reference/oauth/token"},{"title":"Revoke an access_token or refresh_token","openapi":"POST /api/v1/oauth/revoke","playground":"none","href":"/api-reference/oauth/revoke"}]}]},{"tab":"Resources","icon":"folder-open","pages":[{"title":"Resources","href":"/resources/help/faq"}]}]},"basePath":"","title":"Prepare a form-element attachment upload - FormHug","deploymentId":"dpl_53YqbBPsHdrqSGqXiWPGU7csRVod","buildId":"dpl_53YqbBPsHdrqSGqXiWPGU7csRVod","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Ku9dSkH0.js","snippetPresets-Cjez4eet.js","utils-BqNa-fnS.js","style-to-object-BY3JEAdk.js","utils-DiE92JCe.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-Bi0DpqVf.js","conditional-requirements-CFM0id0Q.js","cloneDeep-C6xnxscF.js","_Uint8Array-B7g0OYAt.js","isObject-FP1Yky1u.js","ApiExamples-Bf8Ecb5t.js","usePlaygroundInputsStore-BA942cq6.js","shallow-D0sePNkF.js","isEqual-CnnQO8sL.js","CodeSnippets-BTANoy1T.js","CodeSnippet-CTZvgJfu.js","getApiPlaygroundDisplay-BK2o1XYu.js","Page--B9YZ09u.js","DynamicMarkdown-CsgNpZb1.js","SectionHeading-C3K437Dy.js","icon-DlxjjqnB.js","MethodPill-Cr7Ib9nN.js","getPastedJson-DXo3wtHt.js","Check2Icon-ChEI-f_B.js","axios-CsQoIw0U.js","Markdown-CH4mv0N8.js","AssistantPageLink-BHjmqccN.js","dist-DYCPzQwJ.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}