Stytch Session API

The Session API from Stytch — 15 operation(s) for session.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Identity & Access Management BC-620.20

Operations 15

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v1/b2b/sessions List active B2B sessions for a member · Get #
Ask an LLM
“Which active sessions does a B2B member have right now?”
“Can I see every active session for one organization member?”
Tell an agent
List active B2B sessions for member {member_id} in organization {organization_id}.
Show all active sessions of member {member_id} in org {organization_id}.
POST /v1/b2b/sessions/authenticate Authenticate a B2B session and extend its lifetime · Authenticate #
Ask an LLM
“How do I extend a B2B session's lifetime by a set number of minutes?”
“Can I refresh an expired B2B session JWT and keep it valid?”
Tell an agent
Authenticate B2B session {session_token} and extend its lifetime by {session_duration_minutes} minutes.
Refresh the B2B session JWT {session_jwt} and keep it valid for {session_duration_minutes} minutes.
POST /v1/b2b/sessions/revoke Revoke a B2B session · Revoke #
Ask an LLM
“How do I immediately invalidate a B2B session token?”
“Can I revoke all sessions for a B2B member at once?”
Tell an agent destructive · confirm first
Revoke B2B session {session_token}.
Revoke every session for B2B member {member_id}.
POST /v1/b2b/sessions/exchange Exchange a session into another B2B organization · Exchange #
Ask an LLM
“How do I accept an organization invite by exchanging my current session?”
“Can I switch a B2B session into a different organization?”
Tell an agent
Exchange my session into organization {organization_id}.
Switch my current session into org {organization_id} and keep it valid for {session_duration_minutes} minutes.
POST /v1/b2b/sessions/exchange_access_token Exchange a connected apps access token for a B2B session · Exchangeaccesstoken #
Ask an LLM
“How do I turn a connected apps access token into a B2B session?”
“Can I exchange an access token for a B2B session without re-authenticating?”
Tell an agent
Exchange access token {access_token} for a B2B session.
Exchange {access_token} into a B2B session lasting {session_duration_minutes} minutes.
POST /v1/b2b/sessions/attest Attest a trusted auth token to a B2B session · Attest #
Ask an LLM
“How do I add a trusted identity provider token as an authentication factor on a B2B session?”
“Can I attest a token from a trusted auth token profile to an existing B2B session?”
Tell an agent
Attest trusted auth token {token} from profile {profile_id} to my B2B session.
Add {token} from profile {profile_id} as an auth factor on B2B session {session_token}.
POST /v1/b2b/sessions/migrate Migrate a B2B session from an external OIDC endpoint · Migrate #
Ask an LLM
“How do I migrate a B2B session from my external OIDC endpoint?”
“Can I create a B2B session by calling my own UserInfo endpoint with a token?”
Tell an agent
Migrate B2B session {session_token} into organization {organization_id}.
Create a B2B session from external token {session_token} in org {organization_id} lasting {session_duration_minutes} minutes.
GET /v1/b2b/sessions/jwks/{project_id} Get the B2B session JWKS for a project · Getjwks #
Ask an LLM
“Where do I get the JSON Web Key Set for validating B2B session JWTs?”
“How often are the B2B session keys rotated?”
Tell an agent
Get the B2B session JWKS for project {project_id}.
Fetch the JSON Web Key Set used to validate B2B session JWTs in project {project_id}.
GET /v1/sessions List active sessions for a user · Get #
Ask an LLM
“Which active sessions does a user have right now?”
“Can I see every active session for one user?”
Tell an agent
List active sessions for user {user_id}.
Show all active sessions of user {user_id}.
POST /v1/sessions/authenticate Authenticate a session token or JWT · Authenticate #
Ask an LLM
“Can I exchange an old session JWT for a fresh session?”
“What happens if I send both a session token and a JWT?”
Tell an agent
Authenticate session token {session_token}.
Validate JWT {session_jwt} and set its lifetime to {session_duration_minutes} minutes.
POST /v1/sessions/revoke Revoke a session · Revoke #
Ask an LLM
“Can I invalidate a session immediately with its ID?”
“Is it possible to revoke a session using one of its expired tokens?”
Tell an agent destructive · confirm first
Revoke session {session_id}.
Revoke the session that issued token {session_token}.
POST /v1/sessions/migrate Migrate a session from an OIDC endpoint · Migrate #
Ask an LLM
“Can I turn an external OIDC user session into a Stytch session?”
“What user data does the session migration need before I can create a session?”
Tell an agent
Migrate session token {session_token} from my OIDC endpoint.
Create a session for the external user of {session_token} lasting {session_duration_minutes} minutes.
POST /v1/sessions/exchange_access_token Exchange an access token for a session · Exchangeaccesstoken #
Ask an LLM
“Can a Connected Apps access token be converted into a Stytch session?”
“How long is an access token valid before it can be exchanged?”
Tell an agent
Exchange access token {access_token} for a Stytch session.
Convert Connected Apps token {access_token} into a session lasting {session_duration_minutes} minutes.
GET /v1/sessions/jwks/{project_id} Get a project's session signing keys · Getjwks #
Ask an LLM
“Which public keys can I use to verify session JWTs?”
“How often do session signing keys rotate?”
Tell an agent
Get the JWKS for project {project_id}.
Fetch session signing keys for project {project_id}.
POST /v1/sessions/attest Exchange a trusted auth token for a session · Attest #
Ask an LLM
“Can I turn a trusted identity provider token into a Stytch session?”
“Can I add a trusted auth token as an extra factor to an existing session?”
Tell an agent
Attest trusted auth token {token} from profile {profile_id}.
Add trusted token {token} from profile {profile_id} to session {session_token}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stytch:stytch-session-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stytch-session-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stytch Session API
  version: 2.0.0
  contact:
    name: Stytch
    url: https://stytch.com/docs
  license:
    name: Proprietary
  description: 'Operations tagged Session across 2 of this provider''s published API definitions: stytch-b2b-openapi.yml, stytch-consumer-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.stytch.com
  description: Production
- url: https://test.stytch.com
  description: Test
tags:


# --- truncated at 32 KB (233 KB total) ---
# Full source: https://artifacts.apis.io/stytch/openapi/stytch-session-api-openapi.yml