Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/dishant0406/quickleap/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

DELETE /rules/:ruleId
Permanently deletes a rule. This operation cannot be undone.

Path parameters

ruleId
string
required
The ID of the rule to delete

Response

Returns a success response when the rule is deleted.
message
string
Confirmation message

Examples

import { deleteRule } from '@quickleap/sdk';

try {
  await deleteRule('rule_456');
  console.log('Rule deleted successfully');
} catch (error) {
  console.error('Failed to delete rule:', error);
}
Deleting a rule is permanent and cannot be undone. Consider setting the rule status to inactive instead if you may want to re-enable it later.

Alternative: Deactivate instead of delete

If you want to preserve the rule but stop it from evaluating, consider using the toggle status endpoint:
Deactivate instead of delete
import { toggleRuleStatus } from '@quickleap/sdk';

// Set rule to inactive instead of deleting
const response = await toggleRuleStatus('rule_456', {
  status: 'inactive'
});

console.log(`Rule ${response.data.rule.name} is now inactive`);
console.log(`Hit count preserved: ${response.data.rule.hitCount}`);
Benefits of deactivating:
  • Preserves rule configuration and analytics
  • Can be reactivated later
  • Maintains historical hit count data
  • Allows for seasonal or temporary rules

Build docs developers (and LLMs) love