Skip to content
pingwright
Docs menu API

Build on it

GraphQL API

The console is built on Pingwright's GraphQL API, so everything you can do there, you can do from a script. MCP tools use the same API underneath.

Endpoint and version

Text
POST https://api.pingwright.app/graphql

Send the API version in the X-PINGWRIGHT-API-VERSION header. The current version is 2026-10. Pin it, so a later version doesn't change what you get.

Authenticate

From a script or CI, use an API key (pw_…) as a bearer token. Create one under Settings › API keys; it's shown once. A key works in one organization only and acts as the person who created it, with their role.

Shell
curl https://api.pingwright.app/graphql \
  -H "Authorization: Bearer $PINGWRIGHT_API_KEY" \
  -H "X-PINGWRIGHT-API-VERSION: 2026-10" \
  -H "Content-Type: application/json" \
  -d '{"query":"{ myOrganizations { nodes { organization { id name } role } } }"}'

Revoke a key under Settings › API keys the moment you think it has leaked.

A first query

Most queries take an organizationId; myOrganizations gives you yours. Then, for example, every check with its status:

GraphQL
query Checks($organizationId: ID!) {
  checks(organizationId: $organizationId) {
    totalCount
    nodes {
      id
      name
      type
      target
      status
      lastCheckedAt
    }
  }
}

Lists are paged with take (50 by default) and skip.

Good to know

  • An operation can ask for up to 300 fields.
  • Header values on checks are write-only: the API returns header names with a redacted flag, never the values.
  • Secrets such as API keys, agent tokens and ingest keys are returned once, by the mutation that creates them.
  • Logs, metrics and errors queries fail with FEATURE_NOT_ENABLED until that feature preview is on.

Create an API key in the console