Authmarks REST API quickstart for college IT teams: your first call in five minutes
For university IT cells and LMS administrators: create an organisation API token, locate your organisation id and make a first read-only Authmarks API call with curl, Node.js or Python, including pagination, errors and rate limits.
Published 2026-11-26 · 6 min read
| API version | v1 |
|---|---|
| Auth | Bearer token (amk_ organisation API token) |
| Base URL | https://www.authmarks.com/api/v1 |
| Access | Read-only (GET and HEAD) |
| Rate limit | 600 requests a minute per token |
| OpenAPI | https://www.authmarks.com/api/v1/openapi.json |
What this guide delivers: a working, read-only link to your organisation's Authmarks data in about five minutes. When you reach the end, you will have an API token, your organisation id, one successful curl call, a pagination loop in bash, Node.js and Python, and a typed client generated from the OpenAPI document. The v1 API lists LMS connections, grade returns, assignments, submissions and sealed records. It never creates, modifies or deletes anything.
The steps suit a university IT cell, a college's LMS administrator or a department's in-house developer equally well. For the complete list of fields and errors, refer to the API reference. For token scopes and secure storage, refer to Authentication and scopes.
Step 1: create an API token
Only an owner or admin of the organisation can do this.
-
Sign in and open Settings → Developers (
/dashboard/org?tab=developers). -
Under API tokens, click Create token.
-
Give it a label that identifies who will use it, for instance
nightly-reportorlms-health-check. -
Select only the scopes the task requires:
Scope Data the token may read lms_readLMS connections together with their grade-return log assignments_readAll assignments in the organisation records_readSubmissions per assignment, and sealed records -
An expiry (1 to 730 days) is optional, but we advise setting one.
-
Copy the token immediately. It starts with
amk_and is displayed only once. Authmarks retains only a SHA-256 hash of it, so it can never be displayed again. If it is lost, rotate it or create a fresh one.
Store the token in an environment variable, never inside the code:
export AUTHMARKS_TOKEN="amk_paste_your_token_here"
Step 2: find your organisation id
The Developers tab displays your organisation id, a UUID such as 3f2a9c1e-8b7d-4e21-9a0f-5c6d7e8f9a01. Each v1 path begins with it:
export AUTHMARKS_ORG="3f2a9c1e-8b7d-4e21-9a0f-5c6d7e8f9a01"
export AUTHMARKS_API="https://www.authmarks.com/api/v1/orgs/$AUTHMARKS_ORG"
A token is accepted only for the organisation it belongs to. Pairing it with a different organisation's id returns 401, just as an unrecognised token does.
Step 3: make your first call
Fetch your list of assignments (requires assignments_read):
curl -sS "$AUTHMARKS_API/assignments?limit=2" \
-H "Authorization: Bearer $AUTHMARKS_TOKEN"
{
"data": [
{
"id": "a7c1d2e3-4f56-4789-8abc-def012345678",
"title": "Essay 2: Climate policy",
"status": "active",
"course_id": "c0ffee00-1111-4222-8333-444455556666",
"module_id": "m0d01e00-aaaa-4bbb-8ccc-dddd00001111",
"starts_at": "2026-11-02T08:00:00Z",
"due_at": "2026-11-30T23:59:00Z",
"created_at": "2026-10-28T14:12:09Z"
},
{
"id": "b8d2e3f4-5a67-4890-9bcd-ef0123456789",
"title": "Lab report 4",
"status": "completed",
"course_id": "c0ffee00-1111-4222-8333-444455556666",
"module_id": null,
"starts_at": null,
"due_at": "2026-11-14T17:00:00Z",
"created_at": "2026-10-20T09:30:00Z"
}
],
"next_cursor": "eyJvIjoyfQ"
}
Ids are opaque strings. Save them as text and do not attempt to parse them.
Every endpoint with curl
Each endpoint is a GET, relative to https://www.authmarks.com/api/v1/orgs/{orgId}.
LMS connections (lms_read)
curl -sS "$AUTHMARKS_API/lms-connections" \
-H "Authorization: Bearer $AUTHMARKS_TOKEN"
{
"data": [
{
"id": "lc_6f1e2d3c",
"label": "Canvas production",
"issuer": "https://canvas.instructure.com",
"client_id": "10000000000123",
"product": "canvas",
"status": "active",
"source": "dynamic",
"deployments": [{ "deployment_id": "42:8865aa05b4b79b64a91a86042e43af5ea8ae79eb", "status": "active" }],
"created_at": "2026-09-01T10:00:00Z",
"approved_at": "2026-09-01T10:05:12Z"
},
{
"id": "lc_9a8b7c6d",
"label": "Moodle staging",
"issuer": "https://moodle.example.edu",
"client_id": "ZqP3x0aBcD",
"product": "moodle",
"status": "pending",
"source": "dynamic",
"deployments": [],
"created_at": "2026-11-24T16:40:00Z",
"approved_at": null
}
],
"next_cursor": null
}
status is one of pending (awaiting an admin's approval), active or disabled. How to set up a connection is explained in LTI 1.3 setup.
Grade returns for one connection (lms_read)
curl -sS "$AUTHMARKS_API/lms-connections/lc_6f1e2d3c/grade-returns?limit=50" \
-H "Authorization: Bearer $AUTHMARKS_TOKEN"
{
"data": [
{
"id": "gr_01HZX4",
"resource_link_id": "f8b0c1d2-assignment-link",
"lineitem": "https://canvas.example.edu/api/lti/courses/120/line_items/88",
"activity_progress": "Submitted",
"grading_progress": "PendingManual",
"status": "sent",
"created_at": "2026-11-25T21:14:03Z"
},
{
"id": "gr_01HZX5",
"resource_link_id": "f8b0c1d2-assignment-link",
"lineitem": "https://canvas.example.edu/api/lti/courses/120/line_items/88",
"activity_progress": "Submitted",
"grading_progress": "PendingManual",
"status": "failed",
"created_at": "2026-11-25T21:15:40Z"
}
],
"next_cursor": "eyJvIjo1MH0"
}
Assignments (assignments_read)
curl -sS "$AUTHMARKS_API/assignments?limit=200" \
-H "Authorization: Bearer $AUTHMARKS_TOKEN"
The response appears in Step 3.
Submissions for one assignment (records_read)
curl -sS "$AUTHMARKS_API/assignments/a7c1d2e3-4f56-4789-8abc-def012345678/submissions" \
-H "Authorization: Bearer $AUTHMARKS_TOKEN"
{
"data": [
{
"student": { "id": "p_3b9c0d1e", "name": "Jordan Lee", "email": "jordan.lee@example.edu" },
"document_id": "doc_7Hq2",
"sealed": true,
"record_id": "rec_k9x2_a1_4f8e2c1d9b7a6e5f",
"sealed_at": "2026-11-25T18:02:44Z",
"record_url": "https://www.authmarks.com/r/rec_k9x2_a1_4f8e2c1d9b7a6e5f"
},
{
"student": { "id": "p_8e7f6a5b", "name": "Sam Ortiz", "email": "sam.ortiz@example.edu" },
"document_id": "doc_9Lm4",
"sealed": false,
"record_id": null,
"sealed_at": null,
"record_url": null
}
],
"next_cursor": null
}
If a submission has not been sealed, record_id, sealed_at and record_url are null. The API returns no scores, percentages or detector output whatsoever.
One sealed record (records_read)
curl -sS "$AUTHMARKS_API/records/rec_k9x2_a1_4f8e2c1d9b7a6e5f" \
-H "Authorization: Bearer $AUTHMARKS_TOKEN"
{
"data": {
"id": "rec_k9x2_a1_4f8e2c1d9b7a6e5f",
"document_id": "doc_7Hq2",
"sealed_at": "2026-11-25T18:02:44Z",
"content_sha256": "9f2c4a1b0e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b7a6f5e4d3c2b",
"record_url": "https://www.authmarks.com/r/rec_k9x2_a1_4f8e2c1d9b7a6e5f",
"verify_url": "https://www.authmarks.com/api/records/rec_k9x2_a1_4f8e2c1d9b7a6e5f/public"
}
}
A record that does not belong to your organisation's members or assignments returns 404.
Paginate through every result
List endpoints accept limit (1 to 200, default 50) and cursor. Copy next_cursor from one page into cursor for the following request. On the last page, next_cursor is null. Cursors are opaque: never assemble or alter them yourself.
Bash (curl and jq)
#!/usr/bin/env bash
set -euo pipefail
: "${AUTHMARKS_TOKEN:?set AUTHMARKS_TOKEN}"
: "${AUTHMARKS_ORG:?set AUTHMARKS_ORG}"
API="https://www.authmarks.com/api/v1/orgs/$AUTHMARKS_ORG"
cursor=""
while :; do
url="$API/assignments?limit=200"
if [ -n "$cursor" ]; then
url="$url&cursor=$(jq -rn --arg c "$cursor" '$c|@uri')"
fi
page=$(curl -sS --fail-with-body "$url" -H "Authorization: Bearer $AUTHMARKS_TOKEN")
echo "$page" | jq -c '.data[]'
cursor=$(echo "$page" | jq -r '.next_cursor // empty')
[ -z "$cursor" ] && break
done
Node.js (18+, built-in fetch)
const BASE = `https://www.authmarks.com/api/v1/orgs/${process.env.AUTHMARKS_ORG}`;
const headers = { Authorization: `Bearer ${process.env.AUTHMARKS_TOKEN}` };
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
async function getPage(path, params) {
const url = new URL(`${BASE}${path}`);
for (const [key, value] of Object.entries(params)) {
if (value != null) url.searchParams.set(key, value);
}
for (;;) {
const response = await fetch(url, { headers });
if (response.status === 429) {
const wait = Number(response.headers.get("Retry-After") ?? "60");
await sleep(wait * 1000);
continue;
}
const body = await response.json();
if (!response.ok) {
throw new Error(`${response.status} ${body.error?.code}: ${body.error?.message}`);
}
return body;
}
}
async function* listAll(path, limit = 200) {
let cursor = null;
do {
const page = await getPage(path, { limit, cursor });
yield* page.data;
cursor = page.next_cursor;
} while (cursor);
}
for await (const assignment of listAll("/assignments")) {
console.log(assignment.id, assignment.title, assignment.due_at);
}
Python (requests)
import os
import time
import requests
BASE = f"https://www.authmarks.com/api/v1/orgs/{os.environ['AUTHMARKS_ORG']}"
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['AUTHMARKS_TOKEN']}"
def get_page(path, **params):
while True:
response = session.get(f"{BASE}{path}", params=params, timeout=30)
if response.status_code == 429:
time.sleep(int(response.headers.get("Retry-After", "60")))
continue
if not response.ok:
error = response.json().get("error", {})
raise RuntimeError(f"{response.status_code} {error.get('code')}: {error.get('message')}")
return response.json()
def list_all(path, limit=200):
cursor = None
while True:
page = get_page(path, limit=limit, cursor=cursor)
yield from page["data"]
cursor = page["next_cursor"]
if not cursor:
return
for assignment in list_all("/assignments"):
print(assignment["id"], assignment["title"], assignment["due_at"])
requests omits any parameter whose value is None, so the first page is requested without a cursor.
Handle errors
All errors follow one structure:
{ "error": { "code": "forbidden", "message": "This token does not hold the records_read scope." } }
| Status | code | Recommended action |
|---|---|---|
| 400 | invalid_request | Correct the query, for instance a limit outside 1 to 200 or a cursor that was edited. |
| 401 | unauthorized | The token is missing, incorrect, revoked, expired or from another organisation. Do not retry. |
| 403 | forbidden | The token does not carry the scope for this endpoint, or the plan does not include the feature (lms_read needs LTI). Issue a new token with the scope. |
| 404 | not_found | That id is not present in your organisation. |
| 405 | method_not_allowed | Only GET and HEAD are permitted. |
| 429 | rate_limited | Wait the number of seconds stated in Retry-After, then try again. |
| 503 | unavailable | Retry with backoff (say 2, 4, then 8 seconds). |
Retry only on 429 and 503. A 401 or 403 will not succeed on a retry, and repeated failed sign-ins from one address are capped (30 a minute).
Rate limits
- 600 requests a minute per token. Above the limit, the API responds with
429and aRetry-Afterheader in seconds. - 30 failed authentications a minute per client address. Beyond that, every attempt from that address is refused until the minute ends.
Use limit=200 for bulk reads to keep the number of requests down, and give every tool its own token so that one heavy job does not slow another. This matters when a nightly report and an LMS health check run on the same campus server.
Generate a typed client from OpenAPI
The public OpenAPI 3.1 document describes all v1 endpoints, the public verification endpoints and the MCP endpoint:
curl -sS https://www.authmarks.com/api/v1/openapi.json -o authmarks-openapi.json
The security scheme is named orgToken (HTTP bearer, format amk_ token).
TypeScript with openapi-typescript and openapi-fetch
npx openapi-typescript https://www.authmarks.com/api/v1/openapi.json -o src/authmarks.d.ts
npm install openapi-fetch
import createClient from "openapi-fetch";
import type { paths } from "./authmarks";
const client = createClient<paths>({
baseUrl: "https://www.authmarks.com",
headers: { Authorization: `Bearer ${process.env.AUTHMARKS_TOKEN}` },
});
const { data, error } = await client.GET("/api/v1/orgs/{orgId}/assignments", {
params: { path: { orgId: process.env.AUTHMARKS_ORG! }, query: { limit: 50 } },
});
if (error) console.error(error);
else console.log(data.data.map((a) => a.title));
Any language with OpenAPI Generator
npx @openapitools/openapi-generator-cli generate \
-i https://www.authmarks.com/api/v1/openapi.json \
-g python \
-o ./authmarks-client
Replace -g python with java, go, csharp, ruby or any other generator your team prefers.
Next steps
- API reference: each field and each error in detail.
- Connect AI agents with MCP: the same data for Claude Code, Cursor and other agents.
- Building with AI agents: guardrails and sample workflows.
- Security for integrations: a well-run production setup.
- LTI 1.3 setup: connect your institution's LMS so there is data to read.
Sources
- OpenAPI Specification 3.1.0 — as of 2026-11-26
- openapi-typescript — as of 2026-11-26
- OpenAPI Generator — as of 2026-11-26
Change notes
- 2026-11-26 — First published.
Spotted an error? Email sales@authmarks.com and we will correct the page and date the correction.