Validation rules add a custom layer of protection against wrongly-targeted campaigns and fraud. The rules enable app owners to control which installs and in-app events are blocked, or which installs are attributed to the most recent valid source.
Validation rules API is used to:
- Get rules: Provides a list of all your validation rules with details regarding all the rule conditions.
- Create rule: Create a new rule with specific conditions. When defining rule conditions, you will need to refer to the rule schema, attributes, and operators sections.
- Update rule: Change/edit the conditions of an existing rule. When updating rule conditions, you will need to refer to the rule schema, attributes, and operators sections.
- Update rule status: Enable, disable, or delete an existing rule.
- The API V2.0 token from your AppsFlyer admin. You need the API token as the authorization for each API command. The API token is passed in the authorization field in HTTP header.
- To easily create additional rules or update existing rules using the API, we recommend you use the JSON of a rule already created in the AppsFlyer platform as a template.
To get the JSON:
- In AppsFlyer, go to Configuration > Validation Rules.
- In the browser window, add #dev to the URL or go to https://hq1.appsflyer.com/vr2/validation-rules#dev.
A code icon displays near the top right of every Validation rule.
- Select a Validation rule.
- Click the code icon.
A JSON with the API Validation rule code request displays.
- Click copy.