Getting Started

Welcome to the bugAgent API

The bugAgent REST API gives you full programmatic access to bug reports, feature requests, enhancements, projects, API keys, user profiles, and more. Everything available in the dashboard and MCP tools is accessible via the API.

💡
MCP + REST — bugAgent also supports the Model Context Protocol for AI agent integrations. The REST API and MCP tools share the same feature set.

Introduction

The bugAgent API is organized around REST. It accepts JSON-encoded request bodies, returns JSON responses, and uses standard HTTP methods and status codes.

All API requests must include a Content-Type: application/json header for requests with a body. Responses always return Content-Type: application/json.

🔐

Secure

All requests over HTTPS. API keys are SHA-256 hashed at rest.

Fast

Sub-100ms responses for most endpoints. Built on edge infrastructure.

🤖

Agent-Friendly

Designed for both human and AI agent consumption. Consistent JSON schemas.

Base URL

All API endpoints are relative to the base URL:

Base URL
https://app.bugagent.com/api

For example, to list bug reports:

Example
GET https://app.bugagent.com/api/reports

Authentication

The API supports two authentication methods:

API Key (recommended)

Generate an API key from the dashboard settings or via the POST /api/keys endpoint. Include it as a Bearer token:

cURL
curl https://app.bugagent.com/api/reports \
  -H "Authorization: Bearer ba_live_your_key_here"
⚠️
Keep your API key secret. Do not expose it in client-side code, public repos, or browser requests. API keys have full access to your account.

Session Cookie

If you're authenticated via the dashboard (browser session), API requests from the same origin automatically use your session cookie. This is used by the dashboard frontend.

Error Handling

The API uses standard HTTP status codes and returns errors as JSON:

Error Response
{
  "error": "Description of what went wrong"
}
CodeMeaning
200Success
201Created
400Bad request — invalid or missing parameters
401Unauthorized — missing or invalid authentication
403Forbidden — insufficient permissions
404Not found — resource doesn't exist or you don't have access
409Conflict — resource already exists
413Payload too large
422Unprocessable — validation failed
500Internal server error

Available SDKs

Official SDKs are coming soon for popular languages:

🟢

Node.js / TypeScript

Coming soon

🐍

Python

Coming soon

🦀

Rust

Coming soon

Go

Coming soon

In the meantime, you can use any HTTP client to interact with the API, or connect via the MCP server for AI agent workflows.

Contribute

We welcome contributions to our SDKs. If you have any suggestions or improvements, please feel free to open a pull request!

If you have any other languages you would like us to support, please reach out to us at hello@bugagent.com.

License

All of our SDKs are open source and available under the MIT License. You are free to use, modify, and distribute them in your own projects.

API Endpoints
POST /api/auth/register Public

Register a new agent account. Accounts created via this endpoint are automatically flagged as is_agent: true. A unique organization is created for each new account.

⚠️
Rate limited: 5 attempts per 15 minutes per email address.

Request Body

email required
string — Valid email address for the new account
password required
string — Password (8-128 characters)
full_name optional
string — Display name (max 200 characters)

Response

201 Created
{
  "userId": "uuid",
  "email": "agent@example.com"
}
POST /api/auth/login Public

Sign in and receive a JWT access token. Use the returned token as a Bearer token for subsequent requests, or generate a long-lived API key instead.

⚠️
Rate limited: 5 attempts per 15 minutes per email address.

Request Body

email required
string — Account email
password required
string — Account password

Response

200 OK
{
  "userId": "uuid",
  "email": "agent@example.com",
  "accessToken": "eyJhbG...",
  "refreshToken": "refresh_...",
  "expiresAt": 1711234567
}
GET /api/reports Auth Required

List bug reports for the authenticated user's account and team. Returns reports in reverse chronological order.

Query Parameters

type optional
string — Filter by type: ui, performance, crash, security, logic, data, network, accessibility, compatibility, functional, ui-ux, data-integrity, feature-request, enhancement, technical-debt, documentation, devops, ux-improvement, integration
severity optional
string — Filter by severity: critical, high, medium, low
search optional
string — Search title and description
limit optional
integer — Max results (default 20, max 100)
offset optional
integer — Pagination offset (default 0)

Example

cURL
curl "https://app.bugagent.com/api/reports?type=crash&limit=10" \
  -H "Authorization: Bearer ba_live_..."
POST /api/reports Auth Required

Create a new report. Supports bugs, feature requests, enhancements, technical debt, and more. If type is omitted, bugAgent auto-classifies based on title and description.

Request Body

