Skip to content

Collections

A Collection bundles several of your quizzes behind one shareable, embeddable link, each item tagged easy / medium / hard so students pick a difficulty and self-start. See the Collections guide for the concept.

OperationEndpointScope
List collectionsGET /api/v1/collectionsapi:collection:read
Create a collectionPOST /api/v1/collectionsapi:collection:write
Get a collectionGET /api/v1/collections/{collectionAssignmentId}api:collection:read
Update a collectionPATCH /api/v1/collections/{collectionAssignmentId}api:collection:write

The {collectionAssignmentId} path segment is the collection_assignment_id returned when you create a collection (also the id in the public /collection/<slug> and /widget/collection/<id> URLs).

List collections

GET /api/v1/collections?page=1&limit=20
QueryDefaultNotes
page11–1000.
limit201–100.
json
{
  "data": [
    { "collection_assignment_id": "…", "collection_id": "…", "title": "…",
      "slug": "…", "use_count": 0, "created_at": "…", "collection_url": "…" }
  ],
  "total": 1, "page": 1, "limit": 20, "totalPages": 1
}

Create a collection

POST /api/v1/collections
FieldTypeRequiredNotes
titlestringYes1–200 chars.
itemsarrayYes2–50 items, each { quiz_id, difficulty? }. quiz_ids must be distinct and owned by you.
items[].quiz_idUUIDYesA quiz from GET /api/v1/quizzes.
items[].difficulty"easy" | "medium" | "hard"NoDefaults to medium.
default_mode"classic" | "widget"NoDefaults to widget.
time_limit_secondsnumber | nullNoOptional per-quiz time limit.
shuffle_itemsbooleanNoDefaults to false.
show_resultsbooleanNoDefaults to true.

The public slug is generated automatically (title + a short id suffix); set a custom one later with PATCH (see below).

json
{
  "data": {
    "collection_id": "…",
    "collection_assignment_id": "…",
    "slug": "my-pack-2bdccf",
    "collection_url": "https://quizzz.techtranslab.com/collection/my-pack-2bdccf",
    "embed_url": "https://quizzz.techtranslab.com/widget/collection/…"
  }
}

Errors:

StatuscodeWhen
400INVALID_ITEMSFewer than 2 items, or a duplicate quiz_id.
400QUIZ_NOT_FOUNDAn items[].quiz_id is not a quiz you own (response includes quiz_ids).
403quota codeMonthly link quota exceeded.

Get a collection

GET /api/v1/collections/{collectionAssignmentId}

Returns the collection with its items. 404 if it does not exist or is not yours.

json
{
  "data": {
    "collection_assignment_id": "…", "collection_id": "…", "title": "…",
    "default_mode": "widget", "time_limit_seconds": null,
    "shuffle_items": false, "show_results": true,
    "slug": "…", "collection_url": "…", "embed_url": "…",
    "items": [ { "quiz_id": "…", "difficulty": "easy", "quiz_title": "…" } ]
  }
}

Update a collection

PATCH /api/v1/collections/{collectionAssignmentId}

All fields optional — send only what you want to change.

FieldTypeNotes
titlestring1–200.
itemsarraySame shape/rules as create (2–50, distinct, owned). Replaces the item set.
default_mode"classic" | "widget"
time_limit_secondsnumber | null
shuffle_itemsboolean
show_resultsboolean
slugstringCustom public slug (≤80). Validated for format + uniqueness; 400 INVALID_SLUG if taken or malformed.

Returns the updated collection (same shape as Get). 404 if it is not yours; 400 QUIZ_NOT_FOUND / INVALID_ITEMS on bad items.

Pro plan + scope

The API needs the Pro plan (an api_access entitlement) and a key with the api:collection:read / api:collection:write scope. Prefer plain language? The Claude Connector exposes the same as create_collection / list_collections / get_collection / update_collection.

TechTrans Lab