> For the complete documentation index, see [llms.txt](https://help.pixfizz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.pixfizz.com/api-and-integrations/pixfizz-restful-api/api-keys.md). Agents can also search and read this documentation through its [MCP server](https://help.pixfizz.com/~gitbook/mcp).

# API Keys

## API Keys

Use an API key instead of your admin username and password when connecting to the Pixfizz API. API keys are more secure and make every request faster.

***

### Overview

Until now, API requests used HTTP Basic Auth with a standard admin username and password. You can now generate an API key and use it in place of those credentials for all API requests.

Using an API key:

* Avoids sharing an admin password with the tools and integrations that call the API.
* Bypasses brute-force login protection, which saves around 0.5 seconds on every request.
* Lets you see when each key was last used, and delete it at any time.

API keys belong to a user and work only on the site where they were created.

### How to create an API key

1. Go to **Admin > Users > Users** and open the user the integration should act as.
2. Scroll down to the **API Keys** section and click **Add API Key**.
3. Give the key a name that describes where it will be used, for example the name of the integration.
4. Copy the key and store it somewhere secure. Keys start with `pxk_`.

<figure><img src="https://1409369501-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDLSaKAH9aauCVHoiuVBl%2Fuploads%2FpiEpDbxwQqQtcU6Vlc3B%2FScreenshot%202026-09-25%20at%2008.57.48.png?alt=media&amp;token=c9d76dcb-4b2b-4ae9-86bb-5e5c55c0722a" alt=""><figcaption></figcaption></figure>

The **API Keys** section lists every key for that user with its **Name**, a partially hidden **Key**, the date it was **Created** and the date it was **Last Used**.

If you connect an integration to several sites, create a key on each site.

### How to use an API key

API keys use the same HTTP Basic Auth method you already use. The only difference is what you send:

* Put the **API key in the username position**.
* The **password is ignored**. You can send any value, or leave it empty.

#### Example (curl)

```
curl -u pxk_YOUR_API_KEY: https://yourstore.pixfizz.com/v1/admin/orders.json
```

Note the colon after the key. It separates the username (your key) from the empty password.

### How to delete an API key

1. Go to **Admin > Users > Users**, open the user and scroll to the **API Keys** section.
2. Click **Delete** next to the key you want to remove.

Any integration still using that key will stop working immediately, so update it with a new key first if you still need it.

### Tips

* Create a separate key for each integration and name it clearly. If you need to remove access for one integration, you can delete its key without affecting the others.
* Only create keys on the sites where you actually connect an integration.
* Use the **Last Used** date to spot keys that are no longer in use, and delete them.
* Treat your API key like a password. Don't paste it into public code, emails or support tickets.
* Switch any existing integration that uses an admin username and password to an API key.

### Related

* [Pixfizz RESTful API](https://help.pixfizz.com/api-and-integrations/pixfizz-restful-api)
