Update template metadata.
Updates specific metadata and attributes of an existing template identified by its ID. This endpoint is crucial for managing the lifecycle and details of templates without the need to re-upload the template file. It allows for precise control over template metadata, versioning, and deployment states.
Features
- Metadata Management: Modify template metadata such as name, comment, and tags for improved organization and searchability.
- Version Deployment: Update the deployedAt field to control which version of a template is actively deployed, ensuring that the correct template version is used in document generation processes.
- Lifecycle Control: Manage the template's lifecycle by updating the expiration timestamp, allowing for fine-grained control over template availability.
Which version is patched
The identifier in the URL decides which version is patched:
- With a Template ID (64-bit format), Carbone patches the currently deployed version of that template.
- With a Version ID (SHA256 format), Carbone patches that exact version.
Use Cases
Updating template metadata to reflect changes in document usage or categorization, switching between template versions for deployment to support different document generation needs, and managing template lifecycle by setting expiration dates to automatically retire outdated templates.
Request
- Base URLhttps://api.carbone.io
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Unique identifier of the template or version ID
Headers
Carbone API major version to use. Only a major version can be specified: it automatically includes all future minor versions and patches.
- 5: latest version, recommended.
- 4: default when the header is not provided.
- 3: legacy.
- staging: not intended for production environments.
It is strongly recommended to always set this header explicitly to avoid unexpected behavior. See API versioning documentation
Request body
Response
Template metadata updated successfully. The response always includes versionId, plus the fields provided in the request body. deployedAt is the value saved by Carbone: when the request asked to deploy now, it is the current time.
Changes
No recorded changes to this operation across all 1 revision of this API.