Ory

Ory Identity (Self-Service) API

Public Kratos flows for login, registration, recovery, verification, settings, logout, and sessions.

Operations 17

GET /self-service/login/browser Create a browser login flow #
GET /self-service/login/api Create a native (API) login flow #
GET /self-service/login/flows Get a login flow #
POST /self-service/login Submit a login flow #
GET /self-service/registration/browser Create a browser registration flow #
POST /self-service/registration Submit a registration flow #
GET /self-service/recovery/browser Create a browser account recovery flow #
POST /self-service/recovery Submit a recovery flow #
GET /self-service/verification/browser Create a browser email verification flow #
POST /self-service/verification Submit a verification flow #
GET /self-service/settings/browser Create a browser settings (profile) flow #
POST /self-service/settings Submit a settings flow #
GET /self-service/logout/browser Create a browser logout flow #
GET /sessions/whoami Get the current session #
GET /sessions List the caller's sessions #
DELETE /sessions Revoke all other sessions #
DELETE /sessions/{id} Revoke one of the caller's sessions #

Documentation

Specifications

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/ory-identity-self-service-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

ory-identity-self-service-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ory Network Identity (Self-Service) API
  description: Ory is open-source identity and access infrastructure, delivered as the Ory Network managed cloud.
  version: '1.0'
  contact:
    name: Ory
    url: https://www.ory.com
  license:
    name: Apache-2.0
    url: https://github.com/ory/kratos/blob/master/LICENSE
servers:
- url: https://{project-slug}.projects.oryapis.com
  description: Ory Network project (Kratos, Hydra, Keto, Courier)
  variables:
    project-slug:
      default: your-project-slug
      description: The slug of your Ory Network project.
- url: https://api.console.ory.sh
  description: Ory Network Console API (control plane)
security:
- oryApiKey: []
tags:
- name: Identity (Self-Service)
  description: Public Kratos flows for login, registration, recovery, verification, settings, logout, and sessions.
paths:
  /self-service/login/browser:
    get:
      operationId: createBrowserLoginFlow
      tags:
      - Identity (Self-Service)
      summary: Create a browser login flow
      security: []
      responses:
        '200':
          description: The initialized login flow.
  /self-service/login/api:
    get:
      operationId: createNativeLoginFlow
      tags:
      - Identity (Self-Service)
      summary: Create a native (API) login flow
      security: []
      responses:
        '200':
          description: The initialized login flow.
  /self-service/login/flows:
    get:
      operationId: getLoginFlow
      tags:
      - Identity (Self-Service)
      summary: Get a login flow
      security: []
      parameters:
      - name: id
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The login flow.
  /self-service/login:
    post:
      operationId: updateLoginFlow
      tags:
      - Identity (Self-Service)
      summary: Submit a login flow
      security: []
      parameters:
      - name: flow
        in: query
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: The session and identity after successful login.
        '400':
          description: The login flow with validation errors.
  /self-service/registration/browser:
    get:
      operationId: createBrowserRegistrationFlow
      tags:
      - Identity (Self-Service)
      summary: Create a browser registration flow
      security: []
      responses:
        '200':
          description: The initialized registration flow.
  /self-service/registration:
    post:
      operationId: updateRegistrationFlow
      tags:
      - Identity (Self-Service)
      summary: Submit a registration flow
      security: []
      parameters:
      - name: flow
        in: query
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: The identity (and session) after successful registration.
  /self-service/recovery/browser:
    get:
      operationId: createBrowserRecoveryFlow
      tags:
      - Identity (Self-Service)
      summary: Create a browser account recovery flow
      security: []
      responses:
        '200':
          description: The initialized recovery flow.
  /self-service/recovery:
    post:
      operationId: updateRecoveryFlow
      tags:
      - Identity (Self-Service)
      summary: Submit a recovery flow
      security: []
      parameters:
      - name: flow
        in: query
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: The recovery flow state.
  /self-service/verification/browser:
    get:
      operationId: createBrowserVerificationFlow
      tags:
      - Identity (Self-Service)
      summary: Create a browser email verification flow
      security: []
      responses:
        '200':
          description: The initialized verification flow.
  /self-service/verification:
    post:
      operationId: updateVerificationFlow
      tags:
      - Identity (Self-Service)
      summary: Submit a verification flow
      security: []
      parameters:
      - name: flow
        in: query
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: The verification flow state.
  /self-service/settings/browser:
    get:
      operationId: createBrowserSettingsFlow
      tags:
      - Identity (Self-Service)
      summary: Create a browser settings (profile) flow
      responses:
        '200':
          description: The initialized settings flow.
  /self-service/settings:
    post:
      operationId: updateSettingsFlow
      tags:
      - Identity (Self-Service)
      summary: Submit a settings flow
      parameters:
      - name: flow
        in: query
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: The updated identity and settings flow.
  /self-service/logout/browser:
    get:
      operationId: createBrowserLogoutFlow
      tags:
      - Identity (Self-Service)
      summary: Create a browser logout flow
      responses:
        '200':
          description: The logout URL and token.
  /sessions/whoami:
    get:
      operationId: toSession
      tags:
      - Identity (Self-Service)
      summary: Get the current session
      responses:
        '200':
          description: The active session for the supplied cookie or token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /sessions:
    get:
      operationId: listMySessions
      tags:
      - Identity (Self-Service)
      summary: List the caller's sessions
      responses:
        '200':
          description: The caller's active sessions.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Session'
    delete:
      operationId: disableMyOtherSessions
      tags:
      - Identity (Self-Service)
      summary: Revoke all other sessions
      responses:
        '200':
          description: The number of sessions revoked.
  /sessions/{id}:
    delete:
      operationId: disableMySession
      tags:
      - Identity (Self-Service)
      summary: Revoke one of the caller's sessions
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Session revoked.
components:
  responses:
    Unauthorized:
      description: Missing or invalid credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Session:
      type: object
      properties:
        id:
          type: string
          format: uuid
        active:
          type: boolean
        expires_at:
          type: string
          format: date-time
        authenticated_at:
          type: string
          format: date-time
        identity:
          $ref: '#/components/schemas/Identity'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            status:
              type: string
            message:
              type: string
            reason:
              type: string
    Identity:
      type: object
      properties:
        id:
          type: string
          format: uuid
        schema_id:
          type: string
        state:
          type: string
          enum:
          - active
          - inactive
        traits:
          type: object
          additionalProperties: true
        verifiable_addresses:
          type: array
          items:
            type: object
            additionalProperties: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    oryApiKey:
      type: http
      scheme: bearer
      description: 'Ory API key. Project admin endpoints use an Ory project API key (ory_pat_...); Console endpoints use a workspace API key (ory_wak_...). Passed as `Authorization: Bearer <token>`.'