> For the complete documentation index, see [llms.txt](https://docs.txn.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.txn.io/getting-setup/creating-your-api-keys.md).

# Creating your API keys

Once your business account is set up and active, you can create your API keys to authenticate against the Txn API.

To do so, open **Developer Tools** in the left-hand menu of your account, stay on the **API Keys** tab and click **Add API Key**. Creating a key takes four steps:

1. **Key Details.** Enter a name for the key and choose its permission.
2. **IP Allowlist.** Allow access from any IP address, or only from the public IPv4 addresses and CIDR ranges you list.
3. **2FA Verification.** Enter the 6-digit code from your authenticator app.
4. **Save API Key.** Copy the key and store it securely.

| API Key Permission | Description                                              |
| ------------------ | -------------------------------------------------------- |
| Read only          | Can only read data, e.g. transaction details.            |
| Full access        | Can read and write data, e.g. create quotes and payouts. |

Each newly generated API key is shown only once — copy and store it securely, as it cannot be retrieved from your account later.

The **API Keys** tab lists every API key of your account with its prefix, permission, IP allowlist and creation date. To delete a key, click **Delete** in its row and confirm with your authenticator app code.

{% hint style="info" %}
When a key has an IP allowlist, requests from any other IP address are rejected with `401`. You can set the allowlist when you create the key and change it later on an existing key with **Edit**, without re-issuing the key or changing its permission.
{% endhint %}

<figure><img src="https://1963856601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgfUDRstNYYBTf2futZ28%2Fuploads%2Fgit-blob-4a5ea5dabb83fc4145031065707e3e0c2b2504f0%2Fapikey1.png?alt=media" alt="API Keys tab"><figcaption><p>Developer Tools → API Keys</p></figcaption></figure>

<figure><img src="https://1963856601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgfUDRstNYYBTf2futZ28%2Fuploads%2Fgit-blob-d8e055596f9cd303ff6de19a56ed442555503927%2Fapikey2.png?alt=media" alt="Create API Key — Key Details"><figcaption><p>Step 1: Enter a name and choose the key permission</p></figcaption></figure>

<figure><img src="https://1963856601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgfUDRstNYYBTf2futZ28%2Fuploads%2Fgit-blob-174abf4a926ca685945c6c515aa2c25c41da154b%2Fapikey3.png?alt=media" alt="Create API Key — IP Allowlist"><figcaption><p>Step 2: Allow any IP address, or only the addresses you list</p></figcaption></figure>

<figure><img src="https://1963856601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgfUDRstNYYBTf2futZ28%2Fuploads%2Fgit-blob-d0026fb72e100fe2b97ed07de132a168e6c997ff%2Fapikey4.png?alt=media" alt="Create API Key — 2FA Verification"><figcaption><p>Step 3: Confirm with your authenticator app code</p></figcaption></figure>

<figure><img src="https://1963856601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgfUDRstNYYBTf2futZ28%2Fuploads%2Fgit-blob-5d3a05a8620ccec2e7022e0cebb33d738c951789%2Fapikey5.png?alt=media" alt="Create API Key — Save API Key"><figcaption><p>Step 4: Copy and save the key — it is shown only once</p></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.txn.io/getting-setup/creating-your-api-keys.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
