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
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const template = await agental.templates.get("tpl_0123456789abcdef");
- await template.delete();
Answer204 No Content
No body: the status says it was done.
Template deleted.
Path
idrequiredstring | e.g. "tpl_0123456789abcdef" |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
204 Template deleted.
Errors and other answers
| 404 | Not found. |
| 409 | template_in_use sandboxes are on it, and the message says how many. |
| 409 | default_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.