POST
/
v1
/
private-locations
/
{id}
/
keys
Generate a new API Key for a private location
curl --request POST \
  --url https://api.checklyhq.com/v1/private-locations/{id}/keys \
  --header 'Authorization: <api-key>'
{
  "id": "fed3ada8-7d9b-4634-a0fe-471afe0518b6",
  "rawKey": "pl_a89026d28a0c45cf9e11b4c3637f3912",
  "maskedKey": "...6a1e",
  "created_at": "2023-12-25",
  "updated_at": "2023-12-25"
}

Overview

The Create Private Location Key endpoint generates a new API key for a specific private location. Use these keys to authenticate monitoring agents and enable secure communication with Checkly. Common Use Cases:
  • Agent Deployment
  • Key Rotation
  • Security Updates
  • New Agent Setup
Store API keys securely and never expose them in logs or public repositories. Keys provide full access to report check results for the private location.
New API keys are active immediately. Use them to configure monitoring agents and ensure secure communication with Checkly services.

Authorizations

Authorization
string
header
required

The Checkly Public API uses API keys to authenticate requests. You can get the API Key here.

Your API key is like a password: keep it secure!

Authentication to the API is performed using the Bearer auth method in the Authorization header and using the account ID.

For example, set Authorization header while using cURL:

curl -H "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"

Headers

x-checkly-account
string

Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general

Path Parameters

id
string
required

Response

Created

id
string
required
Example:

"fed3ada8-7d9b-4634-a0fe-471afe0518b6"

rawKey
string
required
Example:

"pl_a89026d28a0c45cf9e11b4c3637f3912"

maskedKey
string
required

The masked key value.

Example:

"...6a1e"

created_at
string<date>
required
updated_at
string<date>