Delete a template or a specific version.
Removes a specific template or a specific version of a template from the Carbone storage. This endpoint accepts both the templateId and versionId, enabling precise control over which templates or versions are deleted.
Features
- Template and Version Deletion: Deletes either the entire template, including all its versions, when using a templateId, or a specific version of a template when using a versionId.
- Soft Deletion Mechanism: The deletion process sets the expireAt timestamp to the current time: the template immediately stops being returned by the API, then the file is removed once the server's retention delay has passed (Carbone Cloud: 24 hours). This is equivalent to calling PATCH /template/{id} with expireAt set to the current timestamp.
- Bulk Version Deletion: When a templateId is specified, all versions of the template are marked for deletion unless otherwise specified.
Parameters
The ID of the template or version to delete. This can be a templateId to delete an entire template and its versions, or a versionId to delete a specific version.
Use Case
Ideal for managing the lifecycle of templates, such as cleaning up outdated versions, removing obsolete templates, or archiving specific versions while maintaining the overall template integrity.
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
Response
The template is deleted
Example response
{
"message": "Template deleted"
}Changes
No recorded changes to this operation across all 1 revision of this API.