Permanently deletes an organization rule.
This endpoint requires admin privileges.
Bearer token obtained from the authenticate endpoint. The authenticated user must be an admin.
UUID of the rule to delete.
Response
Confirmation message: "Organization rule deleted successfully".
curl -X DELETE https://api.trellis.sh/v1/organization-rules/b2c3d4e5-f6a7-8901-bcde-f12345678901 \
-H "Authorization: Bearer YOUR_TOKEN"
import requests
rule_id = "b2c3d4e5-f6a7-8901-bcde-f12345678901"
response = requests.delete(
f"https://api.trellis.sh/v1/organization-rules/{rule_id}",
headers={"Authorization": "Bearer YOUR_TOKEN"},
)
const ruleId = "b2c3d4e5-f6a7-8901-bcde-f12345678901";
await fetch(`https://api.trellis.sh/v1/organization-rules/${ruleId}`, {
method: "DELETE",
headers: { Authorization: "Bearer YOUR_TOKEN" },
});
{
"message": "Organization rule deleted successfully"
}
{
"detail": "Missing Authorization header"
}
{
"detail": "Admin privileges required"
}
{
"detail": "Organization rule not found"
}