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

# Introduction

> Use the Propel Review API to run asynchronous, diff-based code reviews.

Use the Propel API to create review tokens, submit pull request diffs for asynchronous review, and fetch review results.

## Base URL

`https://api.propelcode.ai`

<Tip>
  For local testing, target `http://localhost:6060` with a local review API token.
</Tip>

## Authentication

The API uses two bearer token types in the `Authorization` header:

```bash theme={null}
Authorization: Bearer <token>
```

* Use your dashboard auth token for `/v1/auth/tokens` endpoints.
* Use a review API token for `/v1/reviews` endpoints.

## Supported endpoints

The documented endpoints are:

* `POST /v1/auth/tokens`
* `GET /v1/auth/tokens`
* `DELETE /v1/auth/tokens/{id}`
* `POST /v1/reviews`
* `GET /v1/reviews/{review_id}`

## Recommended workflow

1. Create a review API token with `POST /v1/auth/tokens`.
2. Compute a base commit that exists in remote history: `git rev-parse main`.
3. Generate a diff: `git diff main...HEAD`.
4. Call `POST /v1/reviews` with `diff`, `repository`, and optional `base_commit`.
5. Poll `GET /v1/reviews/{review_id}` until status is `completed` or `failed`.
