Create an attachment upload URL
Attachments
Create an attachment upload URL
Create a short-lived, builder-scoped S3 PUT URL for an image up to 40 MiB. Upload the bytes directly with the declared Content-Type, then use the returned attachment reference when creating or bulk-upserting photos.
POST
Create an attachment upload URL
Requires a valid authenticated request for the builder. No resource-specific
scope is required.
Creates a short-lived, builder-scoped S3 upload URL for an image up to 40 MiB.
The endpoint returns
Do not append parameters such as
200 OK because it creates an upload intent rather than a
persisted BuildPass resource.
Send the image bytes directly to the returned uploadUrl with PUT and the
exact returned uploadHeaders. Then use the returned
{ key, regionId, type } attachment reference when creating or bulk-upserting
photos.
The External API validates the image bytes, type, and final size when the
attachment reference is consumed.
Sending the upload
Server-side clients should send every returneduploadHeaders value verbatim:
charset to Content-Type, because changing
a signed header makes S3 reject the request. Browser Fetch APIs do not allow
JavaScript to set Content-Length; in a browser, send the returned
Content-Type, use the original File as the body, and ensure File.size
exactly matches the size used to create the upload URL. The browser will
derive the matching content length.Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Body
application/json
Response
200 - application/json
Attachment upload URL created
Example:
"external-uploads/ckbuilder123456789012345678/photo.jpg"
Available options:
attachment Example:
41943040
Example:
Example:
"au1"