Skip to main content
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 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 returned uploadHeaders value verbatim:
Do not append parameters such as 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

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

builderId
string
required

Body

application/json
contentType
string
required
Example:

"image/jpeg"

fileName
string
required
Example:

"site-photo.jpg"

size
integer
required
Required range: 1 <= x <= 41943040
type
enum<string>
required
Available options:
attachment

Response

200 - application/json

Attachment upload URL created

key
string
required
Example:

"external-uploads/ckbuilder123456789012345678/photo.jpg"

type
enum<string>
required
Available options:
attachment
contentType
string
required
fileName
string
required
maxSize
integer
required
Example:

41943040

uploadHeaders
object
required
Example:
uploadUrl
string<uri>
required
regionId
string | null
Example:

"au1"