Note: If you have the QA Wolf GitHub integration enabled for your preview testing, GitHub will notify us of PRs being merged or closed, and we use that notification to stop runs and trigger flow promotion. In this case, it is typically redundant and unnecessary to call this.
Post to /api/webhooks/environment_terminated Webhook
HTTP Method: POST
Sample Query
Shell
API key
API key
Go to 


https://app.qawolf.com/<team slug>/settings/integrationsOr, navigate via the UI:


Required Request Headers
| Header Name | Header Value | Description |
|---|---|---|
Authorization | Bearer api_*** | Provide a string constructed by appending your team API Key to Bearer. |
Content-Type | application/json |
JSON-formatted Request Body
ThisPOST request supports a JSON-formatted object with the below fields. All fields are optional.
Commonly Used Fields
| Field | Value | Description |
|---|---|---|
environmentId | Ephemeral environment id | ID of the environment to terminate |
environmentAlias | Ephemeral environment alias | Alias of the environment to terminate |
deploymentUrl | URL | Preview URL for runs created with ephemeral_environment: true using Deploy Success Webhook |
Response
200 Responses
The response will look like this:TypeScript
HTTP Status Error Codes
| Code | Description |
|---|---|
| 401 | Missing or invalid credentials. Make sure you are using the Authorization: Bearer XXX with XXX the API token for your team. |
| 403 | Forbidden. Usually indicates a disabled team. Contact support. |
| 404 | Environment not found. |
| 409 | Conflict. Environment is already terminated |
| 500 | Internal server error. If the issue persists, contact support. |