This webhook is fired when a destroy has been resumed after an approval
env0 API authentication is done via API keys. An API Key can either be created by an organization administrator, in which case it will not be connected to any specific user, or via Personal API Keys to authenticate as a user.
Once you've created your organization, you can set up and manage API Keys.
Navigate to the Organization Settings page and click the API Keys tab.
Click Add API Key and enter a name for your key in the Name field. This name is for reference purposes only and isn't used directly in authentication.
❗️Save Your API Key ID and secret The secret will not be available after you close this window.
Click on your avatar (located on the top right of the screen)
Click on Personal Settings
Select the API Keys tab
Click Add API Key, and enter a name for your key in the Name field. This name is for reference purposes and isn't used directly in authentication.
❗️Save your API Key ID & secret The secret will not be available after you close this window.
Authentication of the env0 API is done using the Basic Authentication method. Each request made should include the API Key ID as the username, and the API Key secret as the password. For example, when using curl, we can include these parameters via flag --user {API Key ID}:{API Key Secret}.
When creating an API key through the organization settings, you will need to choose if you’d like to grant it Organization Admin or User permissions. In case of the latter, you can assign fine-grained permissions per project. Personal API Keys can be created through the user’s profile page and will have the same permissions as the user has.
env0 API allows up to 1K requests per 60 seconds, requests are aggregated by IP, HTTP Method and URI. If you exceed this limit, you will receive a 429 status code.
This is the schema of what env0 sends to your endpoint when a destroy has been resumed after an approval
"com.env0.destroy.resumed""https://env0.com""application/json"Show child attributes
Show child attributes
deploy, destroy, prPlan, driftDetection, task, remotePlan, dryRun, moduleTest, deploy, destroy, prPlan, driftDetection, task, remotePlan, dryRun, moduleTest Show child attributes
IN_PROGRESS, WAITING_FOR_USER, TIMEOUT, FAILURE, SUCCESS, CANCELLED, INTERNAL_FAILURE, ABORTING, ABORTED, QUEUED, SKIPPED, NEVER_DEPLOYED, IN_PROGRESS, WAITING_FOR_USER, TIMEOUT, FAILURE, SUCCESS, CANCELLED, INTERNAL_FAILURE, ABORTING, ABORTED, QUEUED, SKIPPED, NEVER_DEPLOYED, IN_PROGRESS, WAITING_FOR_USER, TIMEOUT, FAILURE, SUCCESS, CANCELLED, INTERNAL_FAILURE, ABORTING, ABORTED, QUEUED, SKIPPED, NEVER_DEPLOYED opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, workflow, module, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, workflow, module Show child attributes
Show child attributes
Show child attributes
Show child attributes
approved, cancelled, approved, cancelled Show child attributes
The deployed Environment ID
ENV0_PROJECT_ID
The Project Name of the deployed Environment
The deployment ID
The deployment type.
deploy, destroy, prPlan, deploy, destroy, prPlan, deploy, destroy, prPlan Available only when deployment revision defined
The Terraform Workspace name used in the Environment
The root repository path
the vcs provider
gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps, gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps, gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps, gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps pr author. available only in PR Plan
the pr number. available only in PR Plan
the source repository. available only in PR Plan for the VCSs supporting fork PR Plans)"
the source branch. available only in PR Plan
the target branch. available only in PR Plan
the commit hash
the commit url
The OIDC Token - read more here(https://docs.env0.com/docs/oidc-integrations) on how to enable it and use it
When using a native VCS integration, this will represent the access token we use to clone the repository
The file path to a JSON representation of a Terraform Plan file
add additional cli arguments when running a plan
add additional cli arguments when running the apply command
Repository URL to write PR comments to. Used for prPlan deployments to override the target repo for comments.
PR number to write comments to. Used for prPlan deployments to override the target PR.
Discovery VCS provider (e.g., 'github')
gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps, gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps, gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps, gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps user, terraform-cli, workflow, user, terraform-cli, workflow, user, terraform-cli, workflow Show child attributes
Show child attributes
create, update, delete, recreate, metadata, create, update, delete, recreate, metadata replace_because_tainted, replace_because_cannot_update, replace_by_request, delete_because_no_resource_config, delete_because_no_module, delete_because_wrong_repetition, delete_because_count_index, delete_because_each_key, read_because_config_unknown, read_because_dependency_pending, replace_because_tainted, replace_because_cannot_update, replace_by_request, delete_because_no_resource_config, delete_because_no_module, delete_because_wrong_repetition, delete_because_count_index, delete_because_each_key, read_because_config_unknown, read_because_dependency_pending Show child attributes
create, update, delete, recreate, metadata, create, update, delete, recreate, metadata Show child attributes
Show child attributes
Show child attributes
Show child attributes
opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible A string representing semantic version of Terraform. If set to "RESOLVE_FROM_TERRAFORM_CODE", the version will be determined by using tfenv's 'min-required'. When set to "latest", the version used will be the most recent one available for Terraform.
terraform, opentofu, terraform, opentofu, terraform, opentofu opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible Show child attributes
Show child attributes
SET, GLOBAL, BLUEPRINT, SUB_ENVIRONMENT_BLUEPRINT, PROJECT, WORKFLOW, ENVIRONMENT, DEPLOYMENT, SET, GLOBAL, BLUEPRINT, SUB_ENVIRONMENT_BLUEPRINT, PROJECT, WORKFLOW, ENVIRONMENT, DEPLOYMENT, SET, GLOBAL, BLUEPRINT, SUB_ENVIRONMENT_BLUEPRINT, PROJECT, WORKFLOW, ENVIRONMENT, DEPLOYMENT, SET, GLOBAL, BLUEPRINT, SUB_ENVIRONMENT_BLUEPRINT, PROJECT, WORKFLOW, ENVIRONMENT, DEPLOYMENT, SET, GLOBAL, BLUEPRINT, SUB_ENVIRONMENT_BLUEPRINT, PROJECT, WORKFLOW, ENVIRONMENT, DEPLOYMENT Whether it is an Environment or Terraform variable 0 value maps to an Environment variable 1 value maps to an Terraform variable
0, 1, 0, 1, 0, 1, 0, 1, 0, 1 The ID of the configuration property. If provided, will act as an update. Otherwise, a new configuration property will be created.
The ID of the entity of the provided scope. e.g. a project's ID when the provided scope is PROJECT.
Inapplicable for GLOBAL scope, as it has no specific entity.
Show child attributes
"string"HCL, JSON, ENVIRONMENT_OUTPUT, HCL, JSON, ENVIRONMENT_OUTPUT, HCL, JSON, ENVIRONMENT_OUTPUT, HCL, JSON, ENVIRONMENT_OUTPUT, HCL, JSON, ENVIRONMENT_OUTPUT Show child attributes
Show child attributes
Show child attributes
CREATED, INACTIVE, ACTIVE, FAILED, TIMEOUT, WAITING_FOR_USER, DEPLOY_IN_PROGRESS, DESTROY_IN_PROGRESS, TASK_IN_PROGRESS, ABORTING, ABORTED, NEVER_DEPLOYED, DRIFTED, DRY_RUN_IN_PROGRESS, CREATED, INACTIVE, ACTIVE, FAILED, TIMEOUT, WAITING_FOR_USER, DEPLOY_IN_PROGRESS, DESTROY_IN_PROGRESS, TASK_IN_PROGRESS, ABORTING, ABORTED, NEVER_DEPLOYED, DRIFTED, DRY_RUN_IN_PROGRESS, CREATED, INACTIVE, ACTIVE, FAILED, TIMEOUT, WAITING_FOR_USER, DEPLOY_IN_PROGRESS, DESTROY_IN_PROGRESS, TASK_IN_PROGRESS, ABORTING, ABORTED, NEVER_DEPLOYED, DRIFTED, DRY_RUN_IN_PROGRESS Show child attributes
deploy, destroy, prPlan, driftDetection, task, remotePlan, dryRun, moduleTest, deploy, destroy, prPlan, driftDetection, task, remotePlan, dryRun, moduleTest Show child attributes
Show child attributes
IN_PROGRESS, WAITING_FOR_USER, TIMEOUT, FAILURE, SUCCESS, CANCELLED, INTERNAL_FAILURE, ABORTING, ABORTED, QUEUED, SKIPPED, NEVER_DEPLOYED, IN_PROGRESS, WAITING_FOR_USER, TIMEOUT, FAILURE, SUCCESS, CANCELLED, INTERNAL_FAILURE, ABORTING, ABORTED, QUEUED, SKIPPED, NEVER_DEPLOYED, IN_PROGRESS, WAITING_FOR_USER, TIMEOUT, FAILURE, SUCCESS, CANCELLED, INTERNAL_FAILURE, ABORTING, ABORTED, QUEUED, SKIPPED, NEVER_DEPLOYED opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, workflow, module, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, workflow, module Show child attributes
Show child attributes
Show child attributes
Show child attributes
approved, cancelled, approved, cancelled Show child attributes
The deployed Environment ID
ENV0_PROJECT_ID
The Project Name of the deployed Environment
The deployment ID
The deployment type.
deploy, destroy, prPlan, deploy, destroy, prPlan, deploy, destroy, prPlan Available only when deployment revision defined
The Terraform Workspace name used in the Environment
The root repository path
the vcs provider
gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps, gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps, gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps, gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps pr author. available only in PR Plan
the pr number. available only in PR Plan
the source repository. available only in PR Plan for the VCSs supporting fork PR Plans)"
the source branch. available only in PR Plan
the target branch. available only in PR Plan
the commit hash
the commit url
The OIDC Token - read more here(https://docs.env0.com/docs/oidc-integrations) on how to enable it and use it
When using a native VCS integration, this will represent the access token we use to clone the repository
The file path to a JSON representation of a Terraform Plan file
add additional cli arguments when running a plan
add additional cli arguments when running the apply command
Repository URL to write PR comments to. Used for prPlan deployments to override the target repo for comments.
PR number to write comments to. Used for prPlan deployments to override the target PR.
Discovery VCS provider (e.g., 'github')
gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps, gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps, gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps, gitlab, github, bitbucket, bitbucketServer, gitlabEnterprise, githubEnterprise, azureDevOps user, terraform-cli, workflow, user, terraform-cli, workflow, user, terraform-cli, workflow Show child attributes
Show child attributes
create, update, delete, recreate, metadata, create, update, delete, recreate, metadata replace_because_tainted, replace_because_cannot_update, replace_by_request, delete_because_no_resource_config, delete_because_no_module, delete_because_wrong_repetition, delete_because_count_index, delete_because_each_key, read_because_config_unknown, read_because_dependency_pending, replace_because_tainted, replace_because_cannot_update, replace_by_request, delete_because_no_resource_config, delete_because_no_module, delete_because_wrong_repetition, delete_because_count_index, delete_because_each_key, read_because_config_unknown, read_because_dependency_pending Show child attributes
create, update, delete, recreate, metadata, create, update, delete, recreate, metadata Show child attributes
Show child attributes
Show child attributes
Show child attributes
opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible A string representing semantic version of Terraform. If set to "RESOLVE_FROM_TERRAFORM_CODE", the version will be determined by using tfenv's 'min-required'. When set to "latest", the version used will be the most recent one available for Terraform.
terraform, opentofu, terraform, opentofu, terraform, opentofu opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible Show child attributes
run-from-here, single-node-deploy, single-node-destroy, run-from-here, single-node-deploy, single-node-destroy Show child attributes
Show child attributes
SET, GLOBAL, BLUEPRINT, SUB_ENVIRONMENT_BLUEPRINT, PROJECT, WORKFLOW, ENVIRONMENT, DEPLOYMENT, SET, GLOBAL, BLUEPRINT, SUB_ENVIRONMENT_BLUEPRINT, PROJECT, WORKFLOW, ENVIRONMENT, DEPLOYMENT, SET, GLOBAL, BLUEPRINT, SUB_ENVIRONMENT_BLUEPRINT, PROJECT, WORKFLOW, ENVIRONMENT, DEPLOYMENT, SET, GLOBAL, BLUEPRINT, SUB_ENVIRONMENT_BLUEPRINT, PROJECT, WORKFLOW, ENVIRONMENT, DEPLOYMENT, SET, GLOBAL, BLUEPRINT, SUB_ENVIRONMENT_BLUEPRINT, PROJECT, WORKFLOW, ENVIRONMENT, DEPLOYMENT Whether it is an Environment or Terraform variable 0 value maps to an Environment variable 1 value maps to an Terraform variable
0, 1, 0, 1, 0, 1, 0, 1, 0, 1 The ID of the configuration property. If provided, will act as an update. Otherwise, a new configuration property will be created.
The ID of the entity of the provided scope. e.g. a project's ID when the provided scope is PROJECT.
Inapplicable for GLOBAL scope, as it has no specific entity.
Show child attributes
"string"HCL, JSON, ENVIRONMENT_OUTPUT, HCL, JSON, ENVIRONMENT_OUTPUT, HCL, JSON, ENVIRONMENT_OUTPUT, HCL, JSON, ENVIRONMENT_OUTPUT, HCL, JSON, ENVIRONMENT_OUTPUT Show child attributes
Show child attributes
0, 1, 2, 3, 0, 1, 2, 3 Mark the environment as inactive
ERROR, DRIFTED, OK, NEVER_RUN, DISABLED, ERROR, DRIFTED, OK, NEVER_RUN, DISABLED, ERROR, DRIFTED, OK, NEVER_RUN, DISABLED Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
MERGE_WITH_TEMPLATES, OVERRIDE_TEMPLATES, MERGE_WITH_TEMPLATES, OVERRIDE_TEMPLATES paying, trial, free, paying, trial, free The maximum allowed TTL. Must be 6-h, 12-h, 1-d, 3-d, 1-w, 2-w, 1-M, inherit or explicit null which means infinite
The default TTL set when creating environments. Must be 6-h, 12-h, 1-d, 3-d, 1-w, 2-w, 1-M, inherit or explicit null which means infinite
Show child attributes
ORGANIZATION, PROJECT, ORGANIZATION, PROJECT, ORGANIZATION, PROJECT opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, workflow, module, approval-policy, custom-flow, environment-discovery, discovery-config, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, workflow, module, approval-policy, custom-flow, environment-discovery, discovery-config, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, workflow, module, approval-policy, custom-flow, environment-discovery, discovery-config, opentofu, terraform, terragrunt, pulumi, k8s, cloudformation, helm, ansible, workflow, module, approval-policy, custom-flow, environment-discovery, discovery-config Show child attributes
A string representing semantic version of Terraform. If set to "RESOLVE_FROM_TERRAFORM_CODE", the version will be determined by using tfenv's 'min-required'. When set to "latest", the version used will be the most recent one available for Terraform.
terraform, opentofu, terraform, opentofu, terraform, opentofu Show child attributes
Return a 200 status to indicate that the data was received successfully
Was this page helpful?