Setting up an API Mission on ZAP

Overview

The ZAP API endpoint allows you to easily add XP to users.

Please note that the API method is a backend operation, i.e. you are creating a new mission without using ZAP’s interface. All users, whether rewarded or not, will be able to see this mission. This is to ensure transparency and discourage unfair reward distribution.

Potential use cases:

  • Rewarding users for reporting bugs in your Discord

  • Rewarding users testing your product, where off-chain verification is not possible

  • Rewarding users for posting content such as YouTube videos about your project

  • and much more

  • Step 1: Head over to your Settings tab and hit View in the Your API Key section

Please note that your API key carries many privileges, so be sure to keep it secure! Do not share your secret API keys in publicly accessible areas.

  • Step 2: Head over to Postman and Send a New API Request. All API requests must be made over HTTPS. API requests without authentication will fail.

  • Step 3: Head to the Headers section and input x-api-key into the Key field, and post your API key that you obtained from ZAP into the corresponding Value field.

  • Step 4: Head back to the Params section and switch the toggle from GET to POST

Make sure to change the :slug property based on your project’s URL on ZAP.

  • Step 6: Head to the Body section and select raw from the toggle. Copy and paste the following format into Postman and hit Send.

{ "reward": 500, "label": "name of mission", "description": "success message", "users": [”walletaddress”] }

  • reward = the amount of XP a user will receive

  • label = the name of the Mission as it will appear on ZAP

  • description = success message that users will see

  • users = which users will receive XP

If you are looking to reward multiple wallets at once, please use the following format:

{ "reward": 500, "label": " ", "description": " ", "users": ["address1", "address2"]}

  • That's it! The mission and additional XP earned will show now shop up on ZAP.

Last updated