Skip to content

Delete an environment

DELETE
/api/v1/environment/{environment_id}
curl --request DELETE \
--url https://app.prefactorai.com/api/v1/environment/013xrzp12g3nqk8ns6jadrqmpgrjkeny \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data null
environment_id
required
Environment_Id

A valid environment ID

string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkeny
One of:

Optional idempotency key for ensuring request idempotency

string

Success

Media typeapplication/json
object
details
Environment_Details
object
account_id
Account_Id

A valid account ID

string
description
One of:

Optional free-form description

string
id
Environment_Id

A valid environment ID

string
name

Environment name

string
purpose

Environment purpose

string
Allowed values: development staging testing production
type

Type of resource (always ‘environment’)

string
Allowed values: environment
status
string
Allowed values: success
Example
{
"details": {
"account_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"description": null,
"id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"name": "Development",
"purpose": "development",
"type": "environment"
},
"status": "success"
}

Error

Media typeapplication/json
One of:
object
code
string
Allowed values: bad_request bad_authtoken not_authenticated not_permitted not_implemented unknown not_found unexpected_ref_type unexpected invalid_action alert_unknown alert_already_cleared invalid_value required_value idempotency_key_already_used
message
string
status
string
Allowed values: error
Example
{
"code": "bad_request",
"status": "error"
}