> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/api-reference/tenant-configuration.md).

# Tenant Configuration

Everything needed to configure and operate a tenant. A \*\*tenant\*\* is an isolated workspace on The Wallet Crew platform — typically one brand, one region, or one programme. These endpoints manage the devices, scheduled tasks, secrets, API credentials, tenant settings, and webhook subscriptions that define how a tenant behaves.

Everything needed to configure and operate a tenant. A **tenant** is an isolated workspace on The Wallet Crew platform — typically one brand, one region, or one programme. These endpoints manage the devices, scheduled tasks, secrets, API credentials, tenant settings, and webhook subscriptions that define how a tenant behaves.

### Devices

Devices are the scanners and terminals authorised to connect to **Pass Scanner** — the companion app used by staff to validate passes in real time.

| Operation                                     | Description                                                |
| --------------------------------------------- | ---------------------------------------------------------- |
| `GET /api/{tenantId}/devices`                 | List registered devices. Requires `Device.Read`.           |
| `POST /api/{tenantId}/devices`                | Register a new device.                                     |
| `PUT /api/{tenantId}/devices/{deviceId}`      | Update device name or settings.                            |
| `DELETE /api/{tenantId}/devices/{deviceId}`   | Remove a device and revoke its API key.                    |
| `POST …/devices/{deviceId}/connect`           | Connect a device: returns its API key and environment URI. |
| `POST …/devices/{deviceId}/connections/reset` | Rotate the API key for a device.                           |

> See [Manage devices guide](https://docs.thewalletcrew.io/guides-scan/scan/pass-scanner/manage-devices) for the full setup flow including QR code distribution.

### Scheduler

The scheduler runs automated tasks on a configurable cadence — data sync, pass updates, report exports, and more.

| Operation                                           | Description                                                                 |
| --------------------------------------------------- | --------------------------------------------------------------------------- |
| `GET /api/{tenantId}/scheduler/executions`          | List recent task executions across all tasks. Requires `Scheduler.History`. |
| `GET /api/{tenantId}/scheduler/{taskId}/executions` | Execution history for a specific task.                                      |
| `GET …/{taskId}/executions/{executionId}`           | Full detail and logs for a single execution.                                |

### Sftp

Read-only visibility into the SFTP (Triglav) flat-file import feature. Customers drop CSV files via SFTP to bulk-update passes; these endpoints report whether the feature is enabled for the tenant, list the files in its inbox, and return the full import story for one file — including which specific passes were touched and which failed.

| Operation                                             | Description                                                       |
| ----------------------------------------------------- | ----------------------------------------------------------------- |
| `GET /api/{tenantId}/admin/sftp/status`               | Whether SFTP is enabled, plus a quick activity summary.           |
| `GET /api/{tenantId}/admin/sftp/files`                | List inbox files, each tagged `pending`, `processed`, or `error`. |
| `GET /api/{tenantId}/admin/sftp/files/{fileName}/log` | Full import log for one file, including per-pass outcomes.        |

> A tenant with no SFTP inbox simply has the feature disabled — every endpoint reports this as `sftpEnabled: false` / an empty list, never a 404.

### Secret

Secrets are tenant-scoped key/value pairs used to store integration credentials (API tokens, signing keys, passwords) that connector scripts and configuration can reference without embedding secrets in plain text.

| Operation                              | Description                                                             |
| -------------------------------------- | ----------------------------------------------------------------------- |
| `GET /api/{tenantId}/secrets`          | List all secret keys (values are not returned). Requires `Secret.Read`. |
| `GET /api/{tenantId}/secrets/{key}`    | Retrieve a secret value by key.                                         |
| `PUT /api/{tenantId}/secrets/{key}`    | Create or update a secret.                                              |
| `DELETE /api/{tenantId}/secrets/{key}` | Delete a secret.                                                        |

### Security

The `Security` tag manages **API keys** — the credentials used to authenticate calls to the tenant API.

| Operation                                        | Description                                                             |
| ------------------------------------------------ | ----------------------------------------------------------------------- |
| `GET /api/{tenantId}/admin/apiKeys`              | List all API keys for the tenant.                                       |
| `POST /api/{tenantId}/admin/apiKeys`             | Create a new key. The plaintext token is returned **once** at creation. |
| `PUT /api/{tenantId}/admin/apiKeys/{keyName}`    | Update key metadata (name, scopes, expiry).                             |
| `DELETE /api/{tenantId}/admin/apiKeys/{keyName}` | Revoke and delete a key.                                                |

> Each API key carries a set of permission scopes. A key without the required scope returns `403`. Use the principle of least privilege — give integrations only the scopes they need.

### Tenant

Tenant endpoints manage the configuration files that define how a tenant is set up — templates, layout overrides, branding, connector settings.

| Operation                                    | Description                                              |
| -------------------------------------------- | -------------------------------------------------------- |
| `GET /api/tenants`                           | List all tenants (Global Administrator only).            |
| `GET /api/tenants/{tenantId}`                | Download the full tenant configuration as a ZIP archive. |
| `PUT /api/tenants/{tenantId}`                | Create or replace tenant configuration files.            |
| `PATCH /api/tenants/{tenantId}`              | Partially update specific configuration files.           |
| `DELETE /api/tenants/{tenantId}`             | Delete tenant configuration (Global Administrator only). |
| `GET /api/tenants/{tenantId}/config/history` | View the configuration change history.                   |
| `GET /api/tenants/{tenantId}/test`           | Validate the tenant configuration without publishing.    |

### TenantConfiguration

Higher-level tenant settings — programme name, locale defaults, custom domain, and platform-wide toggles.

### WebHook

Webhooks deliver real-time HTTP notifications to your endpoint whenever events occur in The Wallet Crew — pass installed, pass updated, scan recorded, customer created, and more.

| Operation                              | Description                                                              |
| -------------------------------------- | ------------------------------------------------------------------------ |
| `POST /api/{tenantId}/webhooks`        | Create a webhook subscription. Returns the `id` and a `signatureSecret`. |
| `GET /api/{tenantId}/webhooks`         | List subscriptions.                                                      |
| `PATCH /api/{tenantId}/webhooks/{id}`  | Update a subscription (URL, events, active state).                       |
| `DELETE /api/{tenantId}/webhooks/{id}` | Remove a subscription.                                                   |

**Verifying delivery**: Every webhook request includes these headers:

| Header                 | Content                                                             |
| ---------------------- | ------------------------------------------------------------------- |
| `x-neostore-signature` | HMAC-SHA256 over the raw request body, using the `signatureSecret`. |
| `x-neostore-eventname` | The event type that triggered the delivery.                         |
| `x-neostore-tenantid`  | The tenant that emitted the event.                                  |

### Further reading

* [API Keys & Secrets guide](https://docs.thewalletcrew.io/configure/advanced-configuration/platform/api-keys-and-secrets)
* [Webhooks guide](https://docs.thewalletcrew.io/developers-guides/integration-guides/webhooks)
* [Webhooks configuration](https://docs.thewalletcrew.io/developers-guides/integration-guides/webhooks/webhooks-configure)
* [Manage devices guide](https://docs.thewalletcrew.io/guides-scan/scan/pass-scanner/manage-devices)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thewalletcrew.io/api-reference/tenant-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
