---
title: "Upload a submission (ZIP)"
method: POST
path: "/check/upload"
tags: ["Submissions"]
---

# Upload a submission (ZIP)

`POST /check/upload`

## Request

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

Uploads one ZIP archive of source code into a check. Max 10 MB. Call once per submission, or use /check/upload-batch.

## Response `200`

Upload accepted

- UploadResult
  - `data` object[]: The submission rows created by this upload.
    - `id` integer
    - `filename` string: Archive name without the .zip extension.
    - `file_size` integer: Bytes stored.
    - `status_id` integer: 2 (ready) immediately after upload.
    - `created_at` string
  - `file` string
  - `file_size` integer
  - `submission_count` integer
  - `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

## 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).
- `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.
- `500`: Unexpected server error.

---

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