Skip to main content
POST
/
v1
/
session
/
migration
Migrate a legacy session
curl --request POST \
  --url https://{appId}.session.prelude.dev/v1/session/migration \
  --header 'Content-Type: application/json' \
  --data '
{
  "token": "<string>",
  "code_challenge": "<string>",
  "dispatch_id": "<string>"
}
'
{
  "challenge_token": "<string>"
}

Body

application/json
token
string
required

The legacy session token to validate via the migration hook.

Example:

"legacy-session-token-abc123"

code_challenge
string
required

PKCE code challenge for the login flow.

Example:

"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"

dispatch_id
string

The identifier of the dispatch from the front-end SDK.

Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

OK

challenge_token
string
required
Example:

"eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9..."