Skip to main content
POST
This call publishes a new version of a private template and answers 201 with the version. The request is multipart/form-data, like Create a Private Template. The version number of the manifest must be higher than the current one, and the id of the manifest cannot change. A published version never changes, and a number that was used stays reserved even if its version was removed. Needs the templates:write scope when called with an API key, and only the owner of the template (in a workspace, its owner) can publish. A code service without a new ZIP part keeps the code of the previous version; if it had none, the call fails with TEMPLATE_SOURCE_REQUIRED. A variable listed in env_hidden and absent from env keeps its previous value, and sending it again replaces it. Apps already created from the template are not touched: each user updates when they choose.
string
required
The template ID.
string
required
The manifest of the new version, as a JSON-serialized string.
file
A ZIP part with the new code of a service, named after the service id. Optional for a service that already has code.
string
What changed, as a JSON-serialized object with pt-br (required), en and es.

Response

object
The new version.

Error Responses

string
The error code indicating the reason for the failure. Possible values:
  • API_KEY_SCOPE_DENIED: The API key does not have the templates:write scope (403).
  • TEMPLATE_NOT_FOUND: The template does not exist or is not yours (404).
  • TEMPLATE_MANIFEST_INVALID: The manifest is not valid, the version is not higher than the current one, or the id changed; details.issues lists the findings.
  • TEMPLATE_SOURCE_REQUIRED: A code service has no ZIP part and no code from an earlier version.
  • TEMPLATE_SECRET_IN_SOURCE: A ZIP holds a secret; details.files lists the paths (400).
  • IMAGE_NOT_FOUND: An image service refers to an image that is not yours or has no successful build.
  • WORKSPACE_OWNER_ONLY: Only the workspace owner publishes versions of its templates.
Last modified on October 28, 2026