Skip to main content
Environments

Delete a Environment

Deletes an Environment that is not referenced by a Template.

Path

DELETE /api/v1/forward/environments/{id}

Request headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT or SAT>
Checks Template references before deletion. If unreferenced, the Environment is deleted and no longer appears in default listings.

Path parameters

ParameterTypeRequiredDescription
idstringYesEnvironment ID.

Query parameters

ParameterTypeRequiredDescription
identity_idstringNoOptional; used only for Identity-owned resources. PAT callers can pass it explicitly; omitting it uses the administrator scope. For SAT, issue an Identity-scoped token and do not explicitly pass this parameter, or the request returns HTTP 400. See Identity ownership.

Example request

curl -X DELETE "https://api.qoder.com/api/v1/forward/environments/env_xxx" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

Example response

{
  "id": "env_xxx",
  "type": "environment_deleted",
  "deleted": true
}

Response fields

FieldTypeDescription
idstringID of the deleted resource.
typestringDeletion result type.
deletedbooleanWhether the resource was deleted.

Errors

HTTPTypeTrigger
400invalid_request_errorThe request body, path parameters, or pagination parameters are invalid. Also returned if SAT explicitly includes identity_id.
401authentication_errorThe authentication token is missing or invalid.
403permission_errorOwner mismatch for a PAT without identity_id or an Admin SAT, or other insufficient permissions.
404not_found_errorThe Environment does not exist, is not registered, or is not visible. identity_id is invalid, disabled, or does not belong to the caller, or the target resource does not belong to the current Identity scope.
409conflict_errorThe idempotency key conflicts, create recovery requires manual intervention, or the resource is still referenced during deletion.
500/502/503api_errorForward or a dependent service failed.