> ## Documentation Index
> Fetch the complete documentation index at: https://qawolf-flows-tab-consolidation-outlining.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> The QA Wolf REST API provides direct HTTP access to core platform actions.

<Tip>
  For most use cases, [`@qawolf/ci-sdk`](/qawolf/libraries/ci-sdk/api-reference) is recommended over direct endpoint access.
</Tip>

## Authentication

All endpoints require a `QAWOLF_API_KEY` passed as a Bearer token.

```bash theme={null}
Authorization: Bearer $QAWOLF_API_KEY
```

### Kinds of API key

| Kind         | Acts as                                                            | Where to create it                                 |
| ------------ | ------------------------------------------------------------------ | -------------------------------------------------- |
| Workspace    | One workspace                                                      | **Workspace Settings → Integrations → API Access** |
| Organization | The whole organization, across every workspace in it               | **Workspace Settings → API Keys**                  |
| User         | The member who owns the key, across every workspace they can reach | **Workspace Settings → API Keys**                  |

To reach either settings page, open the **Workspace Name** dropdown in QA Wolf.

### Which workspace a request acts on

A workspace API key implies its workspace, so requests never name one. An organization or user API key does not, so a request that is scoped to a single workspace resolves it in this order:

1. The workspace named by a resource in the request, such as `environmentId`.
2. The workspace named by `workspaceId`.
3. Your organization's first-created workspace.

Creating another workspace never changes step 3, so a pipeline that relies on it keeps running. Even so, pass `workspaceId` when your organization has more than one workspace: it states which workspace you meant, and it keeps working if the first-created workspace is ever deleted or disabled. Copy the ID from **Workspace Settings → API Keys**.

## Base URL

```text theme={null}
https://app.qawolf.com
```

## Endpoints

| Endpoint                                                                                   | Method        | Description                                                       |
| ------------------------------------------------------------------------------------------ | ------------- | ----------------------------------------------------------------- |
| [`/api/webhooks/deploy_success`](/qawolf/deploy-success)                                   | `POST`        | Notify QA Wolf of a successful deployment to trigger a run.       |
| [`/api/webhooks/environment_terminated`](/qawolf/environment_terminated)                   | `POST`        | Notify QA Wolf that an ephemeral environment has been terminated. |
| [`/api/v0/ci-greenlight/{root-run-id}`](/qawolf/v0-ci-greenlight)                          | `GET`         | Poll for the outcome of a run to gate a pipeline.                 |
| [`/api/v0/run-inputs-executables-signed-urls`](/qawolf/run-inputs-executables-signed-urls) | `GET` + `PUT` | Generate a signed URL and upload an executable file.              |
