Soft-delete a rule by ID. Pass the owning `organization_id` as a query parameter. By default the request is rejected if the rule still has active attachments; set `force=true` to delete anyway.

## Path parameters

**`rule_id`** string required

Rule ID (prefixed with `rule_`).

## Query parameters

**`organization_id`** string required

Organization the rule belongs to (`org_` prefixed).

**`force`** boolean optional · Defaults to `false`

Force delete even when the rule has active attachments.

## Returns

Returns `204 No Content` on success.

Request

```bash cURL
curl -X DELETE "https://api.aitronos.com/v1/rules/rule_abc123?organization_id=org_abc123&force=true" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```


```python Python SDK
# A first-class SDK method for this endpoint is coming soon.
# In the meantime, call the endpoint directly with the SDK's HTTP client:
from aitronos import Aitronos

client = Aitronos(api_key="your-api-key")
response = client._client_wrapper.httpx_client.request(
    "rules/rule_abc123",
    method="DELETE",
    params={"organization_id": "org_abc123", "force": True},
)
print(response.status_code)
```


```python Python
import os, requests

response = requests.delete(
    "https://api.aitronos.com/v1/rules/rule_abc123",
    headers={"Authorization": f"Bearer {os.environ['ACCESS_TOKEN']}"},
    params={"organization_id": "org_abc123", "force": True},
)
print(response.status_code)
```


```javascript JavaScript
const params = new URLSearchParams({ organization_id: "org_abc123", force: "true" });
await fetch(`https://api.aitronos.com/v1/rules/rule_abc123?${params}`, {
  method: "DELETE",
  headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` },
});
```

Response

```text 204 No Content
# Empty response body — the rule was soft-deleted successfully.
```


```json 403 Forbidden
{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_PERMISSIONS",
    "message": "You do not have permission to perform this action.",
    "system_message": "Insufficient permissions for this operation",
    "type": "authorization_error",
    "status": 403,
    "details": { "rule_id": "rule_abc123" },
    "trace_id": "req_abc123xyz",
    "timestamp": "2026-04-15T10:00:00Z"
  }
}
```

## Related Resources

- [Delete a rule](/docs/api-reference/rules/delete)
- [List rules (query param)](/docs/api-reference/rules/list-query)
- [Update a rule (by ID)](/docs/api-reference/rules/update-by-id)