# API keys API

> List API key metadata and read daily or monthly usage. Secret values are never returned.

List API key metadata and read daily or monthly usage. Secret values are never returned.

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

API version: `3.55.133`

## Endpoints

### GET /management/api-keys

List API keys

Returns the API keys for the tenant identified by the API key. Secret values are never returned, only metadata (name, prefix, scopes, usage). Related: `Retrieve an API key`, `Retrieve API key usage`.

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

Reference: https://mybusinessapp.co.za/developers/api/api-key#tag/APIKey/getAllAPIKeys

### GET /management/api-keys/usage

Retrieve tenant API key usage

Returns monthly usage statistics for all API keys in the tenant. Related: `Retrieve API key usage`.

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
- `months` (query), optional — Number of months to retrieve usage for (default: 12)

Reference: https://mybusinessapp.co.za/developers/api/api-key#tag/APIKey/getTenantAPIKeyUsage

### GET /management/api-keys/{id}

Retrieve an API key by id

Returns the metadata for a single API key by `id` (never the secret). Related: `List API keys`.

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 API key

Reference: https://mybusinessapp.co.za/developers/api/api-key#tag/APIKey/getSingleAPIKey

### GET /management/api-keys/{id}/usage

Retrieve API key usage

Returns daily usage statistics for a single API key by `id`. Related: `Retrieve tenant API key usage`.

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 API key
- `days` (query), optional — Number of days to retrieve usage for (default: 30)

Reference: https://mybusinessapp.co.za/developers/api/api-key#tag/APIKey/getSingleAPIKeyUsage

---

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

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