Skip to main content
PATCH
cURL
Step 3 of 8 in Evaluate an exam. Call it twice: once to upload, once with isFinal to submit.

Rules

  • Send exactly one of documents, fileUrl, or isFinal per request.
  • Files must be .pdf, .jpg, .jpeg, or .png, and at most 20 MB each.
  • Declare each file’s type in its multipart part: application/pdf, image/jpeg, or image/png. The API reads the part’s Content-Type, not the file name. Most other values are rejected with 400 Invalid file type, but the Word .docx type is not, so do not send one by accident.
  • A PDF can have at most 50 pages, and a sheet takes one PDF. You cannot mix a PDF with images.
  • fileUrl replaces an upload: a public HTTPS link that the API fetches itself. It rejects the link unless the file starts with %PDF, and allows one fileUrl per sheet.
  • Send {"isFinal": true} only after every file is uploaded.
In a multipart request, any value of isFinal submits the sheet, including isFinal=false. Leave the field out until you mean it, and use JSON when you submit.
Files are only accepted while the sheet is Open. Once extraction is running or has failed, the call still returns 200 and quietly ignores the files. Check documents in the response to confirm what was stored.

How to know when it’s done

The response has no status field of its own. Two things tell you where extraction is: Or register a webhook for exam_evaluation_model_answer_extraction. See Async jobs and webhooks.

Next step

Get extracted exam model answers

Wait until the answer key is ready, then review it.

Authorizations

Authorization
string
header
required

Access token from Get an access token. A missing, invalid, or expired token returns 403.

Path Parameters

examId
string<uuid>
required

The exam id returned by Create an exam. Write it in lowercase: this path only matches lowercase hexadecimal characters and hyphens.

Example:

"d19e6868-98dd-4274-a2a5-4a616dd93ea7"

id
string<uuid>
required

The model answer sheet id returned by Create an exam model answer sheet.

Example:

"7b3f9a10-4c62-4b8e-9c21-8f5a6d2e1b34"

Body

documents
file[]

Answer key files. One .pdf of up to 50 pages, or any number of .jpg and .png images. Up to 20 MB per file. Each part's Content-Type decides the file type, so declare application/pdf, image/jpeg, or image/png. No mixing a PDF with images, and one PDF per sheet.

fileUrl
string<uri>

Public HTTPS link to a PDF instead of an upload. The API fetches it and rejects anything that does not start with %PDF.

Example:

"https://example.com/papers/science-set-a-key.pdf"

isFinal
boolean

Send true to submit the answer key for extraction. Send it on its own. In a multipart request any value, including false, submits the sheet, so leave the field out until you mean it.

Response

The model answer sheet was updated. With isFinal=true, extraction has started.

A model answer sheet, also called the answer key. It holds the files you upload and never reports a status of its own.

id
string<uuid>

The model answer sheet ID.

documents
object[]

Files attached to the model answer sheet, oldest first. Their status is the only progress signal in this response.