title required
string — Bug report title (3-500 characters)
description optional
string — Detailed description
type optional
string — Report type: ui, performance, crash, security, logic, data, network, accessibility, compatibility, functional, ui-ux, data-integrity, feature-request, enhancement, technical-debt, documentation, devops, ux-improvement, integration. Auto-classified if omitted.
severity optional
string — critical, high, medium (default), low
project optional
string — Project slug or name (defaults to team's default project)
environment optional
object — { browser, os, device, url }
metadata optional
object — Arbitrary key-value metadata
format_description optional
boolean — When true, the description is reformatted into a structured bug template using AI before saving. Defaults to false.
time_spent_seconds optional
integer — Time spent in seconds. Used for tracking QA effort. The timer on the dashboard saves exact seconds. Defaults to 0.

Response

201 Created
{
  "id": "uuid",
  "title": "Login button unresponsive on iOS",
  "type": "ui",
  "severity": "high",
  "classification": { "type": "ui", "confidence": 0.85 },
  "quality_score": 7,
  "quality_breakdown": {
    "reproduction_steps": 0.9,
    "expected_vs_actual": 0.8,
    "environment_details": 0.7,
    "evidence": 0.6,
    "root_cause_analysis": 0.5,
    "impact_assessment": 0.8,
    "context_and_history": 0.6,
    "heuristics_and_oracles": 0.7,
    "clarity_and_structure": 0.9,
    "actionability": 0.8
  },
  "created_at": "2026-03-17T12:00:00Z",
  ...
}
POST /api/reports/format-description Auth Required

Reformat a bug report description into a structured bug template using AI. Returns the formatted description text without modifying the report. Use this to preview the AI formatting before saving.

Request Body

description required
string — The raw description text to format
title optional
string — Bug title for additional context when formatting

Response

200 OK
{ "formatted": "## Summary\nLogin button is unresponsive...\n\n## Steps to Reproduce\n1. Navigate to...\n\n## Expected Behavior\n...\n\n## Actual Behavior\n..." }
GET /api/reports/:id Auth Required

Retrieve a single bug report by ID. Returns 404 if the report doesn't exist or you don't have access.

Response Fields (includes all standard fields plus)

quality_score
integer (1–10) — Overall report quality rating calculated automatically using context-driven testing heuristics. Visual badges: red (1–3), amber (4–6), green (7–10).
quality_breakdown
object — Individual dimension scores (each 0.0–1.0): reproduction_steps, expected_vs_actual, environment_details, evidence, root_cause_analysis, impact_assessment, context_and_history, heuristics_and_oracles, clarity_and_structure, actionability.
PATCH /api/reports/:id Auth Required

Update a bug report. Only fields you include in the body are updated.

Request Body

title, description, type, severity, status, internal_notes
Any of these fields can be included to update. internal_notes are private and not synced to Jira.
time_spent_seconds optional
integer — Time spent in seconds. Used for tracking QA effort. The timer on the dashboard saves exact seconds.
POST /api/reports/upload Auth Required

Upload file attachments (screenshots, videos, documents) to a bug report. Uses multipart/form-data.

Form Fields

reportId required
string — ID of the report to attach files to
files required
File[] — Up to 10 files, 10MB each, 50MB total. Supported: PNG, JPEG, GIF, WebP, MP4, WebM, PDF, TXT, CSV
POST /api/reports/flush Auth Required

Bulk delete old bug reports. Requires owner or admin team role.

Request Body

months required
integer — Delete reports older than N months (1, 2, or 3)
project_id optional
string — Scope to a specific project

Response

200 OK
{ "deleted": 42 }
POST /api/reports/comments Auth Required

Add a comment to a bug report, or toggle an emoji reaction on a comment.

Create Comment

report_id required
string — Report to comment on
content required
string — Comment text (max 10,000 characters)

Toggle Reaction

action required
"react"
comment_id required
string — Comment to react to
emoji required
string — Emoji character
PATCH /api/reports/comments Auth Required

Edit a comment. Only the author can edit their own comments.

comment_id required
string
content required
string — Updated comment text
DELETE /api/reports/comments Auth Required

Delete a comment. Only the author can delete their own comments.

comment_id required
string
GET /api/projects Auth Required

List all projects for your team.

POST /api/projects Auth Required

Create a new project. The first project is automatically set as default. Subject to plan limits.

Request Body

name required
string — Project name (auto-generates slug)
description optional
string
is_default optional
boolean — Set as default project for new reports
PATCH /api/projects Auth Required

Update a project's name, description, or default status.

id required
string — Project ID
name, description, is_default
Fields to update
DELETE /api/projects Owner / Manager

Permanently delete a project and all associated data. Only owners and managers can delete projects. You cannot delete your last project — every organization must have at least one.

Request Body (JSON)

id required
string — Project ID to delete

What Gets Deleted

⚠️
This action is irreversible. The following data is permanently removed:
  • All bug reports and their media attachments (storage freed)
  • Web automations, runs, and schedules
  • Mobile apps, automations, runs, and schedules (binaries purged from storage)
  • Test cases, test suites, test runs, and results
  • Geo-Snap screenshots
  • Notes and time tracking entries

Important Behavior

Team members
All team members remain in the organization and retain access to other projects.
Default project
If the deleted project was the default, the oldest remaining project is automatically promoted.
Storage quota
Team storage usage is decremented by the total size of purged files (attachments + mobile app binaries).

Errors

403
Only owners and managers can delete projects.
400
Cannot delete your last project. You must always have at least one.
404
Project not found or does not belong to this team.
GET /api/keys Auth Required

List your active (non-revoked) API keys. Only the key prefix is returned — full keys are shown once at creation.

POST /api/keys Auth Required

Generate a new API key. The full key (starting with ba_live_) is returned only once — store it securely.

Request Body

name required
string — A label for this key (e.g., "CI Pipeline")
scopes optional
string[] — Defaults to ["reports:read", "reports:write"]

Response

201 Created
{
  "key": "ba_live_abc123...",
  "id": "uuid",
  "name": "CI Pipeline",
  "key_prefix": "ba_live_abc123",
  "scopes": ["reports:read", "reports:write"],
  "created_at": "2026-03-17T12:00:00Z"
}
DELETE /api/keys/:id Auth Required

Revoke an API key. The key is soft-deleted and can no longer be used for authentication.

POST /api/keys/:id/regenerate Auth Required

Revoke the current key and generate a new one with the same name and scopes. Returns the new full key.

GET /api/profile Auth Required

Get the authenticated user's profile.

Response

200 OK
{
  "id": "uuid",
  "email": "user@example.com",
  "full_name": "Jane Smith",
  "avatar_url": null,
  "plan": "pro",
  "is_agent": false,
  "created_at": "2026-03-10T08:00:00Z"
}
PATCH /api/profile Auth Required

Update your profile. Only full_name can be changed via the API (security: no email, role, or plan changes).

full_name
string — Display name
POST /api/profile/password Auth Required

Change your password.

password required
string — New password (min 8 characters)
GET /api/settings Auth Required

Get your profile info and notification preferences.

Response

200 OK
{
  "fullName": "Jane Smith",
  "email": "user@example.com",
  "isAgent": false,
  "plan": "pro",
  "notifications": {
    "emailNewReport": true,
    "emailUsageWarning": true,
    "emailWeeklyDigest": false
  }
}
PATCH /api/settings Auth Required

Update notification preferences.

email_usage_warning optional
boolean
GET /api/usage Auth Required

Get your current plan usage (reports used, limit, remaining, reset date).

Response

200 OK
{
  "used": 47,
  "limit": 5000,
  "remaining": 4953,
  "plan": "pro",
  "period": "monthly",
  "resetsAt": "2026-04-01T00:00:00Z"
}
GET /api/stats Auth Required

Get report statistics with daily counts, breakdowns by type, severity, and status.

Query Parameters

days optional
integer — Number of days to look back (default 30, max 365)

Response

200 OK
{
  "period": "30 days",
  "total": 127,
  "daily": [
    { "date": "2026-02-16", "count": 3 },
    { "date": "2026-02-17", "count": 5 },
    ...
  ],
  "byType": { "ui": 42, "crash": 18, "logic": 67, "feature-request": 12, "enhancement": 8 },
  "bySeverity": { "high": 23, "medium": 89, "low": 15 },
  "byStatus": { "open": 95, "resolved": 32 }
}
POST /api/checkout Auth Required

Create a Stripe checkout session to upgrade your plan. Returns a URL to redirect the user to.

Request Body

plan required
string — "pro" or "team"
billing optional
string — "monthly" (default) or "annual"

Response

200 OK
{ "url": "https://checkout.stripe.com/..." }
POST /api/billing-portal Auth Required

Get a URL to the Stripe billing portal where users can manage subscriptions, payment methods, and invoices.

Response

200 OK
{ "url": "https://billing.stripe.com/..." }
POST /dashboard/settings/team Manager+

Invite a user to your team. Sends an email invitation with a 5-day expiry. Invited users join the inviting organization directly — no separate org is created.

Form Data

action required
string — "invite"
email required
string — Email address to invite
role optional
string — "contributor" (default), "manager", or "owner". Managers can only invite contributors and managers.
👥
Users already in your organization cannot be invited again. Users in different organizations can be invited — they will belong to multiple orgs. Pending invitations appear inline in the members list with a pending status badge. Managers can resend (resets the 5-day expiry) or cancel invitations. Cancelled invitations become invalid immediately.
POST /dashboard/settings/team Manager+

Edit a team member's display name inline. Owners and admins can edit any non-owner member. Managers can edit contributors and other managers but not owners or admins.

Form Data

action required
string — "edit_name"
member_id required
string — Team member record ID
new_name required
string — New display name (1-200 characters)
POST /dashboard/settings/team Manager+

Change a team member's role. Managers can assign contributor or manager roles. Only owners/admins can assign admin. Owner role can only be changed via ownership transfer.

Form Data

action required
string — "change_role"
member_id required
string — Team member record ID
new_role required
string — "contributor", "manager", or "admin"
POST /dashboard/settings/team Owner / Manager

Remove a team member from the organization. Only owners and managers can remove members. Owners cannot be removed. All data created by the removed user (bug reports, automations, test cases, mobile apps, geo snaps, schedules, time tracking) is reassigned to the person performing the removal. Notes are deleted. The user's profile is preserved as a ghost stub for foreign-key integrity and re-invite capability.

Form Data

action required
string — "remove_member"
member_id required
string — Team member record ID
👥
Removed users who are later re-invited will rejoin the organization with a fresh membership. Their ghost profile ensures historical records (e.g. “created by”) remain intact.
POST /api/switch-team Auth Required

Switch the active organization context. Users who belong to multiple organizations use this to change which org's data they see.

Request Body (JSON)

teamId required
string — Team ID to switch to (must be a team the user belongs to)
POST /api/create-team Auth Required

Create a new organization (team). Available to Pro and Team plan users. If no name is provided, a unique uplifting name is auto-generated (e.g. "Radiant Foxes"). A Default Project is automatically created so the organization always has at least one project.

Request Body (JSON)

name optional
string — Custom organization name. Must be 2–50 characters. Auto-generated if omitted.

Response

{
  "success": true,
  "team": {
    "id": "uuid",
    "name": "Radiant Foxes",
    "plan": "pro"
  }
}

Errors

403
Free plan users cannot create organizations. Upgrade to Pro or Team first.
409
An organization with that name already exists.
400
Name must be between 2 and 50 characters.
Skills & Integrations

Skills Overview

bugAgent Skills connect external tools into your QA workflow via OAuth or API keys. Each Skill enriches the context engine with data from services your team already uses — syncing code, pulling analysis, and bridging issue trackers.

Available Skills

SkillConnectionDescription
GitHubOAuthSync repositories for Playwright automation scripts. See GitHub endpoints.
JiraOAuth 2.0Bi-directional bug sync with comments, attachments, and severity. See Jira endpoints.
ClaudeAPI KeyRoot cause analysis for bug reports. See Claude endpoints.
SlackWebhookNotifications for new reports, automation results, and team activity.

Enabling Skills

Navigate to Settings → Integrations in the dashboard. Each Skill has its own connection flow. Once connected, configure per-project settings such as auto-push for Claude, repository mapping for GitHub, or default project for Jira.

Building Custom Skills

Partners can build custom Skills that interact with bugAgent programmatically. Use the REST API endpoints documented below — reports, automation, projects, and team management — to create integrations that feed data into or out of bugAgent. To propose a new Skill, contact support@bugagent.com.

👥
Jira connections are team-scoped. One connection is shared by all team members. Any member can sync reports; only managers and above can connect, configure, or disconnect. If the connecting user leaves, the integration persists. Auto-sync polls Jira periodically for changes and syncs comments, attachments, and severity (last-updated-wins) automatically. Use the force sync button on any report for an immediate full sync.
GET /api/jira/connect Manager+

Start the Jira OAuth 2.0 flow. Redirects to Atlassian's authorization page. The resulting connection is stored against the user's active team, not the individual user.

🔗
This is a browser redirect endpoint, not a JSON API. Navigate to it directly from a browser.
GET /api/jira/projects Auth Required

Fetch all Jira projects accessible by the team's shared connection. Used to populate the project dropdown when pushing a report to Jira for the first time. Returns the default project key if one is saved.

Response

{
  "projects": [
    { "id": "10001", "key": "BUG", "name": "Bug Tracker", "avatar": "https://..." },
    { "id": "10002", "key": "PROJ", "name": "Main Project", "avatar": "https://..." }
  ],
  "defaultProjectKey": "BUG"
}
POST /api/jira/sync Auth Required

Sync a bug report to Jira using the team's shared connection. Creates a Jira issue with mapped fields, labels, and uploads any attachments. Severity is mapped to Jira priority (critical→Highest, high→High, medium→Medium, low→Low). Any authenticated team member can sync.

Request Body

reportId required
string — Bug report ID
projectKey optional
string — Jira project key (uses default if omitted)

Response

200 OK
{
  "success": true,
  "jiraKey": "PROJ-1234",
  "jiraUrl": "https://your-site.atlassian.net/browse/PROJ-1234"
}
POST /api/jira/force-sync Auth Required

Force an immediate bi-directional sync between bugAgent and Jira. Triggered by the sync button next to the AUTO SYNC badge on the report detail page. Syncs description, title, severity/priority, comments, and media attachments.

Request Body

reportId required
string — Bug report ID (must already be linked to a Jira issue)

Sync Behavior

Severity / Priority
Last updated wins. Compares report.updated_at vs Jira fields.updated — whichever platform was modified more recently determines the value. The other side is updated automatically.
Description & Title
Pushed from bugAgent to Jira. Environment metadata is appended if not already structured.
Comments
Bi-directional. Local comments without a jira_comment_id are pushed to Jira. Jira comments not in bugAgent are pulled in. Comments originating from bugAgent (prefixed [bugAgent]) are not re-imported.
Media / Attachments
Bi-directional. Local media is uploaded to Jira; Jira attachments are downloaded to Supabase storage. Deduplicated by filename (case-insensitive) and jira_attachment_id to prevent duplicates across sync cycles.

Response

200 OK
{
  "success": true,
  "results": [
    "Description synced",
    "Priority pushed to Jira (high — last updated)",
    "2 comment(s) pushed to Jira",
    "1 attachment(s) pulled from Jira"
  ]
}
GET /api/jira/check Auth Required

Check if a synced Jira issue has been modified. Compares title, severity, status, and type between bugAgent and Jira. Severity uses last-updated-wins logic and is auto-applied during polling. Comments and attachments are synced bi-directionally via the auto-sync polling and force-sync endpoints.

Query Parameters

reportId required
string — Bug report ID (must have a jira_key)

Response

200 OK
{
  "hasChanges": true,
  "jiraUpdatedAt": "2026-03-18T15:30:00.000Z",
  "changes": {
    "title": { "jira": "Updated title in Jira", "bugagent": "Original title" },
    "severity": { "jira": "high", "bugagent": "medium" }
  }
}
POST /api/jira/merge Auth Required

Bi-directional merge between bugAgent and Jira. Updates bugAgent with the chosen values, then pushes them to Jira so both systems are identical. Severity is mapped to Jira priority. For automatic conflict resolution, use /api/jira/force-sync which applies last-updated-wins logic.

Request Body

reportId required
string — Bug report ID
merged required
object — Fields to sync: title, severity, status, type. Each value is the chosen winner (from bugAgent or Jira).
POST /api/jira/settings Manager+

Update the team's Jira integration settings or disconnect. Only managers and above can modify these settings.

Request Body

action required
string — "update_settings" or "disconnect"
auto_push optional
boolean — Auto-sync new reports to Jira
default_project_key optional
string — Default Jira project key
POST /api/jira/batch-sync-status Auth Required

Batch-sync report statuses with Jira. Used by the Kanban board to push status changes after drag-and-drop reordering. Fetches the latest Jira status for each report and reconciles any differences.

Request Body

report_ids required
array of UUIDs — The bug report IDs to sync with Jira

Response

200 OK
{
  "updates": [
    {
      "id": "uuid",
      "old_status": "new",
      "new_status": "in_progress",
      "jira_status": "In Progress"
    }
  ],
  "synced": 1
}
Automation
🤖
Automation requires a Pro or Team plan. Record browser actions via the FAB SDK, generate Playwright scripts with AI, or create automations directly with a custom Playwright script. Run them on demand, scheduled, or in CI/CD pipelines. Pro and Team plans also include an automation coverage mind map on the dashboard.
POST /api/automations Auth Required

Create a new automation. Stores the recorded steps, generated Playwright script, and optional schedule. The automation is scoped to the user's active team.

Request Body

name required
string — Human-readable name for the automation
steps required
array — Recorded browser action steps from the FAB SDK
script optional
string — Generated Playwright script (can also be generated later via /generate-script)
schedule optional
string — Cron expression for scheduled runs (e.g. "0 9 * * 1-5")
start_url optional
string — URL where the automation begins

Response

201 Created
{
  "id": "uuid",
  "name": "Login flow smoke test",
  "steps": [ ... ],
  "script": "import { test } from '@playwright/test'; ...",
  "schedule": "0 9 * * 1-5",
  "start_url": "https://app.example.com/login",
  "status": "active",
  "team_id": "uuid",
  "created_by": "uuid",
  "created_at": "2026-03-21T12:00:00Z",
  "updated_at": "2026-03-21T12:00:00Z"
}
POST /api/automations/create Auth Required

Create a new automation with a custom Playwright script. Unlike POST /automations which expects recorded FAB steps, this endpoint lets you supply a script directly — ideal for hand-written tests, AI-generated scripts, or scripts imported from an existing test suite.

Duplicating an Automation

To duplicate an existing automation, fetch its details via GET /api/automations/:id, then call this endpoint with the original's script, target_url, and project_id. Set name to "[Copy] Original Name". The duplicate starts in "draft" status and does not inherit version history or run history from the original.

Request Body

name required
string — Name of the automation
target_url optional
string — Target URL the script tests
script optional
string — Playwright test script content. Defaults to a placeholder template if not provided.
status optional
string — "active" or "draft". Default: "draft"
project_id optional
string — Project to assign the automation to. Uses the default project if omitted.

Authentication

Requires session authentication (dashboard) or an API key with automations:write scope.

Plan

Pro or Team plan required.

Response

201 Created
{
  "id": "uuid"
}
GET /api/automations Auth Required

List all automations for the user's active team. Supports pagination and filtering by status.

Query Parameters

status optional
string — Filter by status: active, paused, archived
project_id optional
string — Filter automations by project ID
created_by optional
string — Filter automations by creator's user ID
page optional
number — Page number (default: 1)
limit optional
number — Results per page (default: 20, max: 100)

Response

200 OK
{
  "automations": [
    {
      "id": "uuid",
      "name": "Login flow smoke test",
      "status": "active",
      "project_id": "proj_uuid",
      "created_by": "user_uuid",
      "schedule": "0 9 * * 1-5",
      "last_run_at": "2026-03-21T09:00:00Z",
      "last_run_status": "passed",
      "run_count": 42,
      "created_at": "2026-03-20T12:00:00Z"
    }
  ],
  "total": 5,
  "page": 1,
  "limit": 20
}
GET /api/automations/:id Auth Required

Get full details of a single automation, including recorded steps, generated Playwright script, schedule, and recent run history.

Response

200 OK
{
  "id": "uuid",
  "name": "Login flow smoke test",
  "steps": [
    { "action": "navigate", "url": "https://app.example.com/login" },
    { "action": "fill", "selector": "#email", "value": "test@example.com" },
    { "action": "fill", "selector": "#password", "value": "********" },
    { "action": "click", "selector": "button[type=submit]" },
    { "action": "assert", "selector": ".dashboard-title", "text": "Welcome" }
  ],
  "script": "import { test, expect } from '@playwright/test'; ...",
  "schedule": "0 9 * * 1-5",
  "start_url": "https://app.example.com/login",
  "status": "active",
  "team_id": "uuid",
  "created_by": "uuid",
  "created_at": "2026-03-20T12:00:00Z",
  "updated_at": "2026-03-21T08:00:00Z",
  "recent_runs": [
    { "id": "uuid", "status": "passed", "duration_ms": 4200, "started_at": "2026-03-21T09:00:00Z" }
  ]
}
PATCH /api/automations/:id Auth Required

Update an existing automation. Only provided fields are changed. Use this to rename, update the script, change the schedule, or pause/resume.

Request Body

name optional
string — New name
steps optional
array — Updated recorded steps
script optional
string — Updated Playwright script
schedule optional
string | null — Cron expression or null to remove schedule
status optional
string — active, paused, or archived

Response

200 OK
{
  "id": "uuid",
  "name": "Login flow smoke test (updated)",
  "status": "paused",
  "schedule": null,
  "updated_at": "2026-03-21T14:00:00Z"
}
DELETE /api/automations/:id Auth Required

Permanently delete an automation and all its associated run history. This action cannot be undone.

Response

200 OK
{ "deleted": true }
POST /api/automations/generate-script Auth Required

Generate a Playwright script from recorded browser steps using AI. The generated script includes assertions, error handling, and is ready to run. Optionally saves the script to an existing automation.

Request Body

steps required
array — Recorded browser action steps from the FAB SDK
automation_id optional
string — If provided, saves the generated script to this automation
start_url optional
string — Starting URL for the test

Response

200 OK
{
  "script": "import { test, expect } from '@playwright/test';\n\ntest('Login flow smoke test', async ({ page }) => {\n  await page.goto('https://app.example.com/login');\n  await page.fill('#email', 'test@example.com');\n  await page.fill('#password', '********');\n  await page.click('button[type=submit]');\n  await expect(page.locator('.dashboard-title')).toContainText('Welcome');\n});",
  "automation_id": "uuid"
}
POST /api/automations/:id/optimize Auth Required

Send a Playwright script to Sonnet 4 for AI-powered optimization. Applies a 12-point checklist that automatically fixes selectors, wait strategies, assertions, error handling, auth patterns, mobile compatibility, and strict mode issues. The current script version is saved before optimization so you can undo the change.

URL Parameters

id required
string — The automation ID to optimize

Response

200 OK
{
  "script": "// optimized Playwright script...",
  "version": 3,
  "changes_summary": "Fixed 4 issues: replaced fragile text selectors with data-testid, added explicit waitForLoadState, improved assertions with toBeVisible, added error recovery for auth flow."
}
POST /api/automations/:id/undo Auth Required

Revert the automation script to its previous version. Up to 10 previous versions are retained. Versions are saved before manual edits, AI optimization, and script regeneration.

URL Parameters

id required
string — The automation ID to undo

Response

200 OK
{
  "script": "// previous version of the script...",
  "version": 2,
  "versions_remaining": 1
}
400 Bad Request
{ "error": "No previous versions available to undo" }
POST /api/automations/runs Auth Required

Trigger an on-demand run of an automation. The run is queued and executed asynchronously. Poll GET /api/automations/runs or use the returned run ID to check status.

Request Body

automation_id required
string — Automation to run
environment optional
object — Environment variables passed to the Playwright script
device optional
string — Device to emulate during the test run (Virtual mode). Controls viewport size, user agent, and mobile mode. Default: "desktop"
browserstack optional
boolean — Set to true to run on a real BrowserStack browser instead of the local runner. Requires bs_browser, bs_os, bs_os_version.
bs_browser optional
string — BrowserStack browser: "chrome", "firefox", "safari", "edge"
bs_os optional
string — BrowserStack OS: "Windows" or "OS X"
bs_os_version optional
string — OS version: "11" (Windows) or "Sonoma" (macOS)
Available device values
CategoryValueViewport
Laptops & Desktopsdesktop1280×800
macbook-air1440×900
macbook-pro-141512×982
macbook-pro-161728×1117
dell-xps-131280×800
chromebook1366×768
1920x10801920×1080
2560x14402560×1440
3840x21603840×2160
iPhonesiphone-15-pro-max430×932
iphone-15393×852
iphone-14-pro-max430×932
iphone-14390×844
iphone-13390×844
iphone-12390×844
iphone-se375×667
Androidpixel-7412×915
pixel-6412×915
galaxy-s23360×780
galaxy-s22360×780
galaxy-s21360×800
galaxy-a54360×800
oneplus-11412×915
Tabletsipad768×1024
ipad-air820×1180
ipad-mini768×1024
ipad-pro1024×1366
galaxy-tab-s8800×1280
surface-pro912×1368

Response

202 Accepted
{
  "run_id": "uuid",
  "automation_id": "uuid",
  "status": "queued",
  "device": "desktop",
  "queued_at": "2026-03-21T14:30:00Z"
}
GET /api/automations/runs Auth Required

List automation runs for the user's active team. Filter by automation ID or status. Returns run results including duration, pass/fail status, and any error output.

Query Parameters

automation_id optional
string — Filter runs for a specific automation
status optional
string — Filter by status: queued, running, passed, failed, cancelled
page optional
number — Page number (default: 1)
limit optional
number — Results per page (default: 20, max: 100)

Response

200 OK
{
  "runs": [
    {
      "id": "uuid",
      "automation_id": "uuid",
      "automation_name": "Login flow smoke test",
      "status": "passed",
      "duration_ms": 4200,
      "started_at": "2026-03-21T09:00:00Z",
      "finished_at": "2026-03-21T09:00:04Z",
      "error": null
    },
    {
      "id": "uuid",
      "automation_id": "uuid",
      "automation_name": "Checkout flow",
      "status": "failed",
      "duration_ms": 8500,
      "started_at": "2026-03-21T09:00:00Z",
      "finished_at": "2026-03-21T09:00:08Z",
      "error": "Timeout waiting for selector '#confirm-btn'"
    }
  ],
  "total": 42,
  "page": 1,
  "limit": 20
}
POST /api/v1/automations/run API Key

Trigger an automation run from CI/CD pipelines. Authenticates via API key instead of session token. Designed to be called from GitHub Actions, GitLab CI, or any CI/CD system. Returns immediately with a run ID for polling.

Request Body

automation_id required
string — Automation to run
environment optional
object — Environment variables passed to the Playwright script
callback_url optional
string — Webhook URL to POST results to when the run completes
device optional
string — Device to emulate during the test run. Controls viewport size, user agent, and mobile mode. Default: "desktop". See POST /automations/runs for the full list of supported device values.

Headers

Authorization required
Bearer ba_live_... — API key with automations:run scope

Response

202 Accepted
{
  "run_id": "uuid",
  "automation_id": "uuid",
  "status": "queued",
  "device": "desktop",
  "poll_url": "/api/v1/automations/runs/uuid",
  "queued_at": "2026-03-21T14:30:00Z"
}
GET /api/v1/automations/runs/:id API Key

Poll the status of a CI/CD automation run. Returns the current status, duration, and any error output. Use this to wait for completion in CI/CD scripts.

Headers

Authorization required
Bearer ba_live_... — API key with automations:run scope

Response

200 OK
{
  "id": "uuid",
  "automation_id": "uuid",
  "automation_name": "Login flow smoke test",
  "status": "passed",
  "duration_ms": 4200,
  "started_at": "2026-03-21T09:00:00Z",
  "finished_at": "2026-03-21T09:00:04Z",
  "error": null,
  "trace_url": "https://bugagent.com/traces/uuid",
  "screenshots": [
    { "step": "login-success", "url": "https://storage.bugagent.com/screenshots/uuid.png" }
  ]
}
GitHub Integration
GitHub integration is available on Pro and Team plans. Connect your GitHub account to automatically push Playwright automation scripts to your repositories. Scripts are saved to tests/bugagent/{name}.spec.ts and stay in sync on every edit.
POST /api/github/connect Auth Required

Initiate the GitHub OAuth flow. Returns a redirect URL that opens the GitHub authorization page. Once the user authorizes, GitHub redirects back to bugAgent with an installation token. Connect from Settings → Integrations in the dashboard.

Request Body

redirect_uri optional
string — Custom redirect URI after OAuth completes. Defaults to the dashboard integrations page.

Response

200 OK
{
  "authorization_url": "https://github.com/login/oauth/authorize?client_id=...",
  "state": "random-state-token"
}
GET /api/github/repos Auth Required

List all GitHub repositories accessible via the connected GitHub account. Use this to select which repo to map to a bugAgent project.

Response

200 OK
{
  "repos": [
    {
      "id": 123456,
      "full_name": "acme/web-app",
      "default_branch": "main",
      "private": true
    }
  ]
}
POST /api/github/mapping Auth Required

Map a bugAgent project to a GitHub repository. Once mapped, Playwright automation scripts created or updated in that project are automatically pushed to tests/bugagent/{name}.spec.ts in the target repo. Deleting or archiving an automation removes the file from the repo.

Request Body

project_id required
string — The bugAgent project ID to map
repo_full_name required
string — GitHub repo in owner/repo format (e.g. acme/web-app)
branch optional
string — Target branch. Defaults to the repo's default branch.
path_prefix optional
string — Directory path for scripts. Defaults to tests/bugagent.

Response

200 OK
{
  "mapping_id": "uuid",
  "project_id": "uuid",
  "repo_full_name": "acme/web-app",
  "branch": "main",
  "path_prefix": "tests/bugagent",
  "created_at": "2026-03-22T10:00:00Z"
}
GET /api/github/status Auth Required

Check the current GitHub connection status and project-to-repo mappings for the authenticated user's organization. Also returns recent sync history and any SHA conflict errors.

Response

200 OK
{
  "connected": true,
  "github_username": "acme-dev",
  "mappings": [
    {
      "project_id": "uuid",
      "project_name": "Web App",
      "repo_full_name": "acme/web-app",
      "branch": "main",
      "path_prefix": "tests/bugagent",
      "last_sync_at": "2026-03-22T09:45:00Z",
      "sync_status": "ok"
    }
  ]
}

Notes

  • If sync_status is sha_conflict, the remote file was modified outside bugAgent. Use POST /api/github/mapping to re-map and force a fresh push, or resolve the conflict in GitHub first.
  • Scripts are pushed to {path_prefix}/{automation-name}.spec.ts using the GitHub Contents API.
DELETE /api/github/disconnect Auth Required

Disconnect the GitHub integration. Removes the OAuth token and all project-to-repo mappings. Scripts already pushed to GitHub are not deleted.

Response

200 OK
{
  "disconnected": true
}
Notes
📝
Notes are available on all plans (Free, Pro, Team). Capture testing observations, meeting notes, and session logs in 5 formats: Markdown, Plain Text, Rich Text, Checklist, and Outline. Includes voice-to-text dictation, time tracking, file attachments, and private or shared visibility.
GET /api/notes Auth Required

List notes for the authenticated user's team. Returns notes the user owns or notes with shared visibility. Supports keyword search, project filtering, author filtering, and date range filtering.

Query Parameters

q optional
string — Keyword search across note titles and content
project_id optional
string — Filter by project UUID
author_id optional
string — Filter by author's user UUID
from optional
string — ISO 8601 date. Only return notes created on or after this date
to optional
string — ISO 8601 date. Only return notes created on or before this date
page optional
number — Page number (default: 1)
per_page optional
number — Results per page (default: 20, max: 100)

Response

200 OK
{
  "notes": [
    {
      "id": "uuid",
      "title": "Checkout flow observations",
      "format": "markdown",
      "visibility": "shared",
      "project_id": "uuid",
      "author_id": "uuid",
      "author_name": "Jane Smith",
      "time_spent_seconds": 1820,
      "attachments_count": 2,
      "created_at": "2026-03-22T10:00:00Z",
      "updated_at": "2026-03-22T10:30:00Z"
    }
  ],
  "total": 42,
  "page": 1,
  "per_page": 20
}
POST /api/notes Auth Required

Create a new note. If no title is provided, the first 30 characters of the content are used as the auto-title. Notes auto-save as you type in the dashboard, but this endpoint creates the initial note record.

Request Body

title optional
string — Note title (max 200 chars). Auto-generated from first 30 characters of content if omitted
content optional
string — Note content (max 100,000 chars)
format optional
string — markdown (default), plain_text, rich_text, checklist, outline
visibility optional
string — private (default) or shared. Private notes are only visible to the author. Shared notes are visible to all team members
project_id optional
string — Associate the note with a project UUID
time_spent_seconds optional
integer — Time spent in seconds. Used for tracking QA effort. The timer on the dashboard saves exact seconds. Defaults to 0

Response

201 Created
{
  "id": "uuid",
  "title": "Checkout flow observations",
  "content": "## Session 1\n- Payment form loads slowly...",
  "format": "markdown",
  "visibility": "private",
  "project_id": "uuid",
  "author_id": "uuid",
  "time_spent_seconds": 0,
  "attachments": [],
  "created_at": "2026-03-22T10:00:00Z",
  "updated_at": "2026-03-22T10:00:00Z"
}
GET /api/notes/:id Auth Required

Get full details of a single note including content and attachments. Returns the note only if the user is the author or the note has shared visibility within the same team.

Response

200 OK
{
  "id": "uuid",
  "title": "Checkout flow observations",
  "content": "## Session 1\n- Payment form loads slowly on 3G...",
  "format": "markdown",
  "visibility": "shared",
  "project_id": "uuid",
  "author_id": "uuid",
  "author_name": "Jane Smith",
  "time_spent_seconds": 1820,
  "attachments": [
    {
      "id": "uuid",
      "filename": "screenshot.png",
      "size_bytes": 245000,
      "mime_type": "image/png",
      "url": "https://storage.bugagent.com/notes/uuid/screenshot.png"
    }
  ],
  "created_at": "2026-03-22T10:00:00Z",
  "updated_at": "2026-03-22T10:30:00Z"
}
PATCH /api/notes/:id Auth Required

Update an existing note. Only provided fields are changed. Only the note author can update a note. The dashboard uses this endpoint for auto-save (triggered on content changes) and manual save (Save button or Cmd/Ctrl+S).

Request Body

title optional
string — Updated title
content optional
string — Updated content
format optional
string — Change format: markdown, plain_text, rich_text, checklist, outline
visibility optional
string — private or shared
project_id optional
string — Re-associate to a different project
time_spent_seconds optional
integer — Time spent in seconds. Used for tracking QA effort. The timer on the dashboard saves exact seconds.

Response

200 OK
{
  "id": "uuid",
  "title": "Checkout flow observations (updated)",
  "content": "...",
  "format": "markdown",
  "visibility": "shared",
  "time_spent_seconds": 2400,
  "updated_at": "2026-03-22T11:00:00Z"
}
DELETE /api/notes/:id Auth Required

Permanently delete a note and all its attachments. Only the note author can delete a note. This action cannot be undone.

Response

200 OK
{ "deleted": true }
POST /api/notes/upload Auth Required

Upload a file attachment to a note. Files are stored in Supabase Storage and linked to the note. Maximum file size is 10 MB. Supports images, documents, PDFs, and text files.

Request Body (multipart/form-data)

note_id required
string — The note UUID to attach the file to
file required
file — The file to upload (max 10 MB)

Response

200 OK
{
  "id": "uuid",
  "note_id": "uuid",
  "filename": "network-waterfall.png",
  "size_bytes": 185000,
  "mime_type": "image/png",
  "url": "https://storage.bugagent.com/notes/uuid/network-waterfall.png"
}

Notes

  • Accepted file types: images (PNG, JPEG, GIF, WebP), documents (PDF, DOC, DOCX), text files (TXT, CSV, JSON, XML).
  • Maximum file size: 10 MB per file.
  • Files are stored in the team's Supabase Storage bucket and served via signed URLs.
Time Tracking
⏱️
Time Tracking is available on the Team plan only. Log daily QA effort with categories, filter by project and team member, and view daily, weekly, and monthly summaries.
GET /api/time-entries Auth Required

List time tracking entries for the authenticated user's team. Supports filtering by time period, project, and category.

Query Parameters

period optional
string — today, week, month, or all (default: all)
project_id optional
string — Filter by project UUID
category optional
string — Filter by category (e.g. testing, bug-triage, automation)
sort optional
string — newest (default), oldest, most_time, least_time

Response

200 OK
{
  "entries": [
    {
      "id": "uuid",
      "description": "Regression testing checkout flow",
      "category": "testing",
      "duration_minutes": 45,
      "project_id": "uuid",
      "entry_date": "2026-03-22",
      "user_id": "uuid",
      "created_at": "2026-03-22T10:00:00Z",
      "updated_at": "2026-03-22T10:00:00Z"
    }
  ],
  "count": 1
}
POST /api/time-entries Auth Required

Create a new time tracking entry. Log hours spent on QA tasks with categories for team reporting and analytics.

Request Body

description required
string — Description of the work done
category required
string — Category (e.g. testing, bug-triage, automation, review, meeting)
duration_minutes required
integer — Duration in minutes (minimum 1)
project_id optional
string — Associate with a project UUID
entry_date optional
string — Date in YYYY-MM-DD format (defaults to today)

Response

201 Created
{
  "id": "uuid",
  "description": "Regression testing checkout flow",
  "category": "testing",
  "duration_minutes": 45,
  "project_id": "uuid",
  "entry_date": "2026-03-22",
  "created_at": "2026-03-22T10:00:00Z"
}
PATCH /api/time-entries/:id Auth Required

Update an existing time tracking entry. Only provided fields are changed.

Request Body

description optional
string — Updated description
category optional
string — Updated category
duration_minutes optional
integer — Updated duration in minutes
project_id optional
string — Re-associate to a different project
entry_date optional
string — Updated date in YYYY-MM-DD format

Response

200 OK
{
  "id": "uuid",
  "description": "Regression testing checkout flow (updated)",
  "category": "testing",
  "duration_minutes": 60,
  "project_id": "uuid",
  "entry_date": "2026-03-22",
  "updated_at": "2026-03-22T11:00:00Z"
}
DELETE /api/time-entries/:id Auth Required

Delete a time tracking entry. This action cannot be undone.

Response

200 OK
{ "deleted": true }

Notes

  • Time Tracking is a Team plan feature. Free and Pro plan users receive a 403 Forbidden response.
  • Entries are scoped to the authenticated user's team. All team members can view entries; only the entry creator or team admins can update or delete.
AI Assistant
POST /api/ai/chat Auth Required

Send a message to the AI Assistant. The assistant is context-aware — it has access to your organization's bug data, projects, Jira connection status, custom AI instructions, and uploaded knowledge documents (product specs, testing playbooks, etc.). It can answer questions about your bugs, suggest testing strategies, and guide you through creating bug reports via text or voice.

Request Body

message required
string — The user's message (max 10,000 characters)
history optional
array — Previous conversation messages. Each entry: {"role": "user"|"assistant", "content": "..."}. Max 40 entries, 100K total characters.

Response

200 OK
{"response": "You have 12 open critical bugs. The most recent is..."}

Notes

  • Powered by Claude Sonnet. Responses are professional, concise, and emoji-free.
  • The assistant is scoped to your current organization's data only.
  • Context-aware: automatically includes custom AI instructions and uploaded knowledge documents (product specs, testing playbooks, etc.) configured in Settings.
  • Supports voice-to-text input via Whisper transcription for long recording sessions (up to 20+ minutes).
  • History role values are validated server-side. Only user and assistant roles are accepted.
  • Off-topic questions (politics, opinions, etc.) are politely redirected.
POST /api/ai/create-report Auth Required

Create a report via the AI Assistant. Supports all 19 report types including bugs, feature requests, enhancements, technical debt, and more. This endpoint is typically called automatically when the assistant completes a guided report creation flow. It verifies team membership and project ownership before creating the report.

Request Body

title required
string — Bug title (max 500 characters)
description required
string — Full bug description including steps to reproduce, expected/actual behavior (max 50,000 characters)
type optional
string — Report type: ui, performance, crash, security, logic, data, network, accessibility, compatibility, functional, ui-ux, data-integrity, feature-request, enhancement, technical-debt, documentation, devops, ux-improvement, integration. Auto-classified if omitted.
severity optional
string — critical, high, medium, low. Defaults to medium.
project_id optional
string — Target project UUID. Must belong to the user's current organization. Falls back to default project.
internal_notes optional
string — Internal testing notes (max 10,000 characters)
environment optional
object — {"browser": "...", "os": "...", "device": "..."}
sync_to_jira optional
boolean — Automatically create a Jira issue if Jira is connected. Default: false.
attachments optional
array — Up to 10 file attachments. Each: {"filename": "...", "mimeType": "image/png", "data": "base64..."}. Max 10 MB per file.

Response

200 OK
{
  "success": true,
  "id": "uuid",
  "title": "Login button unresponsive on mobile",
  "type": "ui",
  "severity": "high",
  "attachments_count": 2,
  "jira_key": "PROJ-42"
}

Security

  • Verifies the authenticated user is a member of the current organization before creating the report.
  • Project ID is validated against the organization. Cross-org report creation is blocked.
  • File types are restricted to images, video, PDF, and text files.
Claude Analysis
POST /api/claude/push Auth Required

Push a bug report to Claude for root cause analysis. Claude analyzes the report and returns a structured analysis including probable cause, affected areas, suggested fix, verification steps, and risk assessment. The analysis is stored on the bug report for future reference. Requires a Claude connection configured in Settings → Integrations.

Request Body

report_id required
string — The ID of the bug report to send to Claude for analysis

Response

200 OK
{
  "analysis": "## Probable Root Cause\n...",
  "pushed_at": "2026-03-22T14:30:00Z"
}

Notes

  • Requires a Claude connection configured in Settings → Integrations with a valid Anthropic API key.
  • The analysis is stored on the bug report and returned in GET /reports/:id as claude_analysis and claude_pushed_at.
  • Re-pushing the same report overwrites the previous analysis.
  • Available on Pro and Team plans.
bugAgent Tools (SDK)
🎬
For setup guides, SDK installation, and integration details see the bugAgent Tools (SDK) documentation.
POST /api/sessions/capture Auth Required

Submit a session recording captured by the bugAgent SDK. The SDK records the last 60 seconds of user activity — clicks, navigation, errors, and network failures — and sends the data to this endpoint. The AI then analyzes the session to help auto-draft bug reports. Available on Pro, Team, and Enterprise plans.

Request Body

events required
array — Recorded session events. Each event: {"type": "click"|"navigation"|"error"|"network", "timestamp": "ISO8601", "data": {...}}
duration_ms required
number — Duration of the captured session in milliseconds (max 60000)
project_id optional
string — Target project UUID. Falls back to default project.
url optional
string — Page URL where the session was captured
environment optional
object — {"browser": "...", "os": "...", "device": "..."}

Response

201 Created
{
  "id": "uuid",
  "duration_ms": 58200,
  "event_count": 34,
  "created_at": "2026-03-19T14:30:00Z"
}

Notes

  • Requires Pro, Team, or Enterprise plan. Free plan users receive a 403 error.
  • Maximum payload size: 5 MB per session capture.
  • Sessions are retained for 30 days (Pro/Team) or configurable on Enterprise.
GET /api/sessions Auth Required

List SDK sessions for the current organization. Supports pagination and filtering.

Query Parameters

project_id optional
string — Filter by project
report_id optional
string — Filter sessions attached to a specific bug report
limit optional
number — Results per page (default 20, max 100)
offset optional
number — Pagination offset

Response

200 OK
{
  "sessions": [
    {
      "id": "uuid",
      "duration_ms": 58200,
      "event_count": 34,
      "url": "https://app.example.com/checkout",
      "report_id": null,
      "created_at": "2026-03-19T14:30:00Z"
    }
  ],
  "total": 42
}
GET /api/sessions/:id Auth Required

Get full detail of a SDK session, including all recorded events. Use this to render the session timeline or feed the events into the AI for analysis.

Response

200 OK
{
  "id": "uuid",
  "duration_ms": 58200,
  "event_count": 34,
  "url": "https://app.example.com/checkout",
  "environment": {"browser": "Chrome 120", "os": "macOS 15"},
  "report_id": null,
  "events": [
    {"type": "click", "timestamp": "2026-03-19T14:29:02Z", "data": {"selector": "#checkout-btn"}},
    {"type": "error", "timestamp": "2026-03-19T14:29:03Z", "data": {"message": "TypeError: Cannot read property..."}}
  ],
  "created_at": "2026-03-19T14:30:00Z"
}
PATCH /api/sessions Auth Required

Attach a SDK session to an existing bug report. This links the session data to the report so reviewers can see what the user did in the 60 seconds before the bug was filed.

Request Body

session_id required
string — Session replay UUID
report_id required
string — Bug report UUID to attach the session to

Response

200 OK
{
  "success": true,
  "session_id": "uuid",
  "report_id": "uuid"
}

Notes

  • Both the session and the report must belong to the same organization.
  • A session can only be attached to one report. Re-attaching overwrites the previous link.
Team Booster
POST /api/team-booster Auth Required

Instantly scale your QA team with booster testers. Accounts are provisioned automatically with tester access. Pro and Team plans only. Free plan returns 403. You will not be charged until approval has been given.

Request Body

ParameterTypeRequiredDescription
team_sizeintegerYesNumber of tester accounts to provision (1–10)
locationstringYesGeographic location for testers (e.g. “US”, “EU”, “APAC”)
durationstringYesDuration of the engagement (e.g. “1 week”, “1 month”)
product_urlstringNoURL of the product to be tested
product_typesstring[]NoTypes of products (e.g. ["web app", "mobile app"])
tech_levelsstring[]NoTechnical levels required (e.g. ["junior", "senior"])
budgetstringYesBudget for the engagement (e.g. “$500”, “$2000/month”)

Response

200 OK
{ "success": true, "created": 5 }

Error Responses

403 Forbidden
{ "error": "Team Booster is available on Pro and Team plans only." }
GET /api/admin/changelog Public

List all changelog entries, most recent first. Also available as an RSS feed.

Response

200 OK
{
  "entries": [
    {
      "id": "uuid",
      "title": "REST API parity with MCP tools",
      "summary": "Added 12 new REST API endpoints...",
      "content": "Detailed markdown content...",
      "tags": ["api", "new-feature"],
      "published_at": "2026-03-17T12:46:28Z"
    },
    ...
  ]
}
Test Cases
GET /api/test-cases Auth Required

List test cases for the authenticated user's team. Supports search, filtering by priority, type, and status, sorting, and pagination.

Query Parameters

search optional
string — Keyword search across test case names and descriptions
priority optional
string — Filter by priority: critical, high, medium, low
type optional
string — Filter by type: functional, regression, smoke, integration, e2e, performance, security, usability, accessibility
status optional
string — Filter by status: active, draft, deprecated
sort optional
string — Sort by: newest, oldest, name, priority (default: newest)
page optional
number — Page number (default: 1)
per_page optional
number — Results per page (default: 20, max: 100)

Response

200 OK
{
  "cases": [
    {
      "id": "uuid",
      "name": "Verify checkout with discount code",
      "description": "Ensure discount codes apply correctly",
      "priority": "high",
      "type": "functional",
      "status": "active",
      "tags": ["checkout", "discounts"],
      "estimated_time": 300,
      "steps_count": 5,
      "project_id": "uuid",
      "created_at": "2026-03-25T10:00:00Z",
      "updated_at": "2026-03-25T10:00:00Z"
    }
  ],
  "total": 42,
  "page": 1,
  "per_page": 20
}
POST /api/test-cases Auth Required

Create a new test case with detailed steps. Each step includes an action to perform and the expected result.

Request Body

name required
string — Test case name (max 200 chars)
description optional
string — Detailed description of the test case
preconditions optional
string — Prerequisites that must be met before executing the test
steps optional
array — Array of step objects: { "action": "Click login", "expected": "Login form appears" }
priority optional
string — critical, high, medium (default), low
type optional
string — functional (default), regression, smoke, integration, e2e, performance, security, usability, accessibility
tags optional
array — Array of tag strings for categorization
estimated_time optional
integer — Estimated execution time in seconds
project_id optional
string — Associate with a project UUID. Uses default project if omitted

Response

201 Created
{
  "id": "uuid",
  "name": "Verify checkout with discount code",
  "description": "Ensure discount codes apply correctly",
  "preconditions": "User is logged in with items in cart",
  "steps": [
    { "order": 1, "action": "Navigate to cart", "expected": "Cart page loads with items" },
    { "order": 2, "action": "Enter code SAVE20", "expected": "20% discount applied" },
    { "order": 3, "action": "Click checkout", "expected": "Order total reflects discount" }
  ],
  "priority": "high",
  "type": "functional",
  "status": "active",
  "tags": ["checkout", "discounts"],
  "estimated_time": 300,
  "project_id": "uuid",
  "created_at": "2026-03-25T10:00:00Z",
  "updated_at": "2026-03-25T10:00:00Z"
}
GET /api/test-cases/:id Auth Required

Get a test case by ID with its full steps and execution history.

Response

200 OK
{
  "id": "uuid",
  "name": "Verify checkout with discount code",
  "description": "Ensure discount codes apply correctly",
  "preconditions": "User is logged in with items in cart",
  "steps": [
    { "order": 1, "action": "Navigate to cart", "expected": "Cart page loads with items" },
    { "order": 2, "action": "Enter code SAVE20", "expected": "20% discount applied" }
  ],
  "priority": "high",
  "type": "functional",
  "status": "active",
  "tags": ["checkout", "discounts"],
  "estimated_time": 300,
  "project_id": "uuid",
  "history": [
    { "run_id": "uuid", "run_name": "Sprint 12 Regression", "status": "passed", "executed_at": "2026-03-24T14:00:00Z" }
  ],
  "created_at": "2026-03-25T10:00:00Z",
  "updated_at": "2026-03-25T10:00:00Z"
}
PATCH /api/test-cases/:id Auth Required

Update any field of a test case. Only provided fields are changed.

Request Body

name optional
string — Updated name
description optional
string — Updated description
preconditions optional
string — Updated preconditions
steps optional
array — Replaces all steps with new array
priority optional
string — critical, high, medium, low
type optional
string — Test case type
status optional
string — active, draft, deprecated
tags optional
array — Replaces all tags
estimated_time optional
integer — Estimated execution time in seconds

Response

200 OK
{ "id": "uuid", "name": "Updated name", ... }
DELETE /api/test-cases/:id Auth Required

Permanently delete a test case. Removes it from all suites.

Response

200 OK
{ "success": true }
POST /api/test-cases/duplicate Auth Required

Duplicate an existing test case including all steps, tags, and metadata. The copy is created with the name prefix "[Copy]".

Request Body

case_id required
string — ID of the test case to duplicate

Response

201 Created
{ "id": "uuid", "name": "[Copy] Verify checkout with discount code", ... }
Test Suites
GET /api/test-suites Auth Required

List test suites for the authenticated user's team. Returns each suite with its case count and last run status.

Query Parameters

search optional
string — Keyword search across suite names
page optional
number — Page number (default: 1)
per_page optional
number — Results per page (default: 20, max: 100)

Response

200 OK
{
  "suites": [
    {
      "id": "uuid",
      "name": "Checkout Regression Suite",
      "description": "All checkout-related test cases",
      "case_count": 12,
      "last_run_status": "passed",
      "project_id": "uuid",
      "created_at": "2026-03-25T10:00:00Z"
    }
  ],
  "total": 8
}
POST /api/test-suites Auth Required

Create a new test suite to group related test cases.

Request Body

name required
string — Suite name (max 200 chars)
description optional
string — Suite description
project_id optional
string — Associate with a project UUID

Response

201 Created
{
  "id": "uuid",
  "name": "Checkout Regression Suite",
  "description": "All checkout-related test cases",
  "case_count": 0,
  "project_id": "uuid",
  "created_at": "2026-03-25T10:00:00Z"
}
GET /api/test-suites/:id Auth Required

Get a test suite by ID with its full list of cases in order.

Response

200 OK
{
  "id": "uuid",
  "name": "Checkout Regression Suite",
  "description": "All checkout-related test cases",
  "cases": [
    { "id": "uuid", "name": "Verify checkout with discount code", "priority": "high", "type": "functional", "order": 1 }
  ],
  "project_id": "uuid",
  "created_at": "2026-03-25T10:00:00Z"
}
PATCH /api/test-suites/:id Auth Required

Update a test suite's name or description.

Request Body

name optional
string — Updated name
description optional
string — Updated description

Response

200 OK
{ "id": "uuid", "name": "Updated Suite Name", ... }
DELETE /api/test-suites/:id Auth Required

Delete a test suite. Test cases within the suite are not deleted.

Response

200 OK
{ "success": true }
POST /api/test-suites/:id/cases Auth Required

Add one or more test cases to a suite.

Request Body

case_ids required
array — Array of test case UUIDs to add

Response

200 OK
{ "added": 3, "case_count": 15 }
DELETE /api/test-suites/:id/cases Auth Required

Remove a test case from a suite.

Request Body

case_id required
string — Test case UUID to remove

Response

200 OK
{ "success": true, "case_count": 14 }
PATCH /api/test-suites/:id/reorder Auth Required

Reorder the test cases within a suite. Provide the full ordered list of case IDs.

Request Body

ordered_case_ids required
array — Array of test case UUIDs in desired order

Response

200 OK
{ "success": true }
Test Runs
GET /api/test-runs Auth Required

List test runs for the authenticated user's team. Returns each run with suite name, assignee, and pass/fail summary.

Query Parameters

search optional
string — Keyword search across run names
status optional
string — Filter by status: in_progress, completed
suite_id optional
string — Filter by test suite UUID
page optional
number — Page number (default: 1)
per_page optional
number — Results per page (default: 20, max: 100)

Response

200 OK
{
  "runs": [
    {
      "id": "uuid",
      "name": "Sprint 12 Regression",
      "suite_id": "uuid",
      "suite_name": "Checkout Regression Suite",
      "status": "in_progress",
      "assigned_to": "uuid",
      "assignee_name": "Jane Smith",
      "summary": { "total": 12, "passed": 8, "failed": 2, "blocked": 1, "skipped": 0, "untested": 1 },
      "created_at": "2026-03-25T10:00:00Z"
    }
  ],
  "total": 5
}
POST /api/test-runs Auth Required

Create a new test run from a test suite. Snapshots all cases from the suite at creation time.

Request Body

suite_id required
string — Test suite UUID to create the run from
name required
string — Run name (e.g. "Sprint 12 Regression")
assigned_to optional
string — User UUID of the assignee

Response

201 Created
{
  "id": "uuid",
  "name": "Sprint 12 Regression",
  "suite_id": "uuid",
  "status": "in_progress",
  "assigned_to": "uuid",
  "results": [
    { "case_id": "uuid", "case_name": "Verify checkout with discount code", "status": "untested" }
  ],
  "created_at": "2026-03-25T10:00:00Z"
}
GET /api/test-runs/:id Auth Required

Get a test run by ID with all case results.

Response

200 OK
{
  "id": "uuid",
  "name": "Sprint 12 Regression",
  "suite_id": "uuid",
  "suite_name": "Checkout Regression Suite",
  "status": "in_progress",
  "assigned_to": "uuid",
  "assignee_name": "Jane Smith",
  "results": [
    {
      "case_id": "uuid",
      "case_name": "Verify checkout with discount code",
      "status": "passed",
      "actual_result": "Discount applied correctly",
      "notes": "",
      "executed_at": "2026-03-25T11:00:00Z"
    }
  ],
  "summary": { "total": 12, "passed": 8, "failed": 2, "blocked": 1, "skipped": 0, "untested": 1 },
  "created_at": "2026-03-25T10:00:00Z"
}
PATCH /api/test-runs/:id Auth Required

Update a test run's name or assignee.

Request Body

name optional
string — Updated run name
assigned_to optional
string — Updated assignee UUID

Response

200 OK
{ "id": "uuid", "name": "Updated Run Name", ... }
POST /api/test-runs/:id/results Auth Required

Save the execution result for a specific test case in a run. Mark each case as passed, failed, blocked, or skipped.

Request Body

case_id required
string — Test case UUID
status required
string — passed, failed, blocked, skipped
actual_result optional
string — What actually happened during execution
notes optional
string — Additional notes or observations

Response

200 OK
{ "success": true, "status": "failed", "case_id": "uuid" }
POST /api/test-runs/:id/complete Auth Required

Mark a test run as completed. Calculates and stores the final pass rate.

Response

200 OK
{
  "id": "uuid",
  "status": "completed",
  "summary": { "total": 12, "passed": 10, "failed": 2, "blocked": 0, "skipped": 0, "untested": 0 },
  "pass_rate": 83.3,
  "completed_at": "2026-03-25T15:00:00Z"
}
POST /api/test-runs/:id/rerun-failed Auth Required

Create a new test run containing only the failed cases from a completed run. Useful for re-testing after fixes.

Response

201 Created
{
  "id": "uuid",
  "name": "Re-run: Sprint 12 Regression (failed)",
  "suite_id": "uuid",
  "status": "in_progress",
  "results": [
    { "case_id": "uuid", "case_name": "Apply expired discount code", "status": "untested" }
  ],
  "created_at": "2026-03-25T16:00:00Z"
}
Test Reports
GET /api/test-reports Auth Required

Get completed test run reports with pass rate and date range filtering. Returns aggregated test execution data.

Query Parameters

from optional
string — ISO 8601 date. Only return runs completed on or after this date
to optional
string — ISO 8601 date. Only return runs completed on or before this date
suite_id optional
string — Filter by test suite UUID

Response

200 OK
{
  "reports": [
    {
      "run_id": "uuid",
      "run_name": "Sprint 12 Regression",
      "suite_name": "Checkout Regression Suite",
      "status": "completed",
      "pass_rate": 83.3,
      "summary": { "total": 12, "passed": 10, "failed": 2, "blocked": 0, "skipped": 0 },
      "completed_at": "2026-03-25T15:00:00Z"
    }
  ],
  "total": 15,
  "average_pass_rate": 87.5
}
Geo-Snap
GET /api/geo-snap Auth Required

List saved Geo-Snap screenshots. Filter by country, search by URL, and paginate results.

Query Parameters

search optional
string — Search by URL substring
country optional
string — Filter by country code (e.g. US, DE, JP)
sort optional
string — Sort order: newest (default), oldest
page optional
integer — Page number (default: 1)
per_page optional
integer — Results per page (default: 20, max: 100)

Response

200 OK
{
  "snaps": [
    {
      "id": "uuid",
      "url": "https://example.com",
      "country": "US",
      "screenshot_url": "https://storage.bugagent.com/geo-snaps/uuid-us.png",
      "status": "completed",
      "created_at": "2026-03-25T10:00:00Z"
    }
  ],
  "total": 15,
  "page": 1,
  "per_page": 20
}
POST /api/geo-snap Auth Required

Capture screenshots of a URL from one or more countries. Free plan: 1 country per request, 10 saved screenshots. Pro/Team: up to 5 countries per request, unlimited saved screenshots.

Request Body

url required
string — The URL to capture (must be a valid public URL)
countries required
string[] — Array of country codes (e.g. ["US", "DE", "JP"]). Free: max 1, Pro/Team: max 5

Response

201 Created
{
  "snaps": [
    {
      "id": "uuid",
      "url": "https://example.com",
      "country": "US",
      "screenshot_url": "https://storage.bugagent.com/geo-snaps/uuid-us.png",
      "status": "completed",
      "created_at": "2026-03-25T10:00:00Z"
    },
    {
      "id": "uuid",
      "url": "https://example.com",
      "country": "DE",
      "screenshot_url": "https://storage.bugagent.com/geo-snaps/uuid-de.png",
      "status": "completed",
      "created_at": "2026-03-25T10:00:00Z"
    }
  ]
}
DELETE /api/geo-snap/:id Auth Required

Delete a saved Geo-Snap screenshot by ID.

Path Parameters

id required
string — The UUID of the Geo-Snap screenshot to delete

Response

200 OK
{ "deleted": true }
Mobile Testing
GET /api/mobile/apps Auth Required

List uploaded mobile apps. Filter by platform, search by name, and paginate results.

Query Parameters

search optional
string — Search by app name
platform optional
string — Filter by platform: android or ios
sort optional
string — Sort order: newest (default), oldest, name
page optional
integer — Page number (default: 1)
per_page optional
integer — Results per page (default: 20, max: 100)

Response

200 OK
{
  "apps": [
    {
      "id": "uuid",
      "name": "MyApp",
      "platform": "android",
      "package_name": "com.example.myapp",
      "version": "2.1.0",
      "file_url": "https://storage.bugagent.com/apps/uuid.apk",
      "file_size": 48500000,
      "automation_count": 3,
      "created_at": "2026-03-20T10:00:00Z"
    }
  ],
  "total": 1
}
POST /api/mobile/apps Auth Required

Upload an APK (Android) or IPA (iOS) app binary. Uses multipart/form-data. Max file size: 500 MB.

Request Body (multipart/form-data)

file required
file — The APK or IPA binary (max 500 MB)
name required
string — Display name for the app
platform required
string — android or ios
version optional
string — App version string (e.g. 2.1.0)
package_name optional
string — Package identifier (e.g. com.example.myapp)

Response

201 Created
{
  "id": "uuid",
  "name": "MyApp",
  "platform": "android",
  "package_name": "com.example.myapp",
  "version": "2.1.0",
  "file_url": "https://storage.bugagent.com/apps/uuid.apk",
  "file_size": 48500000,
  "created_at": "2026-03-20T10:00:00Z"
}
GET /api/mobile/apps/:id Auth Required

Get full details for a mobile app, including automation count.

Path Parameters

id required
string — The UUID of the mobile app

Response

200 OK
{
  "id": "uuid",
  "name": "MyApp",
  "platform": "android",
  "package_name": "com.example.myapp",
  "version": "2.1.0",
  "file_url": "https://storage.bugagent.com/apps/uuid.apk",
  "file_size": 48500000,
  "automation_count": 3,
  "created_at": "2026-03-20T10:00:00Z",
  "updated_at": "2026-03-20T10:00:00Z"
}
PATCH /api/mobile/apps/:id Auth Required

Update an uploaded mobile app's metadata.

Path Parameters

id required
string — The UUID of the mobile app

Request Body

name optional
string — Updated display name
version optional
string — Updated version string
package_name optional
string — Updated package identifier
simulator_file_url optional
string — URL to a simulator .app build (iOS only). Enables in-browser test recording. Set to null to remove.
simulator_storage_path optional
string — Storage path for the simulator build file

Response

200 OK
{
  "id": "uuid",
  "name": "MyApp",
  "platform": "android",
  "package_name": "com.example.myapp",
  "version": "2.1.0",
  "file_url": "https://storage.bugagent.com/apps/uuid.apk",
  "file_size": 48500000,
  "automation_count": 3,
  "created_at": "2026-03-20T10:00:00Z",
  "updated_at": "2026-03-20T10:00:00Z"
}
PUT /api/mobile/apps/:id Auth Required

Replace an app's binary with a new version. Deletes the old file from storage, clears cached platform URLs (forcing re-upload on next run), and updates the team's storage quota. All linked automations and schedules will automatically use the new version. For iOS apps, the simulator build is also removed — re-upload it to continue recording.

Path Parameters

id required
string — The UUID of the mobile app to update

Request Body

storage_path required
string — The new file's storage path (from upload-url signed URL flow)
file_size optional
number — File size in bytes
version optional
string — New version string

Response

200 OK
{ "id": "uuid", "name": "My App", "platform": "android", "version": "2.0.0", "file_size": 15728640, "updated_at": "2026-03-29T..." }
DELETE /api/mobile/apps/:id Auth Required

Delete an uploaded mobile app and its storage file. Automations referencing this app will be orphaned.

Path Parameters

id required
string — The UUID of the mobile app to delete

Response

200 OK
{ "success": true }
GET /api/mobile/automations Auth Required

List mobile automation scripts. Filter by app, script type, and status.

Query Parameters

search optional
string — Search by automation name
app_id optional
string — Filter by mobile app UUID
script_type optional
string — Filter by type: maestro (YAML), appium (Python), or appium_js (JavaScript)
status optional
string — Filter by status: draft, active, paused
sort optional
string — Sort: newest (default), oldest, name

Response

200 OK
{
  "automations": [
    {
      "id": "uuid",
      "name": "Login Flow Test",
      "app_id": "uuid",
      "script_type": "maestro",
      "status": "active",
      "target_devices": [
        "Pixel 7",
        "Samsung Galaxy S23"
      ],
      "created_at": "2026-03-21T09:00:00Z"
    }
  ],
  "total": 1
}
POST /api/mobile/automations Auth Required

Create a mobile automation script. Use Appium for complex cross-platform interactions or Maestro YAML for simple flows.

Request Body

name required
string — Automation name
app_id required
string — UUID of the uploaded mobile app
script_type required
string — maestro (YAML), appium (Appium Python), or appium_js (Appium JS)
script required
string — The test script content (Appium Java/Python or Maestro YAML)
target_devices optional
string[] — Array of target device names (e.g. ["Pixel 7", "Samsung Galaxy S23"])

Response

201 Created
{
  "id": "uuid",
  "name": "Login Flow Test",
  "app_id": "uuid",
  "script_type": "maestro",
  "script": "appId: com.example.myapp\n---\n- launchApp\n- tapOn: \"Login\"\n- inputText: \"user@example.com\"",
  "status": "draft",
  "target_devices": [
    "Pixel 7",
    "Samsung Galaxy S23"
  ],
  "created_at": "2026-03-21T09:00:00Z"
}
GET /api/mobile/automations/:id Auth Required

Get full details for a mobile automation, including app info and recent runs.

Path Parameters

id required
string — The UUID of the automation

Response

200 OK
{
  "id": "uuid",
  "name": "Login Flow Test",
  "app_id": "uuid",
  "app_name": "MyApp",
  "script_type": "maestro",
  "script": "appId: com.example.myapp\n---\n- launchApp\n- tapOn: \"Login\"",
  "status": "active",
  "target_devices": [
    "Pixel 7",
    "Samsung Galaxy S23"
  ],
  "recent_runs": [
    {
      "id": "uuid",
      "status": "passed",
      "device": "Pixel 7",
      "duration_ms": 45000,
      "created_at": "2026-03-22T08:00:00Z"
    }
  ],
  "created_at": "2026-03-21T09:00:00Z"
}
PATCH /api/mobile/automations/:id Auth Required

Update a mobile automation script or its metadata.

Path Parameters

id required
string — The UUID of the automation

Request Body

name optional
string — Updated name
script optional
string — Updated script content
status optional
string — draft, active, or paused
target_devices optional
string[] — Updated target device list

Response

200 OK
{
  "id": "uuid",
  "name": "Login Flow Test",
  "app_id": "uuid",
  "app_name": "MyApp",
  "script_type": "maestro",
  "script": "appId: com.example.myapp\n---\n- launchApp\n- tapOn: \"Login\"",
  "status": "active",
  "target_devices": [
    "Pixel 7",
    "Samsung Galaxy S23"
  ],
  "recent_runs": [
    {
      "id": "uuid",
      "status": "passed",
      "device": "Pixel 7",
      "duration_ms": 45000,
      "created_at": "2026-03-22T08:00:00Z"
    }
  ],
  "created_at": "2026-03-21T09:00:00Z"
}
DELETE /api/mobile/automations/:id Auth Required

Delete a mobile automation. Fails if the automation has active schedules — delete schedules first.

Path Parameters

id required
string — The UUID of the automation to delete

Response

200 OK
{ "success": true }
GET /api/mobile/runs Auth Required

List mobile test runs. Filter by automation and status.

Query Parameters

automation_id optional
string — Filter by automation UUID
status optional
string — Filter: queued, running, passed, failed, errored
sort optional
string — Sort: newest (default), oldest

Response

200 OK
{
  "runs": [
    {
      "id": "uuid",
      "automation_id": "uuid",
      "status": "passed",
      "device": "Pixel 7",
      "os_version": "14",
      "duration_ms": 45000,
      "created_at": "2026-03-22T08:00:00Z"
    }
  ],
  "total": 1
}
POST /api/mobile/runs Auth Required

Trigger a mobile test run. Appium scripts are routed to BrowserStack; Maestro scripts are routed to Maestro Cloud.

Request Body

automation_id required
string — UUID of the mobile automation to run
device required
string — Target device name (e.g. Pixel 7, iPhone 15 Pro)
os_version optional
string — OS version to test on (e.g. 14 for Android 14, 17.2 for iOS)

Response

201 Created
{
  "id": "uuid",
  "automation_id": "uuid",
  "status": "queued",
  "device": "Pixel 7",
  "os_version": "14",
  "provider": "browserstack",
  "created_at": "2026-03-22T08:00:00Z"
}
GET /api/mobile/runs/:id Auth Required

Get full results for a mobile test run, including video recording, Appium logs, device logs, network logs, and duration.

Path Parameters

id required
string — The UUID of the run

Response

200 OK
{
  "id": "uuid",
  "automation_id": "uuid",
  "status": "passed",
  "device": "Pixel 7",
  "os_version": "14",
  "provider": "browserstack",
  "duration_ms": 45000,
  "video_url": "https://storage.bugagent.com/runs/uuid/video.mp4",
  "screenshots": [
    "https://storage.bugagent.com/runs/uuid/screen_001.png"
  ],
  "logs": "https://storage.bugagent.com/runs/uuid/device.log",
  "performance": {
    "cpu_avg": 23.5,
    "memory_peak_mb": 256,
    "battery_drain": 2.1,
    "fps_avg": 58.3
  },
  "created_at": "2026-03-22T08:00:00Z",
  "completed_at": "2026-03-22T08:00:45Z"
}
PATCH /api/mobile/runs/:id Auth Required

Archive a completed mobile test run. Archived runs are hidden from the default listing but can be viewed with the status=archived filter.

Request Body

status required
string — Set to "archived"
GET /api/mobile/devices Auth Required

List available BrowserStack real devices for mobile testing. Optionally filter by platform.

Query Parameters

platform
string — Filter by "android" or "ios". Omit to get both.
GET /api/mobile/schedules Auth Required

List scheduled mobile test runs with cron expression, timezone, and notification settings.

Response

200 OK
{
  "schedules": [
    {
      "id": "uuid",
      "automation_id": "uuid",
      "automation_name": "Login Flow Test",
      "cron_expression": "0 9 * * 1-5",
      "timezone": "America/New_York",
      "devices": [
        "Pixel 7",
        "iPhone 15 Pro"
      ],
      "notify_on_fail": "slack",
      "enabled": true,
      "next_run_at": "2026-03-23T09:00:00Z"
    }
  ],
  "total": 1
}
POST /api/mobile/schedules Auth Required

Create a scheduled mobile test run. Runs are dispatched to the configured devices on the cron schedule.

Request Body

automation_id required
string — UUID of the mobile automation
cron_expression required
string — 5-field cron expression (e.g. 0 9 * * 1-5 for weekdays at 9am)
timezone optional
string — IANA timezone (default: UTC)
devices required
string[] — Array of device names to run on each schedule trigger
notify_on_fail optional
string — Notification on failure: none (default), email, slack, both

Response

201 Created
{
  "id": "uuid",
  "automation_id": "uuid",
  "cron_expression": "0 9 * * 1-5",
  "timezone": "America/New_York",
  "devices": [
    "Pixel 7",
    "iPhone 15 Pro"
  ],
  "notify_on_fail": "slack",
  "enabled": true,
  "next_run_at": "2026-03-23T09:00:00Z",
  "created_at": "2026-03-22T10:00:00Z"
}
PATCH /api/mobile/schedules/:id Auth Required

Update a mobile test schedule.

Path Parameters

id required
string — The UUID of the schedule

Request Body

cron_expression optional
string — Updated cron expression
timezone optional
string — Updated timezone
devices optional
string[] — Updated device list
notify_on_fail optional
string — Updated notification setting
enabled optional
boolean — Enable or disable the schedule

Response

200 OK
{
  "id": "uuid",
  "automation_id": "uuid",
  "cron_expression": "0 9 * * 1-5",
  "timezone": "America/New_York",
  "devices": [
    "Pixel 7",
    "iPhone 15 Pro"
  ],
  "notify_on_fail": "slack",
  "enabled": true,
  "next_run_at": "2026-03-23T09:00:00Z",
  "created_at": "2026-03-22T10:00:00Z"
}
DELETE /api/mobile/schedules/:id Auth Required

Delete a mobile test schedule.

Path Parameters

id required
string — The UUID of the schedule to delete

Response

200 OK
{ "success": true }
Performance Testing
GET /api/performance/tests Auth Required

List all performance test configurations for the current team.

Response

200 OK
{ "tests": [{ "id": "uuid", "name": "Homepage Perf", "url": "https://example.com", "device": "desktop", "virtual_users": 10, "duration": 30, "perf_threshold": 50, "auto_create_bug": true, "created_at": "..." }] }
POST /api/performance/tests Auth Required

Create a new performance test configuration. Combines page quality audits with distributed load testing. Supports mobile app profiling on real Android/iOS devices via BrowserStack. Pro/Team/Enterprise plans only.

Body Parameters

name required
string — Name for the performance test
url required
string — URL to test (web tests only)
device optional
string — Device to emulate: desktop (default), mobile, tablet
virtual_users optional
number — Number of virtual users for load testing (default: 10)
duration optional
number — Load test duration in seconds (default: 30)
perf_threshold optional
number — Lighthouse performance score threshold 0–100 (default: 50). Scores below this auto-create bug reports
auto_create_bug optional
boolean — Auto-create a bug report when thresholds are breached (default: true)
app_id optional
string — UUID of an uploaded mobile app (from POST /mobile/apps). Required for mobile performance tests
mobile_devices optional
array — List of BrowserStack device names to profile (e.g. ["Pixel 7", "iPhone 15 Pro"]). Each device creates one run and consumes 1 monthly credit
mobile_thresholds optional
object — Thresholds for mobile auto-bug creation: cpu_max (%), memory_peak (MB), fps_min, battery_drain_max (%), launch_time_max (ms). Exceeding any threshold triggers a bug report

Response

201 Created
{ "test": { "id": "uuid", "name": "Homepage Perf", "url": "https://example.com", ... } }
GET /api/performance/tests/:id Auth Required

Get a single performance test configuration by ID.

Path Parameters

id required
string — The UUID of the performance test
PATCH /api/performance/tests/:id Auth Required

Update a performance test configuration. Only include fields you want to change.

Path Parameters

id required
string — The UUID of the performance test

Body Parameters

name optional
string — Updated test name
url optional
string — Updated URL
device optional
string — Updated device
virtual_users optional
number — Updated virtual users count
perf_threshold optional
number — Updated score threshold
auto_create_bug optional
boolean — Updated auto-bug toggle
DELETE /api/performance/tests/:id Auth Required

Delete a performance test configuration and all its associated runs.

Path Parameters

id required
string — The UUID of the performance test to delete

Response

200 OK
{ "success": true }
POST /api/performance/run Auth Required

Trigger a performance test run (page audit + load test). The run executes asynchronously; poll GET /performance/runs/:id for results. Auto-creates a bug report when the performance score drops below the configured threshold.

Body Parameters

test_id required
string — The UUID of the performance test to run

Response

202 Accepted
{ "run": { "id": "uuid", "status": "running", "test_id": "uuid", "created_at": "..." } }
GET /api/performance/runs/:id Auth Required

Get full results for a performance test run. Includes Lighthouse scores (Performance, Accessibility, Best Practices, SEO), Core Web Vitals (LCP, FID, CLS, FCP, TTFB, INP, TBT, SI), and load test metrics (VUs, total requests, RPS, p50/p90/p95/p99 latencies).

Path Parameters

id required
string — The UUID of the performance run
GET /api/performance/runs/:id/csv Auth Required

Download a CSV report for a performance run. Includes Lighthouse scores, Core Web Vitals, load test summary with latency percentiles, and test metadata.

Path Parameters

id required
string — The UUID of the performance run

Response

Returns text/csv with Content-Disposition: attachment; filename="performance-report-{id}.csv"

POST /api/performance/runs/:id/archive Auth Required

Archive a completed performance test run. Archived runs are hidden from the default listing but can be viewed with the status=archived filter on GET /performance/runs.

Path Parameters

id required
string — The UUID of the performance run to archive

Response

200 OK
{ "success": true, "status": "archived" }
DELETE /api/performance/runs/:id/archive Auth Required

Unarchive a previously archived performance test run, restoring it to the default listing.

Path Parameters

id required
string — The UUID of the performance run to unarchive

Response

200 OK
{ "success": true, "status": "completed" }
GET /api/performance/usage Auth Required

Check monthly performance test usage against plan limits. Limits: Free=0, Pro=1/mo, Team=2/mo, Enterprise=10/mo, Admin=unlimited.

Response

200 OK
{ "used": 1, "limit": 2, "remaining": 1, "plan": "team", "period_start": "2026-03-01", "period_end": "2026-03-31" }
Security Scanning
POST /api/security/scans Auth Required

Create a security scan configuration. Requires Pro, Team, or Enterprise plan.

Request Body

name required
string — Scan name
scan_type required
string — web or mobile
target_url web only
string — URL to scan (domain must be verified via DNS TXT record)
app_id mobile only
string — UUID of the uploaded mobile app
scan_depth optional
string — quick (default, ~30s), regular (~5min), deep (up to 30min)
auth_config optional
object — { login_url, username, password } for authenticated web scanning
auto_create_bug optional
boolean — Auto-create bug reports for qualifying findings (default false)
min_severity_for_bug optional
string — Minimum severity for auto-bug: critical, high (default), medium, low
POST /api/security/run Auth Required

Trigger a security scan. Web scans require a verified domain. Mobile scans require an uploaded app with a valid file URL. Counts against monthly quota.

Request Body

scan_id required
string — UUID of the scan configuration
scan_depth optional
string — Override the saved scan depth for this run

Response

201 Created
{ "id": "run-uuid", "status": "queued" }
GET /api/security/runs/{id} Auth Required

Get scan run status and results. Poll this endpoint while status is queued or running.

Response (completed)

200 OK
{
  "id": "run-uuid",
  "status": "completed",
  "security_score": 72,
  "total_findings": 15,
  "critical_count": 0,
  "high_count": 2,
  "medium_count": 5,
  "low_count": 4,
  "info_count": 4,
  "authenticated": true,
  "duration_seconds": 185
}
GET /api/security/domains Auth Required

List verified domains for the team. Use POST to add a domain and receive a DNS TXT verification token.

Code Review
GET /api/code-review/prs?repo=owner/repo Auth Required

List open pull requests for a GitHub repository. Returns PR number, title, author, head branch, and existing review status if previously reviewed. Requires a GitHub integration configured in Settings.

repostring (query)GitHub repo in owner/repo format
POST /api/code-review/review Auth Required

Trigger an AI code review on a pull request. Fetches the PR diff from GitHub and sends it to Claude for analysis. Returns the review ID with quality score and findings. Team/Enterprise only.

repostringGitHub repo in owner/repo format
pr_numberintegerPull request number
GET /api/code-review/reviews Auth Required

List past code reviews for the team. Returns review ID, repo, PR number/title, quality score, severity counts, and timestamps. Ordered by most recent.

GET /api/code-review/reviews/:id Auth Required

Get a single code review with all findings. Each finding includes severity (critical/high/medium/low), category (bug/security/performance/style/logic/maintainability), title, description, suggestion, file path, line numbers, and code snippet.

GET /api/code-review/settings Auth Required

Get code review settings for the team. Returns custom instructions, auto-review toggle, post-comments toggle, auto-bug creation config, and enabled status.

POST /api/code-review/settings Auth Required

Update code review settings. All fields optional — only provided fields are updated.

custom_instructionsstring?Custom review instructions sent to Claude
auto_reviewboolean?Auto-review PRs on open (Phase 2)
post_commentsboolean?Post inline comments to GitHub PR (Phase 3)
auto_create_bugboolean?Auto-create bug reports for critical findings
min_severity_for_bugstring?Minimum severity for auto-bug: critical, high, medium, low
GET /api/code-review/usage Auth Required

Check code review usage. Returns reviews used and plan info. Unlimited reviews on Pro, Team, and Enterprise plans.

GET /api/code-review/analytics Auth Required

Get code review analytics for the team. Returns trends (daily review counts + avg scores), finding category and source breakdowns, severity distribution, velocity metrics (reviews/week, avg time, avg findings), top repos, top PR authors, and recent quality score sparkline data. Query param: days (7, 30, or 90, default 30).

GET /api/github/webhooks Auth Required

List all GitHub webhooks registered for the team. Returns webhook ID, repo, active status, and creation date.

POST /api/github/webhooks Auth Required

Register a GitHub webhook on a repository for auto-review. Requires repo (e.g. owner/name). Creates a webhook on GitHub that sends pull_request events to bugAgent. The webhook secret is auto-generated and stored securely.

DELETE /api/github/webhooks Auth Required

Remove a GitHub webhook from a repository. Requires repo. Deletes the webhook from both GitHub and the bugAgent database.

POST /api/github/webhook Public (Webhook)

GitHub webhook receiver endpoint. Handles pull_request events. Verifies HMAC-SHA256 signature, checks auto-review settings, and triggers a Claude-powered code review. Only processes opened and synchronize actions. Deduplicates by commit SHA.

GET /api/explorations Auth Required

List all Exploratory AI configs for the team. Returns name, target URL, status, last run info, and run count.

POST /api/explorations Auth Required

Create a new exploration config. Requires name and target_url. Optional: exploration_context (JSONB with focus_areas, instructions, auth_config, exclude_paths, max_depth, test_data), project_id, auto_create_bug, min_severity_for_bug.

POST /api/explorations/run Auth Required

Trigger an exploration run. Requires exploration_id. Dispatches to the runner for 5-phase execution (Recon, Plan, Execute, Analyze, Report). Returns the run ID. Poll GET /api/explorations/runs/:id for status.

GET /api/explorations/runs/:id Auth Required

Get exploration run details including phase data (recon, plan, execute, analyze), findings, and linked bug reports. Use for polling during execution or viewing results.

GET /api/explorations/usage Auth Required

Check monthly Exploratory AI usage. Pro: 3/mo, Team: 10/mo, Enterprise: 50/mo.

GET/POST/PATCH/DELETE /api/explorations/schedules Auth Required

Manage exploration schedules. GET lists schedules. POST creates a new one (requires exploration_id and cron_expression). PATCH updates schedule (enable/disable, change cron). DELETE removes a schedule. Supports notifications via email or Slack on failure.

Recommendations

Suggestions & Recommendations

Use API keys over JWTs

API keys don't expire and are simpler for server-to-server or agent integrations. JWTs from /auth/login expire and require refresh logic.

Set a project on every report

Use the project field when creating reports to keep your bug data organized. If omitted, reports go to the team's default project.

Poll /usage before bulk operations

Check GET /usage before submitting many reports to avoid hitting plan limits mid-batch.

Use the MCP server for AI agents

If you're building an AI agent integration, the MCP server provides a more natural interface than raw REST calls. Both offer the same features.

Rotate API keys periodically

Use POST /keys/:id/regenerate to rotate keys without downtime — the new key keeps the same name and scopes.

Subscribe to the changelog

Stay up to date with API changes via the changelog page or RSS feed.