Folders

The Folder object and its five operations: list subfolders, create, read, rename, colour and delete a folder of the “My contents” library.

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

Sections · Folders

Folders organize the library, five levels deep at most. Colour and icon only apply to top-level folders; asking for them on a subfolder answers 403 forbidden.

Good to know

  • GET /v1/folders lists the subfolders of a parent (the top level without parentId); the contents of a folder are read with GET /v1/contents?folderId=….
  • Deleting a folder deletes its subfolders and their contents.

The Folder object

A folder of the library ("My contents"). Folders nest five levels deep at most.

FieldTypeDescription
idalways presentstring (uuid)Folder identifier (UUID).
namealways presentstringName of the folder.
parentIdalways presentstring | nullParent folder, or null for a top-level folder.
descriptionalways presentstring | nullDescription, or null.
coloralways presentstring | nullColour #RRGGBB (top-level folders only), or null.
iconalways presentstring | nullIcon name (top-level folders only), or null.
updatedAtalways presentstring (date-time)Last update instant (ISO 8601, UTC).
Folder
{
  "id": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
  "name": "Biology",
  "parentId": null,
  "description": "Year 12 biology.",
  "color": "#3B82F6",
  "icon": "leaf",
  "updatedAt": "2026-10-02T08:30:12.000Z"
}

List the subfolders of a folder

GET/v1/foldersScope folders:read

Folders stored directly in the parent (the top level when parentId is omitted), in library order, paginated.

Parameters

FieldInTypeDescription
parentIdoptionalquerystring (uuid)Parent folder (UUID). Omit it to list the top-level folders.
limitoptionalqueryintegerfrom 1 to 100 · default 50Number of items per page, 1 to 100 (default 50).
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 folders — A page of Folder { 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 parent 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/folders?limit=50" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY"
Response 200
{
  "data": [
    {
      "id": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
      "name": "Biology",
      "parentId": null,
      "description": "Year 12 biology.",
      "color": "#3B82F6",
      "icon": "leaf",
      "updatedAt": "2026-10-02T08:30:12.000Z"
    }
  ],
  "nextCursor": null,
  "hasMore": false
}

Create a folder

POST/v1/foldersScope folders:write

Creates a folder at the top level or inside a parent (five levels at most). Colour and icon apply to top-level folders only.

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 CreateFolderRequest

A new folder.

FieldTypeDescription
namerequiredstring1 to 200 charactersName of the folder (1 to 200 characters).
parentIdoptionalstring (uuid) | nullParent folder; omitted or null = top level.
descriptionoptionalstring | nullat most 2000 charactersDescription (2,000 characters at most).
coloroptionalstring | nullColour #RRGGBB (top-level folders only), or null.
iconoptionalstring | nullat most 64 charactersIcon name (top-level folders only).

Response 201

The folder created — A Folder 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 parent 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/folders" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY" \
  -H "Idempotency-Key: 6f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Biology",
  "color": "#3B82F6",
  "icon": "leaf"
}'
Response 201
{
  "id": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
  "name": "Biology",
  "parentId": null,
  "description": "Year 12 biology.",
  "color": "#3B82F6",
  "icon": "leaf",
  "updatedAt": "2026-10-02T08:30:12.000Z"
}

Retrieve a folder

GET/v1/folders/{folderId}Scope folders:read

One folder of the account the API key acts for. Answers 304 to a matching If-None-Match.

Parameters

FieldInTypeDescription
folderIdrequiredpathstring (uuid)Folder identifier (UUID).

Response 200

The folder — A Folder 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/folders/7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY"
Response 200
{
  "id": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
  "name": "Biology",
  "parentId": null,
  "description": "Year 12 biology.",
  "color": "#3B82F6",
  "icon": "leaf",
  "updatedAt": "2026-10-02T08:30:12.000Z"
}

Update a folder

PATCH/v1/folders/{folderId}Scope folders:write

Changes the name, the description, the colour or the icon (colour and icon: top-level folders only, 403 forbidden otherwise).

Parameters

FieldInTypeDescription
folderIdrequiredpathstring (uuid)Folder identifier (UUID).

Request body UpdateFolderRequest

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

FieldTypeDescription
nameoptionalstring1 to 200 charactersNew name (1 to 200 characters).
descriptionoptionalstring | nullat most 2000 charactersNew description, or null to clear it.
coloroptionalstring | nullColour #RRGGBB (top-level folders only), or null.
iconoptionalstring | nullat most 64 charactersNew icon name, or null.

Response 200

The folder updated — A Folder 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/folders/7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Biology — Year 12"
}'
Response 200
{
  "id": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
  "name": "Biology",
  "parentId": null,
  "description": "Year 12 biology.",
  "color": "#3B82F6",
  "icon": "leaf",
  "updatedAt": "2026-10-02T08:30:12.000Z"
}

Delete a folder

DELETE/v1/folders/{folderId}Scope folders:write

Deletes the folder, its subfolders and their contents. Answers 204 without a body.

Parameters

FieldInTypeDescription
folderIdrequiredpathstring (uuid)Folder 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/folders/7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY"