Supercheck LogoSupercheck

API Endpoints

Complete reference for all Supercheck REST API endpointsEdit

All endpoints require Authorization: Bearer <token> unless noted otherwise. Request and response bodies are JSON.


System

GET /api/health

Check API and dependency health. No authentication required.

curl https://demo.supercheck.dev/api/health

Response:

{
  "status": "ok",
  "database": "connected",
  "redis": "connected",
  "storage": "connected"
}

GET /api/locations

List available execution locations. No authentication required.

curl https://demo.supercheck.dev/api/locations

Response:

{
  "locations": [
    { "id": "us-east", "name": "US East", "region": "us-east-1" },
    { "id": "eu-central", "name": "EU Central", "region": "eu-central-1" }
  ]
}

CLI Tokens

GET /api/cli-tokens

List CLI tokens for the current project.

POST /api/cli-tokens

Create a CLI token. Returns the plain token value once.

Body:

{ "name": "CI/CD Pipeline", "expiresIn": 7776000 }

PATCH /api/cli-tokens/{id}

Enable, disable, or rename a token.

Body:

{ "enabled": false }

DELETE /api/cli-tokens/{id}

Permanently revoke a token.


Jobs

GET /api/jobs

List all jobs in the current project.

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger50Items per page (max 100)

POST /api/jobs

Create a new job.

Body:

{
  "name": "Nightly E2E Suite",
  "description": "Run all browser tests nightly",
  "cronSchedule": "0 2 * * *",
  "timeoutSeconds": 300,
  "retryCount": 0,
  "tests": []
}

GET /api/jobs/{id}

Get job details by ID.

PATCH /api/jobs/{id}

Update job configuration. Only provided fields are changed.

Body:

{
  "name": "Updated Name",
  "status": "paused",
  "cronSchedule": "0 3 * * *"
}

DELETE /api/jobs/{id}

Delete a job.

POST /api/jobs/{id}/trigger

Trigger a job run. Supports both CLI tokens and trigger keys.

Response:

{ "runId": "uuid", "message": "Job triggered" }

POST /api/jobs/run

Run a job immediately, bypassing the schedule.

Body:

{ "jobId": "uuid" }

Response:

{ "runId": "uuid", "message": "Job started" }

Runs

GET /api/runs

List job runs with optional filters.

ParameterTypeDescription
pageintegerPage number
limitintegerItems per page
jobIduuidFilter by job
statusstringrunning, completed, failed, cancelled

GET /api/runs/{runId}

Get run details.

DELETE /api/runs/{runId}

Delete a run record.

GET /api/runs/{runId}/status

Quick status check (lighter than full details).

Response:

{ "id": "uuid", "status": "completed" }

GET /api/runs/{runId}/stream

Stream live console output via Server-Sent Events (SSE).

curl -N https://demo.supercheck.dev/api/runs/{runId}/stream \
  -H "Authorization: Bearer sck_live_..." \
  -H "Accept: text/event-stream"

Events:

The stream uses named Server-Sent Events:

event: ready
data: {}

event: console
data: {"line": "Running test 1/5..."}

event: heartbeat
data: {}

event: complete
data: {"status": "completed"}

event: error
data: {"message": "Execution failed"}

POST /api/runs/{runId}/cancel

Cancel a running execution.


Tests

GET /api/tests

List tests with optional search and type filters.

ParameterTypeDescription
pageintegerPage number
limitintegerItems per page
searchstringSearch by title
typestringFilter by test type (browser, performance, api, playwright, k6)
includeScriptbooleanInclude decoded script content (default: false)

POST /api/tests

Create a new test.

Body:

{
  "title": "Homepage Load Test",
  "script": "import { test } from '@playwright/test';\n...",
  "type": "playwright",
  "description": "Verify homepage loads correctly"
}

GET /api/tests/{id}

Get test details.

ParameterTypeDescription
includeScriptbooleanInclude the script content

PATCH /api/tests/{id}

Update a test. Only provided fields are changed.

Body:

{
  "title": "Updated Title",
  "script": "...",
  "description": "Updated description"
}

DELETE /api/tests/{id}

Delete a test.

POST /api/tests/{id}/execute

