{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/api-reference/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["api-container","api-content","endpoint","api-examples","tabs","tab","code-group"]},"redocly_category":"API Reference","searchWeight":130,"type":"markdown"},"seo":{"title":"Path parameters","description":"Complete API reference and documentation for Freddy AI-powered backend system by Aitronos","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"ApiContainer","attributes":{},"children":[{"$$mdtype":"Tag","name":"ApiContent","attributes":{},"children":[{"$$mdtype":"Tag","name":"Endpoint","attributes":{"method":"DELETE","path":"https://api.aitronos.com/v1/rules/{rule_id}"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Soft-delete a rule by ID. Pass the owning ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["organization_id"]}," as a query parameter. By default the request is rejected if the rule still has active attachments; set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["force=true"]}," to delete anyway."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"path-parameters","__idx":0},"children":["Path parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rule_id"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#ef4444 !important","fontWeight":"600 !important","fontStyle":"normal !important"}},"children":["required"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Rule ID (prefixed with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rule_"]},")."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"query-parameters","__idx":1},"children":["Query parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["organization_id"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#ef4444 !important","fontWeight":"600 !important","fontStyle":"normal !important"}},"children":["required"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Organization the rule belongs to (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["org_"]}," prefixed)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["force"]}]}," boolean ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#9ca3af !important","fontWeight":"500 !important","fontStyle":"normal !important"}},"children":["optional"]}," · Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Force delete even when the rule has active attachments."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"returns","__idx":2},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["204 No Content"]}," on success."]}]},{"$$mdtype":"Tag","name":"ApiExamples","attributes":{},"children":[{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Request","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeGroup","attributes":{"mode":"dropdown"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","data-title":"cURL","header":{"title":"cURL","controls":{"copy":{}}},"source":"curl -X DELETE \"https://api.aitronos.com/v1/rules/rule_abc123?organization_id=org_abc123&force=true\" \\\n  -H \"Authorization: Bearer $ACCESS_TOKEN\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python SDK","header":{"title":"Python SDK","controls":{"copy":{}}},"source":"# A first-class SDK method for this endpoint is coming soon.\n# In the meantime, call the endpoint directly with the SDK's HTTP client:\nfrom aitronos import Aitronos\n\nclient = Aitronos(api_key=\"your-api-key\")\nresponse = client._client_wrapper.httpx_client.request(\n    \"rules/rule_abc123\",\n    method=\"DELETE\",\n    params={\"organization_id\": \"org_abc123\", \"force\": True},\n)\nprint(response.status_code)\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","data-title":"Python","header":{"title":"Python","controls":{"copy":{}}},"source":"import os, requests\n\nresponse = requests.delete(\n    \"https://api.aitronos.com/v1/rules/rule_abc123\",\n    headers={\"Authorization\": f\"Bearer {os.environ['ACCESS_TOKEN']}\"},\n    params={\"organization_id\": \"org_abc123\", \"force\": True},\n)\nprint(response.status_code)\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","data-title":"JavaScript","header":{"title":"JavaScript","controls":{"copy":{}}},"source":"const params = new URLSearchParams({ organization_id: \"org_abc123\", force: \"true\" });\nawait fetch(`https://api.aitronos.com/v1/rules/rule_abc123?${params}`, {\n  method: \"DELETE\",\n  headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` },\n});\n","lang":"javascript"},"children":[]}]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Response","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","data-title":"204 No Content","header":{"title":"204 No Content","controls":{"copy":{}}},"source":"# Empty response body — the rule was soft-deleted successfully.\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","data-title":"403 Forbidden","header":{"title":"403 Forbidden","controls":{"copy":{}}},"source":"{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INSUFFICIENT_PERMISSIONS\",\n    \"message\": \"You do not have permission to perform this action.\",\n    \"system_message\": \"Insufficient permissions for this operation\",\n    \"type\": \"authorization_error\",\n    \"status\": 403,\n    \"details\": { \"rule_id\": \"rule_abc123\" },\n    \"trace_id\": \"req_abc123xyz\",\n    \"timestamp\": \"2026-04-15T10:00:00Z\"\n  }\n}\n","lang":"json"},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-resources","__idx":3},"children":["Related Resources"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/rules/delete"},"children":["Delete a rule"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/rules/list-query"},"children":["List rules (query param)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/api-reference/rules/update-by-id"},"children":["Update a rule (by ID)"]}]}]}]},"headings":[{"value":"Path parameters","id":"path-parameters","depth":2},{"value":"Query parameters","id":"query-parameters","depth":2},{"value":"Returns","id":"returns","depth":2},{"value":"Related Resources","id":"related-resources","depth":2}],"frontmatter":{"title":"Delete a rule (by ID)","seo":{"title":"Path parameters"}},"lastModified":"2026-06-28T22:05:28.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/api-reference/rules/delete-by-id","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}