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

# Subprojects

> Run card programs for your own business clients through one integration.

If you run card programs for your own business clients, you integrate once through a parent project and run each client in its own subproject.

## How it works

* A **parent project** holds your integration: API keys and webhook endpoints. It has no users, cards or accounts of its own.
* Each business client runs in a **subproject** under the parent, with its own users, cards, accounts and fees. Users, cards and accounts never move between subprojects.
* Sandbox and production each have their own parent project, with their own subprojects.
* You call the API with the parent's API keys. Subprojects have no API keys.

You do not create subprojects through the API.

## Calling the API for a subproject

Name the subproject in the `Reap-Subproject-Id` header, and authenticate with the parent's API key:

```http theme={null}
POST /cards
Authorization: Bearer <parent API key>
Reap-Version: 2025-02-14
Reap-Subproject-Id: 6b0f3c9e-2d4a-4c1e-9f3b-8a7d5e6c4b21
```

The request and response are the same as for any other project.

* Every endpoint that acts on users, cards, accounts or transactions operates on a subproject and requires the header. Each endpoint page in the [API reference](https://docs.reap.global/api-reference/overview.md) lists the header when the endpoint accepts it.
* [Webhook endpoints](https://docs.reap.global/api-reference/webhooks/list-webhook-endpoints.md) belong to the parent. Call them without the header.
* Each subproject has its own [rate limit](https://docs.reap.global/api-reference/rate-limiting.md).
* An [idempotency key](https://docs.reap.global/api-reference/idempotency.md) applies within one subproject, so the same key sent for two subprojects does not collide.

## Errors

| Status | Code | Cause |
| - | - | - |
| `400` | `SUBPROJECT_HEADER_MISSING` | A parent API key called an endpoint that operates on a subproject without the `Reap-Subproject-Id` header. |
| `400` | `SUBPROJECT_HEADER_NOT_ALLOWED` | The header came with an API key that does not belong to a parent project, or with a call to an endpoint that belongs to the parent. |
| `404` | `SUBPROJECT_NOT_FOUND` | No subproject with that ID exists under this parent. |
| `409` | `PROJECT_PAUSED` | The subproject or the parent is paused, and the endpoint is not one a pause keeps serving. `detail.requiredScope` names the endpoint's scope. |
| `422` | `VALIDATION_FAILED` | The header value is not a UUID. `detail.on` is `headers`. |

Pausing the parent pauses every subproject under it: reads keep working, except sensitive ones such as revealing card details, cards can still be frozen, blocked or deleted and users deleted, and card authorizations are declined. See [Pausing a project](https://docs.reap.global/program-configuration/pausing.md), and [Errors](https://docs.reap.global/api-reference/errors.md) for the errors every endpoint can return.

## Webhooks

Events from every subproject go to the parent's [webhook endpoints](https://docs.reap.global/webhooks/overview.md). Each delivery names its subproject in the `Reap-Subproject-Id` header, so one endpoint can route events for all your clients.

The signature covers the header. A delivery for a subproject carries a `v2` signature in place of `v1`, so a receiver that ignores the header fails verification rather than processing an event for the wrong client. See [Signature Verification](https://docs.reap.global/webhooks/signature-verification.md#deliveries-for-a-subproject).

[External authorization](https://docs.reap.global/transactions/external-authorization/overview.md) works the same way: an authorization request for a subproject's card goes to the parent's `REQUEST` endpoint and names the subproject in `Reap-Subproject-Id`.


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