Skip to main content

Import and export rules

Move rules between environments or keep a backup: export rules to a file and import them elsewhere

You can export rules to a file and import them again later - useful for copying a proven setup between Cloudinary environments, sharing rules with another team, or keeping a backup before making big changes.

When to use this

  • Recreating your rules in another Cloudinary environment (for example, from a test account to production).

  • Sharing a rule setup with another team or account.

  • Keeping a snapshot of your rules before a clean-up or major change.

Export rules

  • One rule: on the Rules page, open the rule's row menu and select Export rule.

  • Several rules: select their checkboxes, then select Export rules in the selection bar.

Tip: Export is also a quick backup before bulk-deleting rules - you can re-import them if you change your mind.

Your browser downloads a file named like moderation-rules_2026-07-26.json containing the full definition of each exported rule - name, description, decision behavior, and configuration.

Import rules

  1. On the Rules page, select the More actions button (next to Create Rule) and choose Import rules.

  2. Pick a rules export file (.json).

  3. A summary dialog shows the outcome - for example, "3 rules imported successfully." If some rules couldn't be imported, they're listed with the reason:

    • Rule type is not available in this environment - the target account doesn't have access to that rule type (for example, a Pro rule type that isn't enabled).

    • Rule definition is invalid - the rule in the file doesn't match what this environment expects.

    • Could not be created - something went wrong saving the rule; try again.

  4. Select Done. Imported rules appear on the Rules page, ready to use.

What happens next

  • Imported rules are regular rules - edit them, add them to policies, and use them in runs and automations as usual.

  • Importing creates new rules; it doesn't overwrite existing ones, even if a rule with the same name already exists.

Policies are not included in a rules export - recreate the policy in the target environment and add the imported rules to it.

Did this answer your question?