Developers

Authmarks REST API quickstart for Canadian campus IT: your first call in five minutes

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

Published 2026-11-26 · 7 min read

API versionv1
AuthBearer token (amk_ organization 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 organization's Authmarks data in roughly five minutes. When you reach the end you will hold an API token and your organization id, you will have made a successful curl call, and you will have a pagination loop in bash, Node.js and Python plus a typed client generated from the OpenAPI document. Version 1 of the API lists LMS connections, grade returns, assignments, submissions and sealed records. It never creates, edits or deletes anything.

Whether you sit in central campus IT at a university, support a college's LMS team or run integrations for a CEGEP, the steps are the same. Every field and error is listed in the API reference; token scopes and safe storage are covered in Authentication and scopes.

Step 1: create an API token

Only an owner or admin of the organization can do this.

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

  2. In the API tokens section, select Create token.

  3. Give the token a label that names whoever uses it, such as nightly-report or lms-health-check.

  4. Pick only the scopes the job actually needs:

    ScopeWhat the token can read
    lms_readLMS connections and the log of grades they returned
    assignments_readAssignments
    records_readSubmissions for each assignment, and sealed records
  5. You can set an expiry (1 to 730 days). We suggest you do.

  6. Copy the token now. It begins with amk_ and is displayed only once: Authmarks keeps nothing but a SHA-256 hash of it, so it can never be displayed again. If it goes missing, rotate it or create a fresh one.

Keep the token in an environment variable, not in your source code:

export AUTHMARKS_TOKEN="amk_paste_your_token_here"

Step 2: find your organization id

Your organization id appears on the Developers tab. It is a UUID that looks like 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"

Each token is tied to its own organization. Sending it with a different organization's id returns 401, exactly as an unknown token would.

Step 3: make your first call

Fetch your assignments (the token 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"
}

Treat ids as opaque strings: store them as text and never try to parse them.

Every endpoint with curl

Every endpoint is a GET request 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 reads pending (an admin has not approved it yet), active or disabled. To set up a connection in the first place, follow 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 under 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 come back as null. The API never returns scores, percentages or detector output.

This endpoint carries student names and email addresses. At a Canadian institution that is personal information, which PIPEDA and provincial laws such as FIPPA in Ontario and British Columbia or Quebec's Law 25 generally protect; your privacy office decides where exported data may be stored and who may see it.

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

Asking for a record that does not belong to your organization's members or assignments returns 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 on the next; on the final page next_cursor is null. Cursors are opaque, so never construct or modify one 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"])

Because requests drops any parameter whose value is None, the first page goes out with no cursor.

Handle errors

All errors share a single shape:

{ "error": { "code": "forbidden", "message": "This token does not hold the records_read scope." } }
StatuscodeWhat to do
400invalid_requestCorrect the query, for instance a limit outside 1 to 200 or a cursor that was edited.
401unauthorizedThe token is missing, incorrect, revoked, expired or tied to another organization. Do not retry.
403forbiddenThe token does not hold the scope this endpoint needs, or your plan does not include the feature (lms_read requires LTI). Create a new token with the scope added.
404not_foundThat id does not exist in your organization.
405method_not_allowedOnly GET and HEAD are allowed.
429rate_limitedWait the number of seconds given in Retry-After, then try again.
503unavailableTry again with backoff (2, 4, then 8 seconds, for example).

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

Rate limits

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

Request limit=200 for bulk reads so you send fewer requests, and issue each tool its own token so that one busy job never slows another down.

Generate a typed client from OpenAPI

The public OpenAPI 3.1 document describes every v1 endpoint, along with 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 your team uses.

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.