Skip to main content
POST
/
v2
/
session
/
apps
/
{appID}
/
tokens
Mint a token
curl --request POST \
  --url https://api.prelude.dev/v2/session/apps/{appID}/tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "claims": {}
}'
{
  "token": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

appID
string
required

The id of the app the request refers to. An application's unique identifier.

Examples:

"54e9ujn"

"fvua38g"

Body

application/json
claims
object
required

The JWT claims payload to sign. Any claims are accepted and are passed through as-is. The exp claim is capped at 24 hours in the future and defaults to 24 hours from now when omitted; iat and jti are populated automatically when omitted.

Example:
{ "sub": "user-123", "scope": "read write" }

Response

Created

token
string
required

The signed JWT.

Example:

"eyJhbGciOiJSUzI1NiIsImtpZCI6ImtleS0xIn0.eyJzdWIiOiJ1c2VyLTEyMyJ9.signature"

expires_at
string<date-time>
required

The time at which the token expires.

Example:

"2026-06-17T12:00:00Z"