👋 How to use?

Once you obtain the API token from the ZooTools team, you just simply need to pass the bearer token in the request header to authenticate your requests.

This is an example using axios in JavaScript, but it would be similar for Flutter, iOS, etc.

import axios from 'axios';

const API_TOKEN = 'REPLACE_WITH_YOUR_API_TOKEN' // ask ZooTools team for a key

// Example: Adds a contact to your project
axios
    .post("<https://api.zootools.co/v1/contacts>", {
			"properties": {
				"email": "[email protected]"
			}
		}), {
      headers: {
        Authorization: `Bearer ${API_TOKEN}`,
      },
    })

🔎 Schemas

Contact

It represents a user in your application. You can add contacts using the API or if you’re using ZooTools Forms, the contact will be automatically created on submitting the form.

"contact": {
    "id": "BsCSmcrP4WVewZ1LQ00x",
    "createdAt": "2024-02-27T00:53:11.000Z",
    "updatedAt": "2024-02-27T00:53:34.000Z",
    "properties": {
        "email": "[email protected]",
        "emailDomain": "zootools.co",
        "firstName": "Jorge",
        "lastName": "",
        "cryptoAddress": "123123", // (optional) only used by Web3 Companies

				/*
				 * referral -> the member who invited this user to signup for your product.
				 */
        "referral": "",
        "status": "subscribed", // whether the user wants to receive your emails or it's "unsubscribed"
        "listId": "6rKjemCN8HY7lV99lUBf"

			 /**
				* Extra Metadata on the leaderboard (if you want to use it)
				**/
			  "rankingPoints": 0,
			  "rankingPosition": 1,
			  "referralsCount": 0,
        "score": 0,
    }
}

🔴 Endpoints

[POST] Search for a contact

[POST] Create or update a contact

[GET] Get leaderboard

[POST] Increase member points

[POST] Increase contact points