import 'package:cloudflare_dart/api.dart';All URIs are relative to https://api.cloudflare.com/client/v4
| Method | HTTP request | Description |
|---|---|---|
| emailRoutingRoutingRulesCreateRoutingRule | POST /zones/{zone_id}/email/routing/rules | Create routing rule |
| emailRoutingRoutingRulesDeleteRoutingRule | DELETE /zones/{zone_id}/email/routing/rules/{rule_identifier} | Delete routing rule |
| emailRoutingRoutingRulesGetCatchAllRule | GET /zones/{zone_id}/email/routing/rules/catch_all | Get catch-all rule |
| emailRoutingRoutingRulesGetRoutingRule | GET /zones/{zone_id}/email/routing/rules/{rule_identifier} | Get routing rule |
| emailRoutingRoutingRulesListRoutingRules | GET /zones/{zone_id}/email/routing/rules | List routing rules |
| emailRoutingRoutingRulesUpdateCatchAllRule | PUT /zones/{zone_id}/email/routing/rules/catch_all | Update catch-all rule |
| emailRoutingRoutingRulesUpdateRoutingRule | PUT /zones/{zone_id}/email/routing/rules/{rule_identifier} | Update routing rule |
EmailRuleResponseSingle emailRoutingRoutingRulesCreateRoutingRule(zoneId, emailCreateRuleProperties)
Create routing rule
Rules consist of a set of criteria for matching emails (such as an email being sent to a specific custom email address) plus a set of actions to take on the email (like forwarding it to a specific destination address).
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getEmailRoutingRoutingRulesApi();
final String zoneId = zoneId_example; // String |
final EmailCreateRuleProperties emailCreateRuleProperties = ; // EmailCreateRuleProperties |
try {
final response = api.emailRoutingRoutingRulesCreateRoutingRule(zoneId, emailCreateRuleProperties);
print(response);
} catch on DioException (e) {
print('Exception when calling EmailRoutingRoutingRulesApi->emailRoutingRoutingRulesCreateRoutingRule: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| zoneId | String | ||
| emailCreateRuleProperties | EmailCreateRuleProperties |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailRuleResponseSingle emailRoutingRoutingRulesDeleteRoutingRule(ruleIdentifier, zoneId)
Delete routing rule
Delete a specific routing rule.
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getEmailRoutingRoutingRulesApi();
final String ruleIdentifier = ruleIdentifier_example; // String |
final String zoneId = zoneId_example; // String |
try {
final response = api.emailRoutingRoutingRulesDeleteRoutingRule(ruleIdentifier, zoneId);
print(response);
} catch on DioException (e) {
print('Exception when calling EmailRoutingRoutingRulesApi->emailRoutingRoutingRulesDeleteRoutingRule: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| ruleIdentifier | String | ||
| zoneId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailCatchAllRuleResponseSingle emailRoutingRoutingRulesGetCatchAllRule(zoneId)
Get catch-all rule
Get information on the default catch-all routing rule.
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getEmailRoutingRoutingRulesApi();
final String zoneId = zoneId_example; // String |
try {
final response = api.emailRoutingRoutingRulesGetCatchAllRule(zoneId);
print(response);
} catch on DioException (e) {
print('Exception when calling EmailRoutingRoutingRulesApi->emailRoutingRoutingRulesGetCatchAllRule: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| zoneId | String |
EmailCatchAllRuleResponseSingle
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailRuleResponseSingle emailRoutingRoutingRulesGetRoutingRule(ruleIdentifier, zoneId)
Get routing rule
Get information for a specific routing rule already created.
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getEmailRoutingRoutingRulesApi();
final String ruleIdentifier = ruleIdentifier_example; // String |
final String zoneId = zoneId_example; // String |
try {
final response = api.emailRoutingRoutingRulesGetRoutingRule(ruleIdentifier, zoneId);
print(response);
} catch on DioException (e) {
print('Exception when calling EmailRoutingRoutingRulesApi->emailRoutingRoutingRulesGetRoutingRule: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| ruleIdentifier | String | ||
| zoneId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailRulesResponseCollection emailRoutingRoutingRulesListRoutingRules(zoneId, page, perPage, enabled)
List routing rules
Lists existing routing rules.
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getEmailRoutingRoutingRulesApi();
final String zoneId = zoneId_example; // String |
final num page = 8.14; // num |
final num perPage = 8.14; // num |
final bool enabled = true; // bool |
try {
final response = api.emailRoutingRoutingRulesListRoutingRules(zoneId, page, perPage, enabled);
print(response);
} catch on DioException (e) {
print('Exception when calling EmailRoutingRoutingRulesApi->emailRoutingRoutingRulesListRoutingRules: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| zoneId | String | ||
| page | num | [optional] [default to 1] | |
| perPage | num | [optional] [default to 20] | |
| enabled | bool | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailCatchAllRuleResponseSingle emailRoutingRoutingRulesUpdateCatchAllRule(zoneId, emailUpdateCatchAllRuleProperties)
Update catch-all rule
Enable or disable catch-all routing rule, or change action to forward to specific destination address.
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getEmailRoutingRoutingRulesApi();
final String zoneId = zoneId_example; // String |
final EmailUpdateCatchAllRuleProperties emailUpdateCatchAllRuleProperties = ; // EmailUpdateCatchAllRuleProperties |
try {
final response = api.emailRoutingRoutingRulesUpdateCatchAllRule(zoneId, emailUpdateCatchAllRuleProperties);
print(response);
} catch on DioException (e) {
print('Exception when calling EmailRoutingRoutingRulesApi->emailRoutingRoutingRulesUpdateCatchAllRule: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| zoneId | String | ||
| emailUpdateCatchAllRuleProperties | EmailUpdateCatchAllRuleProperties |
EmailCatchAllRuleResponseSingle
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailRuleResponseSingle emailRoutingRoutingRulesUpdateRoutingRule(ruleIdentifier, zoneId, emailUpdateRuleProperties)
Update routing rule
Update actions and matches, or enable/disable specific routing rules.
import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';
final api = CloudflareDart().getEmailRoutingRoutingRulesApi();
final String ruleIdentifier = ruleIdentifier_example; // String |
final String zoneId = zoneId_example; // String |
final EmailUpdateRuleProperties emailUpdateRuleProperties = ; // EmailUpdateRuleProperties |
try {
final response = api.emailRoutingRoutingRulesUpdateRoutingRule(ruleIdentifier, zoneId, emailUpdateRuleProperties);
print(response);
} catch on DioException (e) {
print('Exception when calling EmailRoutingRoutingRulesApi->emailRoutingRoutingRulesUpdateRoutingRule: $e\n');
}| Name | Type | Description | Notes |
|---|---|---|---|
| ruleIdentifier | String | ||
| zoneId | String | ||
| emailUpdateRuleProperties | EmailUpdateRuleProperties |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]