Rollback template to previous version (Cloud-only)
client.templates.rollback(stringtemplateName, TemplateRollbackParams { version } body, RequestOptionsoptions?): TemplateRollbackResponse { success, message }
/v1/templates/{template_name}/rollback
Rollback the current working version of a template to a previous saved version. If the current version has unsaved changes, they will be automatically saved as a new version before rollback.
Parameters
templateName: string
Returns
Rollback template to previous version (Cloud-only)
import Letta from '@letta-ai/letta-client';
const client = new Letta({
apiKey: process.env['LETTA_API_KEY'], // This is the default and can be omitted
});
const response = await client.templates.rollback('template_name', { version: 'version' });
console.log(response.success);
{
"success": true,
"message": "message"
}
Returns Examples
{
"success": true,
"message": "message"
}