Skip to content
Navigation

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 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

PUT
https://api.cloudraker.com/v1/compose/configs/{idOrSlug}/files
Try it
Path parameters
Request body
Live API request

This request can change data or incur charges for the selected organization.

Authorization

  • bearerAuth
    HTTP
    required

Path parameters

  • idOrSlug
    string
    required
    minLength: 1

Request body JSON required

Any of the following:

  • object
    • name
      string
      required
      minLength: 1
    • content
      string
      required
  • object
    • name
      string
      required
      minLength: 1
    • mimeType
      string
      required
      minLength: 1

Returns

200

The created file, now in the bundle.

JSON
  • object
    string
    required
  • id
    string
    required
  • name
    string
    required
  • mimeType
    string
    required
  • size
    number | null
    required
  • uploadUrl
    optional
    string
  • uploadExpiresAt
    optional
    string

400

Not a compose template (capability_mismatch).

404

Unknown template.

422

The bundle is full (too_many_files), or the file is a font format the renderer cannot read (unsupported_file_type).

429

Rate limited. The /v1 API allows at least 67 requests per minute per organization (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the Retry-After interval and retry — the error is retryable.
JSON
  • code
    rate_limited
    required
  • message
    string
    required
  • retryable
    true
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close