# Authentication

Public Mint uses an [API gateway](https://en.wikipedia.org/wiki/API_management) to authorize, authenticate and route requests to endpoints. All requests require an [API key](/api/reference/authentication.md#authorization) for authorization and authentication in the request header associated to the key **apikey**, like the example below demonstrates. The key serves to identify the app/partner behind the requests, and which resources they're permitted to access.

**If you don't include your key, or use an invalid one, the request will return an error.**&#x20;

{% tabs %}
{% tab title="Sandbox" %}
{% code title="AUTHENTICATED REQUEST" %}

```bash
$ curl https://api.sandbox.publicmint.io/identities/:id \
  -H "apikey:{YOUR_API_KEY}"
```

{% endcode %}
{% endtab %}

{% tab title="Production" %}
{% code title="AUTHENTICATED REQUEST" %}

```bash
$ curl https://api.publicmint.io/identities/:id \
  -H "apikey:{YOUR_API_KEY}"
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Authorization and authentication

Authorization to our public APIs requires a partner API key. To be eligible, you need to be a verified business partner. You can learn more about how to apply at the [Partners section](broken://pages/-LnCk0-aqUbrHKUzaVJN).

When your application is successful you'll receive a confirmation email giving you access to the Partners Portal (coming soon), where you'll be able to generate, revoke and manage your API keys.&#x20;

{% hint style="success" %}
While we work on finalizing the Partner's Portal, please contact us directly to request early access to our API.
{% endhint %}

You'll need to pass on your API key in the request headers when making calls to Public Mint's endpoints to [authenticate your requests](/api/reference/authentication.md#Authorization) and identify witch application/partner is using the APIs.

API keys also serve to authenticate user sessions.&#x20;


---

# 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://developers.publicmint.io/api/reference/authentication.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.
