Skip to content

Delete a template

DELETE
/orgs/{org}/templates/{id}
curl --request DELETE \
--url https://api.sloose.com/orgs/org_9f3c/templates/b3f1c8a2 \
--header 'Authorization: Bearer <token>'

A template shared with the org may be deleted by any builder or above; a private one only by its creator or an admin. Every import started from it or saved as it is detached in the same write — its pointer cleared and its version moved, with the caller recorded as the writer — and keeps its own copy of the recipe. Run history is kept: a run records what happened, not what the template says now. The template’s schedules and versions go with it.

Refused while any of those imports is running (409 IMPORT_RUNNING, naming each import and its run): a running import refuses every write, and the detach is one. Nothing is deleted or detached; try again when the run ends.

org
required

The org id the session was issued for. A token for one org can never read another.

string
Example
org_9f3c

The org id the session was issued for. A token for one org can never read another.

id
required

The template id.

string
Example
b3f1c8a2

The template id.

Deleted.

Media typeapplication/json
object
ok
required
boolean
detached
required

How many imports were detached.

integer
Example
{
"ok": true
}

No bearer, or one that is expired, revoked or no longer resolves to a member.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The bearer’s role is too low, or it was issued for a different org.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No such template, or it is not visible to this session.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

An import started from the template or saved as it is running (code: IMPORT_RUNNING, with running: each { importId, runId }). Nothing was deleted.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Report a problem with this page