Revoke a Session and immediately invalidate all its tokens. To revoke a specific Session, pass either the member_session_id, session_token, or session_jwt. To revoke all Sessions for a Member, pass the member_id.
Revoke Session
POSThttps://test.stytch.com/v1/b2b/sessions/revoke
Body parameters
member_session_id string
session_token string
session_jwt string
member_id string
Response fields
request_id string
status_code int
curl --request POST \
--url https://test.stytch.com/v1/b2b/sessions/revoke \
-u 'PROJECT_ID:SECRET' \
-H 'Content-Type: application/json' \
-H "X-Stytch-Member-Session: mZAYn5aLEqKUlZ_Ad9U_fWr38GaAQ1oFAhT8ds245v7Q" \
-d '{
"member_id": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f"
}'
RESPONSE
200
{
"status_code": 200,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141"
}