> For the complete documentation index, see [llms.txt](https://docs.sharemint.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sharemint.xyz/fundamentals/referee-requirements/api-points.md).

# API Points

You can send points for each user to ShareMint using our API.

These points are associated with referees and are used to reward affiliates.

You can send multiple points for each user. For example, you can send us a score of 100 for fighting, 120 for breeding, and 200 for forging. You can set a requirement that rewards are unlocked if a referee has a score of at least 100 across all three categories.

To add an API Points requirement, navigate to your project's settings page. In the *Affiliates* section, click on *Advanced Referee Requirements*, and choose *API Points* as the requirement type.

You will be asked to fill in the following fields:

* **Name** - the name of the key to store the points under. This must match the  name sent via API.
* **What is the minimum value required to be considered a referral?** - This is a numeric value threshold above which an affiliate is considered to be valid. You can leave this blank or set it to 0 if you'd like to allow any value.

In this example, a referee must have a breeding score of at least 5, and a forging score of at least 8:

<figure><img src="/files/F458S55rQpWyIhdMG3i2" alt=""><figcaption><p>API Points example</p></figcaption></figure>

### API

Send points using our API:

## To save points.

<mark style="color:green;">`POST`</mark> `https://sharemint.xyz/api/external/save-points`

One of `address`, `email`, or `projectUserId` must be provided, otherwise, the request will not be processed.

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json |

#### Request Body

| Name                                        | Type   | Description                                                                                                                                                                                                 |
| ------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| slug<mark style="color:red;">\*</mark>      | String | Project slug                                                                                                                                                                                                |
| apiSecret<mark style="color:red;">\*</mark> | String | Find this on the admin tab of your project                                                                                                                                                                  |
| keyPoints<mark style="color:red;">\*</mark> | String | Key value pairs of points. Example: `{"breeds": 12, "quests": 44}`. The value is the number of points the user has amassed. This will override previous user scores. Keys not supplied are left unaffected. |
| address                                     | String | The address of the user to store the points for.                                                                                                                                                            |
| email                                       | String | The email of the user to store the points for.                                                                                                                                                              |
| projectUserId                               | String | The ShareMint id of the user  to store the points for.                                                                                                                                                      |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}

{% tab title="500: Internal Server Error " %}

{% endtab %}

{% tab title="400: Bad Request " %}

{% endtab %}

{% tab title="401: Unauthorized " %}

{% endtab %}

{% tab title="403: Forbidden " %}

{% endtab %}

{% tab title="404: Not Found " %}

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sharemint.xyz/fundamentals/referee-requirements/api-points.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
