Contents

The Content object and its five operations: list a folder, create a content with its text, read, update and delete it with the Memojin API.

api.memojin.com/v1 · Contract 1.0.0-beta.2 · Beta

Sections · Contents

A content is a piece of study material in the library (“My contents”): class notes, a revision sheet, a textbook section. It holds a text (its body), and it is the source of the memocards and questions.

Good to know

  • POST /v1/contents stores the text as is, without AI or credits. To turn it into memocards, then start a generation (at least 100 characters of text).
  • GET /v1/contents browses one folder (the root without folderId); to look across the whole library, use search.
  • inclusions sums up what the content holds: body, summary, number of memocards, questions, ready podcasts and sources.
  • Deleting a content deletes its memocards and questions.

The Content object

A content (study material, notes…) of the account the key acts for.

FieldTypeDescription
idalways presentstring (uuid)Content identifier (UUID).
titlealways presentstringTitle of the content.
descriptionalways presentstring | nullShort description, or null.
languagealways presentstring | nullLanguage code (fr, en, es, de, it…), or null when unknown.
folderIdalways presentstring | nullFolder holding the content, or null at the root.
imageUrlalways presentstring | nullCover image: a short-lived signed URL (download it, do not store it), or null.
createdAtalways presentstring (date-time)Creation instant (ISO 8601, UTC).
updatedAtalways presentstring (date-time)Last update instant (ISO 8601, UTC).
inclusionsalways presentContentMeasuresThe six measures of a content.
Content
{
  "id": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
  "title": "Photosynthesis",
  "description": "Light and dark reactions, chlorophyll, the Calvin cycle.",
  "language": "en",
  "folderId": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
  "imageUrl": null,
  "createdAt": "2026-10-01T14:03:00.000Z",
  "updatedAt": "2026-10-02T08:30:12.000Z",
  "inclusions": {
    "hasBody": true,
    "hasSummary": false,
    "memocardsCount": 12,
    "questionsCount": 3,
    "podcastsReadyCount": 0,
    "sourcesCount": 1
  }
}

The ContentMeasures object

The six measures of a content.

FieldTypeDescription
hasBodyalways presentbooleanThe content has a body (its text).
hasSummaryalways presentbooleanThe content has a summary.
memocardsCountalways presentintegerNumber of memocards (flashcards).
questionsCountalways presentintegerNumber of practice questions.
podcastsReadyCountalways presentintegerNumber of podcast episodes ready to play.
sourcesCountalways presentintegerNumber of source documents.

List the contents of a folder

GET/v1/contentsScope contents:read

Contents stored directly in the folder (the root when folderId is omitted), most recent first, paginated with limit and cursor. Only the contents of the account the API key acts for are visible.

Parameters

FieldInTypeDescription
folderIdoptionalquerystring (uuid)Folder to list (UUID). Omit it to list the root.
limitoptionalqueryintegerfrom 1 to 100 · default 20Number of items per page, 1 to 100 (default 20).
cursoroptionalquerystringat most 200 charactersOpaque cursor: the nextCursor of the previous page. Keep the same limit from one page to the next.

Response 200

A page of contents — A page of Content { data, nextCursor, hasMore }

Errors

HTTPMeaning
400validation_error or invalid_cursor
401invalid_api_key or revoked_api_key
403insufficient_scope, account_suspended, live_not_enabled or forbidden
404not_found — the folder does not exist or is not visible to this key
406not_acceptable — the Accept header excludes application/json
429rate_limited or test_quota_exceeded — see the Retry-After and RateLimit-* headers
500internal_error
503unavailable — see the Retry-After header
Request
curl "https://api.memojin.com/v1/contents?limit=20" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY"
Response 200
{
  "data": [
    {
      "id": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
      "title": "Photosynthesis",
      "description": "Light and dark reactions, chlorophyll, the Calvin cycle.",
      "language": "en",
      "folderId": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
      "imageUrl": null,
      "createdAt": "2026-10-01T14:03:00.000Z",
      "updatedAt": "2026-10-02T08:30:12.000Z",
      "inclusions": {
        "hasBody": true,
        "hasSummary": false,
        "memocardsCount": 12,
        "questionsCount": 3,
        "podcastsReadyCount": 0,
        "sourcesCount": 1
      }
    }
  ],
  "nextCursor": null,
  "hasMore": false
}

Create a content

POST/v1/contentsScope contents:write

Creates a content in a folder (or at the root), optionally with its body as plain text. No AI is involved and no credit is used. Answers 201 with the content and its Location.

Parameters

FieldInTypeDescription
Idempotency-KeyoptionalheaderstringStrongly recommended. A unique value per operation (UUID v4), reused unchanged on every retry. Within 24 hours, the same key and the same request replay the first response (Idempotent-Replayed: true) without a second effect or charge; another request with the same key → 422 idempotency_key_reused; still running → 409 idempotency_in_progress.

Request body CreateContentRequest

A new content.

FieldTypeDescription
titlerequiredstring1 to 300 charactersTitle of the content (1 to 300 characters).
folderIdoptionalstring (uuid) | nullFolder to store it in; omitted or null = the root.
descriptionoptionalstring | nullat most 2000 charactersShort description (2,000 characters at most).
languageoptionalstring | nullLanguage code (fr, en, es, de, it…), or null when unknown.
textoptionalstringat most 200000 charactersBody of the content, as plain text (paragraphs separated by blank lines; formulas between $…$). Written as is: no AI is involved and no credit is used. Omit it to create an empty content.

