List API keys
const url = 'https://api.overwatch.weareheavy.dev/v1/keys';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.overwatch.weareheavy.dev/v1/keys \ --header 'Authorization: Bearer <token>'The organization’s keys, masked — only the display prefix (start) is
returned; the plaintext exists only at creation. Session-only,
owner/admin.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”The organization’s keys.
object
A stored API key, masked — the plaintext is only returned at creation.
object
The visible key prefix for display (e.g. wah_CL).
ISO 8601 (key records come from the auth layer).
ISO 8601 expiry, or null for a non-expiring key.
The key’s site scope, or null for full organization access.
full keys act with management capability (register sites, change
settings, trigger crawls). read keys may only make GET requests —
use them anywhere the key is visible to users, such as a CMS plugin
running in the browser.
Example
{ "keys": [ { "enabled": 0, "access": "full" } ]}Missing or invalid credentials.
object
A human-readable error message.
Example
{ "error": "invalid api key"}A dashboard session is required (API-key callers are rejected), or the session’s role does not allow this action.
object
A human-readable error message.
Example
{ "error": "a dashboard session is required"}