> For the complete documentation index, see [llms.txt](https://docs.bugbug.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bugbug.io/running-tests/running-via-api.md).

# Running via API

## Running via API

BugBug can be connected to CI/CD pipelines, deployment tools, and custom systems through Public API, CLI, or incoming webhooks.

Use this page to choose the right option.

### Public API

Use the [Public API ](#public-api)when you are building a custom integration and need programmatic control.

The Public API can list and manage tests and suites, start runs, check statuses, retrieve results, stop runs, download reports, export/import data, update settings, and manage visual regression reference screenshots.

BugBug provides API documentation in three formats:

* [GitBook](/public-api-reference/config.md)
* [Swagger](https://app.bugbug.io/docs/swagger/?version=v2)
* [Redoc](https://app.bugbug.io/docs/redoc/?version=v2)

Read more about public integration [here](/integrations/public-api.md).

### Command Line Interface

Use CLI when you need to run BugBug tests from CI/CD without writing a custom integration.

[Learn how to seamlessly integrate BugBug into your existing workflow](/integrations/api.md)

### Incoming webhooks

Use incoming webhooks when another tool only needs to trigger a test or suite with a single `POST` request.

[Learn more how to use incoming webhooks](/integrations/webhooks.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bugbug.io/running-tests/running-via-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
