> For the complete documentation index, see [llms.txt](https://help.branch.io/llms.txt).

# API Reference

> Branch API reference—create deep links and QR codes, track events, and export attribution data. Interactive endpoints with code samples in eight languages.

The Branch APIs let you query and export data, create Branch Links, generate custom Branch QR codes, and more.

## Data APIs

| API | Purpose | Type of data | Timing | Export window |
| --- | --- | --- | --- | --- |
| [**Daily Exports**](https://help.branch.io/apidocs/daily-exports.md) | Export **all** device-level data in batches on a daily basis. | Log | Delayed and batched | Rolling 7 days |
| [**Custom Exports**](https://help.branch.io/apidocs/custom-exports.md) | Export **select** device-level data using your own filters. | Log | Delayed and batched | Rolling 120 days |
| [**Scheduled Log Exports**](https://help.branch.io/apidocs/scheduled-log-exports.md) | Set up a recurring export of select device-level data. | Log | Delayed and batched (hourly or daily) | — |
| [**Cross-Events Export**](https://help.branch.io/apidocs/cross-events-export.md) | Query and compare large pools of data across multiple sources. | Aggregate | Delayed and batched | Rolling 2 years |
| [**Aggregate**](https://help.branch.io/apidocs/aggregate.md) | Pull aggregate Branch data filtered for limited-access users. | Aggregate | Delayed and batched | Rolling 2 years |
| [**Cohort**](https://help.branch.io/apidocs/cohort.md) | Pull cohort data to understand user behavior and performance over time. | Aggregate | Delayed and batched | Rolling 2 years |
| [**Query**](https://help.branch.io/apidocs/query.md) | Export **select** campaign-level data. | Aggregate | Real time | Rolling 2 years |

## Functional APIs

| API | Purpose |
| --- | --- |
| [**Deep Linking**](https://help.branch.io/apidocs/deep-linking.md) | Create, read, update, and delete Branch Links. |
| [**Quick Links**](https://help.branch.io/apidocs/quick-links.md) | Programmatically create, update, and bulk-manage Branch Quick Links. |
| [**QR Code**](https://help.branch.io/apidocs/qr-code.md) | Programmatically generate and customize Branch-powered QR codes. |
| [**Events**](https://help.branch.io/apidocs/events.md) | Track events and conversions for your app. |
| [**Attribution**](https://help.branch.io/apidocs/attribution.md) | Attribute app sessions to your active campaigns. |
| [**App**](https://help.branch.io/apidocs/app.md) | View and update an existing Branch app configuration. |
| [**Data Subject Request**](https://help.branch.io/apidocs/data-subject-request.md) | GDPR and CCPA workflows for accessing and erasing user or device data from Branch. |

## Access

Availability varies by Branch plan. See [Branch pricing](https://www.branch.io/pricing/).

## Authentication

All Branch APIs authenticate with your **Branch Key**. Most endpoints accept the key in the JSON request body as `branch_key`; export and data APIs accept an Access Token.

### Retrieve your Branch Key

In the New Branch experience:

1. Navigate to **Configuration > Security & Access > Credentials**.
2. Use the copy icon to copy your Branch Key.

In the legacy Branch experience:

1. Navigate to **Account > Settings > Profile**.
2. Use the copy icon to copy your Branch Key.

See the [Credentials guide](https://help.branch.io/account-hub/credentials-new.md) for managing Access Tokens, organization IDs, and additional credentials.

## Conventions

- **Base URL:** `https://api2.branch.io`
- **Versioning:** included in the path (`/v1/`, `/v2/`, `/v3/`)
- **Content type:** `application/json` unless otherwise noted
- **Errors:** every endpoint returns a JSON error body of `{ "error": { "message": string, "code": integer } }`
- **Rate limits:** documented per API in the operation reference
