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.
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:
https://app.bugagent.com/api For example, to list bug reports:
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 https://app.bugagent.com/api/reports \
-H "Authorization: Bearer ba_live_your_key_here" 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": "Description of what went wrong"
} | Code | Meaning |
|---|---|
200 | Success |
201 | Created |
400 | Bad request — invalid or missing parameters |
401 | Unauthorized — missing or invalid authentication |
403 | Forbidden — insufficient permissions |
404 | Not found — resource doesn't exist or you don't have access |
409 | Conflict — resource already exists |
413 | Payload too large |
422 | Unprocessable — validation failed |
500 | Internal 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/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.
Request Body
email requiredpassword requiredfull_name optionalResponse
{
"userId": "uuid",
"email": "agent@example.com"
} /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.
Request Body
email requiredpassword requiredResponse
{
"userId": "uuid",
"email": "agent@example.com",
"accessToken": "eyJhbG...",
"refreshToken": "refresh_...",
"expiresAt": 1711234567
} /api/reports Auth Required List bug reports for the authenticated user's account and team. Returns reports in reverse chronological order.
Query Parameters
type optionalui, performance, crash, security, logic, data, network, accessibility, compatibility, functional, ui-ux, data-integrity, feature-request, enhancement, technical-debt, documentation, devops, ux-improvement, integrationseverity optionalcritical, high, medium, lowsearch optionallimit optionaloffset optionalExample
curl "https://app.bugagent.com/api/reports?type=crash&limit=10" \
-H "Authorization: Bearer ba_live_..." /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 requireddescription optionaltype optionalui, 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 optionalcritical, high, medium (default), lowproject optionalenvironment optional{ browser, os, device, url }metadata optionalformat_description optionaltrue, the description is reformatted into a structured bug template using AI before saving. Defaults to false.time_spent_seconds optional0.Response
{
"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",
...
} /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 requiredtitle optionalResponse
{ "formatted": "## Summary\nLogin button is unresponsive...\n\n## Steps to Reproduce\n1. Navigate to...\n\n## Expected Behavior\n...\n\n## Actual Behavior\n..." } /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_scorequality_breakdownreproduction_steps, expected_vs_actual, environment_details, evidence, root_cause_analysis, impact_assessment, context_and_history, heuristics_and_oracles, clarity_and_structure, actionability./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_notesinternal_notes are private and not synced to Jira.time_spent_seconds optional/api/reports/upload Auth Required Upload file attachments (screenshots, videos, documents) to a bug report. Uses multipart/form-data.
Form Fields
reportId requiredfiles required/api/reports/flush Auth Required Bulk delete old bug reports. Requires owner or admin team role.
Request Body
months requiredproject_id optionalResponse
{ "deleted": 42 } /api/reports/comments Auth Required Add a comment to a bug report, or toggle an emoji reaction on a comment.
Create Comment
report_id requiredcontent requiredToggle Reaction
action required"react"comment_id requiredemoji required/api/reports/comments Auth Required Edit a comment. Only the author can edit their own comments.
comment_id requiredcontent required/api/reports/comments Auth Required Delete a comment. Only the author can delete their own comments.
comment_id required/api/projects Auth Required List all projects for your team.
/api/projects Auth Required Create a new project. The first project is automatically set as default. Subject to plan limits.
Request Body
name requireddescription optionalis_default optional/api/projects Auth Required Update a project's name, description, or default status.
id requiredname, description, is_default/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 requiredWhat Gets Deleted
- 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
Errors
403400404/api/keys Auth Required List your active (non-revoked) API keys. Only the key prefix is returned — full keys are shown once at creation.
/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 requiredscopes optional["reports:read", "reports:write"]Response
{
"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"
} /api/keys/:id Auth Required Revoke an API key. The key is soft-deleted and can no longer be used for authentication.
/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.
/api/profile Auth Required Get the authenticated user's profile.
Response
{
"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"
} /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/api/profile/password Auth Required Change your password.
password required/api/settings Auth Required Get your profile info and notification preferences.
Response
{
"fullName": "Jane Smith",
"email": "user@example.com",
"isAgent": false,
"plan": "pro",
"notifications": {
"emailNewReport": true,
"emailUsageWarning": true,
"emailWeeklyDigest": false
}
} /api/settings Auth Required Update notification preferences.
email_usage_warning optional/api/usage Auth Required Get your current plan usage (reports used, limit, remaining, reset date).
Response
{
"used": 47,
"limit": 5000,
"remaining": 4953,
"plan": "pro",
"period": "monthly",
"resetsAt": "2026-04-01T00:00:00Z"
} /api/stats Auth Required Get report statistics with daily counts, breakdowns by type, severity, and status.
Query Parameters
days optionalResponse
{
"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 }
} /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"pro" or "team"billing optional"monthly" (default) or "annual"Response
{ "url": "https://checkout.stripe.com/..." } /api/billing-portal Auth Required Get a URL to the Stripe billing portal where users can manage subscriptions, payment methods, and invoices.
Response
{ "url": "https://billing.stripe.com/..." } /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"invite"email requiredrole optional"contributor" (default), "manager", or "owner". Managers can only invite contributors and managers./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"edit_name"member_id requirednew_name required/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"change_role"member_id requirednew_role required"contributor", "manager", or "admin"/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"remove_member"member_id required/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/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 optionalResponse
{
"success": true,
"team": {
"id": "uuid",
"name": "Radiant Foxes",
"plan": "pro"
}
} Errors
403409400Skills 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
| Skill | Connection | Description |
|---|---|---|
| GitHub | OAuth | Sync repositories for Playwright automation scripts. See GitHub endpoints. |
| Jira | OAuth 2.0 | Bi-directional bug sync with comments, attachments, and severity. See Jira endpoints. |
| Claude | API Key | Root cause analysis for bug reports. See Claude endpoints. |
| Slack | Webhook | Notifications 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.
/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.
/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"
} /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 requiredprojectKey optionalResponse
{
"success": true,
"jiraKey": "PROJ-1234",
"jiraUrl": "https://your-site.atlassian.net/browse/PROJ-1234"
} /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 requiredSync Behavior
report.updated_at vs Jira fields.updated — whichever platform was modified more recently determines the value. The other side is updated automatically.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.jira_attachment_id to prevent duplicates across sync cycles.Response
{
"success": true,
"results": [
"Description synced",
"Priority pushed to Jira (high — last updated)",
"2 comment(s) pushed to Jira",
"1 attachment(s) pulled from Jira"
]
} /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 requiredResponse
{
"hasChanges": true,
"jiraUpdatedAt": "2026-03-18T15:30:00.000Z",
"changes": {
"title": { "jira": "Updated title in Jira", "bugagent": "Original title" },
"severity": { "jira": "high", "bugagent": "medium" }
}
} /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 requiredmerged requiredtitle, severity, status, type. Each value is the chosen winner (from bugAgent or Jira)./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"update_settings" or "disconnect"auto_push optionaldefault_project_key optional/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 requiredResponse
{
"updates": [
{
"id": "uuid",
"old_status": "new",
"new_status": "in_progress",
"jira_status": "In Progress"
}
],
"synced": 1
} /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 requiredsteps requiredscript optional/generate-script)schedule optional"0 9 * * 1-5")start_url optionalResponse
{
"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"
} /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 requiredtarget_url optionalscript optionalstatus optional"active" or "draft". Default: "draft"project_id optionalAuthentication
Requires session authentication (dashboard) or an API key with automations:write scope.
Plan
Pro or Team plan required.
Response
{
"id": "uuid"
} /api/automations Auth Required List all automations for the user's active team. Supports pagination and filtering by status.
Query Parameters
status optionalactive, paused, archivedproject_id optionalcreated_by optionalpage optionallimit optionalResponse
{
"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
} /api/automations/:id Auth Required Get full details of a single automation, including recorded steps, generated Playwright script, schedule, and recent run history.
Response
{
"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" }
]
} /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 optionalsteps optionalscript optionalschedule optionalnull to remove schedulestatus optionalactive, paused, or archivedResponse
{
"id": "uuid",
"name": "Login flow smoke test (updated)",
"status": "paused",
"schedule": null,
"updated_at": "2026-03-21T14:00:00Z"
} /api/automations/:id Auth Required Permanently delete an automation and all its associated run history. This action cannot be undone.
Response
{ "deleted": true } /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 requiredautomation_id optionalstart_url optionalResponse
{
"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"
} /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 requiredResponse
{
"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."
} /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 requiredResponse
{
"script": "// previous version of the script...",
"version": 2,
"versions_remaining": 1
} { "error": "No previous versions available to undo" } /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 requiredenvironment optionaldevice optional"desktop"browserstack optionaltrue to run on a real BrowserStack browser instead of the local runner. Requires bs_browser, bs_os, bs_os_version.bs_browser optional"chrome", "firefox", "safari", "edge"bs_os optional"Windows" or "OS X"bs_os_version optional"11" (Windows) or "Sonoma" (macOS)Response
{
"run_id": "uuid",
"automation_id": "uuid",
"status": "queued",
"device": "desktop",
"queued_at": "2026-03-21T14:30:00Z"
} /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 optionalstatus optionalqueued, running, passed, failed, cancelledpage optionallimit optionalResponse
{
"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
} /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 requiredenvironment optionalcallback_url optionaldevice optional"desktop". See POST /automations/runs for the full list of supported device values.Headers
Authorization requiredBearer ba_live_... — API key with automations:run scopeResponse
{
"run_id": "uuid",
"automation_id": "uuid",
"status": "queued",
"device": "desktop",
"poll_url": "/api/v1/automations/runs/uuid",
"queued_at": "2026-03-21T14:30:00Z"
} /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 requiredBearer ba_live_... — API key with automations:run scopeResponse
{
"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" }
]
} tests/bugagent/{name}.spec.ts and stay in sync on every edit./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 optionalResponse
{
"authorization_url": "https://github.com/login/oauth/authorize?client_id=...",
"state": "random-state-token"
} /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
{
"repos": [
{
"id": 123456,
"full_name": "acme/web-app",
"default_branch": "main",
"private": true
}
]
} /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 requiredrepo_full_name requiredowner/repo format (e.g. acme/web-app)branch optionalpath_prefix optionaltests/bugagent.Response
{
"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"
} /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
{
"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_statusissha_conflict, the remote file was modified outside bugAgent. UsePOST /api/github/mappingto re-map and force a fresh push, or resolve the conflict in GitHub first. - Scripts are pushed to
{path_prefix}/{automation-name}.spec.tsusing the GitHub Contents API.
/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
{
"disconnected": true
} /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 optionalproject_id optionalauthor_id optionalfrom optionalto optionalpage optionalper_page optionalResponse
{
"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
} /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 optionalcontent optionalformat optionalmarkdown (default), plain_text, rich_text, checklist, outlinevisibility optionalprivate (default) or shared. Private notes are only visible to the author. Shared notes are visible to all team membersproject_id optionaltime_spent_seconds optional0Response
{
"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"
} /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
{
"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"
} /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 optionalcontent optionalformat optionalmarkdown, plain_text, rich_text, checklist, outlinevisibility optionalprivate or sharedproject_id optionaltime_spent_seconds optionalResponse
{
"id": "uuid",
"title": "Checkout flow observations (updated)",
"content": "...",
"format": "markdown",
"visibility": "shared",
"time_spent_seconds": 2400,
"updated_at": "2026-03-22T11:00:00Z"
} /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
{ "deleted": true } /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 requiredfile requiredResponse
{
"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.
/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 optionaltoday, week, month, or all (default: all)project_id optionalcategory optionaltesting, bug-triage, automation)sort optionalnewest (default), oldest, most_time, least_timeResponse
{
"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
} /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 requiredcategory requiredtesting, bug-triage, automation, review, meeting)duration_minutes requiredproject_id optionalentry_date optionalYYYY-MM-DD format (defaults to today)Response
{
"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"
} /api/time-entries/:id Auth Required Update an existing time tracking entry. Only provided fields are changed.
Request Body
description optionalcategory optionalduration_minutes optionalproject_id optionalentry_date optionalYYYY-MM-DD formatResponse
{
"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"
} /api/time-entries/:id Auth Required Delete a time tracking entry. This action cannot be undone.
Response
{ "deleted": true } Notes
- Time Tracking is a Team plan feature. Free and Pro plan users receive a
403 Forbiddenresponse. - 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.
/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 requiredhistory optional{"role": "user"|"assistant", "content": "..."}. Max 40 entries, 100K total characters.Response
{"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
userandassistantroles are accepted. - Off-topic questions (politics, opinions, etc.) are politely redirected.
/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 requireddescription requiredtype optionalui, 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 optionalcritical, high, medium, low. Defaults to medium.project_id optionalinternal_notes optionalenvironment optional{"browser": "...", "os": "...", "device": "..."}sync_to_jira optionalfalse.attachments optional{"filename": "...", "mimeType": "image/png", "data": "base64..."}. Max 10 MB per file.Response
{
"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.
/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 requiredResponse
{
"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/:idasclaude_analysisandclaude_pushed_at. - Re-pushing the same report overwrites the previous analysis.
- Available on Pro and Team plans.
/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{"type": "click"|"navigation"|"error"|"network", "timestamp": "ISO8601", "data": {...}}duration_ms requiredproject_id optionalurl optionalenvironment optional{"browser": "...", "os": "...", "device": "..."}Response
{
"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
403error. - Maximum payload size: 5 MB per session capture.
- Sessions are retained for 30 days (Pro/Team) or configurable on Enterprise.
/api/sessions Auth Required List SDK sessions for the current organization. Supports pagination and filtering.
Query Parameters
project_id optionalreport_id optionallimit optionaloffset optionalResponse
{
"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
} /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
{
"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"
} /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 requiredreport_id requiredResponse
{
"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.
/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
| Parameter | Type | Required | Description |
|---|---|---|---|
team_size | integer | Yes | Number of tester accounts to provision (1–10) |
location | string | Yes | Geographic location for testers (e.g. “US”, “EU”, “APAC”) |
duration | string | Yes | Duration of the engagement (e.g. “1 week”, “1 month”) |
product_url | string | No | URL of the product to be tested |
product_types | string[] | No | Types of products (e.g. ["web app", "mobile app"]) |
tech_levels | string[] | No | Technical levels required (e.g. ["junior", "senior"]) |
budget | string | Yes | Budget for the engagement (e.g. “$500”, “$2000/month”) |
Response
{ "success": true, "created": 5 } Error Responses
{ "error": "Team Booster is available on Pro and Team plans only." } /api/admin/changelog Public List all changelog entries, most recent first. Also available as an RSS feed.
Response
{
"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"
},
...
]
} /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 optionalpriority optionalcritical, high, medium, lowtype optionalfunctional, regression, smoke, integration, e2e, performance, security, usability, accessibilitystatus optionalactive, draft, deprecatedsort optionalnewest, oldest, name, priority (default: newest)page optionalper_page optionalResponse
{
"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
} /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 requireddescription optionalpreconditions optionalsteps optional{ "action": "Click login", "expected": "Login form appears" }priority optionalcritical, high, medium (default), lowtype optionalfunctional (default), regression, smoke, integration, e2e, performance, security, usability, accessibilitytags optionalestimated_time optionalproject_id optionalResponse
{
"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"
} /api/test-cases/:id Auth Required Get a test case by ID with its full steps and execution history.
Response
{
"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"
} /api/test-cases/:id Auth Required Update any field of a test case. Only provided fields are changed.
Request Body
name optionaldescription optionalpreconditions optionalsteps optionalpriority optionalcritical, high, medium, lowtype optionalstatus optionalactive, draft, deprecatedtags optionalestimated_time optionalResponse
{ "id": "uuid", "name": "Updated name", ... } /api/test-cases/:id Auth Required Permanently delete a test case. Removes it from all suites.
Response
{ "success": true } /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 requiredResponse
{ "id": "uuid", "name": "[Copy] Verify checkout with discount code", ... } /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 optionalpage optionalper_page optionalResponse
{
"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
} /api/test-suites Auth Required Create a new test suite to group related test cases.
Request Body
name requireddescription optionalproject_id optionalResponse
{
"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"
} /api/test-suites/:id Auth Required Get a test suite by ID with its full list of cases in order.
Response
{
"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"
} /api/test-suites/:id Auth Required Update a test suite's name or description.
Request Body
name optionaldescription optionalResponse
{ "id": "uuid", "name": "Updated Suite Name", ... } /api/test-suites/:id Auth Required Delete a test suite. Test cases within the suite are not deleted.
Response
{ "success": true } /api/test-suites/:id/cases Auth Required Add one or more test cases to a suite.
Request Body
case_ids requiredResponse
{ "added": 3, "case_count": 15 } /api/test-suites/:id/cases Auth Required Remove a test case from a suite.
Request Body
case_id requiredResponse
{ "success": true, "case_count": 14 } /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 requiredResponse
{ "success": true } /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 optionalstatus optionalin_progress, completedsuite_id optionalpage optionalper_page optionalResponse
{
"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
} /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 requiredname requiredassigned_to optionalResponse
{
"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"
} /api/test-runs/:id Auth Required Get a test run by ID with all case results.
Response
{
"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"
} /api/test-runs/:id Auth Required Update a test run's name or assignee.
Request Body
name optionalassigned_to optionalResponse
{ "id": "uuid", "name": "Updated Run Name", ... } /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 requiredstatus requiredpassed, failed, blocked, skippedactual_result optionalnotes optionalResponse
{ "success": true, "status": "failed", "case_id": "uuid" } /api/test-runs/:id/complete Auth Required Mark a test run as completed. Calculates and stores the final pass rate.
Response
{
"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"
} /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
{
"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"
} /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 optionalto optionalsuite_id optionalResponse
{
"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
} /api/geo-snap Auth Required List saved Geo-Snap screenshots. Filter by country, search by URL, and paginate results.
Query Parameters
search optionalcountry optionalUS, DE, JP)sort optionalnewest (default), oldestpage optionalper_page optionalResponse
{
"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
} /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 requiredcountries required["US", "DE", "JP"]). Free: max 1, Pro/Team: max 5Response
{
"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"
}
]
} /api/geo-snap/:id Auth Required Delete a saved Geo-Snap screenshot by ID.
Path Parameters
id requiredResponse
{ "deleted": true } /api/mobile/apps Auth Required List uploaded mobile apps. Filter by platform, search by name, and paginate results.
Query Parameters
search optionalplatform optionalandroid or iossort optionalnewest (default), oldest, namepage optionalper_page optionalResponse
{
"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
} /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 requiredname requiredplatform requiredandroid or iosversion optional2.1.0)package_name optionalcom.example.myapp)Response
{
"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"
} /api/mobile/apps/:id Auth Required Get full details for a mobile app, including automation count.
Path Parameters
id requiredResponse
{
"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"
} /api/mobile/apps/:id Auth Required Update an uploaded mobile app's metadata.
Path Parameters
id requiredRequest Body
name optionalversion optionalpackage_name optionalsimulator_file_url optionalnull to remove.simulator_storage_path optionalResponse
{
"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"
} /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 requiredRequest Body
storage_path requiredfile_size optionalversion optionalResponse
{ "id": "uuid", "name": "My App", "platform": "android", "version": "2.0.0", "file_size": 15728640, "updated_at": "2026-03-29T..." } /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 requiredResponse
{ "success": true } /api/mobile/automations Auth Required List mobile automation scripts. Filter by app, script type, and status.
Query Parameters
search optionalapp_id optionalscript_type optionalmaestro (YAML), appium (Python), or appium_js (JavaScript)status optionaldraft, active, pausedsort optionalnewest (default), oldest, nameResponse
{
"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
} /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 requiredapp_id requiredscript_type requiredmaestro (YAML), appium (Appium Python), or appium_js (Appium JS)script requiredtarget_devices optional["Pixel 7", "Samsung Galaxy S23"])Response
{
"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"
} /api/mobile/automations/:id Auth Required Get full details for a mobile automation, including app info and recent runs.
Path Parameters
id requiredResponse
{
"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"
} /api/mobile/automations/:id Auth Required Update a mobile automation script or its metadata.
Path Parameters
id requiredRequest Body
name optionalscript optionalstatus optionaldraft, active, or pausedtarget_devices optionalResponse
{
"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"
} /api/mobile/automations/:id Auth Required Delete a mobile automation. Fails if the automation has active schedules — delete schedules first.
Path Parameters
id requiredResponse
{ "success": true } /api/mobile/runs Auth Required List mobile test runs. Filter by automation and status.
Query Parameters
automation_id optionalstatus optionalqueued, running, passed, failed, erroredsort optionalnewest (default), oldestResponse
{
"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
} /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 requireddevice requiredPixel 7, iPhone 15 Pro)os_version optional14 for Android 14, 17.2 for iOS)Response
{
"id": "uuid",
"automation_id": "uuid",
"status": "queued",
"device": "Pixel 7",
"os_version": "14",
"provider": "browserstack",
"created_at": "2026-03-22T08:00:00Z"
} /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 requiredResponse
{
"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"
} /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"archived"/api/mobile/devices Auth Required List available BrowserStack real devices for mobile testing. Optionally filter by platform.
Query Parameters
platform"android" or "ios". Omit to get both./api/mobile/schedules Auth Required List scheduled mobile test runs with cron expression, timezone, and notification settings.
Response
{
"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
} /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 requiredcron_expression required0 9 * * 1-5 for weekdays at 9am)timezone optionalUTC)devices requirednotify_on_fail optionalnone (default), email, slack, bothResponse
{
"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"
} /api/mobile/schedules/:id Auth Required Update a mobile test schedule.
Path Parameters
id requiredRequest Body
cron_expression optionaltimezone optionaldevices optionalnotify_on_fail optionalenabled optionalResponse
{
"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"
} /api/mobile/schedules/:id Auth Required Delete a mobile test schedule.
Path Parameters
id requiredResponse
{ "success": true } /api/performance/tests Auth Required List all performance test configurations for the current team.
Response
{ "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": "..." }] } /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 requiredurl requireddevice optionaldesktop (default), mobile, tabletvirtual_users optionalduration optionalperf_threshold optionalauto_create_bug optionalapp_id optionalPOST /mobile/apps). Required for mobile performance testsmobile_devices optional["Pixel 7", "iPhone 15 Pro"]). Each device creates one run and consumes 1 monthly creditmobile_thresholds optionalcpu_max (%), memory_peak (MB), fps_min, battery_drain_max (%), launch_time_max (ms). Exceeding any threshold triggers a bug reportResponse
{ "test": { "id": "uuid", "name": "Homepage Perf", "url": "https://example.com", ... } } /api/performance/tests/:id Auth Required Get a single performance test configuration by ID.
Path Parameters
id required/api/performance/tests/:id Auth Required Update a performance test configuration. Only include fields you want to change.
Path Parameters
id requiredBody Parameters
name optionalurl optionaldevice optionalvirtual_users optionalperf_threshold optionalauto_create_bug optional/api/performance/tests/:id Auth Required Delete a performance test configuration and all its associated runs.
Path Parameters
id requiredResponse
{ "success": true } /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 requiredResponse
{ "run": { "id": "uuid", "status": "running", "test_id": "uuid", "created_at": "..." } } /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/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 requiredResponse
Returns text/csv with Content-Disposition: attachment; filename="performance-report-{id}.csv"
/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 requiredResponse
{ "success": true, "status": "archived" } /api/performance/runs/:id/archive Auth Required Unarchive a previously archived performance test run, restoring it to the default listing.
Path Parameters
id requiredResponse
{ "success": true, "status": "completed" } /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
{ "used": 1, "limit": 2, "remaining": 1, "plan": "team", "period_start": "2026-03-01", "period_end": "2026-03-31" } /api/security/scans Auth Required Create a security scan configuration. Requires Pro, Team, or Enterprise plan.
Request Body
name requiredscan_type requiredweb or mobiletarget_url web onlyapp_id mobile onlyscan_depth optionalquick (default, ~30s), regular (~5min), deep (up to 30min)auth_config optional{ login_url, username, password } for authenticated web scanningauto_create_bug optionalmin_severity_for_bug optionalcritical, high (default), medium, low/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 requiredscan_depth optionalResponse
{ "id": "run-uuid", "status": "queued" } /api/security/runs/{id} Auth Required Get scan run status and results. Poll this endpoint while status is queued or running.
Response (completed)
{
"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
} /api/security/domains Auth Required List verified domains for the team. Use POST to add a domain and receive a DNS TXT verification token.
/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/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 formatpr_numberintegerPull request number/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.
/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.
/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.
/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 Claudeauto_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 findingsmin_severity_for_bugstring?Minimum severity for auto-bug: critical, high, medium, low/api/code-review/usage Auth Required Check code review usage. Returns reviews used and plan info. Unlimited reviews on Pro, Team, and Enterprise plans.
/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).
/api/github/webhooks Auth Required List all GitHub webhooks registered for the team. Returns webhook ID, repo, active status, and creation date.
/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.
/api/github/webhooks Auth Required Remove a GitHub webhook from a repository. Requires repo. Deletes the webhook from both GitHub and the bugAgent database.
/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.
/api/explorations Auth Required List all Exploratory AI configs for the team. Returns name, target URL, status, last run info, and run count.
/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.
/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.
/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.
/api/explorations/usage Auth Required Check monthly Exploratory AI usage. Pro: 3/mo, Team: 10/mo, Enterprise: 50/mo.
/api/explorations/trends Auth Required Get exploration history and trends. Returns run history, finding trends by type and severity over time, screenshot comparisons between consecutive runs, and delta vs previous run. Query params: exploration_id (optional filter), days (7/30/90, default 30).
/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.
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.