Developers

Authmarks REST API quickstart: make your first call in five minutes

Create an organisation API token, look up your organisation id and make a first read-only Authmarks API call with curl, Node.js or Python, with pagination, error handling and rate limits covered.

Published 2026-11-26 · 6 min read

API versionv1
AuthBearer token (amk_ organisation API token)
Base URLhttps://www.authmarks.com/api/v1
AccessRead-only (GET and HEAD)
Rate limit600 requests a minute per token
OpenAPIhttps://www.authmarks.com/api/v1/openapi.json

What this page gives you: a working, read-only connection to your organisation's Authmarks data in roughly five minutes. By the end you will hold an API token and your organisation id, have made a successful curl call, have a pagination loop in bash, Node.js and Python, and have a typed client generated from the OpenAPI document. The v1 API lists LMS (VLE) connections, grade returns, assignments, submissions and sealed records. It never creates, alters or deletes anything.

This guide is written with university IT services and VLE administrators in mind, but it works the same for any organisation. For every field and error, see the API reference. For token scopes and safe storage, see Authentication and scopes.

Step 1: create an API token

You must be an owner or admin of the organisation.

  1. Sign in and go to Settings → Developers (/dashboard/org?tab=developers).

  2. Under API tokens, select Create token.

  3. Give it a label that makes clear who uses it, such as nightly-report or lms-health-check.

  4. Pick only the scopes the job needs:

    ScopeWhat the token can read
    lms_readLMS connections and the log of their grade returns
    assignments_readAssignments across the organisation
    records_readSubmissions for each assignment, and sealed records
  5. You can set an expiry (1 to 730 days) if you wish. We recommend that you do.

  6. Copy the token now. It begins with amk_ and is shown only once. Authmarks keeps only a SHA-256 hash of it, so it cannot be displayed again. If you lose it, rotate it or create another.

Keep the token in an environment variable, never in source code:

export AUTHMARKS_TOKEN="amk_paste_your_token_here"

Step 2: find your organisation id

Your organisation id appears on the Developers tab. It is a UUID such as 3f2a9c1e-8b7d-4e21-9a0f-5c6d7e8f9a01, and every 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 valid only for the organisation that issued it. Sending it with another organisation's id returns 401, exactly as an unknown token would.

Step 3: make your first call

List your assignments (this needs 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. Store them as text and do not try to parse them.

Every endpoint with curl

Every 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 takes one of three values: pending (awaiting approval by an admin), active or disabled. Setting up a connection to your VLE 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"

You can see the response 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
}

For a submission that has not been sealed, record_id, sealed_at and record_url are null. The API returns no scores, percentages or detector output of any kind.

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"
  }
}

If a record does not belong to your organisation's members or assignments, the API answers 404.

Paginate through every result

List endpoints accept limit (1 to 200, default 50) and cursor. Take next_cursor from one page and send it as cursor for the next. On the final page next_cursor is null. Treat cursors as opaque: never construct or modify them.

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 drops any parameter whose value is None, so the first page goes out without a cursor.

Handle errors

All errors share one shape:

{ "error": { "code": "forbidden", "message": "This token does not hold the records_read scope." } }
StatuscodeWhat you should do
400invalid_requestCorrect the query, for instance a limit outside 1 to 200 or a cursor that has been edited.
401unauthorizedThe token is absent, wrong, revoked, expired or issued by another organisation. Do not retry.
403forbiddenEither the token lacks the scope for this endpoint or the plan lacks the feature (lms_read needs LTI). Create a new token with the scope added.
404not_foundNo such id exists in your organisation.
405method_not_allowedThe API accepts only GET and HEAD.
429rate_limitedWait for the number of seconds given in Retry-After, then try again.
503unavailableTry again with backoff (2, 4, then 8 seconds, for example).

Only 429 and 503 are worth retrying. A 401 or 403 will not succeed on a second attempt, and repeated failed sign-ins from a single address are limited (30 a minute).

Rate limits

  • 600 requests a minute per token. Beyond that, the API returns 429 with a Retry-After header given in seconds.
  • 30 failed authentications a minute per client address. Once that is reached, every further attempt from the address is refused until the minute is up.

Use limit=200 for bulk reads so that you make fewer requests, and give each tool its own token so that one busy job never holds up another.

Generate a typed client from OpenAPI

The public OpenAPI 3.1 document covers every v1 endpoint, the public verification endpoints and the MCP endpoint:

curl -sS https://www.authmarks.com/api/v1/openapi.json -o authmarks-openapi.json

Its security scheme is called 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.

Next steps

Sources

Change notes

  • 2026-11-26 — First published.

Spotted an error? Email sales@authmarks.com and we will correct the page and date the correction.