> For the complete documentation index, see [llms.txt](https://docs.shopgo.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shopgo.me/management-api/authentication/using-platform-api-key.md).

# Using Platform API Key

### Overview

The platform API key can be requested by contacting ShopGo's product team. This is intended for internal use and getting it is subject to an approval process.

When using this authentication mechanism, an additional request header must be supplied to specify which tenant accountshould be accessed. The details are described in [Test API Key](/management-api/authentication/using-platform-api-key.md#test-api-key) below.

{% hint style="danger" %}
Take extra care when using the platform API key as it can be used to modify the records of any tenant on the platform.
{% endhint %}

## Test API Key

<mark style="color:blue;">`GET`</mark> `https://api.shopgo.me/v1/management/auth/test`

Use this endpoint to test authentication.\
\
The same request format can be used to authenticate access to all management API endpoints.

#### Headers

| Name        | Type   | Description              |
| ----------- | ------ | ------------------------ |
| X-API-KEY   | string | platform API key         |
| X-TENANT-ID | number | unique tenant identifier |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "result": "success",
    "payload": {}
}
```

{% endtab %}

{% tab title="401 " %}

```javascript
{
    "result": "error",
    "description": "unauthorized"
}
```

{% endtab %}
{% endtabs %}

For convenience, it's possible to replace `X-TENANT-ID` with a similar header `X-TENANT-NAME` that accepts the tenant's name (String).
