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

# Manage tenants

> Create a tenant for each of your clients and manage their projects, yields, fees, and reporting with one admin API key.

If you onboard your own clients, such as a wallet or custody platform does, you keep one partner account on Yield.xyz and create a tenant for each client. Your backend then manages every tenant's projects with your team's admin API key, the same way it manages your own. Your team is the partner, and each tenant sits directly under it. In the API, tenants are created through the `/v1/programmatic/teams` route.

## Prerequisites

* An admin API key for your team. See [Create an admin API key](https://docs.yield.xyz/guides/enterprise/programmatic-access.md#create-an-admin-api-key).
* Multi-tenant access enabled on your team; [contact us](mailto:hello@yield.xyz) to turn it on. Tenant creation returns `403` for teams without it.

Every route on this page is served from `https://api.stakek.it` and authenticated with the `X-ADMIN-API-KEY` header.

## Create a tenant

Create one tenant per client. The tenant's owner is created in the same request:

```bash cURL theme={null}
curl -X POST https://api.stakek.it/v1/programmatic/teams \
  -H "X-ADMIN-API-KEY: $ADMIN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "name": "Acme Treasury",
    "contactDetails": { "email": "ops@acme.example" },
    "user": {
      "email": "jane@acme.example",
      "name": "Jane",
      "surname": "Doe"
    }
  }'
```

```json Response (excerpt) theme={null}
{ "id": "...", "name": "Acme Treasury", "parentTeamId": "<your team id>", "activated": false }
```

| Field | Required | Notes |
| - | - | - |
| `name` | Yes | The tenant's name. |
| `contactDetails` | Yes | Free-form JSON object (or array of objects) with the client's contact details. |
| `user.email` | Yes | The tenant owner's email. Use an address that isn't already registered with Yield.xyz. |
| `user.name`, `user.surname` | Yes | The tenant owner's first and last name. |
| `referredBy` | No | Optional referral reference. |

Yield.xyz activates each new tenant after it's created. The tenant's owner gets two emails: one right away acknowledging the request, and a second with a personal activation link once the tenant is active. The owner signs in through that link. To line activation up with your client onboarding, reach out at [hello@yield.xyz](mailto:hello@yield.xyz). Tenant creation is limited to 30 requests per minute per admin API key.

## Tenant projects

Once the tenant is active, its owner signs in to the [dashboard](https://dashboard.yield.xyz) and creates the tenant's projects there. From then on, your admin API key manages each project's keys, enabled yields, fee configurations, reporting, and campaigns by its `projectId`, exactly as it does for your own team's projects.

## Manage a tenant's project

Use the same project-scoped key, yield, and fee-configuration routes as for your own projects, with the tenant project's `projectId`. Field details, limits, and statuses are in the [Programmatic access guide](https://docs.yield.xyz/guides/enterprise/programmatic-access.md#provision-a-project).

**1. Issue a project API key**

```bash cURL theme={null}
curl -X POST https://api.stakek.it/v1/programmatic/projects/{projectId}/keys \
  -H "X-ADMIN-API-KEY: $ADMIN_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "name": "Acme production key" }'
```

List, update, or remove keys with `GET .../keys`, `PATCH .../keys/{keyId}`, and `DELETE .../keys/{keyId}`.

**2. Enable yields**

```bash cURL theme={null}
curl -X POST https://api.stakek.it/v1/programmatic/projects/{projectId}/yields/enabled \
  -H "X-ADMIN-API-KEY: $ADMIN_API_KEY" \
  -H "content-type: application/json" \
  -d '[{ "integrationId": "base-usdc-aave-v3-lending" }]'
```

`GET` lists what's enabled; `DELETE .../yields/enabled/{integrationId}` or `DELETE .../yields/enabled` with a body removes yields.

**3. Request a fee configuration**

```bash cURL theme={null}
curl -X POST https://api.stakek.it/v1/programmatic/projects/{projectId}/fee-configuration \
  -H "X-ADMIN-API-KEY: $ADMIN_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "integrationId": "base-usdc-aave-v3-lending", "depositFeeBps": 50 }'
```

`GET` lists configurations; `PATCH` and `DELETE .../fee-configuration/{feeConfigurationId}` change or remove one.

Plan checks and limits on these routes follow the tenant that owns the project, not your own team. To set a tenant's plan to match your agreement, [contact us](mailto:hello@yield.xyz).

## Reporting per tenant

Pull each tenant's data by `projectId`:

| Data | Path under `/v1/programmatic/projects/{projectId}` |
| - | - |
| Revenue | `/reporting/revenue`, `/reporting/revenue/aggregate` |
| Performance (volume, TVL) | `/reporting/performance`, `/reporting/performance/aggregate` |
| Perps | `/reporting/perps/actions`, `/reporting/perps/activity`, `/reporting/perps/revenue` |
| Borrow | `/reporting/borrow/actions`, `/reporting/borrow/revenue`, `/reporting/borrow/revenue/summary`, `/reporting/borrow/overview` |

For a tenant's activity, use these project-scoped routes with its `projectId`: revenue and performance return daily figures per integration, and `/reporting/perps/actions`, `/reporting/perps/activity`, and `/reporting/borrow/actions` return individual actions.

Read-only [incentive campaign](https://docs.yield.xyz/documentation/earn/incentive-campaigns.md) data is at `/v2/programmatic/projects/{projectId}/campaigns` and the per-campaign routes beneath it.

```bash cURL theme={null}
curl "https://api.stakek.it/v1/programmatic/projects/{projectId}/reporting/revenue?date=2026-09-29" \
  -H "X-ADMIN-API-KEY: $ADMIN_API_KEY"
```

## What your key can reach

Your admin API key works on projects in your own team and in every tenant your team created, across these route groups:

| Route group | Your projects | Tenant projects |
| - | - | - |
| Project API keys (`/projects/{projectId}/keys`) | ✓ | ✓ |
| Enabled yields (`/projects/{projectId}/yields/enabled`) | ✓ | ✓ |
| Fee configuration (`/projects/{projectId}/fee-configuration`) | ✓ | ✓ |
| Revenue and performance reporting | ✓ | ✓ |
| Perps and borrow reporting | ✓ | ✓ |
| Campaigns (`/v2/.../projects/{projectId}/campaigns`) | ✓ | ✓ |

Access is scoped to your own team and the tenants it owns. A `projectId` that belongs to any other team returns `403`, an unknown `projectId` returns `404`, and one that isn't a valid UUID returns `400`.

## Audit trail

Each tenant you create is recorded in your team's audit log. Changes your key makes to a tenant's project keys, enabled yields, and fee configurations are recorded in that tenant's audit log, marked as made through the API.

> [!NOTE]
>
> Have a specific tenant workflow in mind? Reach out at [hello@yield.xyz](mailto:hello@yield.xyz).

## Next steps

> [card] [Programmatic access guide](https://docs.yield.xyz/guides/enterprise/programmatic-access.md)
>
> Every programmatic route, with field details.

> [card] [Programmatic access](https://docs.yield.xyz/documentation/advanced-setup/programmatic-access.md)
>
> What an admin API key covers and who can create one.

> [card] [Reporting](https://docs.yield.xyz/documentation/advanced-setup/reporting.md)
>
> What each revenue and performance figure means.

> [card] [Set up fees and payouts](https://docs.yield.xyz/guides/dashboards/fees-payouts.md)
>
> Register payout wallets for the fees you charge.


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