curl --request DELETE \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY"
// No content - policy successfully deleted
{
"error": "Cannot delete policy - it is in use by agents",
"dependent_agents": [
{
"base_agent_id": "abc12345-e89b-12d3-a456-426614174000",
"agent_name": "Document Reviewer",
"version_id": "def67890-e89b-12d3-a456-426614174001",
"version_name": "v2"
}
]
}
Policies
Delete Policy
Retrieve, update, or delete a single policy by ID
DELETE
/
policies
/
{id}
/
curl --request DELETE \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY"
// No content - policy successfully deleted
{
"error": "Cannot delete policy - it is in use by agents",
"dependent_agents": [
{
"base_agent_id": "abc12345-e89b-12d3-a456-426614174000",
"agent_name": "Document Reviewer",
"version_id": "def67890-e89b-12d3-a456-426614174001",
"version_name": "v2"
}
]
}
Delete a policy and all of its versions. This operation is irreversible.
Policies cannot be deleted while they are in use by any agent. You must first unlink all agents from the policy before deleting it.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | uuid | Yes | UUID of the policy to delete |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | uuid | Yes | UUID of the organization for access control |
curl --request DELETE \
--url "https://api.roe-ai.com/v1/policies/POLICY_ID/?organization_id=YOUR_ORG_ID" \
--header "Authorization: Bearer YOUR_API_KEY"
// No content - policy successfully deleted
{
"error": "Cannot delete policy - it is in use by agents",
"dependent_agents": [
{
"base_agent_id": "abc12345-e89b-12d3-a456-426614174000",
"agent_name": "Document Reviewer",
"version_id": "def67890-e89b-12d3-a456-426614174001",
"version_name": "v2"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Organization ID. This is required for access control. It can be provided via query or request body depending on the endpoint.
Response
Policy deleted successfully.