> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.usebridge.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.usebridge.com/_mcp/server.

# Authentication

> Guide to authentication in the Bridge REST API

When making requests to the Bridge API, you will need to pass the proper authentication headers to identify yourself.
Use the values of the API Keys, managed within the *Developers* section of your Bridge dashboard.

**`HTTP Header`**

```http request title="HTTP Header"
X-API-Key: <token>
```

## Environments

* **Production**: `https://app.usebridge.com`
* **Sandbox**: `https://app.usebridge.xyz`

Make sure your API key matches the environment you are calling.

## Secret and Publishable Keys

There are two types of API Key, "Secret" and "Publishable". All REST API's will function with a valid Secret API Key.
A subset of API's, with limited behavior, are available using the Publishable API Key. These public APIs may be called
directly from a user's browser, so it must be assumed you do not have full control.

## Patient Tokens

Some of the public APIs (those available with the Publishable API Key), require "Patient Token". This is a short-lived token
that validates access to existing resources. See the [Create Patient Token](https://docs.usebridge.com/api/api-reference/patient-token/create-patient-token) API.
This token will typically be passed through as a field in the request, in addition to the API key header.

## API Key Prefixes

* Sandbox secret keys typically start with `sk_sandbox`
* Production secret keys typically start with `sk_live`