API reference

Appev REST API

The dashboard, the appev CLI, and CI integrations all use the same JSON API. Every resource route lives under /api. Request and response types are the shared @appev/shared types used across Appev.

Write endpoints that start work (POST /api/runs, check runs, reruns, suite runs) return 202 Accepted immediately. Poll the run or suite, or subscribe to webhooks.

Authentication

When API tokens are enabled for your workspace, send one as a bearer token. For links that cannot set headers (for example, opening a readable report in a browser), an access_token query parameter is also accepted.

curl
curl "$APPEV_API_URL/api/projects" \
  -H "Authorization: Bearer $APPEV_API_TOKEN"

Missing or invalid tokens return 401 with { "error": "Missing or invalid API token" }.

Errors and paging

Errors use standard HTTP status codes and a JSON body of the form { "error": "message" }. Examples: 400 for invalid input, 404 when a run's report is not available yet, 409 when running a disabled check.

List endpoints accept limit. Run lists page with before, and issue lists with offset. When more results exist, the response includes nextCursor; pass it back as before (runs) or offset (issues).

Projects

GET/api/projectsList projects
POST/api/projectsCreate a project
GET/api/projects/:projectIdGet a project
PATCH/api/projects/:projectIdUpdate fields, environments, instructions, gate policy, or notifications
DELETE/api/projects/:projectIdDelete a project
GET/api/projects/:projectId/runsRuns in a project
GET/api/projects/:projectId/issuesIssues in a project
POST /api/projectsjson
{
  "name": "Shop",
  "status": "on_track",
  "releaseDate": "2026-12-15T00:00:00.000Z",
  "environments": [
    { "name": "staging", "baseUrl": "https://staging.shop.example.com" }
  ],
  "instructions": [
    { "title": "Test accounts", "content": "Never use real customer emails." }
  ],
  "gatePolicy": { "allowPartial": false, "maxHighIssues": 2 },
  "notifications": {
    "webhookUrl": "https://hooks.example.com/appev",
    "githubRepo": "acme/shop"
  }
}

Secrets

Values are encrypted at rest and never returned. Listing returns names and timestamps only.

GET/api/projects/:projectId/secretsList secret names
PUT/api/projects/:projectId/secrets/:nameSet a secret: { "value": "…" }
DELETE/api/projects/:projectId/secrets/:nameDelete a secret

Checks

GET/api/checksList all checks
GET/api/projects/:projectId/checksList checks in a project
POST/api/projects/:projectId/checksCreate a check
GET/api/checks/:checkIdGet a check
PATCH/api/checks/:checkIdUpdate a check
DELETE/api/checks/:checkIdDelete a check
GET/api/checks/:checkId/runsRuns of a check
GET/api/checks/:checkId/issuesIssues found by a check
POST/api/checks/:checkId/runsRun a check (202)
POST /api/projects/:projectId/checksjson
{
  "name": "Checkout · starter plan",
  "targetUrl": "https://staging.shop.example.com/pricing",
  "task": "Buy the Starter plan as a new visitor using the sandbox test card",
  "successCriteria": [
    "Confirmation shows an order reference",
    "Starter plan is active in account settings"
  ],
  "constraints": ["Use only the card in TEST_CARD"],
  "outOfScope": ["Coupon codes"],
  "lens": "first-time visitor comparing plans on a laptop",
  "secretNames": ["TEST_CARD"],
  "tags": ["smoke", "revenue"],
  "priority": "critical"
}

Optional fields: storageStateSecret, fixtures, apiBaseUrl, environment, projectInstructionIds, enabled.

POST /api/checks/:checkId/runsjson
{
  "baseUrl": "https://pr-482.preview.shop.example.com",
  "candidate": {
    "commitSha": "4f2a9c1…",
    "branch": "feat/new-checkout",
    "pullRequest": "482",
    "buildUrl": "https://ci.example.com/builds/9921"
  }
}

Use one of targetUrl (replace the URL), baseUrl (swap the origin), or environment (a project environment).

Runs