Response 201

The content created — A Content object

Errors

HTTPMeaning
400validation_error or bad_request
401invalid_api_key or revoked_api_key
403insufficient_scope, account_suspended, live_not_enabled or forbidden
404not_found — the folder does not exist or is not visible to this key
406not_acceptable — the Accept header excludes application/json
409idempotency_in_progress — retry after Retry-After (1 s)
413payload_too_large
415unsupported_media_type
422idempotency_key_reused, or a business rule (see the description)
429rate_limited or test_quota_exceeded — see the Retry-After and RateLimit-* headers
500internal_error
503unavailable — see the Retry-After header
Request
curl -X POST "https://api.memojin.com/v1/contents" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY" \
  -H "Idempotency-Key: 6f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Photosynthesis",
  "folderId": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
  "language": "en",
  "text": "Photosynthesis converts light energy into chemical energy."
}'
Response 201
{
  "id": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
  "title": "Photosynthesis",
  "description": "Light and dark reactions, chlorophyll, the Calvin cycle.",
  "language": "en",
  "folderId": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
  "imageUrl": null,
  "createdAt": "2026-10-01T14:03:00.000Z",
  "updatedAt": "2026-10-02T08:30:12.000Z",
  "inclusions": {
    "hasBody": true,
    "hasSummary": false,
    "memocardsCount": 12,
    "questionsCount": 3,
    "podcastsReadyCount": 0,
    "sourcesCount": 1
  }
}

Retrieve a content

GET/v1/contents/{contentId}Scope contents:read

One content of the account the API key acts for, with its six measures (inclusions). Answers 304 to a matching If-None-Match.

Parameters

FieldInTypeDescription
contentIdrequiredpathstring (uuid)Content identifier (UUID).

Response 200

The content — A Content object

Errors

HTTPMeaning
400validation_error — an identifier is not a UUID
401invalid_api_key or revoked_api_key
403insufficient_scope, account_suspended, live_not_enabled or forbidden
404not_found
406not_acceptable — the Accept header excludes application/json
429rate_limited or test_quota_exceeded — see the Retry-After and RateLimit-* headers
500internal_error
503unavailable — see the Retry-After header
Request
curl "https://api.memojin.com/v1/contents/3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY"
Response 200
{
  "id": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
  "title": "Photosynthesis",
  "description": "Light and dark reactions, chlorophyll, the Calvin cycle.",
  "language": "en",
  "folderId": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
  "imageUrl": null,
  "createdAt": "2026-10-01T14:03:00.000Z",
  "updatedAt": "2026-10-02T08:30:12.000Z",
  "inclusions": {
    "hasBody": true,
    "hasSummary": false,
    "memocardsCount": 12,
    "questionsCount": 3,
    "podcastsReadyCount": 0,
    "sourcesCount": 1
  }
}

Update a content

PATCH/v1/contents/{contentId}Scope contents:write

Changes the title, the description or the language. Send If-Match with the ETag you read to avoid overwriting a concurrent change.

Parameters

FieldInTypeDescription
contentIdrequiredpathstring (uuid)Content identifier (UUID).

Request body UpdateContentRequest

The fields to change; the others stay as they are.

FieldTypeDescription
titleoptionalstring1 to 300 charactersNew title (1 to 300 characters).
descriptionoptionalstring | nullat most 2000 charactersNew description, or null to clear it.
languageoptionalstring | nullLanguage code (fr, en, es, de, it…), or null when unknown.

Response 200

The content updated — A Content object

Errors

HTTPMeaning
400validation_error or bad_request
401invalid_api_key or revoked_api_key
403insufficient_scope, account_suspended, live_not_enabled or forbidden
404not_found
406not_acceptable — the Accept header excludes application/json
412precondition_failed — If-Match does not match the current ETag
413payload_too_large
415unsupported_media_type
429rate_limited or test_quota_exceeded — see the Retry-After and RateLimit-* headers
500internal_error
503unavailable — see the Retry-After header
Request
curl -X PATCH "https://api.memojin.com/v1/contents/3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Photosynthesis (revised)"
}'
Response 200
{
  "id": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
  "title": "Photosynthesis",
  "description": "Light and dark reactions, chlorophyll, the Calvin cycle.",
  "language": "en",
  "folderId": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
  "imageUrl": null,
  "createdAt": "2026-10-01T14:03:00.000Z",
  "updatedAt": "2026-10-02T08:30:12.000Z",
  "inclusions": {
    "hasBody": true,
    "hasSummary": false,
    "memocardsCount": 12,
    "questionsCount": 3,
    "podcastsReadyCount": 0,
    "sourcesCount": 1
  }
}

Delete a content

DELETE/v1/contents/{contentId}Scope contents:write

Deletes the content with its memocards and questions. Answers 204 without a body.

Parameters

FieldInTypeDescription
contentIdrequiredpathstring (uuid)Content identifier (UUID).

Response 204

Deleted — No response body.

Errors

HTTPMeaning
400validation_error — an identifier is not a UUID
401invalid_api_key or revoked_api_key
403insufficient_scope, account_suspended, live_not_enabled or forbidden
404not_found
406not_acceptable — the Accept header excludes application/json
412precondition_failed — If-Match does not match the current ETag
429rate_limited or test_quota_exceeded — see the Retry-After and RateLimit-* headers
500internal_error
503unavailable — see the Retry-After header
Request
curl -X DELETE "https://api.memojin.com/v1/contents/3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY"