Supercheck LogoSupercheck
Tests API

Create a test

Create a new test with a script. Supported types: browser (Playwright), api, performance (k6), database, custom.

POST
/api/tests

Authorization

bearerAuth
AuthorizationBearer <token>

Project-scoped CLI token (sck_live_* or sck_test_*) for documented API operations that accept bearer authentication. Interactive browser operations may require a session cookie. Trigger keys (sck_trigger_* / legacy job_*) are accepted only by job trigger endpoints.

In: header

Request Body

application/json

title*string
script?string

Test script content

type?string

Test type. Aliases accepted: playwrightbrowser, k6performance

Default"browser"
Value in"browser" | "api" | "performance" | "database" | "custom"
description?string
priority?string
Default"medium"
Value in"low" | "medium" | "high" | "critical"

Response Body

application/json

application/json

curl -X POST "https://demo.supercheck.dev/api/tests" \  -H "Content-Type: application/json" \  -d '{    "title": "Homepage Load Test"  }'
{
  "success": true,
  "test": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string",
    "title": "string",
    "description": "string",
    "priority": "low",
    "type": "browser",
    "script": "string",
    "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
    "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
    "tags": [
      {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string",
        "color": "string"
      }
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}
{
  "error": "Unauthorized"
}