# Stripe-Context header

Perform API operations on related accounts.

By default, API requests execute on the Stripe account that generated the accompanying [API key](https://docs.stripe.com/keys.md). However, you can use the `Stripe-Context` header to perform an API request in the context of a related account.

> The `Stripe-Context` header supersedes the `Stripe-Account` header, which facilitates [performing API operations on connected accounts](https://docs.stripe.com/connect/authentication.md). `Stripe-Context` expands the scope and the types of related accounts they can access.

## API request scope

You can make API requests to operate within different scopes:

- Your own account
- Any connected account in your platform
- Any v2 account with at least the merchant or recipient configuration
- Any account in your organization

When you make an API request targeting an account other than that of the API key, you must identify the intended account by including the `Stripe-Context` header. The value depends on the relative relationship of the intended account to the [API key](https://docs.stripe.com/keys.md) used to make the request.

For example, consider an organization with multiple platform accounts representing different business lines. Each platform has connected accounts and one connected account has a recipient account.

Organization with multiple standalone platform accounts representing different business lines, each with connected accounts. (See full diagram at https://docs.stripe.com/context)

```text
[Rocket, Inc. Organization org_1234] --> [Rocket Rides Platform acct_111]
[Rocket, Inc. Organization org_1234] --> [Rocket Repairs Platform acct_222]
[Rocket, Inc. Organization org_1234] --> [Rocket Deliveries Platform acct_333]
[Rocket Rides Platform acct_111] --> [Driver Smith Connected account acct_111a]
[Rocket Repairs Platform acct_222] --> [Mechanic Jones Connected account acct_222a]
[Rocket Deliveries Platform acct_333] --> [Courier Vega Connected account acct_333a]
[Driver Smith Connected account acct_111a] --> [Fuel City Recipient account acct_111b]
```

Given this business structure, it’s possible to perform API requests using several different scopes. The following table shows the `Stripe-Context` format for each different scope that requires context based on its relationship to the account the requesting API key belongs to.

| Requesting API key owner | Scope account | Stripe-Context format |
| --- | --- | --- |
| Rocket, Inc. | Rocket Rides | Platform ID: `acct_111` |
| Rocket, Inc. | Driver Smith | Platform ID/Connected account ID: `acct_111/acct_111a` |
| Rocket Rides | Driver Smith | Connected account ID: `acct_111a` |
| Rocket Deliveries | Courier Vega | Connected account ID: `acct_333a` |
| Rocket Rides | Fuel City | Connected account ID/Recipient ID: `acct_111a/acct_111b` |
