---
title: "Start a check"
method: POST
path: "/check/start"
tags: ["Run"]
---

# Start a check

`POST /check/start`

## Request

- Base URL: `https://codequiry.com/api/v1`
- URL: `https://codequiry.com/api/v1/check/start`
- Auth: API key in header `apikey`

Queues analysis for a check that already has submissions. `webcheck` and `dbcheck` only take effect when BOTH are supplied (both true → engine 1, both false → engine 9); otherwise the check's existing engine is used. The check is set to status_id 7 (queued).

## Request body

- object
  - `check_id` integer, required
  - `webcheck` boolean: Enable internet/web matching.
  - `dbcheck` boolean: Enable Codequiry database matching.
  - `test_type` integer: Approved engine id (overrides webcheck/dbcheck mapping).
  - `ai_run` boolean: Run AI-generated-code detection on this check. Accepts true/false/1/0.
  - `base_code_detection` boolean: Detect shared base/boilerplate (starter) code.

## Response `200`

Check queued

- object
  - `success` boolean
  - `check` Check: A check (internally an assignment). Endpoints return the full assignment row, so more fields are present than are listed here; only the stable, documented ones are shown.
    - `stats` object, nullable: Present only when the list was requested with with_stats=1. Averages and maxima are over finished submissions and are null when there are none.
      - `submissions` integer
      - `completed` integer
      - `failed` integer
      - `avg_group` number, nullable
      - `max_group` number, nullable
      - `avg_web` number, nullable
      - `max_web` number, nullable
      - `flagged` integer: Finished submissions at or above 75% Group or Web.
      - `avg_ai` number, nullable
      - `max_ai` number, nullable
      - `ai_submissions` integer
      - `ai_flagged` integer: Submissions whose mean AI probability is 75% or more.
      - `matches` integer: Match total as the dashboard counts it: peer fragments, web sources (one per source) and AI blocks.
    - `id` integer
    - `name` string
    - `status_id` integer
    - `language_id` integer
    - `test_type` integer
    - `ai_run` integer: 1 if AI-generated-code detection runs for this check.
    - `base_code_detection` integer: 1 if base/boilerplate-code detection is enabled.
    - `created_at` string
    - `updated_at` string
    - `assignmentstatuses` object: Expanded status, included only by GET/POST /checks. Not returned by /check/create, /check/get or /check/update - use status_id there, or the top-level status string that /check/get returns.
      - `id` integer
      - `status` string
  - `status` string
  - `submission_count` integer
  - `checkURL` string

## Other responses

- `401`: Missing or invalid API key. The API key is checked before any endpoint logic runs, so this is returned for every operation.
- `402`: The account is suspended for an unpaid invoice. Every endpoint returns this until the invoice is paid from the billing dashboard; it is not retryable and the request was not performed.
- `403`: Not permitted (e.g. free-trial limitation, or a read-only demo check).
- `409`: Check is in a state that does not allow this operation (e.g. still processing, or not yet completed).
- `422`: Request validation failed.
- `429`: Rate limit exceeded: more than 60 requests in one minute from this IP. Retry after the number of seconds in the Retry-After header. Successful responses carry X-RateLimit-Limit and X-RateLimit-Remaining too, so you can pace a client without waiting to be refused.
- `503`: Analysis services are temporarily offline.

---

[API](https://skmtc.dev/codequiry/apis/codequiry-api.md) · [All operations](https://skmtc.dev/codequiry/apis/codequiry-api/llms.txt) · [OpenAPI document](https://skmtc.dev/codequiry/apis/codequiry-api/revisions/6297e91d9665?raw)
