Skip to the page

Destroy an environment and everything in it

POST/v1/organisations/{id}/environments/{envId}/destroy

Operation environments.destroy · since 2026-11-05 · stable

Needs a session withwritescopeAnswers200 OK

{ "ok": true } once the destroy is asked for.

Destroys everything in it. Refused while a resource in it is protected.

Path parameters

idstring (uuid)required
The organisation id.
envIdstring (uuid)required
The environment id.

Body (JSON)

confirmstring, up to 200optional
The environment's exact name, typed back.

Errors

Every error is { "error", "message", "detail"? } (Errors and references). Besides the codes any route can answer, this one refuses with:

  • wrong_state
  • busy
  • protected
POST/v1/organisations/{id}/environments/{envId}/destroy
curl -X POST "https://api.rykloud.com/v1/organisations/$ORG_ID/environments/$ENV_ID/destroy" \
  -H "Authorization: Bearer $RYKLOUD_TOKEN"
With the rykloud CLI
rykloud envs destroy [ENV] [flags]

Command reference: rykloud envs destroy