At a glance: Validation rules API is an AppsFlyer premium feature that lets you get, create, update, and update rule status.

Using Validation rules API

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.

Prerequisites

  • 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:

  1. In AppsFlyer, go to Configuration > Validation Rules.
  2. 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.
  1. Select a Validation rule.
  2. Click the code icon.
    A JSON with the API Validation rule code request displays.
  3. Click copy.