alert-policies

Delete Org Alert Policy

Changed on

Delete an alert policy along with its rules and repo label. Repositories previously scoped to the policy fall back to the default policy after the next org snapshot. The default policy cannot be deleted. Requires a token with org-wide repository access; repo-restricted tokens receive 403.

This endpoint consumes 1 unit of your quota.

This endpoint requires the following org token scopes:

  • alert-policy:delete
delete/orgs/{org_slug}/alert-policies/{policy_id}

Request

  • Base URL
    https://api.socket.dev/v0
  • URL
    https://api.socket.dev/v0/orgs/{org_slug}/alert-policies/{policy_id}
  • Auth
    • HTTP bearer
    • or HTTP basic

Path parameters

org_slugstring required

The slug of the organization

policy_idstring required

The UUID of the alert policy to delete

Query parameters

dry_runboolean

Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts true, 1, or yes. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with dry_run: true, not 201.

Response

Deleted the alert policy, or rehearsed the delete when dry_run is true.

resultstring

Present on a persisted delete.

dry_runboolean

True when ?dry_run=true (or 1 / yes) rehearsed the write; nothing was persisted.

Changes