The Stytch Session object contains all of the information about a user's session; when it was started, when it expires, which authentication factors were validated, e.g. password, OAuth, OTP, etc. Read more about Stytch Sessions and how they work in our Sessions guide.
Session object
Fields
attributes object
authentication_factors array[objects]
custom_claims array[objects]
expires_at timestamp
last_accessed_at timestamp
session_id string
started_at timestamp
user_id string
OBJECT
{
"session": {
"attributes": {
"ip_address": "",
"user_agent": ""
},
"authentication_factors": [
{
"created_at": "2025-01-09T07:41:52Z",
"delivery_method": "email",
"email_factor": {
"email_address": "sandbox@stytch.com",
"email_id": "email-test-81bf03a8-86e1-4d95-bd44-bb3495224953"
},
"last_authenticated_at": "2025-01-09T07:41:52Z",
"updated_at": "2025-01-09T07:41:52Z",
"type": "magic_link"
}
{
"created_at": "2025-01-09T08:41:52Z",
"delivery_method": "knowledge",
"last_authenticated_at": "2025-01-09T08:41:52Z",
"type": "password",
"updated_at": "2025-01-09T08:41:52Z"
}
],
"custom_claims": {
"claim1": "value1",
"claim2": "value2"
},
"expires_at": "2025-04-22T08:00:00Z",
"last_accessed_at": "2025-04-22T07:41:52Z",
"started_at": "2025-04-22T07:00:00Z"
"session_id": "session-test-fe6c042b-6286-479f-8a4f-b046a6c46509",
"user_id": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f",
}
}