GET/api/runsList runs. Filters: projectId, checkId, suiteRunId, status, verdict, hasReport
POST/api/runsStart an ad-hoc run (202)
GET/api/runs/:runIdGet status, verdict, gate, metrics, and report
DELETE/api/runs/:runIdDelete a finished run
POST/api/runs/:runId/cancelCancel a queued or running run
POST/api/runs/:runId/rerunStart a new run with the same inputs (202)
GET/api/runs/:runId/eventsEvent timeline
GET /api/runs/:runId (abridged)json
{
  "run": {
    "id": "65f1a8b9b7f5b2d6f4c4a333",
    "checkId": "65f1a6d3b7f5b2d6f4c4a222",
    "trigger": "check",
    "status": "completed",
    "verdict": "partial",
    "gate": {
      "decision": "fail",
      "reasons": ["Journey verdict is partial and partial results are not allowed"],
      "evaluatedAt": "2026-11-28T09:14:02.000Z"
    },
    "metrics": { "criteriaCount": 3, "criteriaMetCount": 2, "highIssueCount": 1, … },
    "durationMs": 184220
  }
}

Reports and artifacts

GET/api/runs/:runId/reportStructured report (404 until available)
GET/api/runs/:runId/narrative-reportReadable report as JSON with HTML
GET/api/runs/:runId/narrative-report.htmlReadable report, inline HTML
GET/api/runs/:runId/narrative-report/downloadReadable report as a download
GET/api/runs/:runId/artifactsList artifacts with type, path, and size
GET/api/runs/:runId/artifacts/{path}Download an artifact referenced by the report

A report contains status (passed | failed | partial | error), summary, criteria[] with met | not_met | unclear and evidence, issues[] with severity and reproduction steps, engagement, scenarios[] with steps, and artifacts[]. See an example on the features page.

Suite runs

GET/api/projects/:projectId/suite-runsList suite runs
POST/api/projects/:projectId/suite-runsStart a suite (202)
GET/api/suite-runs/:suiteRunIdSuite with counts, gate, and its runs
POST/api/suite-runs/:suiteRunId/cancelCancel remaining runs
POST /api/projects/:projectId/suite-runsjson
{
  "tags": ["smoke"],
  "baseUrl": "https://pr-482.preview.shop.example.com",
  "candidate": { "commitSha": "4f2a9c1…", "pullRequest": "482" }
}

Other filters: checkIds and environment. Only enabled checks run.

Schedules

GET/api/projects/:projectId/schedulesList schedules
POST/api/projects/:projectId/schedulesCreate: name, intervalMinutes, tags, environment, baseUrl, enabled
PATCH/api/schedules/:scheduleIdUpdate a schedule
DELETE/api/schedules/:scheduleIdDelete a schedule

Issues

GET/api/issuesList issues. Filters: projectId, checkId, status, severity (comma-separated)
GET/api/issues/:issueIdGet an issue with occurrences and reproduction
PATCH/api/issues/:issueIdTriage: { "status": "acknowledged", "ticketUrl": "…" }

Metrics

GET/api/projects/:projectId/metricsPass rate, verdict counts, issue counts, average duration, top failing checks. Optional from / to
GET/api/projects/:projectId/metrics/timeseriesDaily metric points
GET/api/dashboardWorkspace-wide summary for the dashboard

Webhooks

Set notifications.webhookUrl on a project to receive a POST when work finishes. Delivery failures are logged and do not affect the run.

TypePayload fields
run.finishedprojectId, runId, checkId, status, verdict, gate, candidate, url
suite.finishedprojectId, suiteRunId, trigger, counts, gate, candidate, runIds, url

Runs that belong to a suite only report through suite.finished. When a webhook secret is configured, verify the x-appev-signature header:

verify.jsjavascript
import { createHmac, timingSafeEqual } from 'node:crypto';

function isValidSignature(rawBody, header, secret) {
  const expected = `sha256=${createHmac('sha256', secret).update(rawBody).digest('hex')}`;
  return header?.length === expected.length && timingSafeEqual(Buffer.from(header), Buffer.from(expected));
}