A JSON REST API, at https://api.memojin.com/v1. These rules hold for every operation; each resource’s reference repeats them where needed.
Request and response format
- JSON only: send
Content-Type: application/jsonwith a body (otherwise415 unsupported_media_type) and acceptapplication/json(otherwise406 not_acceptable). A body is at most 1 MB (413 payload_too_large). - Fields in
camelCase; identifiers are UUIDs; instants in ISO 8601 UTC (2026-10-01T14:03:00.000Z). A missing value isnull, an empty list[]: the fields of an object are always present. - A resource is returned as is; a list as
{ "data": [...], "nextCursor": "…", "hasMore": true }. - Image URLs (
imageUrl) are signed and short-lived: download the image if you need it, do not store the URL.
Success statuses
| Status | When | Body |
|---|---|---|
200 OK | Read, update | The object, or a page |
201 Created | Creation | The created object, and the Location header |
202 Accepted | AI generation started | The job to follow (jobId) |
204 No Content | Deletion | None |
304 Not Modified | Matching If-None-Match | None |
Be tolerant
New fields, new enum values (a status, a job type) and new error codes may appear in /v1 without notice. Ignore the fields you do not know and treat an unknown value as a generic case. See versioning.
Headers
| Header | Direction | Meaning |
|---|---|---|
Authorization | request | Bearer mj_live_… or mj_test_… (authentication) |
Idempotency-Key | request | One UUID per POST operation, reused on every retry (idempotency) |
If-None-Match | request | The ETag you hold: 304 when unchanged (conditional requests) |
If-Match | request | The ETag you read: 412 on PATCH or DELETE if the resource changed since |
Accept-Language | request | Language of error messages: en (default), fr, es, de, it |
X-Request-Id | both | Your own identifier, echoed back (generated otherwise); quote it when contacting us |
ETag | response | Version of the representation returned by a GET |
Cache-Control | response | private, no-cache on reads (revalidate with If-None-Match) |
Location | response | Path of the resource created by a 201 |
Link | response | rel="next" (next page), rel="help" (documentation of an error code), rel="deprecation" |
RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset | response | Your current limit window (rate limits) |
Retry-After | response | Seconds to wait, on 429, 503 and 409 idempotency_in_progress |
Idempotent-Replayed | response | true when the response replays an earlier one |
Memojin-Version | response | Version of the contract that served the request (versioning) |
Memojin-Credits-Estimate | response | AI credit units a generation plans to use (ai_card=12) |
Deprecation, Sunset | response | Set on an operation scheduled for removal (RFC 9745, RFC 8594) |