Requests, responses and headers

JSON only, camelCase fields, ISO 8601 UTC instants, 201, 202 and 204 answers, and every request and response header of the Memojin API.

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

Sections · Requests and responses

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/json with a body (otherwise 415 unsupported_media_type) and accept application/json (otherwise 406 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 is null, 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

StatusWhenBody
200 OKRead, updateThe object, or a page
201 CreatedCreationThe created object, and the Location header
202 AcceptedAI generation startedThe job to follow (jobId)
204 No ContentDeletionNone
304 Not ModifiedMatching If-None-MatchNone

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

HeaderDirectionMeaning
AuthorizationrequestBearer mj_live_… or mj_test_… (authentication)
Idempotency-KeyrequestOne UUID per POST operation, reused on every retry (idempotency)
If-None-MatchrequestThe ETag you hold: 304 when unchanged (conditional requests)
If-MatchrequestThe ETag you read: 412 on PATCH or DELETE if the resource changed since
Accept-LanguagerequestLanguage of error messages: en (default), fr, es, de, it
X-Request-IdbothYour own identifier, echoed back (generated otherwise); quote it when contacting us
ETagresponseVersion of the representation returned by a GET
Cache-Controlresponseprivate, no-cache on reads (revalidate with If-None-Match)
LocationresponsePath of the resource created by a 201
Linkresponserel="next" (next page), rel="help" (documentation of an error code), rel="deprecation"
RateLimit-Limit, RateLimit-Remaining, RateLimit-ResetresponseYour current limit window (rate limits)
Retry-AfterresponseSeconds to wait, on 429, 503 and 409 idempotency_in_progress
Idempotent-Replayedresponsetrue when the response replays an earlier one
Memojin-VersionresponseVersion of the contract that served the request (versioning)
Memojin-Credits-EstimateresponseAI credit units a generation plans to use (ai_card=12)
Deprecation, SunsetresponseSet on an operation scheduled for removal (RFC 9745, RFC 8594)