> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Programmatically manage test suites, flows, and app builds via the BugRadar API

The BugRadar API allows you to programmatically create test suites, flows, and upload app builds. This is useful for integrating BugRadar with your own automation platforms, AI agents, or CI/CD pipelines.

> [!TIP]
>
> For a simpler CI/CD setup using GitHub Actions, see [CI/CD Integration](/docs/ci-cd-integration.md). The endpoints below are for custom integrations.

## Base URL

```
https://backend.usebugradar.com
```

All API endpoints are relative to this base URL.

***

## Authentication

All API requests require an API key passed in the `X-API-Key` header.

```bash theme={null}
curl -X POST https://backend.usebugradar.com/api/v1/suites \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Test Suite"}'
```

**X-API-Key** `string` *required*

Your organization's API key. Create and manage it in [Settings → API Keys](https://usebugradar.com/settings?tab=api-keys).

To check a key and see which workspace it belongs to, call `GET /api/v1/whoami`:

```bash theme={null}
curl https://backend.usebugradar.com/api/v1/whoami \
  -H "X-API-Key: YOUR_API_KEY"
```

```json theme={null}
{ "organization_id": "f3b1c2d4-...", "organization_name": "Acme" }
```

***

## Available Endpoints

> [card] [Apps](/docs/api-apps.md)
>
> List apps and their builds, and manage default Chrome extension dependencies

> [card] [Suites & Flows](/docs/api-suites-flows.md)
>
> Create and list test suites and flows

> [card] [Labels](/docs/api-labels.md)
>
> Manage labels, attach them to flows/suites, and run by label

> [card] [Runs](/docs/api-runs.md)
>
> Trigger flows, poll for results, and fetch run details

> [card] [Hooks](/docs/api-hooks.md)
>
> Manage setup, teardown, and runtime hook scripts

> [card] [Environment Variables](/docs/api-env-vars.md)
>
> List environments and manage their env vars (including secrets)

> [card] [Members](/docs/api-members.md)
>
> List, invite and remove team members

> [card] [Usage](/docs/api-usage.md)
>
> Read flow run and AI action usage for a workspace

> [card] [CI/CD Upload](/docs/api-ci.md)
>
> Upload app builds programmatically

***

## Error Responses

| Status Code | Description |
| - | - |
| **400** | Bad request - missing or invalid parameters |
| **401** | Missing API key |
| **402** | Balance too low (pay as you go): the run did not start |
| **403** | Invalid API key |
| **404** | Resource not found |
| **422** | Validation error - check the response body for details |
| **500** | Server error |

#### Example Error Response

```json theme={null}
{
  "detail": "Suite not found"
}
```

***

## Rate Limits

The API is rate-limited to prevent abuse. If you receive a `429 Too Many Requests` response, wait a few seconds before retrying.

***

## Use Cases

> [card] AI Test Generation
>
> Generate test cases from requirements using AI, then push them to BugRadar via the API

> [card] JIRA Integration
>
> Automatically create test suites when tickets move to "Ready for QA" status

> [card] Test Sync
>
> Keep BugRadar tests in sync with your test management system

> [card] Bulk Import
>
> Migrate existing test cases from spreadsheets or other tools

***

## Need Help?

> [card] [Writing Effective Tests](/docs/writing-effective-flow-instructions.md)
>
> Learn how to write clear, reliable test instructions

> [card] [Contact Support](mailto:founders@usebugradar.com)
>
> Reach out if you need help with your integration


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.