Entwickler
Die Entwicklerdokumentation ist auf Englisch verfasst.
FastOMR has a REST API for what the interface does — templates, exams, answer keys, scans and results — and sends webhooks when work finishes, so that a school's own systems can take the results without anybody copying them across. This page is where to start. The complete reference is the OpenAPI document, which Postman, Insomnia and the code generators read; what is sent when work finishes is in the webhooks guide.
The address
Every request goes to https://be.fastomr.com/api/v1 — on a school's own installation, that
installation's address. Bodies are JSON in UTF-8, both ways.
Authentication
An integration signs in with an API key:
- Create one under Integrations → API keys. An organization's owners and admins can; the plan decides how many — five on Pro, fifty on Enterprise, none on the free plan. The key belongs to its organization and is shown once, when it is made: keep it where your other secrets are.
- Give it permissions — the API calls them scopes, listed below — and only those the integration needs, and a time it is valid for, or none.
- Send it with every request:
GET /api/v1/projects HTTP/1.1
Host: be.fastomr.com
X-API-Key: fomr_…
A key never reaches what only a person may do — accounts, members, other keys, the plan —
whatever its scopes: that answers 403 API_KEY_NOT_A_PERSON, and a request its scopes do not
cover 403 INSUFFICIENT_ROLE. A key revoked on the same page, or past its time, answers 401 from
its next request. A key goes with the authority of the person who made it: when they leave the
organization, are removed or lose the role it needs, it is revoked — make the integration's key
with an account that stays.
| Scopes | Allow |
|---|---|
organization:read, member:read |
Reading the organization's details and its member list |
template:read, template:create, template:update, template:delete, template:publish |
The answer-sheet templates, and publishing a finished one |
project:read, project:create, project:update, project:delete |
Exams: their settings, sections, roster and state |
answer-key:update |
An exam's answer keys |
scan:read, scan:upload |
Sending scans and following their reading |
scan:review, scan:discard, scan:delete |
The review queue: correcting a sheet, setting one aside, deleting one |
result:read, result:export |
Scores, item analysis and the exports (spreadsheet, report cards) |
webhook:read, webhook:manage |
The organization's webhook endpoints |
audit:read, billing:read, api-key:read |
The audit log, the plan and its usage, the list of keys |
A first integration: from a scanned stack to the scores
The usual case — the school's scanner leaves PDFs in a folder, and the scores belong in the school's
own system — takes five requests. Below, $API is https://be.fastomr.com/api/v1 and $KEY a key with the scopes
project:read, scan:upload, scan:read and result:read.
1. Find the exam, by its code or its name:
curl -s "$API/projects?search=PRJ-2026" -H "X-API-Key: $KEY"
Its id is items[0].id — $EXAM below. An exam takes scans while it is Ready or
Collecting.
2. Open a batch for this stack:
curl -s -X POST "$API/projects/$EXAM/scan-batches" -H "X-API-Key: $KEY" \
-H "Content-Type: application/json" -d '{"name": "Hall B, morning"}'
Its id is $BATCH.
3. Send the files, one part each — a multi-page PDF is split into its pages:
curl -s -X POST "$API/projects/$EXAM/scan-batches/$BATCH/upload" -H "X-API-Key: $KEY" \
-F "files=@stack-1.pdf" -F "files=@stack-2.pdf"
The answer is 202 with { "accepted": 80, "rejected": [] }: the pages are read in the
background. A file that cannot be taken is listed in rejected, with a code to decide on and a
reason to show. One request carries at most 50 files and 48 MB; send a larger stack in several,
to the same batch.
4. Wait for the reading. Let a webhook tell you — batch.completed, and
sheet.needs-review for a sheet a person has to look at — or ask:
curl -s "$API/projects/$EXAM/scan-batches/$BATCH" -H "X-API-Key: $KEY"
until status is COMPLETED. Its counts say how many pages were read, how many wait for review
and how many failed.
5. Take the scores, a page at a time:
curl -s "$API/projects/$EXAM/results?page=1&pageSize=100" -H "X-API-Key: $KEY"
or the whole list as one file — JSON, CSV or XLSX — with result:export:
curl -s "$API/projects/$EXAM/exports/results?format=JSON" -H "X-API-Key: $KEY" -o results.json
A sheet still waiting for review is in the list with its status, and its score can change once
it has been reviewed; onlyReviewed=true leaves it out.
Answers and errors
A list takes page (from 1), pageSize (20 by default, 100 at most), search, sortBy and
sortDir (asc or desc), and answers { "items": [ … ], "meta": { "page", "pageSize", "totalItems", "totalPages", "hasPrevious", "hasNext" } }.
Every error has the same shape:
{
"statusCode": 422,
"code": "VALIDATION_FAILED",
"message": "Validation failed",
"requestId": "3f2a9c1e-7b1d-4a55-9c0e-1d2f3a4b5c6d",
"timestamp": "2026-09-26T09:40:12.581Z",
"path": "/api/v1/projects",
"issues": [{ "path": "name", "code": "too_small", "message": "Required" }]
}
Decide on code, never on message, which is written for whoever reads the logs and may change.
requestId is what to quote when you write to us: it finds the request in our logs.
| Status | Codes | Means |
|---|---|---|
401 |
UNAUTHENTICATED |
No key, or a revoked one |
402 |
QUOTA_EXCEEDED, PLAN_FEATURE_UNAVAILABLE |
The plan's limit is reached — details names the resource, the limit and what is in use — or the plan lacks the feature |
403 |
INSUFFICIENT_ROLE, API_KEY_NOT_A_PERSON |
The key's scopes do not cover it, or only a person may do it |
404 |
NOT_FOUND |
Not in this organization: another organization's records answer as if they did not exist |
409 |
VERSION_CONFLICT, CONFLICT |
Changed by somebody else since you read it, or already there |
422 |
VALIDATION_FAILED |
The body or the query was refused; issues says where |
429 |
RATE_LIMITED |
Too many requests: wait the Retry-After seconds |
503 |
SERVICE_UNAVAILABLE |
Briefly unable to take the work — a restart, a full queue: wait the Retry-After seconds and try again |
An exam or a template is updated with the version you read as expectedVersion; a stale one is
refused with 409 VERSION_CONFLICT rather than overwriting what somebody else saved. Read it
again and apply your change to what is there.
A GET can be repeated safely. A POST or PATCH that timed out may have been applied, so send
it with an Idempotency-Key — a UUID of your own, new for each request — and send it again with
the same key: within a day it is answered as the first time, marked Idempotent-Replayed: true,
and its work is done once. The same key with another request answers 422 IDEMPOTENCY_KEY_REUSED,
and while the first is still running 409 IDEMPOTENCY_KEY_IN_PROGRESS. Only a success is kept:
after an error, the same key may be sent again.
Limits
Each key is counted on its own, apart from the people using the interface: 300 requests a minute
unless the installation says otherwise, and fewer on a few expensive routes. Past it, 429 with
Retry-After. The plan's limits — sheets read in a month, storage, exams — apply to a key as to
a person, and answer 402 with the numbers.
Webhooks
Instead of asking whether a batch has been read, let FastOMR tell you: an endpoint registered
under Integrations → Webhooks receives a signed POST when a batch is complete, a sheet needs
a person or a score changes. The webhooks guide has the events, their bodies, how to
verify the signature, and what happens when your endpoint is down.