Docs
Templates ›

Delete template

DELETE/v1/templates/{id}

Deletes a template that no sandbox is on. Sandboxes are never moved off it by this: put them on another template first.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const template = await agental.templates.get("tpl_0123456789abcdef");
  4. await template.delete();
Answer204 No Content

No body: the status says it was done.

Template deleted.

Path

idrequired
string
e.g. "tpl_0123456789abcdef"

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

204 Template deleted.

Errors and other answers

404 Not found.
409template_in_use sandboxes are on it, and the message says how many.
409default_template default cannot be deleted. Nothing was deleted.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.