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

# API Reference

> Complete API reference for Humancheck

The Humancheck API is a RESTful API that provides endpoints for creating reviews, making decisions, and managing the human-in-the-loop workflow.

## Base URL

**Platform (Cloud):**

```
https://api.humancheck.dev
```

**Open Source (Self-hosted):**

```
http://localhost:8000  # Local development
https://your-domain.com  # Production
```

## Authentication

**Platform:** All API requests require an API key. Get your API key from [platform.humancheck.dev](https://platform.humancheck.dev).

**Open Source:** Authentication is optional. Configure in `humancheck.yaml`:

```yaml theme={null}
enable_auth: true
api_key: your-secret-key
```

Include your API key in the `Authorization` header:

```bash theme={null}
Authorization: Bearer your-api-key-here
```

### Python Example

```python theme={null}
headers = {
    "Authorization": "Bearer your-api-key-here",
    "Content-Type": "application/json"
}
```

### cURL Example

```bash theme={null}
curl -H "Authorization: Bearer your-api-key-here" \
     https://api.humancheck.dev/reviews
```

## API Endpoints

### Core Endpoints (Available in Both)

**Reviews:**

* `POST /reviews` - Create a new review
* `GET /reviews` - List reviews
* `GET /reviews/{review_id}` - Get a specific review
* `POST /reviews/{review_id}/decide` - Make a decision on a review
* `GET /reviews/{review_id}/decision` - Get the decision for a review
* `POST /reviews/{review_id}/feedback` - Submit feedback on a review
* `POST /reviews/{review_id}/attachments` - Upload attachment
* `GET /reviews/{review_id}/attachments` - List attachments
* `GET /attachments/{id}` - Get attachment
* `GET /attachments/{id}/download` - Download attachment
* `DELETE /attachments/{id}` - Delete attachment

**Statistics:**

* `GET /stats` - Get review statistics

**Health:**

* `GET /health` - Health check endpoint

### Platform Endpoints (Platform Only)

<Warning>
  These endpoints are only available in [Humancheck Platform](/platform/overview), not in the open-source version.
</Warning>

**Organizations & Users:**

* `POST /organizations` - Create an organization
* `GET /organizations/{org_id}` - Get an organization
* `POST /users` - Create a user
* `POST /teams` - Create a team
* `POST /agents` - Register an AI agent

**Routing:**

* `POST /routing-rules` - Create a routing rule (database-backed)

**Extended Features:**

* `POST /evals` - Create evaluation suite
* `GET /audit-logs` - Get audit logs
* `POST /integrations/slack/oauth` - OAuth connector setup
* `POST /webhooks` - Create webhook endpoint
* `GET /webhooks` - List webhooks
* `POST /workflows` - Create multi-user approval workflow
* `GET /workflows` - List approval workflows

## OpenAPI Specification

The API follows the OpenAPI 3.0 specification. You can view the interactive API documentation at:

* Swagger UI: [https://api.humancheck.dev/docs](https://api.humancheck.dev/docs)
* ReDoc: [https://api.humancheck.dev/redoc](https://api.humancheck.dev/redoc)

## Next Steps

* Explore [Review Endpoints](/api-reference/reviews/create) (Core)
* Learn about [Statistics](/api-reference/stats) (Core)
* Set up [Webhooks](/api-reference/endpoint/webhook) (Platform)
* Check out [Platform Endpoints](/api-reference/organizations) (Platform only)
