Add or replace a file in a template’s bundle

View as Markdown
Registers a new file in your organization's template library and puts it in this template's bundle under `name`. A file already in the bundle under that name is swapped out. Two request shapes: - `{ name, content }` — the text of a source file, stored for you (up to 2 MB). - `{ name, mimeType }` — for binary assets: the file is registered and the response carries `uploadUrl`; `PUT` the bytes there with a `Content-Type` exactly equal to the `mimeType` you sent. The replaced file is detached, never deleted — anything that already rendered with it keeps working. **Learn more:** [Compose](https://docs.cloudraker.com/capabilities/compose)

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

idOrSlugstringRequired>=1 character

Request

This endpoint expects an object.
objectRequired
OR
objectRequired

Response

The created file, now in the bundle.
object"file"
idstring
namestring
mimeTypestring
sizedouble or null
uploadUrlstringOptional
uploadExpiresAtstringOptional

Errors

400
Bad Request Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error