Add or replace a file in a template’s bundle
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 carriesuploadUrl;PUTthe bytes there with aContent-Typeexactly equal to themimeTypeyou sent.
The replaced file is detached, never deleted — anything that already rendered with it keeps working.
Learn more: Compose
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
idOrSlug
Request
This endpoint expects an object.
OR
Response
The created file, now in the bundle.
object
id
name
mimeType
size
uploadUrl
uploadExpiresAt
Errors
400
Bad Request Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error