# Getting an API Key

To work with the goodPayments API, you need to obtain a unique personal API key. This key is used to identify your merchant account, authorize requests, and protect your integration from unauthorized access. Please note that an API key is available only to users who have successfully registered in the goodPayments platform.

### **IP Whitelist**

Before accessing the API key, the merchant must add at least one IP address to the whitelist. API access will only be permitted from the specified addresses.

To add an IP address, go to the **«API»** section in your Dashboard, enter the IP address in IPv4 format in the corresponding field, and click **«Add»**.

{% hint style="info" %}
The maximum number of IP addresses in the whitelist is **5**. If only one address remains in the list, it cannot be deleted.
{% endhint %}

{% hint style="warning" %}
The **«Show Key»** and **«Update Key»** buttons are unavailable until at least one IP address has been added to the whitelist.&#x20;
{% endhint %}

### **How to get your API key**

{% stepper %}
{% step %}
Go to the **«API»** section in your Dashboard
{% endstep %}

{% step %}
Add at least one IP address to the whitelist
{% endstep %}

{% step %}
Click **«Show key»**
{% endstep %}
{% endstepper %}

<figure><img src="/files/DauPU2lxGLvOxtGHasWs" alt=""><figcaption></figcaption></figure>

Your API key will appear in a modal window. We strongly recommend storing it securely and never sharing it with third parties.

If needed, you can rotate your API key at any time. To do this, click **«Update key»** – a new API key will be generated after you confirm the action.


---

# 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://goodpayments.gitbook.io/docs/api-reference/getting-an-api-key.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.
