Images
Add an image
/v1/forms/{formId}/imagesAdd a picture to this form for an image choice option, from an upload or a public URL. A file that isn't a usable image answers 400 invalid_image, and the upload is deleted. A URL that can't be fetched answers 400 import_failed. Pictures that neither the draft nor a published version uses are deleted. That happens an hour after their option is removed, or a day after an upload that was never used.
Path parameters
formIdstringrequiredThe form's id.
Body
JSON, with Content-Type: application/json.
storageIdstringThe
storageIdfrom an upload (seePOST /v1/forms/{formId}/images/upload-url). Give this orurl.1–64 chars
urlstringA public image to fetch and keep. Private and local addresses are refused. Give this or
storageId. Either way, the file must be PNG, JPEG, WebP, GIF or SVG, checked by its bytes, and at most 5 MB. SVGs are cleaned and can be at most 200 KB. Large photos aren't resized, so shrink them to about 1200 px wide first, as the app does.max 2000 chars · uri
Response
idstringrequiredThe picture's id. Put it in an image choice option's
imageId.formIdstringrequiredurlstringrequiredWhere visitors load the picture from. The address is public and never changes, and it's cached for a year. A new picture always gets a new id.
contentTypestringrequiredPNG, JPEG, WebP, GIF or SVG, read from the file's bytes.
sizeintegerrequiredSize in bytes.
-9007199254740991–9007199254740991
widthnumberrequiredWidth in pixels.
heightnumberrequiredHeight in pixels.
sourceUrlstring or nullrequiredThe
urlthe picture was fetched from. Null for an upload.createdAtnumberrequiredWhen it was added, in milliseconds since the epoch.
Errors answer with a status and the error shape.