curl --request GET \
--url https://api.getfernand.com/organization/rules \
--header 'X-API-Key: <api-key>'[
{
"id": 123,
"name": "Auto-close spam conversations",
"status": "LIVE",
"priority": 0,
"stop": false,
"trigger_name": "messages.incoming",
"created": "2025-01-21T10:30:00Z",
"applied_count": 42,
"description": "Automatically closes conversations marked as spam",
"trigger_data": "2 hours",
"filters": [
{
"field": "conversation.status",
"operator": "equals",
"value": "OPENED"
}
],
"actions": [
{
"name": "conversation.close",
"data": {}
}
],
"last_applied_at": "2025-01-21T15:45:30Z"
}
]curl --request GET \
--url https://api.getfernand.com/organization/rules \
--header 'X-API-Key: <api-key>'[
{
"id": 123,
"name": "Auto-close spam conversations",
"status": "LIVE",
"priority": 0,
"stop": false,
"trigger_name": "messages.incoming",
"created": "2025-01-21T10:30:00Z",
"applied_count": 42,
"description": "Automatically closes conversations marked as spam",
"trigger_data": "2 hours",
"filters": [
{
"field": "conversation.status",
"operator": "equals",
"value": "OPENED"
}
],
"actions": [
{
"name": "conversation.close",
"data": {}
}
],
"last_applied_at": "2025-01-21T15:45:30Z"
}
]List of rulesets retrieved successfully.
Unique identifier for the ruleset
Name of the ruleset
250"Auto-close spam conversations"
Current status of the ruleset
PAUSED, LIVE "LIVE"
Priority order for rule execution (lower numbers execute first)
0
If true, stops processing subsequent rules when this rule matches
false
Event that triggers this rule. Accepted triggers:
50"messages.incoming"
Timestamp when the ruleset was created (UTC)
"2025-01-21T10:30:00Z"
Number of times this rule has been successfully applied
42
Optional description of what the ruleset does
500"Automatically closes conversations marked as spam"
Additional data for the trigger (required for certain triggers):
250"2 hours"
Array of filter conditions that must be met for the rule to execute. Each filter contains conditions to match against the entity.
[
{
"field": "conversation.status",
"operator": "equals",
"value": "OPENED"
}
]Array of actions to execute when the rule matches. Each action has a name and optional data.
Show child attributes
[
{ "name": "conversation.close", "data": {} }
]Timestamp when the rule was last applied (UTC)
"2025-01-21T15:45:30Z"
Was this page helpful?