POST
/sessions/{session_id}/refreshRefresh a session
Refreshes a session by creating a new session token. A 401 is returned when there are validation errors, which signals the SDKs to fall back to the handshake flow.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
session_idstringrequired
The ID of the session
Refresh session parameters
expired_tokenstringrequired
The JWT that is sent via the `__session` cookie from your frontend.
Note: this JWT must be associated with the supplied session ID.
refresh_tokenstringrequired
The refresh token from the `__refresh` cookie set via FAPI's handshake flow.
request_originstringrequired
The origin of the request.
request_headersobjectoptional
The headers of the request.
formatstringoptional
The format of the response.
request_originating_ipstringoptional
The IP address of the request.
200Success
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
jwtstringrequired
String representing the encoded JSON Web Token (JWT) value.
400Request was not successful
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
401Authentication invalid
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
Error handling
A 400 is returned: Request was not successful. A 401 is returned: Authentication invalid.