> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firmable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API keys and authentication

> Create a developer API key and authenticate your requests

Developer API keys start with `fbl_dev_`. One key works for both the Firmable API and the MCP server,
and every call uses your organisation's [developer credits](https://docs.firmable.com/developer/credits.md).

## Create a key

**1. Open the API page**

In the [developer portal](https://app.firmable.com/developer), open **API**.

**2. Create the key**

Select **Create key**, give it a name you'll recognise (for example, *Production server*) and
select **Create key**.

**3. Copy it now**

The key is shown **once**. Copy it and store it somewhere safe, such as your secrets manager.

## Authenticate requests

Send the key in the `Authorization` header as a bearer token:

```bash theme={null}
curl "https://api.firmable.com/company?fqdn=firmable.com" \
  -H "Authorization: Bearer fbl_dev_xxx"
```

This looks up one company and uses up to 1 credit, or none if your organisation has looked it up
before. On Windows PowerShell, type `curl.exe` instead of `curl`.

> [!NOTE]
>
> The endpoints, parameters and responses are the same for every key. See the
> [API Reference](https://docs.firmable.com/api-reference/endpoint/company-get.md) for each endpoint.

## Rotate or revoke a key

On the **API** page, open a key's actions:

* **Rotate key** issues a new secret. The old one keeps working for a short time so you can swap it over.
* **Revoke key** stops the key straight away. You can't undo it.

Revoke a key at once if you think it has leaked.

## Errors

| Status | Meaning |
| - | - |
| `401` | The key is missing, wrong or revoked. |
| `402` | Your organisation is out of developer credits. [Buy more](https://docs.firmable.com/developer/credits.md#buy-more-credits). |
| `429` | Too many requests. See [Rate limits](https://docs.firmable.com/api-reference/rate-limits.md). |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.