SuperTokens · Schema

SuperTokens Session

JSON Schema for a SuperTokens authentication session resource.

AuthenticationOpen-SourceSession ManagementSocial LoginPasswordlessIdentityAuthorizationMulti-TenancyNode.jsSelf-Hosted

Properties

Name Type Description
handle string Unique session handle identifier
userId string User ID this session belongs to
userDataInJWT object Arbitrary data embedded in the JWT access token
userDataInDatabase object Arbitrary data stored in the database for this session
tenantId string Tenant ID for multi-tenant deployments
recipeUserId string Recipe-specific user ID (may differ from primary userId in account linking)
expiry integer Session expiry timestamp in milliseconds since epoch
timeCreated integer Session creation timestamp in milliseconds since epoch
View JSON Schema on GitHub

JSON Schema

supertokens-session-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/supertokens/main/json-schema/supertokens-session-schema.json",
  "title": "SuperTokens Session",
  "description": "JSON Schema for a SuperTokens authentication session resource.",
  "type": "object",
  "properties": {
    "handle": {
      "type": "string",
      "description": "Unique session handle identifier"
    },
    "userId": {
      "type": "string",
      "description": "User ID this session belongs to"
    },
    "userDataInJWT": {
      "type": "object",
      "description": "Arbitrary data embedded in the JWT access token",
      "additionalProperties": true
    },
    "userDataInDatabase": {
      "type": "object",
      "description": "Arbitrary data stored in the database for this session",
      "additionalProperties": true
    },
    "tenantId": {
      "type": "string",
      "description": "Tenant ID for multi-tenant deployments"
    },
    "recipeUserId": {
      "type": "string",
      "description": "Recipe-specific user ID (may differ from primary userId in account linking)"
    },
    "expiry": {
      "type": "integer",
      "description": "Session expiry timestamp in milliseconds since epoch"
    },
    "timeCreated": {
      "type": "integer",
      "description": "Session creation timestamp in milliseconds since epoch"
    }
  },
  "required": ["handle", "userId"],
  "$defs": {
    "Token": {
      "type": "object",
      "description": "A SuperTokens token (access or refresh)",
      "properties": {
        "token": {
          "type": "string",
          "description": "The token string value"
        },
        "expiry": {
          "type": "integer",
          "description": "Token expiry time in milliseconds"
        },
        "createdTime": {
          "type": "integer",
          "description": "Token creation time in milliseconds"
        }
      },
      "required": ["token", "expiry"]
    },
    "User": {
      "type": "object",
      "description": "A SuperTokens user",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique user ID"
        },
        "emails": {
          "type": "array",
          "items": { "type": "string", "format": "email" }
        },
        "phoneNumbers": {
          "type": "array",
          "items": { "type": "string" }
        },
        "timeJoined": {
          "type": "integer",
          "description": "Timestamp when user first signed up"
        },
        "tenantIds": {
          "type": "array",
          "items": { "type": "string" }
        }
      },
      "required": ["id", "timeJoined"]
    }
  }
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/supertokens-session"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

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