diff --git a/docs/sites-api.md b/docs/sites-api.md index b74fb99c..a26740ac 100644 --- a/docs/sites-api.md +++ b/docs/sites-api.md @@ -22,6 +22,14 @@ The Plausible Site provisioning API offers a way to create and manage sites in y Each request must be authenticated with an API key using the Bearer Token method. Please [contact us](https://plausible.io/contact) to discuss your needs and to get an API key with permissions for the endpoints listed in this document. +## Authentication + +To create a new sites API key, log in to your Plausible Analytics account. In the top-right menu, click on your account name and go to settings. + +Next, go to the "**API Keys**" section in the left-hand sidebar. Click the "**New API Key**" button, choose "**Sites API**" and save the key as it will only be shown once. After saving the key, click on "**Create API Key**" to confirm its creation. + +After creating an API key, you can authenticate your request by sending the key in the Authorization header of your request. + ## Endpoints ### GET /api/v1/sites diff --git a/docs/stats-api.md b/docs/stats-api.md index df72e622..0643aea5 100644 --- a/docs/stats-api.md +++ b/docs/stats-api.md @@ -19,9 +19,9 @@ Take a look at our [Events API Reference](events-api.md) if you want to record p ## Authentication -You can create a new stats API key by going to your Plausible Analytics account, navigating to "**Account Settings**" and clicking on the section called "**API Keys**". The key will be valid for all sites that you own. +To create a new stats API key, log in to your Plausible Analytics account. In the top-right menu, click on your account name and go to settings. -Click "**New API Key**" and be sure you save the result as you will only see the key once. However, you can always delete the key and create a new one if you no longer remember what it is. +Next, go to the "**API Keys**" section in the left-hand sidebar. Click the "**New API Key**" button, choose "**Stats API**" and save the key as it will only be shown once. After saving the key, click on "**Create API Key**" to confirm its creation. After creating an API key, you can authenticate your request by sending the key in the Authorization header of your request.