Okta Session API

The Session API from Okta — 3 operation(s) for session.

Operations 4

POST /api/v1/sessions Okta Create Session with Session Token #
GET /api/v1/sessions/{sessionId} #
DELETE /api/v1/sessions/{sessionId} Okta Close Session #
POST /api/v1/sessions/{sessionId}/lifecycle/refresh Okta Refresh Session #

Documentation

Specifications

Schemas & Data

Other Resources

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/okta-session-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 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. See our Privacy Policy and Terms.

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

OpenAPI Specification

okta-session-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Okta Application Session API
  description: Allows customers to easily access the Okta API
  termsOfService: https://developer.okta.com/terms/
  contact:
    name: Okta Developer Team
    url: https://developer.okta.com/
    email: devex-public@okta.com
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 2.16.0
servers:
- url: https://your-subdomain.okta.com/
tags:
- name: Session
paths:
  /api/v1/sessions:
    post:
      tags:
      - Session
      summary: Okta Create Session with Session Token
      description: Creates a new session for a user with a valid session token. Use this API if, for example, you want to set the session cookie yourself instead of allowing Okta to set it, or want to hold the session ID in order to delete a session via the API instead of visiting the logout URL.
      operationId: createSession
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSessionRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '400':
          description: Bad Request
          content: {}
      security:
      - api_token: []
      x-codegen-request-body-name: createSessionRequest
  /api/v1/sessions/{sessionId}:
    get:
      tags:
      - Session
      description: Get details about a session.
      operationId: getSession
      parameters:
      - name: sessionId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
      security:
      - api_token: []
    delete:
      tags:
      - Session
      summary: Okta Close Session
      operationId: endSession
      parameters:
      - name: sessionId
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
          content: {}
        '400':
          description: Bad Request
          content: {}
        '404':
          description: Not Found
          content: {}
      security:
      - api_token: []
  /api/v1/sessions/{sessionId}/lifecycle/refresh:
    post:
      tags:
      - Session
      summary: Okta Refresh Session
      operationId: refreshSession
      parameters:
      - name: sessionId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '404':
          description: Not Found
          content: {}
      security:
      - api_token: []
components:
  schemas:
    SessionAuthenticationMethod:
      type: string
      enum:
      - pwd
      - swk
      - hwk
      - otp
      - sms
      - tel
      - geo
      - fpt
      - kba
      - mfa
      - mca
      - sc
      x-okta-tags:
      - Session
    SessionIdentityProviderType:
      type: string
      enum:
      - ACTIVE_DIRECTORY
      - LDAP
      - OKTA
      - FEDERATION
      - SOCIAL
      x-okta-tags:
      - Session
    CreateSessionRequest:
      type: object
      properties:
        sessionToken:
          type: string
      x-okta-tags:
      - Session
    SessionStatus:
      type: string
      enum:
      - ACTIVE
      - MFA_ENROLL
      - MFA_REQUIRED
      x-okta-tags:
      - Session
    SessionIdentityProvider:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        type:
          $ref: '#/components/schemas/SessionIdentityProviderType'
      x-okta-tags:
      - Session
    Session:
      type: object
      properties:
        _links:
          type: object
          additionalProperties:
            type: object
            properties: {}
          readOnly: true
        amr:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/SessionAuthenticationMethod'
        createdAt:
          type: string
          format: date-time
          readOnly: true
        expiresAt:
          type: string
          format: date-time
          readOnly: true
        id:
          type: string
          readOnly: true
        idp:
          $ref: '#/components/schemas/SessionIdentityProvider'
        lastFactorVerification:
          type: string
          format: date-time
          readOnly: true
        lastPasswordVerification:
          type: string
          format: date-time
          readOnly: true
        login:
          type: string
          readOnly: true
        status:
          $ref: '#/components/schemas/SessionStatus'
        userId:
          type: string
          readOnly: true
      x-okta-crud:
      - alias: read
        arguments:
        - dest: sessionId
          src: id
        operationId: getSession
      - alias: delete
        arguments:
        - dest: sessionId
          src: id
        operationId: endSession
      x-okta-operations:
      - alias: refresh
        arguments:
        - dest: sessionId
          src: id
        operationId: refreshSession
      x-okta-tags:
      - Session
  securitySchemes:
    api_token:
      type: apiKey
      description: SSWS {API Token}
      name: Authorization
      in: header
externalDocs:
  description: Find more info here
  url: https://developer.okta.com/docs/api/getting_started/design_principles.html