# Release drafts

Your own release form with the same live checks and questions as the embedded builder.

Paths start at `$ACTIVQC_BASE_URL`, and every call sends `Authorization: Bearer $ACTIVQC_KEY`. Errors use the [error envelope](https://activqc.wavbee.com/docs/errors.md). [All endpoints](https://activqc.wavbee.com/docs/api-reference.md).

## GET /v1/release_drafts

List release drafts.

**Auth:** a secret key, `Authorization: Bearer $ACTIVQC_KEY`.

#### Parameters

| Name | In | Type | Description |
|---|---|---|---|
| `status` | query | string | Filter by draft status: `editing`, `submitted`, or `archived`. |
| `external_ref` | query | string | Filter by exact external_ref. |
| `limit` | query | integer | Page size (1..100, default 20). |
| `cursor` | query | string | Opaque cursor returned as `next_cursor` by the previous page. |

#### Example request

```bash
curl -s "$ACTIVQC_BASE_URL/v1/release_drafts" \
  -H "Authorization: Bearer $ACTIVQC_KEY"
```

#### Responses

| Status | Meaning |
|---|---|
| `200` | Draft list. |
| `422` | Invalid filter or cursor. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |

#### Response `200`

| Field | Type | Description |
|---|---|---|
| `object` | string | **Required.** Always `list`. |
| `data` | array of object | **Required.** |
| `data[].id` | string | **Required.** Example `rd_7fK2mP9xQ4nB8vR1cT6wY3zA`. |
| `data[].object` | string | **Required.** Always `qc.release_draft`. |
| `data[].status` | string | **Required.** One of `editing`, `submitted`, `archived`. |
| `data[].external_ref` | string or null | Example `release-1042`. |
| `data[].end_user_ref` | string or null | Example `artist-88`. |
| `data[].lock_version` | integer | **Required.** Example `0`. |
| `data[].livemode` | boolean | **Required.** |
| `data[].payload` | object | **Required.** |
| `data[].qc_run_id` | integer or null |  |
| `data[].submitted_at` | string (date-time) or null |  |
| `data[].created_at` | string (date-time) | **Required.** |
| `data[].updated_at` | string (date-time) | **Required.** |
| `has_more` | boolean | **Required.** |
| `next_cursor` | string or null |  |

```json
{
  "object": "list",
  "data": [
    {
      "id": "rd_7fK2mP9xQ4nB8vR1cT6wY3zA",
      "object": "qc.release_draft",
      "status": "editing",
      "external_ref": "release-1042",
      "end_user_ref": "artist-88",
      "lock_version": 0,
      "livemode": false,
      "payload": {},
      "qc_run_id": 1,
      "submitted_at": "2026-11-24T10:00:00Z",
      "created_at": "2026-11-24T10:00:00Z",
      "updated_at": "2026-11-24T10:00:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": "string"
}
```

## POST /v1/release_drafts

Create a release draft.

**Auth:** a secret key, `Authorization: Bearer $ACTIVQC_KEY`.

Send an `Idempotency-Key` header (a new UUID per operation; a retry reuses it).

#### Parameters

| Name | In | Type | Description |
|---|---|---|---|
| `Idempotency-Key` | header | string | **Required.** A unique string per operation, for example a UUID. A retry with the same key returns the first answer. Missing: 422. |

#### Request body

`application/json`.

Optional initial metadata and references. `payload` must only contain editable keys (never `qc_answers`) and is capped at 512 KB.

| Field | Type | Description |
|---|---|---|
| `external_ref` | string |  |
| `end_user_ref` | string | Your end user. Also the account id (TR1) when no `account` is sent. |
| `payload` | object |  |
| `account` | object | The uploading account, keyed by your own account id. Its trust decides whether a clean release goes out at once or is checked by a person first (rule TR1). `trust_score` (0-100) is your own score for this call; a WAVBEE staff override beats it, and it beats the score activQC works out from the account's history. Anything else is a 422. |
| `account.id` | string | **Required.** 1 to 128 characters. Example `artist-8812`. |
| `account.trust_score` | integer | 0 to 100. Example `35`. |
| `account.name` | string | A label for your console, at most 255 characters. Example `Kayal Beats`. |

#### Example request

```bash
curl -s -X POST "$ACTIVQC_BASE_URL/v1/release_drafts" \
  -H "Authorization: Bearer $ACTIVQC_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### Responses

| Status | Meaning |
|---|---|
| `201` | Draft created. |
| `401` | No key. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |
| `409` | Duplicate external_ref. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |
| `422` | Missing Idempotency-Key or invalid payload. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |

#### Response `201`

| Field | Type | Description |
|---|---|---|
| `id` | string | **Required.** Example `rd_7fK2mP9xQ4nB8vR1cT6wY3zA`. |
| `object` | string | **Required.** Always `qc.release_draft`. |
| `status` | string | **Required.** One of `editing`, `submitted`, `archived`. |
| `external_ref` | string or null | Example `release-1042`. |
| `end_user_ref` | string or null | Example `artist-88`. |
| `lock_version` | integer | **Required.** Example `0`. |
| `livemode` | boolean | **Required.** |
| `payload` | object | **Required.** |
| `qc_run_id` | integer or null |  |
| `submitted_at` | string (date-time) or null |  |
| `created_at` | string (date-time) | **Required.** |
| `updated_at` | string (date-time) | **Required.** |

```json
{
  "id": "rd_7fK2mP9xQ4nB8vR1cT6wY3zA",
  "object": "qc.release_draft",
  "status": "editing",
  "external_ref": "release-1042",
  "end_user_ref": "artist-88",
  "lock_version": 0,
  "livemode": false,
  "payload": {},
  "qc_run_id": 1,
  "submitted_at": "2026-11-24T10:00:00Z",
  "created_at": "2026-11-24T10:00:00Z",
  "updated_at": "2026-11-24T10:00:00Z"
}
```

## GET /v1/release_drafts/{id}

Fetch a release draft.

**Auth:** a secret key, `Authorization: Bearer $ACTIVQC_KEY`.

#### Parameters

| Name | In | Type | Description |
|---|---|---|---|
| `id` | path | string | **Required.** Draft public id (`rd_…`). |

#### Example request

```bash
curl -s "$ACTIVQC_BASE_URL/v1/release_drafts/{id}" \
  -H "Authorization: Bearer $ACTIVQC_KEY"
```

#### Responses

| Status | Meaning |
|---|---|
| `200` | Found. |
| `404` | Absent or owned by another tenant. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |

#### Response `200`

| Field | Type | Description |
|---|---|---|
| `id` | string | **Required.** Example `rd_7fK2mP9xQ4nB8vR1cT6wY3zA`. |
| `object` | string | **Required.** Always `qc.release_draft`. |
| `status` | string | **Required.** One of `editing`, `submitted`, `archived`. |
| `external_ref` | string or null | Example `release-1042`. |
| `end_user_ref` | string or null | Example `artist-88`. |
| `lock_version` | integer | **Required.** Example `0`. |
| `livemode` | boolean | **Required.** |
| `payload` | object | **Required.** |
| `qc_run_id` | integer or null |  |
| `submitted_at` | string (date-time) or null |  |
| `created_at` | string (date-time) | **Required.** |
| `updated_at` | string (date-time) | **Required.** |

```json
{
  "id": "rd_7fK2mP9xQ4nB8vR1cT6wY3zA",
  "object": "qc.release_draft",
  "status": "editing",
  "external_ref": "release-1042",
  "end_user_ref": "artist-88",
  "lock_version": 0,
  "livemode": false,
  "payload": {},
  "qc_run_id": 1,
  "submitted_at": "2026-11-24T10:00:00Z",
  "created_at": "2026-11-24T10:00:00Z",
  "updated_at": "2026-11-24T10:00:00Z"
}
```

## PATCH /v1/release_drafts/{id}

Update a release draft via JSON Patch or full editable payload.

**Auth:** a secret key, `Authorization: Bearer $ACTIVQC_KEY`.

#### Parameters

| Name | In | Type | Description |
|---|---|---|---|
| `id` | path | string | **Required.** Draft public id (`rd_…`). |

#### Request body

`application/json`.

Send `lock_version` and exactly one of `patch` (RFC 6902 ops) or `payload` (full editable replacement), or `account` alone. Enforced by the controller so invalid payloads return the error envelope. `account` is never part of the payload, and the embedded builder cannot set it.

| Field | Type | Description |
|---|---|---|
| `lock_version` | integer |  |
| `patch` | array of object |  |
| `payload` | object |  |
| `account` | object | The uploading account, keyed by your own account id. Its trust decides whether a clean release goes out at once or is checked by a person first (rule TR1). `trust_score` (0-100) is your own score for this call; a WAVBEE staff override beats it, and it beats the score activQC works out from the account's history. Anything else is a 422. |
| `account.id` | string | **Required.** 1 to 128 characters. Example `artist-8812`. |
| `account.trust_score` | integer | 0 to 100. Example `35`. |
| `account.name` | string | A label for your console, at most 255 characters. Example `Kayal Beats`. |

#### Example request

```bash
curl -s -X PATCH "$ACTIVQC_BASE_URL/v1/release_drafts/{id}" \
  -H "Authorization: Bearer $ACTIVQC_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### Responses

| Status | Meaning |
|---|---|
| `200` | Updated. |
| `404` | Absent or owned by another tenant. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |
| `409` | Stale lock_version (returns current draft) |
| `422` | Disallowed path or bad patch. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |

#### Response `200`

| Field | Type | Description |
|---|---|---|
| `id` | string | **Required.** Example `rd_7fK2mP9xQ4nB8vR1cT6wY3zA`. |
| `object` | string | **Required.** Always `qc.release_draft`. |
| `status` | string | **Required.** One of `editing`, `submitted`, `archived`. |
| `external_ref` | string or null | Example `release-1042`. |
| `end_user_ref` | string or null | Example `artist-88`. |
| `lock_version` | integer | **Required.** Example `0`. |
| `livemode` | boolean | **Required.** |
| `payload` | object | **Required.** |
| `qc_run_id` | integer or null |  |
| `submitted_at` | string (date-time) or null |  |
| `created_at` | string (date-time) | **Required.** |
| `updated_at` | string (date-time) | **Required.** |

```json
{
  "id": "rd_7fK2mP9xQ4nB8vR1cT6wY3zA",
  "object": "qc.release_draft",
  "status": "editing",
  "external_ref": "release-1042",
  "end_user_ref": "artist-88",
  "lock_version": 0,
  "livemode": false,
  "payload": {},
  "qc_run_id": 1,
  "submitted_at": "2026-11-24T10:00:00Z",
  "created_at": "2026-11-24T10:00:00Z",
  "updated_at": "2026-11-24T10:00:00Z"
}
```

## POST /v1/release_drafts/{id}/validate

Validate the stored draft payload without creating a run.

**Auth:** a secret key, `Authorization: Bearer $ACTIVQC_KEY`.

#### Parameters

| Name | In | Type | Description |
|---|---|---|---|
| `id` | path | string | **Required.** |

#### Request body

`application/json`.

| Field | Type | Description |
|---|---|---|
| `checks` | string | `fast` answers at once with everything that is not a model's judgement; `model_check` says whether a model still has to read this text. For a builder checking while someone types. One of `full`, `fast`. Default `full`. |
| `profile` | string |  |
| `config` | object |  |

#### Example request

```bash
curl -s -X POST "$ACTIVQC_BASE_URL/v1/release_drafts/{id}/validate" \
  -H "Authorization: Bearer $ACTIVQC_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "checks": "full"
}'
```

#### Responses

| Status | Meaning |
|---|---|
| `200` | Validated. |
| `404` | Absent or owned by another tenant. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |
| `422` | Config hard floor violation. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |

#### Response `200`

| Field | Type | Description |
|---|---|---|
| `object` | string | **Required.** Example `qc.validation`. |
| `verdict` | string | **Required.** One of `pass`, `pass_with_warnings`, `needs_clarification`, `manual_review`, `fail`. |
| `blocking` | boolean | **Required.** Whether anything here should stop Submit. Advisory findings never block. |
| `open_questions` | integer | Findings carrying an answerable question. |
| `counts` | map of integer |  |
| `artwork_check` | string | `pending` while the cover uploaded to the builder is still being read: validate again in a few seconds for what is on it. One of `pending`, `complete`. |
| `audio_check` | string | `pending` while a track's silence is still being measured or a builder master is still being scanned: validate again in a few seconds for their findings and questions (AU8, AI2). One of `pending`, `complete`. |
| `model_check` | string | `pending` only when you asked for `"checks": "fast"` and a model has not judged this text yet (titles, names, credits): validate without `checks` for its findings. What it said of the same text before is already in a fast answer. One of `pending`, `complete`. |
| `decision` | object | The one decision shown to the artist, worked out from the findings' outcomes. `checking` while `artwork_check`, `audio_check` or `model_check` is pending and nothing already fails. A clean draft is pre-submit (no audio checks ran), so it never promises the release is accepted. |
| `decision.state` | string | **Required.** One of `checking`, `accepted`, `rejected`, `manual_review`, `needs_answers`. |
| `decision.headline` | string | **Required.** Example `Rejected`. |
| `decision.summary` | string | **Required.** Plain words for the artist; on a draft, manual review is promised after you submit. |
| `decision.open_questions` | integer | **Required.** What blocks Submit (open questions and fixable fails); the headline's N. The response's top-level `open_questions` can be higher: it also counts advisory ones. |
| `decision.reasons` | array of object | **Required.** One line per finding that matters, worst first. |
| `decision.reasons[].id` | string | **Required.** `<rule>:<release\|track>:<n>`, the key a finding's answer is kept under. Example `AR7:release:`. |
| `decision.reasons[].outcome` | string | **Required.** One of `fail`, `manual_review`, `clarify`, `not_run`, `warn`. |
| `decision.reasons[].text` | string | **Required.** |
| `decision.reasons[].target` | object | **Required.** |
| `decision.reasons[].anchor` | string or null |  |
| `decision.reasons[].pins` | array of integer | **Required.** Numbers of the marks on the cover that belong to this finding. |
| `decision.reasons[].deciding` | boolean | **Required.** Whether this reason is what the decision rests on. |
| `decision.reasons[].open` | boolean | **Required.** A question or one-tap fix still waiting for the artist. |
| `decision.reasons[].answered` | boolean | The artist answered it is correct as it is; a person decides. |
| `decision.reasons[].answer_label` | string | What the artist answered, when answered. |
| `decision.reasons[].fix` | string | What would make it acceptable: the first change on offer. |
| `decision.reasons[].simulated` | boolean | True when the reason was read from a simulated scan (test keys only). |
| `findings` | array of object | **Required.** |
| `findings[].rule_id` | string | **Required.** Example `P15`. |
| `findings[].target` | object | **Required.** |
| `findings[].target.type` | string | **Required.** One of `release`, `track`. |
| `findings[].target.track_number` | integer or null |  |
| `findings[].severity` | string | **Required.** One of `warn`, `clarify`, `fail`, `manual_review`, `not_run`. |
| `findings[].message` | string or null |  |
| `findings[].evidence` | object |  |
| `findings[].anchor` | string or null | Where the builder should scroll. Section-level, not field-level. Example `/release/upc`. |
| `findings[].simulated` | boolean | True when the finding was read from a simulated scan (test keys only). |
| `findings[].question` | object or null | The question the builder asks, with the fixes on offer. A failing or advisory finding carries one when a fix is derivable; a clarify finding always does — at least "It's correct as it is". Moderation (manual_review) never asks: a person decides it. |
| `findings[].question.question` | string |  |
| `findings[].question.answer` | object | The answer the draft's qc_answers already gives ({id, label}, and `value` for an option with an input: an upload is described by filename, content_type and byte_size); the question no longer blocks. |
| `findings[].question.proposed_patch` | object or null | A single RFC 6902 operation. `null` on an option means it applies nothing. |
| `findings[].question.proposed_patch.op` | string | **Required.** One of `add`, `replace`, `remove`. |
| `findings[].question.proposed_patch.path` | string | **Required.** Example `/tracks/0/title`. |
| `findings[].question.proposed_patch.value` | any | Absent for `remove`. |
| `findings[].question.options` | array of object |  |
| `findings[].question.options[].id` | string | **Required.** Example `release_title`. |
| `findings[].question.options[].label` | string | **Required.** Example `Yes - change the release type to Album`. |
| `findings[].question.options[].patch` | object or null | A single RFC 6902 operation. `null` on an option means it applies nothing. |
| `findings[].question.options[].input` | string | What the answer's `value` must be: one of `choices` (select), a list of them (multi), a line of text (text), or a builder upload's id (upload, `kind: document`). One of `select`, `multi`, `text`, `date`, `upload`. |
| `findings[].question.options[].choices` | array of object | For select and multi. |
| `findings[].question.options[].required` | boolean | Whether a value must be given. Defaults to true. |
| `findings[].question.options[].max_length` | integer | For text; never above 200. |
| `findings[].question.options[].accept` | array of string | For upload: the MIME types taken, within PDF, JPEG and PNG. |
| `findings[].question.options[].max_bytes` | integer | For upload; never above 10 MB. Example `10485760`. |

```json
{
  "object": "qc.validation",
  "verdict": "pass",
  "blocking": false,
  "open_questions": 1,
  "counts": {},
  "artwork_check": "pending",
  "audio_check": "pending",
  "model_check": "pending",
  "decision": {
    "state": "checking",
    "headline": "Rejected",
    "summary": "string",
    "open_questions": 1,
    "reasons": [
      {
        "id": "AR7:release:",
        "outcome": "fail",
        "text": "string",
        "target": {},
        "anchor": "string",
        "pins": [],
        "deciding": false,
        "open": false,
        "answered": false,
        "answer_label": "string",
        "fix": "string",
        "simulated": false
      }
    ]
  },
  "findings": [
    {
      "rule_id": "P15",
      "target": {
        "type": "release",
        "track_number": 1
      },
      "severity": "warn",
      "message": "string",
      "evidence": {},
      "anchor": "/release/upc",
      "simulated": false,
      "question": {
        "question": "string",
        "answer": {},
        "proposed_patch": {
          "op": null,
          "path": "/tracks/0/title",
          "value": null
        },
        "options": []
      }
    }
  ]
}
```

## GET /v1/release_drafts/{id}/questions

List open clarification questions for a release draft.

**Auth:** a secret key, `Authorization: Bearer $ACTIVQC_KEY`.

#### Parameters

| Name | In | Type | Description |
|---|---|---|---|
| `id` | path | string | **Required.** |

#### Example request

```bash
curl -s "$ACTIVQC_BASE_URL/v1/release_drafts/{id}/questions" \
  -H "Authorization: Bearer $ACTIVQC_KEY"
```

#### Responses

| Status | Meaning |
|---|---|
| `200` | Open questions. |
| `404` | Absent or owned by another tenant. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |

#### Response `200`

| Field | Type | Description |
|---|---|---|
| `object` | string | **Required.** Always `list`. |
| `open_questions` | integer | **Required.** |
| `data` | array of object | **Required.** |
| `data[].question_key` | string | **Required.** Example `P15:release:`. |
| `data[].rule_id` | string | **Required.** Example `P15`. |
| `data[].target` | object | **Required.** |
| `data[].target.type` | string | **Required.** One of `release`, `track`. |
| `data[].target.track_number` | integer or null |  |
| `data[].severity` | string | **Required.** One of `warn`, `clarify`, `fail`. |
| `data[].message` | string or null |  |
| `data[].anchor` | string or null |  |
| `data[].question` | string | **Required.** |
| `data[].options` | array of object | **Required.** |
| `data[].options[].id` | string | **Required.** Example `release_title`. |
| `data[].options[].label` | string | **Required.** Example `Yes - change the release type to Album`. |
| `data[].options[].patch` | object or null | A single RFC 6902 operation. `null` on an option means it applies nothing. |
| `data[].options[].patch.op` | string | **Required.** One of `add`, `replace`, `remove`. |
| `data[].options[].patch.path` | string | **Required.** Example `/tracks/0/title`. |
| `data[].options[].patch.value` | any | Absent for `remove`. |
| `data[].options[].input` | string | What the answer's `value` must be: one of `choices` (select), a list of them (multi), a line of text (text), or a builder upload's id (upload, `kind: document`). One of `select`, `multi`, `text`, `date`, `upload`. |
| `data[].options[].choices` | array of object | For select and multi. |
| `data[].options[].choices[].value` | string | **Required.** Example `aiva`. |
| `data[].options[].choices[].label` | string | **Required.** Example `AIVA`. |
| `data[].options[].required` | boolean | Whether a value must be given. Defaults to true. |
| `data[].options[].max_length` | integer | For text; never above 200. |
| `data[].options[].accept` | array of string | For upload: the MIME types taken, within PDF, JPEG and PNG. |
| `data[].options[].max_bytes` | integer | For upload; never above 10 MB. Example `10485760`. |
| `data[].proposed_patch` | object or null | A single RFC 6902 operation. `null` on an option means it applies nothing. |
| `data[].proposed_patch.op` | string | **Required.** One of `add`, `replace`, `remove`. |
| `data[].proposed_patch.path` | string | **Required.** Example `/tracks/0/title`. |
| `data[].proposed_patch.value` | any | Absent for `remove`. |

```json
{
  "object": "list",
  "open_questions": 1,
  "data": [
    {
      "question_key": "P15:release:",
      "rule_id": "P15",
      "target": {
        "type": "release",
        "track_number": 1
      },
      "severity": "warn",
      "message": "string",
      "anchor": "string",
      "question": "string",
      "options": [
        {
          "id": "release_title",
          "label": "Yes - change the release type to Album",
          "patch": null,
          "input": null,
          "choices": null,
          "required": null,
          "max_length": null,
          "accept": [
            "application/pdf",
            "image/jpeg",
            "image/png"
          ],
          "max_bytes": 10485760
        }
      ],
      "proposed_patch": {
        "op": "add",
        "path": "/tracks/0/title",
        "value": {}
      }
    }
  ]
}
```

## POST /v1/release_drafts/{id}/answers

Answer an open question on a release draft and re-validate.

**Auth:** a secret key, `Authorization: Bearer $ACTIVQC_KEY`.

#### Parameters

| Name | In | Type | Description |
|---|---|---|---|
| `id` | path | string | **Required.** |

#### Request body

`application/json`.

Answer an open question on the draft with `question_key` and `option_id` (and `value` for options with an input), or `clear: true` to remove a stored `qc_answers` entry.

| Field | Type | Description |
|---|---|---|
| `question_key` | string | Example `P15:release:`. |
| `option_id` | string | Example `release_title`. |
| `value` | any |  |
| `clear` | boolean |  |
| `lock_version` | integer |  |
| `checks` | string | `fast` answers at once with everything that is not a model's judgement; `model_check` says whether a model still has to read this text. For a builder checking while someone types. One of `full`, `fast`. Default `full`. |
| `profile` | string |  |
| `config` | object |  |

#### Example request

```bash
curl -s -X POST "$ACTIVQC_BASE_URL/v1/release_drafts/{id}/answers" \
  -H "Authorization: Bearer $ACTIVQC_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "question_key": "P15:release:",
  "option_id": "release_title",
  "checks": "full"
}'
```

#### Responses

| Status | Meaning |
|---|---|
| `200` | Answered and re-validated. |
| `404` | Absent or owned by another tenant. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |
| `409` | Stale lock_version or non-editing draft. |
| `422` | Unknown question or invalid option/value. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |

#### Response `200`

| Field | Type | Description |
|---|---|---|
| `object` | string | **Required.** Example `qc.validation`. |
| `verdict` | string | **Required.** One of `pass`, `pass_with_warnings`, `needs_clarification`, `manual_review`, `fail`. |
| `blocking` | boolean | **Required.** Whether anything here should stop Submit. Advisory findings never block. |
| `open_questions` | integer | Findings carrying an answerable question. |
| `counts` | map of integer |  |
| `artwork_check` | string | `pending` while the cover uploaded to the builder is still being read: validate again in a few seconds for what is on it. One of `pending`, `complete`. |
| `audio_check` | string | `pending` while a track's silence is still being measured or a builder master is still being scanned: validate again in a few seconds for their findings and questions (AU8, AI2). One of `pending`, `complete`. |
| `model_check` | string | `pending` only when you asked for `"checks": "fast"` and a model has not judged this text yet (titles, names, credits): validate without `checks` for its findings. What it said of the same text before is already in a fast answer. One of `pending`, `complete`. |
| `decision` | object | The one decision shown to the artist, worked out from the findings' outcomes. `checking` while `artwork_check`, `audio_check` or `model_check` is pending and nothing already fails. A clean draft is pre-submit (no audio checks ran), so it never promises the release is accepted. |
| `decision.state` | string | **Required.** One of `checking`, `accepted`, `rejected`, `manual_review`, `needs_answers`. |
| `decision.headline` | string | **Required.** Example `Rejected`. |
| `decision.summary` | string | **Required.** Plain words for the artist; on a draft, manual review is promised after you submit. |
| `decision.open_questions` | integer | **Required.** What blocks Submit (open questions and fixable fails); the headline's N. The response's top-level `open_questions` can be higher: it also counts advisory ones. |
| `decision.reasons` | array of object | **Required.** One line per finding that matters, worst first. |
| `decision.reasons[].id` | string | **Required.** `<rule>:<release\|track>:<n>`, the key a finding's answer is kept under. Example `AR7:release:`. |
| `decision.reasons[].outcome` | string | **Required.** One of `fail`, `manual_review`, `clarify`, `not_run`, `warn`. |
| `decision.reasons[].text` | string | **Required.** |
| `decision.reasons[].target` | object | **Required.** |
| `decision.reasons[].anchor` | string or null |  |
| `decision.reasons[].pins` | array of integer | **Required.** Numbers of the marks on the cover that belong to this finding. |
| `decision.reasons[].deciding` | boolean | **Required.** Whether this reason is what the decision rests on. |
| `decision.reasons[].open` | boolean | **Required.** A question or one-tap fix still waiting for the artist. |
| `decision.reasons[].answered` | boolean | The artist answered it is correct as it is; a person decides. |
| `decision.reasons[].answer_label` | string | What the artist answered, when answered. |
| `decision.reasons[].fix` | string | What would make it acceptable: the first change on offer. |
| `decision.reasons[].simulated` | boolean | True when the reason was read from a simulated scan (test keys only). |
| `findings` | array of object | **Required.** |
| `findings[].rule_id` | string | **Required.** Example `P15`. |
| `findings[].target` | object | **Required.** |
| `findings[].target.type` | string | **Required.** One of `release`, `track`. |
| `findings[].target.track_number` | integer or null |  |
| `findings[].severity` | string | **Required.** One of `warn`, `clarify`, `fail`, `manual_review`, `not_run`. |
| `findings[].message` | string or null |  |
| `findings[].evidence` | object |  |
| `findings[].anchor` | string or null | Where the builder should scroll. Section-level, not field-level. Example `/release/upc`. |
| `findings[].simulated` | boolean | True when the finding was read from a simulated scan (test keys only). |
| `findings[].question` | object or null | The question the builder asks, with the fixes on offer. A failing or advisory finding carries one when a fix is derivable; a clarify finding always does — at least "It's correct as it is". Moderation (manual_review) never asks: a person decides it. |
| `findings[].question.question` | string |  |
| `findings[].question.answer` | object | The answer the draft's qc_answers already gives ({id, label}, and `value` for an option with an input: an upload is described by filename, content_type and byte_size); the question no longer blocks. |
| `findings[].question.proposed_patch` | object or null | A single RFC 6902 operation. `null` on an option means it applies nothing. |
| `findings[].question.proposed_patch.op` | string | **Required.** One of `add`, `replace`, `remove`. |
| `findings[].question.proposed_patch.path` | string | **Required.** Example `/tracks/0/title`. |
| `findings[].question.proposed_patch.value` | any | Absent for `remove`. |
| `findings[].question.options` | array of object |  |
| `findings[].question.options[].id` | string | **Required.** Example `release_title`. |
| `findings[].question.options[].label` | string | **Required.** Example `Yes - change the release type to Album`. |
| `findings[].question.options[].patch` | object or null | A single RFC 6902 operation. `null` on an option means it applies nothing. |
| `findings[].question.options[].input` | string | What the answer's `value` must be: one of `choices` (select), a list of them (multi), a line of text (text), or a builder upload's id (upload, `kind: document`). One of `select`, `multi`, `text`, `date`, `upload`. |
| `findings[].question.options[].choices` | array of object | For select and multi. |
| `findings[].question.options[].required` | boolean | Whether a value must be given. Defaults to true. |
| `findings[].question.options[].max_length` | integer | For text; never above 200. |
| `findings[].question.options[].accept` | array of string | For upload: the MIME types taken, within PDF, JPEG and PNG. |
| `findings[].question.options[].max_bytes` | integer | For upload; never above 10 MB. Example `10485760`. |
| `draft_id` | string | **Required.** |
| `lock_version` | integer | **Required.** |
| `payload` | object | **Required.** |

```json
{
  "object": "qc.validation",
  "verdict": "pass",
  "blocking": false,
  "open_questions": 1,
  "counts": {},
  "artwork_check": "pending",
  "audio_check": "pending",
  "model_check": "pending",
  "decision": {
    "state": "checking",
    "headline": "Rejected",
    "summary": "string",
    "open_questions": 1,
    "reasons": [
      {
        "id": "AR7:release:",
        "outcome": "fail",
        "text": "string",
        "target": {},
        "anchor": "string",
        "pins": [],
        "deciding": false,
        "open": false,
        "answered": false,
        "answer_label": "string",
        "fix": "string",
        "simulated": false
      }
    ]
  },
  "findings": [
    {
      "rule_id": "P15",
      "target": {
        "type": "release",
        "track_number": 1
      },
      "severity": "warn",
      "message": "string",
      "evidence": {},
      "anchor": "/release/upc",
      "simulated": false,
      "question": {
        "question": "string",
        "answer": {},
        "proposed_patch": {
          "op": null,
          "path": "/tracks/0/title",
          "value": null
        },
        "options": []
      }
    }
  ],
  "draft_id": "string",
  "lock_version": 1,
  "payload": {}
}
```

## POST /v1/release_drafts/{id}/submit

Submit a release draft as a QC run.

**Auth:** a secret key, `Authorization: Bearer $ACTIVQC_KEY`.

Send an `Idempotency-Key` header (a new UUID per operation; a retry reuses it).

#### Parameters

| Name | In | Type | Description |
|---|---|---|---|
| `id` | path | string | **Required.** |
| `Idempotency-Key` | header | string | **Required.** A unique string per operation, for example a UUID. A retry with the same key returns the first answer. Missing: 422. |

#### Request body

`application/json`.

| Field | Type | Description |
|---|---|---|
| `tier` | integer | One of `1`, `2`, `3`. |
| `profile` | string |  |
| `config` | object |  |

#### Example request

```bash
curl -s -X POST "$ACTIVQC_BASE_URL/v1/release_drafts/{id}/submit" \
  -H "Authorization: Bearer $ACTIVQC_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### Responses

| Status | Meaning |
|---|---|
| `202` | Run queued. |
| `404` | Absent or owned by another tenant. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |
| `409` | Archived draft cannot be submitted. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |
| `422` | Missing Idempotency-Key. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |

#### Response `202`

| Field | Type | Description |
|---|---|---|
| `id` | integer | **Required.** Example `42`. |
| `object` | string | **Required.** Example `qc.run`. |
| `status` | string | **Required.** One of `queued`, `running`, `completed`. |
| `tier` | integer | **Required.** Example `1`. |
| `profile` | string or null | Example `apple`. |
| `verdict` | string or null | One of `pass`, `pass_with_warnings`, `needs_clarification`, `manual_review`, `fail`. |
| `final_decision` | string or null | One of `accepted`, `changes_required`, `rejected`. |
| `verdict_phase` | string or null | Example `fast_lane`. |
| `rulebook_version` | string or null | Example `1.0.0`. |
| `counts` | map of integer |  |
| `decision` | object or null | The one decision shown to the artist, worked out from the findings' outcomes. `checking` while `artwork_check`, `audio_check` or `model_check` is pending and nothing already fails. A clean draft is pre-submit (no audio checks ran), so it never promises the release is accepted. |
| `decision.state` | string | **Required.** One of `checking`, `accepted`, `rejected`, `manual_review`, `needs_answers`. |
| `decision.headline` | string | **Required.** Example `Rejected`. |
| `decision.summary` | string | **Required.** Plain words for the artist; on a draft, manual review is promised after you submit. |
| `decision.open_questions` | integer | **Required.** What blocks Submit (open questions and fixable fails); the headline's N. The response's top-level `open_questions` can be higher: it also counts advisory ones. |
| `decision.reasons` | array of object | **Required.** One line per finding that matters, worst first. |
| `decision.reasons[].id` | string | **Required.** `<rule>:<release\|track>:<n>`, the key a finding's answer is kept under. Example `AR7:release:`. |
| `decision.reasons[].outcome` | string | **Required.** One of `fail`, `manual_review`, `clarify`, `not_run`, `warn`. |
| `decision.reasons[].text` | string | **Required.** |
| `decision.reasons[].target` | object | **Required.** |
| `decision.reasons[].anchor` | string or null |  |
| `decision.reasons[].pins` | array of integer | **Required.** Numbers of the marks on the cover that belong to this finding. |
| `decision.reasons[].deciding` | boolean | **Required.** Whether this reason is what the decision rests on. |
| `decision.reasons[].open` | boolean | **Required.** A question or one-tap fix still waiting for the artist. |
| `decision.reasons[].answered` | boolean | The artist answered it is correct as it is; a person decides. |
| `decision.reasons[].answer_label` | string | What the artist answered, when answered. |
| `decision.reasons[].fix` | string | What would make it acceptable: the first change on offer. |
| `decision.reasons[].simulated` | boolean | True when the reason was read from a simulated scan (test keys only). |
| `trust` | object or null | The uploading account's trust the run was decided with (rule TR1), frozen when it was decided. Null when the release named no account, or before the run is decided. For your server only: the artist never sees it. |
| `trust.account_id` | string | **Required.** Example `artist-8812`. |
| `trust.score` | integer | **Required.** Example `50`. |
| `trust.band` | string | **Required.** One of `low`, `medium`, `high`. |
| `trust.source` | string | **Required.** `override` (pinned by WAVBEE staff), `tenant` (the trust_score you sent) or `computed`. One of `override`, `tenant`, `computed`. |
| `trust.reasons` | array of string | **Required.** |
| `created_at` | string (date-time) | **Required.** |
| `completed_at` | string (date-time) or null |  |

```json
{
  "id": 42,
  "object": "qc.run",
  "status": "queued",
  "tier": 1,
  "profile": "apple",
  "verdict": "pass",
  "final_decision": "accepted",
  "verdict_phase": "fast_lane",
  "rulebook_version": "1.0.0",
  "counts": {},
  "decision": {
    "state": "checking",
    "headline": "Rejected",
    "summary": "string",
    "open_questions": 1,
    "reasons": [
      {
        "id": "AR7:release:",
        "outcome": "fail",
        "text": "string",
        "target": {},
        "anchor": "string",
        "pins": [],
        "deciding": false,
        "open": false,
        "answered": false,
        "answer_label": "string",
        "fix": "string",
        "simulated": false
      }
    ]
  },
  "trust": {
    "account_id": "artist-8812",
    "score": 50,
    "band": "low",
    "source": "override",
    "reasons": [
      "3 releases accepted (+6)"
    ]
  },
  "created_at": "2026-11-24T10:00:00Z",
  "completed_at": "2026-11-24T10:00:00Z"
}
```

## POST /v1/release_drafts/{id}/archive

Archive a release draft.

**Auth:** a secret key, `Authorization: Bearer $ACTIVQC_KEY`.

#### Parameters

| Name | In | Type | Description |
|---|---|---|---|
| `id` | path | string | **Required.** |

#### Example request

```bash
curl -s -X POST "$ACTIVQC_BASE_URL/v1/release_drafts/{id}/archive" \
  -H "Authorization: Bearer $ACTIVQC_KEY"
```

#### Responses

| Status | Meaning |
|---|---|
| `200` | Archived. |
| `404` | Absent or owned by another tenant. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |
| `409` | Submitted draft cannot be archived. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |

#### Response `200`

| Field | Type | Description |
|---|---|---|
| `id` | string | **Required.** Example `rd_7fK2mP9xQ4nB8vR1cT6wY3zA`. |
| `object` | string | **Required.** Always `qc.release_draft`. |
| `status` | string | **Required.** One of `editing`, `submitted`, `archived`. |
| `external_ref` | string or null | Example `release-1042`. |
| `end_user_ref` | string or null | Example `artist-88`. |
| `lock_version` | integer | **Required.** Example `0`. |
| `livemode` | boolean | **Required.** |
| `payload` | object | **Required.** |
| `qc_run_id` | integer or null |  |
| `submitted_at` | string (date-time) or null |  |
| `created_at` | string (date-time) | **Required.** |
| `updated_at` | string (date-time) | **Required.** |

```json
{
  "id": "rd_7fK2mP9xQ4nB8vR1cT6wY3zA",
  "object": "qc.release_draft",
  "status": "editing",
  "external_ref": "release-1042",
  "end_user_ref": "artist-88",
  "lock_version": 0,
  "livemode": false,
  "payload": {},
  "qc_run_id": 1,
  "submitted_at": "2026-11-24T10:00:00Z",
  "created_at": "2026-11-24T10:00:00Z",
  "updated_at": "2026-11-24T10:00:00Z"
}
```

