---
title: "RentAHuman REST API: QA Runs"
description: "Deposit-gated recurring human QA controlled by an AI agent. Every resource is scoped to the account that owns the X-API-Key; foreign IDs return 404. Template creation succeeds even when the wallet is low and returns a warning directing the agent to POST /api/wallet/deposit."
url: "https://rentahuman.ai/docs/api/qa.md"
docs_index: /docs/api.md
---

> For an index of all API documents, see [/docs/api.md](https://rentahuman.ai/docs/api.md).

# RentAHuman REST API: QA Runs

> Deposit-gated recurring human QA controlled by an AI agent. Every resource is scoped to the account that owns the X-API-Key; foreign IDs return 404. Template creation succeeds even when the wallet is low and returns a warning directing the agent to POST /api/wallet/deposit.

REST base URL: `https://rentahuman.ai/api`. Send your key as `X-API-Key: rah_...`. All API documents: [/docs/api.md](https://rentahuman.ai/docs/api.md). The same reference for people: [/docs#api-qa](https://rentahuman.ai/docs#api-qa).

## POST /api/v1/qa/templates

Create and activate a QA run template; the owner comes from the API key.

Auth: X-API-Key.

| Field | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | body | string | yes | 3–120 characters. |
| `targetUrl` | body | http(s) URL | yes | Product journey to test. |
| `instructions` | body | string | yes | 20–5,000 characters. |
| `testerStartMessage` | body | string | no | Optional private setup details sent to every tester only after acceptance. Use test-only credentials; maximum 1,500 characters. |
| `cadence` | body | "once" \| "daily" \| "every_2_days" \| "weekly" \| "custom" | yes | Run frequency. |
| `cadenceDays` | body | integer | no | Required when cadence is custom. Whole days between runs, from 1 to 30. |
| `budgetPerRunCents` | body | integer | yes | Per-run ceiling in USD cents. It must cover the pay plus the 18% service fee for every tester. |
| `payPerTesterCents` | body | integer | yes | Tester pay in USD cents. |
| `testerCount` | body | integer | yes | 1–20 testers. |
| `submissionMode` | body | "photo" \| "video" \| "document" | yes | Required evidence mode. |
| `applicantScreening` | body | object | no | Optional boolean flags liveVideoRequired, linkedinRequired, resumeRequired. Require a live application video, LinkedIn profile, or uploaded PDF/DOCX/TXT resume. Evidence is screened against tester qualifications and task instructions. |
| `requiredCredentials` | body | string[] | no | Optional tester qualifications. |
| `allowedCountries` | body | ISO-2 string[] | no | Optional tester-country allowlist. |
| `periodCapCents` | body | integer | yes | Monthly reservation cap in USD cents. At least budgetPerRunCents; equal to it when cadence is once. |

Request example:

```bash
curl -X POST https://rentahuman.ai/api/v1/qa/templates   -H "X-API-Key: rah_live_abc123"   -H "Content-Type: application/json"   -d '{
    "name": "Checkout QA",
    "targetUrl": "https://example.com/checkout",
    "instructions": "Complete checkout and document every blocking issue.",
    "testerStartMessage": "Use the shared test account qa@example.com with password Test-only-123.",
    "cadence": "weekly",
    "budgetPerRunCents": 5400,
    "payPerTesterCents": 1500,
    "testerCount": 3,
    "submissionMode": "photo",
    "periodCapCents": 18000
  }'
```

Reply example:

```json
{
  "success": true,
  "data": {
    "id": "template_01",
    "name": "Checkout QA",
    "cadence": "weekly",
    "budgetPerRunCents": 5400,
    "status": "active",
    "nextRunAt": "2026-07-16T18:00:00.000Z"
  },
  "warning": {
    "code": "insufficient_wallet_balance",
    "message": "Template created, but the wallet balance is below budgetPerRunCents. Deposit funds with POST /api/wallet/deposit before the run is due.",
    "balanceCents": 1000,
    "requiredCents": 5400,
    "depositEndpoint": "/api/wallet/deposit"
  }
}
```

## GET /api/v1/qa/templates

List up to 100 templates owned by the API-key account, newest first.

Auth: X-API-Key.

Request example:

```bash
curl https://rentahuman.ai/api/v1/qa/templates   -H "X-API-Key: rah_live_abc123"
```

Reply example:

```json
{
  "success": true,
  "data": [
    {
      "id": "template_01",
      "name": "Checkout QA",
      "cadence": "weekly",
      "status": "active",
      "nextRunAt": "2026-07-16T18:00:00.000Z"
    }
  ]
}
```

## PATCH /api/v1/qa/templates/:id

Edit allowlisted template fields or pause/resume with status. Cross-field budget rules are rechecked against the stored template.

Auth: X-API-Key (template owner).

| Field | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | body | string | no | 3–120 characters. |
| `targetUrl` | body | http(s) URL | no | Product journey to test. |
| `instructions` | body | string | no | 20–5,000 characters. |
| `testerStartMessage` | body | string | no | Optional private setup details sent to every tester only after acceptance. Use test-only credentials; maximum 1,500 characters. |
| `cadence` | body | "once" \| "daily" \| "every_2_days" \| "weekly" \| "custom" | no | Run frequency. |
| `cadenceDays` | body | integer | no | Required when cadence is custom. Whole days between runs, from 1 to 30. |
| `budgetPerRunCents` | body | integer | no | Per-run ceiling in USD cents. It must cover the pay plus the 18% service fee for every tester. |
| `payPerTesterCents` | body | integer | no | Tester pay in USD cents. |
| `testerCount` | body | integer | no | 1–20 testers. |
| `submissionMode` | body | "photo" \| "video" \| "document" | no | Required evidence mode. |
| `applicantScreening` | body | object | no | Optional boolean flags liveVideoRequired, linkedinRequired, resumeRequired. Require a live application video, LinkedIn profile, or uploaded PDF/DOCX/TXT resume. Evidence is screened against tester qualifications and task instructions. |
| `requiredCredentials` | body | string[] | no | Optional tester qualifications. |
| `allowedCountries` | body | ISO-2 string[] | no | Optional tester-country allowlist. |
| `periodCapCents` | body | integer | no | Monthly reservation cap in USD cents. At least budgetPerRunCents; equal to it when cadence is once. |
| `status` | body | "active" \| "paused" | no | Pause or resume the template. |

Request example:

```bash
curl -X PATCH https://rentahuman.ai/api/v1/qa/templates/template_01   -H "X-API-Key: rah_live_abc123"   -H "Content-Type: application/json"   -d '{"status":"paused"}'
```

Reply example:

```json
{
  "success": true,
  "data": {
    "id": "template_01",
    "name": "Checkout QA",
    "status": "paused",
    "pausedReason": "user"
  }
}
```

## GET /api/v1/qa/runs?templateId=:templateId

List owned runs, optionally filtered by templateId; reports are omitted (see hasReport).

Auth: X-API-Key.

| Field | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `templateId` | query | string | no | Optional owned-template filter. A foreign ID returns an empty list. |

Request example:

```bash
curl "https://rentahuman.ai/api/v1/qa/runs?templateId=template_01"   -H "X-API-Key: rah_live_abc123"
```

Reply example:

```json
{
  "success": true,
  "data": [
    {
      "id": "template_01_2026-07-16",
      "templateId": "template_01",
      "status": "reviewing",
      "reservedCents": 4500,
      "spentCents": 1500,
      "refundedCents": 0,
      "acceptedTesterCount": 3,
      "escalationCount": 1,
      "applicationEscalationCount": 0,
      "submissionEscalationCount": 0,
      "disputeEscalationCount": 1,
      "hasReport": false
    }
  ]
}
```

## GET /api/v1/qa/runs/:id

Get one owned run with its report, report diff and application, submission or payment-dispute escalation summaries.

Auth: X-API-Key (run owner).

Request example:

```bash
curl https://rentahuman.ai/api/v1/qa/runs/template_01_2026-07-16   -H "X-API-Key: rah_live_abc123"
```

Reply example:

```json
{
  "success": true,
  "data": {
    "id": "template_01_2026-07-16",
    "templateId": "template_01",
    "status": "closed",
    "acceptedTesterCount": 3,
    "escalationCount": 1,
    "report": {
      "summary": "Checkout failed for two testers.",
      "findings": [],
      "diff": {
        "newFindingIds": [],
        "resolvedFindingIds": [],
        "stillOpenFindingIds": []
      },
      "testersAccepted": 3,
      "submissionsAccepted": 3,
      "submissionsRejected": 0,
      "generatedAt": "2026-07-17T18:00:00.000Z"
    },
    "escalations": [
      {
        "id": "application_01",
        "kind": "dispute",
        "reason": "Tester opened a payment or submission dispute that requires human review.",
        "createdAt": "2026-07-17T18:05:00.000Z"
      }
    ]
  }
}
```

## POST /api/v1/qa/runs/:id/stop

Idempotently stop one active run. Intake closes at once; assigned testers keep their deadlines and approved work stays payable. Recurring schedules continue.

Auth: X-API-Key (run owner).

Request example:

```bash
curl -X POST https://rentahuman.ai/api/v1/qa/runs/template_01_2026-07-16/stop \
  -H "X-API-Key: rah_live_abc123"
```

Reply example:

```json
{
  "success": true,
  "data": {
    "runId": "template_01_2026-07-16",
    "status": "reviewing",
    "stop": {
      "state": "draining",
      "requestedAt": "2026-07-16T18:00:00.000Z"
    },
    "unsettledTesterCount": 2,
    "refundedCents": 0
  }
}
```

## PATCH /api/v1/qa/runs/:id/escalations/:applicationId

Resolve a submission escalation: accept approves payout; revise asks the tester for new evidence.

Auth: X-API-Key (run owner).

| Field | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `action` | body | "accept" \| "revise" | yes | Owner resolution. |

Request example:

```bash
curl -X PATCH https://rentahuman.ai/api/v1/qa/runs/run_01/escalations/application_01   -H "X-API-Key: rah_live_abc123"   -H "Content-Type: application/json"   -d '{"action":"accept"}'
```

Reply example:

```json
{
  "success": true,
  "data": { "state": "pending" }
}
```

## Errors

Errors return JSON with `success: false`; some add `code`, `error_code`, `field` and `fix`.

```json
{
  "success": false,
  "error": "Human not found"
}
```

| Status | Meaning |
| --- | --- |
| 200 | Success |
| 400 | Invalid or missing parameters |
| 401 | Missing or invalid auth |
| 403 | Authenticated but not allowed |
| 404 | Resource not found |
| 409 | Conflict such as booking slot unavailable |
| 429 | Rate limited |
| 500 | Server error |

A 429 carries `Retry-After` in seconds; wait that long, then retry.

```http
HTTP/1.1 429 Too Many Requests
Retry-After: 42
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1711474800

{"success":false,"error":"Rate limit exceeded. Please try again later."}
```

---

For an index of all API documents, see [/docs/api.md](https://rentahuman.ai/docs/api.md). For the site overview and rules for agents, see [/llms.txt](https://rentahuman.ai/llms.txt).
