Sessions

Mint Retrieval Token

Mint a short-lived, signed, query-only retrieval token.

Scope is pinned server-side from the authenticated key: the tenant is the key's user; an optional endUserId narrows the session to one end-user.

post/api/v1/sessions/token

Request

  • Base URL: https://api.gemina.co (the document declares no server; this is the origin it was published from)
  • URL: https://api.gemina.co/api/v1/sessions/token
  • Auth: API key in header X-API-Key

Request body

endUserIdstring nullable

Optional end-user scope: the token will only see documents tagged to this end-user. Omit for an admin (whole-account) session.

ttlSecondsinteger nullable

Requested TTL; clamped server-side to [300, 900] seconds.

extractionIdsstring[] nullable

Optional extraction scope: the minted token may only read/verify these document-extraction ids (carried in the signed xids claim). Omit for the existing tenant / end-user scoping. Capped at 10; an empty list is rejected rather than silently minting a tenant-wide token.

Response

Successful Response

servedAtstring date-time
servedAtTimestampnumber
createdAtstring date-time nullable
createdAtTimestampnumber nullable
tokenstring required
tokenTypestring
expiresIninteger required
expiresAtstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.