Execute a single test. Creates a run and enqueues the test for execution.

Body (optional, for k6 tests):

{
  "location": "us-east"
}
LocationDescription
us-eastUS East
eu-centralEU Central
asia-pacificAsia Pacific
globalGlobal (default)

Trigger Keys

GET /api/jobs/{id}/api-keys

List all API trigger keys for a job.

POST /api/jobs/{id}/api-keys

Create a new trigger key for a job.

Body:

{
  "name": "CI Pipeline Key",
  "expiresIn": 2592000
}
FieldTypeDescription
namestringKey name (required, 1-100 chars)
expiresInintegerExpiry in seconds (optional, 60-31536000)

PATCH /api/jobs/{id}/api-keys/{keyId}

Update a trigger key (enable, disable, or rename).

DELETE /api/jobs/{id}/api-keys/{keyId}

Permanently revoke a trigger key.


Monitors

GET /api/monitors

List all monitors.

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger50Items per page

POST /api/monitors

Create a new monitor.

Body:

{
  "name": "API Health Check",
  "url": "https://api.example.com/health",
  "type": "http_request",
  "interval": 300,
  "timeout": 30,
  "method": "GET"
}

Supported types: http_request, website, ping_host, port_check, synthetic_test

GET /api/monitors/{id}

Get monitor details.

PATCH /api/monitors/{id}

Update a monitor.

Body:

{
  "interval": 60,
  "active": false
}

DELETE /api/monitors/{id}

Delete a monitor.

GET /api/monitors/{id}/results

Get recent check results.

ParameterTypeDefaultDescription
limitinteger20Number of results

Response:

{
  "results": [
    {
      "timestamp": "2024-01-15T10:30:00Z",
      "status": "up",
      "responseTime": 142,
      "statusCode": 200,
      "location": "us-east"
    }
  ]
}

GET /api/monitors/{id}/stats

Get performance statistics.

Response:

{
  "uptimePercent": 99.95,
  "avgResponseTime": 156.3,
  "p95ResponseTime": 342.1,
  "totalChecks": 8640,
  "successfulChecks": 8636,
  "failedChecks": 4
}

Variables

GET /api/variables

List all project variables. Secret values are redacted.

POST /api/variables

Create a variable.

Body:

{
  "key": "API_BASE_URL",
  "value": "https://api.example.com",
  "isSecret": false,
  "description": "Base URL for API tests"
}

GET /api/variables/{id}

Get a variable by ID.

PUT /api/variables/{id}

Update a variable.

Body:

{
  "key": "API_BASE_URL",
  "value": "https://api-v2.example.com",
  "isSecret": false
}

DELETE /api/variables/{id}

Delete a variable.


Tags

GET /api/tags

List all tags.

POST /api/tags

Create a tag.

Body:

{ "name": "production", "color": "#3B82F6" }

DELETE /api/tags/{id}

Delete a tag.


Notification Providers

GET /api/notification-providers

List notification providers.

POST /api/notification-providers

Create a notification provider.

Body:

{
  "name": "Slack Alerts",
  "type": "slack",
  "config": {
    "name": "Slack Alerts",
    "webhookUrl": "https://hooks.slack.com/services/..."
  }
}

Supported types: email, slack, webhook, telegram, discord, teams

GET /api/notification-providers/{id}

Get provider details.

PUT /api/notification-providers/{id}

Update a provider (full replacement).

Body:

{
  "name": "Updated Slack Alerts",
  "type": "slack",
  "config": {
    "name": "Updated Slack Alerts",
    "webhookUrl": "https://hooks.slack.com/services/..."
  }
}

DELETE /api/notification-providers/{id}

Delete a notification provider.

POST /api/notification-providers/test

Send a test notification to verify configuration.

Body:

{
  "type": "slack",
  "config": { "webhookUrl": "https://hooks.slack.com/services/..." }
}

Response:

{ "success": true, "message": "Test notification sent" }

Alerts

GET /api/alerts/history

View alert history.

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger50Items per page

Audit

GET /api/audit

View audit logs. Requires admin permissions.

ParameterTypeDescription
pageintegerPage number
limitintegerItems per page
actionstringFilter by action type

On this page