Delete a saved template
Code Mode: praxis.studio.templates.delete
HTTP: DELETE /studio/v1/templates/{template}
Delete a template this organization saved. A built-in template belongs to the catalog and cannot be deleted, so this answers TEMPLATE_NOT_FOUND for one. Drafts that already started from the template are unaffected, because the template was detached when they were created. This cannot be undone.
Signature
praxis.studio.templates.delete(args:{path:{/** e.g. "novel_long:three_act" */ template:string}}):Promise<{/** Always true, which is what tells a caller the deletion landed rather than that the resource was already missing. */ deleted:boolean}>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| template | path | string | yes | Template being addressed: a saved one by its tmpl_ identifier, or a built-in one by its key, optionally prefixed with its genre as in novel_long:three_act when several genres share the key. |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | The deletion confirmation; the template no longer appears in the template list. |
| 400 | application/json | INVALID_PARAMS means a field is missing, malformed or not allowed for this resource; correct the named field and repeat the call. |
| 401 | application/json | The API key is missing, invalid or carries no organization; send a valid organization key in the Authorization header. |
| 404 | application/json | TEMPLATE_NOT_FOUND means no saved template has that identifier and no built-in template has that key; read the template list for the genre and use a value it returns. |
| 500 | application/json | INTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed. |