Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/sites-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/stats-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down