# \[LEGACY] Public API Reference

### NOTE: With the release of Public API v2, Public API v1 will be sunset in May of 2024!

Find the v2 reference [here](/dev/api-reference-docs/public-api-2.0-reference.md).

## Authentication

{% hint style="warning" %}
API Keys are private and should not be shared or exposed on the front end.
{% endhint %}

### Using API Key in Requests

Include your API key as an `X-Inveterate-Api-Key` header on all API endpoint requests.

## Requirements

All API requests utilize `https://public.inveterateapi.com/` as the base URL.

### Example Get Request

{% tabs %}
{% tab title="Curl" %}

```shell
curl -X GET "https://public.inveterateapi.com/merchant"
-H "X-Inveterate-Api-Key: {api_key}"
```

{% endtab %}

{% tab title="Node Fetch" %}

```javascript
const merchant = await fetch('https://public.inveterateapi.com/merchant', {
  headers: {
    'Content-Type': 'application/json',
    'X-Inveterate-Api-Key': '{api_key}',
  },
  method: 'GET',
}).then(data => data.json());
```

{% endtab %}
{% endtabs %}

## Reference Shortcuts

{% content-ref url="/pages/t6Wf3MEwx8DwuBwkUMlv" %}
[Benefits API](/dev/api-reference-docs/legacy-public-api-reference/benefits-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/eTJalKLACS9zIzJ9AduA" %}
[Campaigns API](/dev/api-reference-docs/legacy-public-api-reference/campaigns-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/kTW0A5fmL1jld7ckOwlX" %}
[Customers API](/dev/api-reference-docs/legacy-public-api-reference/customers-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/7DJnMTCgWuBOtwpzrlNi" %}
[Merchant API](/dev/api-reference-docs/legacy-public-api-reference/merchant-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/FPVY6tqRzP6BXyf11upE" %}
[Webhooks](/dev/api-reference-docs/legacy-public-api-reference/webhooks.md)
{% endcontent-ref %}

{% content-ref url="/pages/fSazDWVgpFGKwJquQo73" %}
[Free tiers API](/dev/api-reference-docs/legacy-public-api-reference/free-tiers-api.md)
{% endcontent-ref %}


---

# Agent Instructions: 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://help.inveterate.com/dev/api-reference-docs/legacy-public-api-reference.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.
