Skip to content

Refresh current browser session expiration.

POST
/api/sessions/refresh
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/sessions/refresh \
--cookie authrim_session=<authrim_session>

Extends the session to extend_seconds (default 3600, at most 86400) from now, and renews the session cookies to match when the cookie names the session. An extension never shortens a session and never takes it past its sign-in plus the tenant’s session.max_ttl (a session made under a longer limit keeps its expiry but is not extended). The tenant can turn extension off with session.refresh_default.

Successful JSON response.

Media type application/json
object
session_id
required
string
user_id
required
string
expires_at
required
integer
extended_by
required
integer
message
required
string
Example
{
"session_id": "sess_123",
"user_id": "user_123",
"expires_at": 1770086400000,
"extended_by": 3600,
"message": "Session extended successfully"
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Session extension is disabled for the tenant (session.refresh_default).

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

The session is gone.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}