Clerk Sessions API

User sessions and session tokens.

Documentation

Specifications

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/clerk-dev-sessions-api"
All apis
curl "https://apis.io/api/v1/apis?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.

OpenAPI Specification

clerk-dev-sessions-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Clerk Backend Allowlist & Blocklist Sessions API
  description: 'The Clerk Backend API manages Clerk''s authentication and user management resources server-side: users, organizations and memberships, sessions, clients, sign-ups, JWT templates, JWKS, email/SMS verification and templates, allowlist/blocklist identifiers, invitations, SAML/enterprise connections, OAuth applications, and Svix-powered webhooks. The base URL is https://api.clerk.com/v1 and every request (except GET /jwks and the public interstitial) is authenticated with your instance Secret Key passed as `Authorization: Bearer sk_...`. This description is grounded in Clerk''s published OpenAPI spec (github.com/clerk/openapi-specs, bapi) but is a curated subset covering the primary resource groups; it does not enumerate every parameter or schema property. Verify the current version-dated spec on GitHub for the authoritative contract.'
  version: '2026-05-12'
  contact:
    name: Clerk
    url: https://clerk.com
  license:
    name: Clerk Documentation
    url: https://clerk.com/docs
servers:
- url: https://api.clerk.com/v1
  description: Clerk Backend API
security:
- bearerAuth: []
tags:
- name: Sessions
  description: User sessions and session tokens.
paths:
  /sessions:
    get:
      operationId: getSessionList
      tags:
      - Sessions
      summary: List all sessions
      parameters:
      - name: user_id
        in: query
        schema:
          type: string
      - name: status
        in: query
        schema:
          type: string
      responses:
        '200':
          description: A list of sessions.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Session'
    post:
      operationId: createSession
      tags:
      - Sessions
      summary: Create a session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                user_id:
                  type: string
      responses:
        '200':
          description: The created session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
  /sessions/{session_id}:
    parameters:
    - $ref: '#/components/parameters/SessionId'
    get:
      operationId: getSession
      tags:
      - Sessions
      summary: Retrieve a session
      responses:
        '200':
          description: The requested session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '404':
          $ref: '#/components/responses/NotFound'
  /sessions/{session_id}/revoke:
    parameters:
    - $ref: '#/components/parameters/SessionId'
    post:
      operationId: revokeSession
      tags:
      - Sessions
      summary: Revoke a session
      responses:
        '200':
          description: The revoked session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
  /sessions/{session_id}/tokens:
    parameters:
    - $ref: '#/components/parameters/SessionId'
    post:
      operationId: createSessionToken
      tags:
      - Sessions
      summary: Create a session token
      description: Mints a short-lived session JWT for the given session.
      responses:
        '200':
          description: The generated token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionToken'
  /sessions/{session_id}/tokens/{template_name}:
    parameters:
    - $ref: '#/components/parameters/SessionId'
    - name: template_name
      in: path
      required: true
      schema:
        type: string
    post:
      operationId: createSessionTokenFromTemplate
      tags:
      - Sessions
      summary: Create a session token from a JWT template
      description: Mints a session token whose claims are shaped by the named JWT template.
      responses:
        '200':
          description: The generated token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionToken'
components:
  parameters:
    SessionId:
      name: session_id
      in: path
      required: true
      description: The ID of the session.
      schema:
        type: string
  schemas:
    ClerkErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              long_message:
                type: string
              code:
                type: string
        clerk_trace_id:
          type: string
    Session:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
        user_id:
          type: string
        client_id:
          type: string
        status:
          type: string
        last_active_at:
          type: integer
        expire_at:
          type: integer
        created_at:
          type: integer
    SessionToken:
      type: object
      properties:
        object:
          type: string
        jwt:
          type: string
  responses:
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ClerkErrors'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your Clerk instance Secret Key (starts with sk_test_ or sk_live_) passed as `Authorization: Bearer YOUR_SECRET_KEY`.'