Skip to main content

delete-customer-subscription

dci delete-customer-subscription [flags]

Deletes a dashboard, report, or commitment subscription and every scheduled entry on it. Returns 204. Deleting an id that is already gone also returns 204, so a retry does not fail. If-Match is required when the document still exists; a stale value is 412. An id that matches no scheduled subscription, alert, or budget returns 204 when If-Match is present. Create does not accept alert or budget. GET returns them. PATCH may replace their recipient lists. DELETE of an alert or a budget returns 409 customers.entry_is_resource. The caller must have canDelete for the subscription. Manage Settings users, a creator with the permission for each scheduled type, and a source owner or editor may delete it. Source viewers and recipients cannot. Users Manager alone grants no access. A service-account token is evaluated from its own permissions and does not inherit the permissions of the subscription creator. Idempotency-Key is required. The same key, caller, customer, method, path, and If-Match replays the stored success response. A different If-Match is 422 idempotency_key_reused. A missing key is 400 idempotency_key_required. While the first request is in progress, another request with that key is 409 idempotency_request_in_progress. A 4xx response releases the key. dryRun=true does not reserve the key and does not delete. Reads are immediately consistent. After a completed delete, a GET of that id returns 404.

Flags​

FlagTypeDefaultExampleDescription
--dry-runbooleanfalseIf true, validates the request and returns the would-be result without applying it. The response then carries the X-Dry-Run header.

Every command also accepts the CLI-wide flags for output shaping — see Output formats and Table output options.

Output​

On success, this command produces no response data.

Errors​

On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.

HTTP status to exit code mapping
HTTP statusExit codeError codeMeaning
400, 42230VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
40921RESOURCE_CONFLICTThe operation conflicts with the resource's current state.
412, 4281API_ERRORThe request failed; the printed error message has details.
50040API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: deletecustomersubscription