DELETE /v1/projects/{project}/rules/{rule}
Delete a custom bot rule from a project.
curl -X DELETE https://api.botect.ai/v1/projects/123/rules/7 \
-H "Authorization: Bearer YOUR_ACCOUNT_TOKEN"
await fetch('https://api.botect.ai/v1/projects/123/rules/7', {
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.BOTECT_TOKEN}` },
});
import os, requests
requests.delete(
"https://api.botect.ai/v1/projects/123/rules/7",
headers={"Authorization": f"Bearer {os.environ['BOTECT_TOKEN']}"},
)
(empty body)
Permanently deletes a rule. The rule stops being evaluated immediately.
DELETE https://api.botect.ai/v1/projects/{project}/rules/{rule}
Authentication
Account API token via Authorization: Bearer <token>. The project must belong to the token's account, and the rule must belong to the project. See Authentication.
Path parameters
path
projectinteger
RequiredThe project ID.
path
ruleinteger
RequiredThe rule ID to delete.
Example
A successful delete returns 204 No Content.
Errors
| Status | code | When |
|---|---|---|
401 | UNAUTHENTICATED | Missing / bad account token |
403 | — | Project does not belong to the token's account |
404 | — | The rule does not exist or does not belong to the project |
Was this page helpful?