# Operator getting started

Operator-level API keys, the operator tenant, environments and your first operator call.

An operator runs the WireBloom platform for its own customers. Besides the customer API, an operator can hold **operator-level keys**: keys that belong to the operator, not to one customer. They onboard customers from the operator's own systems, manage the operator account (profile, staff, limits, pricing), read reports, reconciliation, treasury and compliance queues, and receive the events of every customer.

The [Operator API reference](/operator/reference) lists every operation an operator key can call; the customer-facing reference is at [/reference](/reference).

## Environments

| Environment | Base URL                                       | Keys                                                       |
| ----------- | ---------------------------------------------- | ---------------------------------------------------------- |
| Production  | `https://api.banking.wirebloom.com/v1`         | `wb_live_…`                                                |
| Staging     | `https://api.staging.banking.wirebloom.com/v1` | `wb_test_…` (where the sandbox is enabled) and `wb_live_…` |
| Local       | `http://localhost:3001/v1`                     | `wb_test_…`                                                |

`wb_test_` keys authenticate only where the sandbox is enabled; production never accepts them. There is no separate operator sandbox tenant: in staging an operator test key works on the operator's own staging data. Where test keys are not accepted, start with a live key holding read scopes only (see the [operator walkthrough](/docs/operator-walkthrough)).

## Creating an operator key

An operator **owner** opens **API access → Keys** in the operator console and creates a key. Creating a key needs a fresh step-up verification; the key is shown **once**, so store it in your secrets manager. Same format, hashing, IP allow-list, expiry, rotation and revocation as customer keys ([Authentication and API keys](/docs/authentication)); the key comes back with `"level": "operator"`. A key never creates, rotates or revokes keys.

## The operator tenant

Every call sends `X-Tenant-Id` = **the operator id**. A customer id or another operator's id is `403`. Operations about one customer name it in the path (`/customers/{customerId}/kyb`), never in the header.

```sh
export WIREBLOOM_API_URL=https://api.staging.banking.wirebloom.com/v1
export WIREBLOOM_OPERATOR_ID=<your operator id>
export WIREBLOOM_API_KEY=<operator key from your secrets manager>
```

## Your first call

Read the operator profile ([getOperator](/operator/reference/tenants#getOperator), scope `operator:read`):

```sh
curl "$WIREBLOOM_API_URL/operators/$WIREBLOOM_OPERATOR_ID" \
  -H "Authorization: Bearer $WIREBLOOM_API_KEY" \
  -H "X-Tenant-Id: $WIREBLOOM_OPERATOR_ID"
```

or list your customers ([listCustomers](/operator/reference/tenants#listCustomers), scope `customers:read`):

```ts
const response = await fetch(`${process.env.WIREBLOOM_API_URL}/customers?limit=25`, {
  headers: {
    Authorization: `Bearer ${process.env.WIREBLOOM_API_KEY}`,
    'X-Tenant-Id': process.env.WIREBLOOM_OPERATOR_ID!,
  },
});
```

## Operator scopes

| Scope                             | Reaches                                                                                                          |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `customers:read`                  | customers and the operator's customer views                                                                      |
| `customers:write`                 | create customers ([onboarding](/docs/operator-onboarding-customers))                                             |
| `customers:manage`                | per-customer limits and pricing, customer notes                                                                  |
| `onboarding:read`                 | a customer's KYB case                                                                                            |
| `operator:read`, `operator:write` | operator profile and operator limits; branding, settings, domains, receiving details and monitoring rules (read) |
| `staff:read`, `staff:write`       | staff, staff roles and the role matrix (read)                                                                    |
| `pricing:read`, `pricing:write`   | fee catalogue, pricing templates, billing runs (read) and billing previews                                       |
| `reports:read`                    | reports, reconciliation runs and exceptions                                                                      |
| `treasury:read`                   | treasury accounts and operations                                                                                 |
| `ops-payments:read`               | the payments, incoming payments, exceptions and four-eyes queues, operator recipients, currency summaries        |
| `compliance:read`                 | compliance queues, holds, screening hits, monitoring alerts, cases, complaints, data requests (read)             |
| `support:manage`                  | customer support requests and feedback                                                                           |
| `status:manage`                   | the operator status page: incidents, components, subscribers                                                     |
| `integration:read`                | banking connections, the Integration home and API usage of every key                                             |
| `webhooks:manage`                 | operator webhook endpoints ([operator webhooks](/docs/operator-webhooks))                                        |
| `audit:read`                      | the operator audit trail                                                                                         |

Customer scopes cannot be given to an operator key and operator scopes cannot be given to a customer key (`422`, `errors[].code` `scope_not_allowed`). The full list with operations is the [scope catalogue](/scopes).

## What an operator key never does

- Move customer money, approve anything, release holds or decide KYB, access or closure: those are decisions of a person (four eyes).
- Open balances on behalf of a customer, or reach a customer's own webhook endpoints.
- Change branding, sensitive operator settings, domains, receiving details, monitoring rules or the role capability matrix.
- Treasury payments and treasury FX stay with interactive staff sessions (dual control).

Calling a customer-only operation (balances, payments, recipients) with an operator key is `403` [`insufficient-scope`](/errors#insufficient-scope) with the detail "only available to customer-level API keys", and a customer key calling an operator operation gets the reverse.

## Next

- [Operator walkthrough](/docs/operator-walkthrough): the five steps of **API access → Walkthrough**.
- [Onboarding customers](/docs/operator-onboarding-customers), [account and staff management](/docs/operator-account-management), [reporting and reconciliation](/docs/operator-reporting).
- [SDKs](/docs/sdks): the TypeScript and Python clients take the operator id as `tenantId`.
