Remove a rule attachment from the organisation's stack. The rule is no longer auto-applied to assistants in the organisation. The operation is a soft-delete so the attachment can be revived by adding the rule again.

## Path parameters

**`org_id`** string required

Organisation ID (prefixed with `org_`).

**`rule_id`** string required

Rule ID to remove (prefixed with `rule_`).

## Returns

Returns `204 No Content` on success.

Request

```bash
curl -X DELETE \
  https://api.aitronos.com/v1/organizations/org_abc123/rules-stack/rule_xyz \
  -H "X-API-Key: $FREDDY_API_KEY"
```


```python Python SDK
from aitronos import Aitronos

client = Aitronos(api_key="your-api-key")

client.org_rule_stack.remove(org_id="org_abc123", rule_id="rule_xyz")
print("Rule removed from org stack")
```


```python
import os
import requests

api_key = os.environ["FREDDY_API_KEY"]
response = requests.delete(
    "https://api.aitronos.com/v1/organizations/org_abc123/rules-stack/rule_xyz",
    headers={"X-API-Key": api_key},
)
assert response.status_code == 204
```


```javascript
const apiKey = process.env.FREDDY_API_KEY;

const response = await fetch(
  "https://api.aitronos.com/v1/organizations/org_abc123/rules-stack/rule_xyz",
  {
    method: "DELETE",
    headers: { "X-API-Key": apiKey }
  }
);

console.log(response.status); // 204
```

Response
`204 No Content`

Error

```json
{
  "success": false,
  "error": {
    "code": "RULE_NOT_FOUND",
    "message": "The requested rule could not be found.",
    "type": "client_error",
    "status": 404,
    "details": {
      "rule_id": "rule_xyz",
      "organization_id": "org_abc123"
    },
    "trace_id": "abc123",
    "timestamp": "2025-01-15T10:00:00Z",
    "system_message": "Technical error detail for diagnostics"
  }
}
```

## Related Resources

- [List organisation rule stack](/docs/api-reference/rules/org-stack-list)
- [Replace organisation rule stack](/docs/api-reference/rules/org-stack-replace)
- [Add rule to organisation stack](/docs/api-reference/rules/org-stack-add)