Skip to content

Commit cb2ee0e

Browse files
Merge pull request #606 from plausible/metmarkosaric-patch-32
sites API key in settings
2 parents 5b58a11 + 2b1e4b3 commit cb2ee0e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs/sites-api.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ The Plausible Site provisioning API offers a way to create and manage sites in y
2222

2323
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.
2424

25+
## Authentication
26+
27+
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.
28+
29+
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.
30+
31+
After creating an API key, you can authenticate your request by sending the key in the Authorization header of your request.
32+
2533
## Endpoints
2634

2735
### GET /api/v1/sites

docs/stats-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Take a look at our [Events API Reference](events-api.md) if you want to record p
1919

2020
## Authentication
2121

22-
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.
22+
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.
2323

24-
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.
24+
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.
2525

2626
After creating an API key, you can authenticate your request by sending the key in the Authorization header of your request.
2727

0 commit comments

Comments
 (0)