# Tenants API

> List tenants and retrieve one by record id or tenant id.

List tenants and retrieve one by record id or tenant id.

Base URL: `https://mpp-api-mybusinessapp-san.azure-api.net/v2`

API version: `3.55.133`

## Endpoints

### GET /tenants

List tenants

Returns the tenants visible to the API key. Paginated: use `page`/`limit` or `paginate=false`; filter by name and status. To count without fetching rows, request `limit=1` and read `metadata.total`. Related: `Retrieve a tenant by id`, `Retrieve a tenant by tenant id`.

Parameters:

- `Ocp-Apim-Subscription-Key` (header), required — Azure API Management subscription key (public: 4fb0f9a3b14a44e98698e80cef2aebeb)
- `X-MBA-Application-ID` (header), optional — Optional. Target another application's stamp; only a Studio key may target a different tenant
- `X-MBA-Application-Type` (header), optional — Optional. Application type paired with X-MBA-Application-ID
- `page` (query), optional — The page number to retrieve
- `limit` (query), optional — The number of items to retrieve per page
- `paginate` (query), optional — Used to determine if pagination is applied to the results. If true, the results will be paginated. If false, the results will not be paginated and all results will be returned.

Reference: https://mybusinessapp.co.za/developers/api/tenant#tag/Tenant/get_all_tenants

### GET /tenants/tenant/{tenantID}

Retrieve a tenant by tenant id

Returns the tenant with the given `tenantID` (the tenant's own identifier, distinct from the record id). Related: `List tenants`.

Parameters:

- `Ocp-Apim-Subscription-Key` (header), required — Azure API Management subscription key (public: 4fb0f9a3b14a44e98698e80cef2aebeb)
- `X-MBA-Application-ID` (header), optional — Optional. Target another application's stamp; only a Studio key may target a different tenant
- `X-MBA-Application-Type` (header), optional — Optional. Application type paired with X-MBA-Application-ID
- `tenantID` (path), required — Unique name of the tenant resource

Reference: https://mybusinessapp.co.za/developers/api/tenant#tag/Tenant/get_single_tenant_by_tenant_id

### GET /tenants/{id}

Retrieve a tenant by id

Returns the tenant with the given `id` and its configuration. Related: `List tenants`.

Parameters:

- `Ocp-Apim-Subscription-Key` (header), required — Azure API Management subscription key (public: 4fb0f9a3b14a44e98698e80cef2aebeb)
- `X-MBA-Application-ID` (header), optional — Optional. Target another application's stamp; only a Studio key may target a different tenant
- `X-MBA-Application-Type` (header), optional — Optional. Application type paired with X-MBA-Application-ID
- `id` (path), required — ID of the tenant resource

Reference: https://mybusinessapp.co.za/developers/api/tenant#tag/Tenant/get_single_tenant

---

[Rendered page](https://mybusinessapp.co.za/developers/api/tenant)

© MyBusinessApp (Pty) Ltd. Proprietary documentation — do not republish.
