View all methods

deployments.delete

Permanently delete an API-created deployment and its associated attribution data.

Facts

Method POST https://yourinstance.getdx.net/api/deployments.delete

Arguments

Required arguments

Name Type Description
token Token Auth token passed as an HTTP header.
reference_id Text or Integer Unique identifier of the deployment to delete.

Example:
release-v2.4.0

Usage info

Deletion is permanent. It removes the deployment along with its metadata, service associations, and pull request attribution. DX recalculates affected deployment metrics asynchronously.

Only deployments created through the Deployments API can be deleted through this method. Deployments managed by a native connector or deployment inference rule return deployment_not_api_managed.

This method is idempotent. If the reference_id does not exist or has already been deleted, the request still succeeds. This makes retries safe after a timeout or lost response.

Example request

curl -X POST https://yourinstance.getdx.net/api/deployments.delete \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer xxxx-xxxxxxxxx-xxxx" \
  --data '{
    "reference_id": "release-v2.4.0"
  }'

Success response

{
  "ok": true,
  "action": "deleted",
  "reference_id": "release-v2.4.0"
}

Errors

Error Description
not_authed The request did not include a valid API key.
required_params_missing reference_id was not provided.
invalid_reference_id reference_id is not text or an integer.
deployment_not_api_managed The deployment is managed by a connector or inference rule.