> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ecomail.cz/llms.txt
> Use this file to discover all available pages before exploring further.

# List smart delivery rules

> Return every smart delivery rule of the account — the two system rules first, then the custom rules.

**applicability** `string`

Return only the rules usable in this area. Allowed values: `campaign`, `pipeline`, `both`. A rule with applicability `both` matches every filter value.

**with\_usages** `boolean` (default: false)

Add the `usage` object to each rule — the campaigns and automation actions that use the rule. Without this parameter `usage` is `null`.

> [!NOTE]
>
> Every account has two system rules: `standard` and `unlimited`. You can change the limits of `standard`, but not its name. You cannot change or delete `unlimited`.

```bash cURL theme={null}
curl -X GET "https://api2.ecomailapp.cz/smart-delivery/rules?applicability=campaign&with_usages=1" \
  -H "key: YOUR_API_KEY" \
  -H "Content-Type: application/json"
```

```php PHP theme={null}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/smart-delivery/rules?applicability=campaign&with_usages=1');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'key: YOUR_API_KEY',
    'Content-Type: application/json',
]);
$response = curl_exec($ch);
curl_close($ch);
```

```json 200 theme={null}
{
  "success": true,
  "data": [
    {
      "id": "standard",
      "name": "Standard",
      "description": "At most one e-mail anywhere in the last 16 hours.",
      "is_system": true,
      "applicability": "both",
      "limits": {
        "priority_window_hours": 16,
        "priority_scope": "all",
        "frequency_cap_email_count": null,
        "frequency_cap_email_days": null,
        "frequency_cap_email_scope": null,
        "frequency_cap_sms_count": null,
        "frequency_cap_sms_days": null,
        "frequency_cap_sms_scope": null
      },
      "usage": {
        "count": 0,
        "pipelines": [],
        "campaigns": []
      }
    },
    {
      "id": "aB3dE5fG7h",
      "name": "Weekend",
      "description": "Weekend sends",
      "is_system": false,
      "applicability": "campaign",
      "limits": {
        "priority_window_hours": 12,
        "priority_scope": "all",
        "frequency_cap_email_count": 2,
        "frequency_cap_email_days": 7,
        "frequency_cap_email_scope": "all",
        "frequency_cap_sms_count": null,
        "frequency_cap_sms_days": null,
        "frequency_cap_sms_scope": null
      },
      "usage": {
        "count": 2,
        "pipelines": [
          {
            "pipeline_id": 42,
            "action_id": "4f6c2a9e-1b7d-4e3a-9c8f-2d5b6a7e8f90"
          }
        ],
        "campaigns": [
          {
            "campaign_id": 1234,
            "title": "Newsletter"
          }
        ]
      }
    }
  ]
}
```

```json 422 theme={null}
{
  "success": false,
  "message": "Validation errors",
  "data": {
    "applicability": ["The selected applicability is invalid."]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.