Skip to main content

Delete a policy

Permanently delete a policy. Once deleted, the policy will no longer be applied to the associated endpoint.

Endpoint

DELETE /policies/{policy_id}

Authentication

Requires tenant authentication via the X-Tenant-ID header or similar tenant identification mechanism.

Path parameters

policy_id
string
required
UUID of the policy to delete

Response

Returns a success message upon successful deletion.
message
string
Success message confirming the deletion

Example request

curl -X DELETE https://api.syftspace.example/policies/987fcdeb-51a2-43d7-8901-abcdef123456 \
  -H "X-Tenant-ID: your-tenant-id"

Example response

{
  "message": "Policy deleted successfully"
}

Error responses

If the policy does not exist or does not belong to the current tenant:
{
  "detail": "Policy not found"
}

Build docs developers (and LLMs) love