Skip to main content
DELETE/approval-policies/{policyId}

Delete Approval Policy

Permanently deletes a draft policy bundle identified by policyId.

Deletion is permitted only while the bundle is in draft status; attempting to delete a published or superseded bundle returns K9O_POLICY_PUBLISH_CONFLICT (409).

Returns K9O_POLICY_NOT_FOUND (404) if policyId does not resolve to a bundle in the project.

Requires PROJECT_ADMIN.

Parameters
policyId *path

The approval policy id (apo_...).

The apo_ prefix may be left out.

projectSlug *path

The project's slug: the path segment after @.

It is unique within the org.

Responses
HTTPK9O CodeDescription
200Success
401K9O_SESSION_EXPIREDThe caller's session token is expired or invalid; re-authenticate to continue.
403K9O_ACCESS_DENIEDThe caller does not hold the required role to delete this approval policy.
403K9O_POLICY_AUTHORING_AUTHORITY_INSUFFICIENTThe caller's role is not authorised under the org-policy constraint to remove the approval rule for the targeted collection and operation scope.
404K9O_POLICY_NOT_FOUNDNo approval policy with the supplied identifier exists in this project.
Response body (200)
data *object

The approval policy that was deleted.

id *string

The id of the deleted policy (apo_...).

meta *any
TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.approvalPolicies.delete('apo_demo00000001')

Showing example in TypeScript

Response example (200)
{
  "data": {
    "id": "string"
  }
}

More in Policy & Approvals