Passer au contenu principal
PATCH
/
sessions
/
{id}
Update session
curl --request PATCH \
  --url https://{tenantDomain}/api/v2/sessions/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "session_metadata": {}
}
'
{
  "id": "<string>",
  "user_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "authenticated_at": "2023-11-07T05:31:56Z",
  "idle_expires_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "last_interacted_at": "2023-11-07T05:31:56Z",
  "device": {
    "initial_user_agent": "<string>",
    "initial_ip": "<string>",
    "initial_asn": "<string>",
    "last_user_agent": "<string>",
    "last_ip": "<string>",
    "last_asn": "<string>"
  },
  "clients": [
    {
      "client_id": "<string>"
    }
  ],
  "authentication": {
    "methods": [
      {
        "name": "<string>",
        "timestamp": "2023-11-07T05:31:56Z",
        "type": "<string>"
      }
    ]
  },
  "cookie": {
    "mode": "non-persistent"
  },
  "session_metadata": {}
}

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

id
string
requis

ID of the session to update.

Corps

session_metadata
object

Metadata associated with the session. Pass null or {} to remove all session_metadata.

Réponse

Session successfully updated.

id
string

The ID of the session

user_id
string

ID of the user which can be used when interacting with other APIs.

created_at

The date and time when the session was created

updated_at

The date and time when the session was created

authenticated_at

The date and time when the session was created

idle_expires_at

The date and time when the session was created

expires_at

The date and time when the session was created

last_interacted_at

The date and time when the session was created

device
object

Metadata related to the device used in the session

clients
object[]

List of client details for the session

authentication
object

Details about authentication signals obtained during the login flow

[Private Early Access] Session cookie configuration.

session_metadata
object

Metadata associated with the session, in the form of an object with string values (max 255 chars). Maximum of 25 metadata properties allowed.