B2B Saas Authentication

/

API reference

/

Session management

/

Session object

Session object


Fields


member_session_idstring

member_idstring

started_attimestamp

last_accessed_attimestamp

expires_attimestamp

authentication_factorsarray[objects]

custom_claimsarray[objects]

organization_idstring

rolesarray[strings]

OBJECT

{
  "member_session": {
    "member_session_id": "session-test-fe6c042b-6286-479f-8a4f-b046a6c46509",
    "member_id": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f",
    "started_at": "2023-01-09T07:41:52Z",
    "last_accessed_at": "2023-01-09T07:41:52Z",
    "expires_at": "2021-08-10T07:41:52Z",
    "authentication_factors": [
      {
        "delivery_method": "email",
        "email_factor": {
          "email_address": "sandbox@stytch.com",
          "email_id": "email-test-81bf03a8-86e1-4d95-bd44-bb3495224953"
        },
        "last_authenticated_at": "2023-01-09T07:41:52Z",
        "created_at": "2023-01-09T07:41:52Z",
        "updated_at": "2023-01-09T07:41:52Z",
        "sequence_order": "PRIMARY",
        "type": "magic_link"
      }
    ],
    "custom_claims": {
      "claim1": "value1",
      "claim2": "value2"
    },
    "organization_id": "organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931",
    "roles": ["stytch_member", "editor"]
  }
}