---
title: "Create a check"
method: POST
path: "/check/create"
tags: ["Checks"]
---

# Create a check

`POST /check/create`

## Request

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

Creates an empty check. Only `name` is required; `language` and `test_type` are optional and default to 13 and 1 respectively.

## Request body

- object
  - `name` string, required: Check name.
  - `language` integer: Language id from GET /languages. Use 999 for Auto Detect; an unknown/invalid id falls back to Auto Detect instead of returning an error.
  - `test_type` integer: Engine id from GET /test-types.
  - `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.
  - `callback_url` string, uri: Webhook destination for this check. Codequiry POSTs a signed JSON payload here when the check completes or fails, so you do not have to poll. Must be a publicly reachable http(s) URL - loopback, private and link-local addresses are rejected with 422. Overrides the account-level webhook URL set in Dashboard -> API Keys. See the Webhooks section of the API description.

## Response `201`

Created check

- CheckCreated: The check as returned by /check/create. Same row as Check but without the expanded assignmentstatuses relation.
  - `id` integer: Save this - it is the check_id every other endpoint takes.
  - `name` string
  - `status_id` integer: Always 1 (new) on creation.
  - `language_id` integer
  - `test_type` integer
  - `ai_run` integer
  - `base_code_detection` integer
  - `job_id` integer: 0 until the check is started.
  - `created_at` string
  - `updated_at` 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.
- `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.

---

[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)
