openapi: 3.0.3
info:
contact:
email: office@ory.sh
description: "This is the API specification for Ory Identities with features such\
\ as registration, login, recovery, account verification, profile settings, password\
\ reset, identity management, session management, email and sms delivery, and\
\ more.\n"
license:
name: Apache 2.0
title: Ory Identities API
version: v0.13.1
servers:
- url: /
tags:
- description: APIs for managing identities.
name: identity
- description: "Endpoints used by frontend applications (e.g. Single-Page-App, Native\
\ Apps, Server Apps, ...) to manage a user's own profile."
name: frontend
- description: APIs for managing email and SMS message delivery.
name: courier
- description: Server Metadata provides relevant information about the running server.
Only available when self-hosting this service.
name: metadata
paths:
/.well-known/ory/webauthn.js:
get:
description: "This endpoint provides JavaScript which is needed in order to\
\ perform WebAuthn login and registration.\n\nIf you are building a JavaScript\
\ Browser App (e.g. in ReactJS or AngularJS) you will need to load this file:\n\
\n```html\n\n```\n\nMore information can be found at [Ory Kratos\
\ User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login)\
\ and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration)."
operationId: getWebAuthnJavaScript
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/webAuthnJavaScript'
description: webAuthnJavaScript
summary: Get WebAuthn JavaScript
tags:
- frontend
/admin/courier/messages:
get:
description: Lists all messages by given status and recipient.
operationId: listCourierMessages
parameters:
- description: "Items per Page\n\nThis is the number of items per page to return.\n\
For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination)."
explode: true
in: query
name: page_size
required: false
schema:
default: 250
format: int64
maximum: 1000
minimum: 1
type: integer
style: form
- description: "Next Page Token\n\nThe next page token.\nFor details on pagination\
\ please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination)."
explode: true
in: query
name: page_token
required: false
schema:
type: string
style: form
- description: "Status filters out messages based on status.\nIf no value is\
\ provided, it doesn't take effect on filter."
explode: true
in: query
name: status
required: false
schema:
$ref: '#/components/schemas/courierMessageStatus'
style: form
- description: "Recipient filters out messages based on recipient.\nIf no value\
\ is provided, it doesn't take effect on filter."
explode: true
in: query
name: recipient
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/message'
type: array
description: Paginated Courier Message List Response
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: List Messages
tags:
- courier
/admin/courier/messages/{id}:
get:
description: Gets a specific messages by the given ID.
operationId: getCourierMessage
parameters:
- description: MessageID is the ID of the message.
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/message'
description: message
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Get a Message
tags:
- courier
/admin/identities:
get:
description: "Lists all [identities](https://www.ory.sh/docs/kratos/concepts/identity-user-model)\
\ in the system."
operationId: listIdentities
parameters:
- description: |-
Items per Page
This is the number of items per page.
explode: true
in: query
name: per_page
required: false
schema:
default: 250
format: int64
maximum: 1000
minimum: 1
type: integer
style: form
- description: "Pagination Page\n\nThis value is currently an integer, but it\
\ is not sequential. The value is not the page number, but a\nreference.\
\ The next page can be any number and some numbers might return an empty\
\ list.\n\nFor example, page 2 might not follow after page 1. And even if\
\ page 3 and 5 exist, but page 4 might not exist."
explode: true
in: query
name: page
required: false
schema:
default: 1
format: int64
minimum: 1
type: integer
style: form
- description: "CredentialsIdentifier is the identifier (username, email) of\
\ the credentials to look up."
explode: true
in: query
name: credentials_identifier
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/identity'
type: array
description: Paginated Identity List Response
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: List Identities
tags:
- identity
patch:
description: "Creates or delete multiple\n[identities](https://www.ory.sh/docs/kratos/concepts/identity-user-model).\n\
This endpoint can also be used to [import\ncredentials](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities)\n\
for instance passwords, social sign in configurations or multifactor methods."
operationId: batchPatchIdentities
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/patchIdentitiesBody'
x-originalParamName: Body
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/batchPatchIdentitiesResponse'
description: batchPatchIdentitiesResponse
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"409":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Create and deletes multiple identities
tags:
- identity
post:
description: "Create an [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model).\
\ This endpoint can also be used to\n[import credentials](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities)\n\
for instance passwords, social sign in configurations or multifactor methods."
operationId: createIdentity
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/createIdentityBody'
x-originalParamName: Body
responses:
"201":
content:
application/json:
schema:
$ref: '#/components/schemas/identity'
description: identity
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"409":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Create an Identity
tags:
- identity
/admin/identities/{id}:
delete:
description: "Calling this endpoint irrecoverably and permanently deletes the\
\ [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model)\
\ given its ID. This action can not be undone.\nThis endpoint returns 204\
\ when the identity was deleted or when the identity was not found, in which\
\ case it is\nassumed that is has been deleted already."
operationId: deleteIdentity
parameters:
- description: ID is the identity's ID.
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
responses:
"204":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Delete an Identity
tags:
- identity
get:
description: "Return an [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model)\
\ by its ID. You can optionally\ninclude credentials (e.g. social sign in\
\ connections) in the response by using the `include_credential` query parameter."
operationId: getIdentity
parameters:
- description: ID must be set to the ID of identity you want to get
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
- description: "Include Credentials in Response\n\nCurrently, only `oidc` is\
\ supported. This will return the initial OAuth 2.0 Access,\nRefresh and\
\ (optionally) OpenID Connect ID Token."
explode: true
in: query
name: include_credential
required: false
schema:
items:
type: string
type: array
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/identity'
description: identity
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Get an Identity
tags:
- identity
patch:
description: "Partially updates an [identity's](https://www.ory.sh/docs/kratos/concepts/identity-user-model)\
\ field using [JSON Patch](https://jsonpatch.com/).\nThe fields `id`, `stateChangedAt`\
\ and `credentials` can not be updated using this method."
operationId: patchIdentity
parameters:
- description: ID must be set to the ID of identity you want to update
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/jsonPatchDocument'
x-originalParamName: Body
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/identity'
description: identity
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"409":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Patch an Identity
tags:
- identity
put:
description: "This endpoint updates an [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model).\
\ The full identity\npayload (except credentials) is expected. It is possible\
\ to update the identity's credentials as well."
operationId: updateIdentity
parameters:
- description: ID must be set to the ID of identity you want to update
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateIdentityBody'
x-originalParamName: Body
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/identity'
description: identity
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"409":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Update an Identity
tags:
- identity
/admin/identities/{id}/credentials/{type}:
delete:
description: "Delete an [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model)\
\ credential by its type\nYou can only delete second factor (aal2) credentials."
operationId: deleteIdentityCredentials
parameters:
- description: ID is the identity's ID.
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
- description: "Type is the credential's Type.\nOne of totp, webauthn, lookup"
explode: false
in: path
name: type
required: true
schema:
enum:
- totp
- webauthn
- lookup
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/identity'
description: identity
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Delete a credential for a specific identity
tags:
- identity
/admin/identities/{id}/sessions:
delete:
description: Calling this endpoint irrecoverably and permanently deletes and
invalidates all sessions that belong to the given Identity.
operationId: deleteIdentitySessions
parameters:
- description: ID is the identity's ID.
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
responses:
"204":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Delete & Invalidate an Identity's Sessions
tags:
- identity
get:
description: This endpoint returns all sessions that belong to the given Identity.
operationId: listIdentitySessions
parameters:
- description: |-
Items per Page
This is the number of items per page.
explode: true
in: query
name: per_page
required: false
schema:
default: 250
format: int64
maximum: 1000
minimum: 1
type: integer
style: form
- description: "Pagination Page\n\nThis value is currently an integer, but it\
\ is not sequential. The value is not the page number, but a\nreference.\
\ The next page can be any number and some numbers might return an empty\
\ list.\n\nFor example, page 2 might not follow after page 1. And even if\
\ page 3 and 5 exist, but page 4 might not exist."
explode: true
in: query
name: page
required: false
schema:
default: 1
format: int64
minimum: 1
type: integer
style: form
- description: ID is the identity's ID.
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
- description: "Active is a boolean flag that filters out sessions based on\
\ the state. If no value is provided, all sessions are returned."
explode: true
in: query
name: active
required: false
schema:
type: boolean
style: form
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/session'
type: array
description: List Identity Sessions Response
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: List an Identity's Sessions
tags:
- identity
/admin/recovery/code:
post:
description: |-
This endpoint creates a recovery code which should be given to the user in order for them to recover
(or activate) their account.
operationId: createRecoveryCodeForIdentity
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/createRecoveryCodeForIdentityBody'
x-originalParamName: Body
responses:
"201":
content:
application/json:
schema:
$ref: '#/components/schemas/recoveryCodeForIdentity'
description: recoveryCodeForIdentity
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Create a Recovery Code
tags:
- identity
/admin/recovery/link:
post:
description: |-
This endpoint creates a recovery link which should be given to the user in order for them to recover
(or activate) their account.
operationId: createRecoveryLinkForIdentity
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/createRecoveryLinkForIdentityBody'
x-originalParamName: Body
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/recoveryLinkForIdentity'
description: recoveryLinkForIdentity
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Create a Recovery Link
tags:
- identity
/admin/sessions:
get:
description: Listing all sessions that exist.
operationId: listSessions
parameters:
- description: "Items per Page\n\nThis is the number of items per page to return.\n\
For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination)."
explode: true
in: query
name: page_size
required: false
schema:
default: 250
format: int64
maximum: 1000
minimum: 1
type: integer
style: form
- description: "Next Page Token\n\nThe next page token.\nFor details on pagination\
\ please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination)."
explode: true
in: query
name: page_token
required: false
schema:
type: string
style: form
- description: "Active is a boolean flag that filters out sessions based on\
\ the state. If no value is provided, all sessions are returned."
explode: true
in: query
name: active
required: false
schema:
type: boolean
style: form
- description: "ExpandOptions is a query parameter encoded list of all properties\
\ that must be expanded in the Session.\nIf no value is provided, the expandable\
\ properties are skipped."
explode: true
in: query
name: expand
required: false
schema:
enum:
- identity
- devices
items:
type: string
type: array
style: form
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/session'
type: array
description: |-
Session List Response
The response given when listing sessions in an administrative context.
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: List All Sessions
tags:
- identity
/admin/sessions/{id}:
delete:
description: Calling this endpoint deactivates the specified session. Session
data is not deleted.
operationId: disableSession
parameters:
- description: ID is the session's ID.
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
responses:
"204":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Deactivate a Session
tags:
- identity
get:
description: |-
This endpoint is useful for:
Getting a session object with all specified expandables that exist in an administrative context.
operationId: getSession
parameters:
- description: "ExpandOptions is a query parameter encoded list of all properties\
\ that must be expanded in the Session.\nExample - ?expand=Identity&expand=Devices\n\
If no value is provided, the expandable properties are skipped."
explode: true
in: query
name: expand
required: false
schema:
enum:
- identity
- devices
items:
type: string
type: array
style: form
- description: ID is the session's ID.
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/session'
description: session
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Get Session
tags:
- identity
/admin/sessions/{id}/extend:
patch:
description: |-
Calling this endpoint extends the given session ID. If `session.earliest_possible_extend` is set it
will only extend the session after the specified time has passed.
Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method.
operationId: extendSession
parameters:
- description: ID is the session's ID.
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/session'
description: session
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- oryAccessToken: []
summary: Extend a Session
tags:
- identity
/health/alive:
get:
description: "This endpoint returns a HTTP 200 status code when Ory Kratos is\
\ accepting incoming\nHTTP requests. This status does currently not include\
\ checks whether the database connection is working.\n\nIf the service supports\
\ TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto`\
\ header to be set.\n\nBe aware that if you are running multiple nodes of\
\ this service, the health status will never\nrefer to the cluster state,\
\ only to a single instance."
operationId: isAlive
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/isAlive_200_response'
description: Ory Kratos is ready to accept connections.
default:
content:
text/plain:
schema:
type: string
description: Unexpected error
summary: Check HTTP Server Status
tags:
- metadata
/health/ready:
get:
description: "This endpoint returns a HTTP 200 status code when Ory Kratos is\
\ up running and the environment dependencies (e.g.\nthe database) are responsive\
\ as well.\n\nIf the service supports TLS Edge Termination, this endpoint\
\ does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware\
\ that if you are running multiple nodes of Ory Kratos, the health status\
\ will never\nrefer to the cluster state, only to a single instance."
operationId: isReady
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/isAlive_200_response'
description: Ory Kratos is ready to accept requests.
"503":
content:
application/json:
schema:
$ref: '#/components/schemas/isReady_503_response'
description: Ory Kratos is not yet ready to accept requests.
default:
content:
text/plain:
schema:
type: string
description: Unexpected error
summary: Check HTTP Server and Database Status
tags:
- metadata
/schemas:
get:
description: Returns a list of all identity schemas currently in use.
operationId: listIdentitySchemas
parameters:
- description: |-
Items per Page
This is the number of items per page.
explode: true
in: query
name: per_page
required: false
schema:
default: 250
format: int64
maximum: 1000
minimum: 1
type: integer
style: form
- description: "Pagination Page\n\nThis value is currently an integer, but it\
\ is not sequential. The value is not the page number, but a\nreference.\
\ The next page can be any number and some numbers might return an empty\
\ list.\n\nFor example, page 2 might not follow after page 1. And even if\
\ page 3 and 5 exist, but page 4 might not exist."
explode: true
in: query
name: page
required: false
schema:
default: 1
format: int64
minimum: 1
type: integer
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/identitySchemas'
description: List Identity JSON Schemas Response
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get all Identity Schemas
tags:
- identity
/schemas/{id}:
get:
description: Return a specific identity schema.
operationId: getIdentitySchema
parameters:
- description: ID must be set to the ID of schema you want to get
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/identitySchema'
description: identitySchema
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get Identity JSON Schema
tags:
- identity
/self-service/errors:
get:
description: "This endpoint returns the error associated with a user-facing\
\ self service errors.\n\nThis endpoint supports stub values to help you implement\
\ the error UI:\n\n`?id=stub:500` - returns a stub 500 (Internal Server Error)\
\ error.\n\nMore information can be found at [Ory Kratos User User Facing\
\ Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors)."
operationId: getFlowError
parameters:
- description: Error is the error's ID
explode: true
in: query
name: id
required: true
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/flowError'
description: flowError
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get User-Flow Errors
tags:
- frontend
/self-service/login:
post:
description: ":::info\n\nThis endpoint is EXPERIMENTAL and subject to potential\
\ breaking changes in the future.\n\n:::\n\nUse this endpoint to complete\
\ a login flow. This endpoint\nbehaves differently for API and browser flows.\n\
\nAPI flows expect `application/json` to be sent in the body and responds\
\ with\nHTTP 200 and a application/json body with the session token on success;\n\
HTTP 410 if the original flow expired with the appropriate error messages\
\ set and optionally a `use_flow_id` parameter in the body;\nHTTP 400 on form\
\ validation errors.\n\nBrowser flows expect a Content-Type of `application/x-www-form-urlencoded`\
\ or `application/json` to be sent in the body and respond with\na HTTP 303\
\ redirect to the post/after login URL or the `return_to` value if it was\
\ set and if the login succeeded;\na HTTP 303 redirect to the login UI URL\
\ with the flow ID containing the validation errors otherwise.\n\nBrowser\
\ flows with an accept header of `application/json` will not redirect but\
\ instead respond with\nHTTP 200 and a application/json body with the signed\
\ in identity and a `Set-Cookie` header on success;\nHTTP 303 redirect to\
\ a fresh login flow if the original flow expired with the appropriate error\
\ messages set;\nHTTP 400 on form validation errors.\n\nIf this endpoint is\
\ called with `Accept: application/json` in the header, the response contains\
\ the flow without a redirect. In the\ncase of an error, the `error.id` of\
\ the JSON response body can be one of:\n\n`session_already_available`: The\
\ user is already signed in.\n`security_csrf_violation`: Unable to fetch the\
\ flow because a CSRF violation occurred.\n`security_identity_mismatch`: The\
\ requested `?return_to` address is not allowed to be used. Adjust this in\
\ the configuration!\n`browser_location_change_required`: Usually sent when\
\ an AJAX request indicates that the browser needs to open a specific URL.\n\
Most likely used in Social Sign In flows.\n\nMore information can be found\
\ at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login)\
\ and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration)."
operationId: updateLoginFlow
parameters:
- description: |-
The Login Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/login?flow=abcde`).
explode: true
in: query
name: flow
required: true
schema:
type: string
style: form
- description: The Session Token of the Identity performing the settings flow.
explode: false
in: header
name: X-Session-Token
required: false
schema:
type: string
style: simple
- description: "HTTP Cookies\n\nWhen using the SDK in a browser app, on the\
\ server side you must include the HTTP Cookie Header\nsent by the client\
\ to your server here. This ensures that CSRF and session cookies are respected."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateLoginFlowBody'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/updateLoginFlowBody'
required: true
x-originalParamName: Body
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/successfulNativeLogin'
description: successfulNativeLogin
"303":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/loginFlow'
description: loginFlow
"410":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"422":
content:
application/json:
schema:
$ref: '#/components/schemas/errorBrowserLocationChangeRequired'
description: errorBrowserLocationChangeRequired
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Submit a Login Flow
tags:
- frontend
/self-service/login/api:
get:
description: "This endpoint initiates a login flow for native apps that do not\
\ use a browser, such as mobile devices, smart TVs, and so on.\n\nIf a valid\
\ provided session cookie or session token is provided, a 400 Bad Request\
\ error\nwill be returned unless the URL query parameter `?refresh=true` is\
\ set.\n\nTo fetch an existing login flow call `/self-service/login/flows?flow=`.\n\
\nYou MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS,\
\ AngularJS) nor server-side (Java Server\nPages, NodeJS, PHP, Golang, ...)\
\ browser applications. Using this endpoint in these applications will make\n\
you vulnerable to a variety of CSRF attacks, including CSRF login attacks.\n\
\nIn the case of an error, the `error.id` of the JSON response body can be\
\ one of:\n\n`session_already_available`: The user is already signed in.\n\
`session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the\
\ user has no session yet.\n`security_csrf_violation`: Unable to fetch the\
\ flow because a CSRF violation occurred.\n\nThis endpoint MUST ONLY be used\
\ in scenarios such as native mobile apps (React Native, Objective C, Swift,\
\ Java, ...).\n\nMore information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login)\
\ and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration)."
operationId: createNativeLoginFlow
parameters:
- description: "Refresh a login session\n\nIf set to true, this will refresh\
\ an existing login session by\nasking the user to sign in again. This will\
\ reset the\nauthenticated_at time of the session."
explode: true
in: query
name: refresh
required: false
schema:
type: boolean
style: form
- description: "Request a Specific AuthenticationMethod Assurance Level\n\n\
Use this parameter to upgrade an existing session's authenticator assurance\
\ level (AAL). This\nallows you to ask for multi-factor authentication.\
\ When an identity sign in using e.g. username+password,\nthe AAL is 1.\
\ If you wish to \"upgrade\" the session's security by asking the user to\
\ perform TOTP / WebAuth/ ...\nyou would set this to \"aal2\"."
explode: true
in: query
name: aal
required: false
schema:
type: string
style: form
- description: The Session Token of the Identity performing the settings flow.
explode: false
in: header
name: X-Session-Token
required: false
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/loginFlow'
description: loginFlow
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Login Flow for Native Apps
tags:
- frontend
/self-service/login/browser:
get:
description: "This endpoint initializes a browser-based user login flow. This\
\ endpoint will set the appropriate\ncookies and anti-CSRF measures required\
\ for browser-based flows.\n\nIf this endpoint is opened as a link in the\
\ browser, it will be redirected to\n`selfservice.flows.login.ui_url` with\
\ the flow ID set as the query parameter `?flow=`. If a valid user session\n\
exists already, the browser will be redirected to `urls.default_redirect_url`\
\ unless the query parameter\n`?refresh=true` was set.\n\nIf this endpoint\
\ is called via an AJAX request, the response contains the flow without a\
\ redirect. In the\ncase of an error, the `error.id` of the JSON response\
\ body can be one of:\n\n`session_already_available`: The user is already\
\ signed in.\n`session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested\
\ but the user has no session yet.\n`security_csrf_violation`: Unable to fetch\
\ the flow because a CSRF violation occurred.\n`security_identity_mismatch`:\
\ The requested `?return_to` address is not allowed to be used. Adjust this\
\ in the configuration!\n\nThe optional query parameter login_challenge is\
\ set when using Kratos with\nHydra in an OAuth2 flow. See the oauth2_provider.url\
\ configuration\noption.\n\nThis endpoint is NOT INTENDED for clients that\
\ do not have a browser (Chrome, Firefox, ...) as cookies are needed.\n\n\
More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login)\
\ and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration)."
operationId: createBrowserLoginFlow
parameters:
- description: "Refresh a login session\n\nIf set to true, this will refresh\
\ an existing login session by\nasking the user to sign in again. This will\
\ reset the\nauthenticated_at time of the session."
explode: true
in: query
name: refresh
required: false
schema:
type: boolean
style: form
- description: "Request a Specific AuthenticationMethod Assurance Level\n\n\
Use this parameter to upgrade an existing session's authenticator assurance\
\ level (AAL). This\nallows you to ask for multi-factor authentication.\
\ When an identity sign in using e.g. username+password,\nthe AAL is 1.\
\ If you wish to \"upgrade\" the session's security by asking the user to\
\ perform TOTP / WebAuth/ ...\nyou would set this to \"aal2\"."
explode: true
in: query
name: aal
required: false
schema:
type: string
style: form
- description: The URL to return the browser to after the flow was completed.
explode: true
in: query
name: return_to
required: false
schema:
type: string
style: form
- description: "HTTP Cookies\n\nWhen using the SDK in a browser app, on the\
\ server side you must include the HTTP Cookie Header\nsent by the client\
\ to your server here. This ensures that CSRF and session cookies are respected."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
- description: "An optional Hydra login challenge. If present, Kratos will cooperate\
\ with\nOry Hydra to act as an OAuth2 identity provider.\n\nThe value for\
\ this parameter comes from `login_challenge` URL Query parameter sent to\
\ your\napplication (e.g. `/login?login_challenge=abcde`)."
explode: true
in: query
name: login_challenge
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/loginFlow'
description: loginFlow
"303":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Login Flow for Browsers
tags:
- frontend
/self-service/login/flows:
get:
description: "This endpoint returns a login flow's context with, for example,\
\ error details and other information.\n\nBrowser flows expect the anti-CSRF\
\ cookie to be included in the request's HTTP Cookie Header.\nFor AJAX requests\
\ you must ensure that cookies are included in the request or requests will\
\ fail.\n\nIf you use the browser-flow for server-side apps, the services\
\ need to run on a common top-level-domain\nand you need to forward the incoming\
\ HTTP Cookie header to this endpoint:\n\n```js\npseudo-code example\nrouter.get('/login',\
\ async function (req, res) {\nconst flow = await client.getLoginFlow(req.header('cookie'),\
\ req.query['flow'])\n\nres.render('login', flow)\n})\n```\n\nThis request\
\ may fail due to several reasons. The `error.id` can be one of:\n\n`session_already_available`:\
\ The user is already signed in.\n`self_service_flow_expired`: The flow is\
\ expired and you should request a new one.\n\nMore information can be found\
\ at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login)\
\ and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration)."
operationId: getLoginFlow
parameters:
- description: |-
The Login Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/login?flow=abcde`).
explode: true
in: query
name: id
required: true
schema:
type: string
style: form
- description: "HTTP Cookies\n\nWhen using the SDK in a browser app, on the\
\ server side you must include the HTTP Cookie Header\nsent by the client\
\ to your server here. This ensures that CSRF and session cookies are respected."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/loginFlow'
description: loginFlow
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"410":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get Login Flow
tags:
- frontend
/self-service/logout:
get:
description: "This endpoint logs out an identity in a self-service manner.\n\
\nIf the `Accept` HTTP header is not set to `application/json`, the browser\
\ will be redirected (HTTP 303 See Other)\nto the `return_to` parameter of\
\ the initial request or fall back to `urls.default_return_to`.\n\nIf the\
\ `Accept` HTTP header is set to `application/json`, a 204 No Content response\n\
will be sent on successful logout instead.\n\nThis endpoint is NOT INTENDED\
\ for API clients and only works\nwith browsers (Chrome, Firefox, ...). For\
\ API clients you can\ncall the `/self-service/logout/api` URL directly with\
\ the Ory Session Token.\n\nMore information can be found at [Ory Kratos User\
\ Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout)."
operationId: updateLogoutFlow
parameters:
- description: "A Valid Logout Token\n\nIf you do not have a logout token because\
\ you only have a session cookie,\ncall `/self-service/logout/browser` to\
\ generate a URL for this endpoint."
explode: true
in: query
name: token
required: false
schema:
type: string
style: form
- description: The URL to return to after the logout was completed.
explode: true
in: query
name: return_to
required: false
schema:
type: string
style: form
responses:
"204":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"303":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Update Logout Flow
tags:
- frontend
/self-service/logout/api:
delete:
description: "Use this endpoint to log out an identity using an Ory Session\
\ Token. If the Ory Session Token was successfully\nrevoked, the server returns\
\ a 204 No Content response. A 204 No Content response is also sent when\n\
the Ory Session Token has been revoked already before.\n\nIf the Ory Session\
\ Token is malformed or does not exist a 403 Forbidden response will be returned.\n\
\nThis endpoint does not remove any HTTP\nCookies - use the Browser-Based\
\ Self-Service Logout Flow instead."
operationId: performNativeLogout
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/performNativeLogoutBody'
required: true
x-originalParamName: Body
responses:
"204":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Perform Logout for Native Apps
tags:
- frontend
/self-service/logout/browser:
get:
description: "This endpoint initializes a browser-based user logout flow and\
\ a URL which can be used to log out the user.\n\nThis endpoint is NOT INTENDED\
\ for API clients and only works\nwith browsers (Chrome, Firefox, ...). For\
\ API clients you can\ncall the `/self-service/logout/api` URL directly with\
\ the Ory Session Token.\n\nThe URL is only valid for the currently signed\
\ in user. If no user is signed in, this endpoint returns\na 401 error.\n\n\
When calling this endpoint from a backend, please ensure to properly forward\
\ the HTTP cookies."
operationId: createBrowserLogoutFlow
parameters:
- description: "HTTP Cookies\n\nIf you call this endpoint from a backend, please\
\ include the\noriginal Cookie header in the request."
explode: false
in: header
name: cookie
required: false
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/logoutFlow'
description: logoutFlow
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create a Logout URL for Browsers
tags:
- frontend
/self-service/recovery:
post:
description: "Use this endpoint to complete a recovery flow. This endpoint\n\
behaves differently for API and browser flows and has several states:\n\n\
`choose_method` expects `flow` (in the URL query) and `email` (in the body)\
\ to be sent\nand works with API- and Browser-initiated flows.\nFor API clients\
\ and Browser clients with HTTP Header `Accept: application/json` it either\
\ returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form\
\ is invalid.\nand a HTTP 303 See Other redirect with a fresh recovery flow\
\ if the flow was otherwise invalid (e.g. expired).\nFor Browser clients without\
\ HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 303 See\
\ Other redirect to the Recovery UI URL with the Recovery Flow ID appended.\n\
`sent_email` is the success state after `choose_method` for the `link` method\
\ and allows the user to request another recovery email. It\nworks for both\
\ API and Browser-initiated flows and returns the same responses as the flow\
\ in `choose_method` state.\n`passed_challenge` expects a `token` to be sent\
\ in the URL query and given the nature of the flow (\"sending a recovery\
\ link\")\ndoes not have any API capabilities. The server responds with a\
\ HTTP 303 See Other redirect either to the Settings UI URL\n(if the link\
\ was valid) and instructs the user to update their password, or a redirect\
\ to the Recover UI URL with\na new Recovery Flow ID which contains an error\
\ message that the recovery link was invalid.\n\nMore information can be found\
\ at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery)."
operationId: updateRecoveryFlow
parameters:
- description: |-
The Recovery Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/recovery?flow=abcde`).
explode: true
in: query
name: flow
required: true
schema:
type: string
style: form
- description: |-
Recovery Token
The recovery token which completes the recovery request. If the token
is invalid (e.g. expired) an error will be shown to the end-user.
This parameter is usually set in a link and not used by any direct API call.
explode: true
in: query
name: token
required: false
schema:
type: string
style: form
- description: "HTTP Cookies\n\nWhen using the SDK in a browser app, on the\
\ server side you must include the HTTP Cookie Header\nsent by the client\
\ to your server here. This ensures that CSRF and session cookies are respected."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateRecoveryFlowBody'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/updateRecoveryFlowBody'
required: true
x-originalParamName: Body
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/recoveryFlow'
description: recoveryFlow
"303":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/recoveryFlow'
description: recoveryFlow
"410":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"422":
content:
application/json:
schema:
$ref: '#/components/schemas/errorBrowserLocationChangeRequired'
description: errorBrowserLocationChangeRequired
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Complete Recovery Flow
tags:
- frontend
/self-service/recovery/api:
get:
description: "This endpoint initiates a recovery flow for API clients such as\
\ mobile devices, smart TVs, and so on.\n\nIf a valid provided session cookie\
\ or session token is provided, a 400 Bad Request error.\n\nTo fetch an existing\
\ recovery flow call `/self-service/recovery/flows?flow=`.\n\nYou\
\ MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS)\
\ nor server-side (Java Server\nPages, NodeJS, PHP, Golang, ...) browser applications.\
\ Using this endpoint in these applications will make\nyou vulnerable to a\
\ variety of CSRF attacks.\n\nThis endpoint MUST ONLY be used in scenarios\
\ such as native mobile apps (React Native, Objective C, Swift, Java, ...).\n\
\nMore information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery)."
operationId: createNativeRecoveryFlow
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/recoveryFlow'
description: recoveryFlow
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Recovery Flow for Native Apps
tags:
- frontend
/self-service/recovery/browser:
get:
description: "This endpoint initializes a browser-based account recovery flow.\
\ Once initialized, the browser will be redirected to\n`selfservice.flows.recovery.ui_url`\
\ with the flow ID set as the query parameter `?flow=`. If a valid user session\n\
exists, the browser is returned to the configured return URL.\n\nIf this endpoint\
\ is called via an AJAX request, the response contains the recovery flow without\
\ any redirects\nor a 400 bad request error if the user is already authenticated.\n\
\nThis endpoint is NOT INTENDED for clients that do not have a browser (Chrome,\
\ Firefox, ...) as cookies are needed.\n\nMore information can be found at\
\ [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery)."
operationId: createBrowserRecoveryFlow
parameters:
- description: The URL to return the browser to after the flow was completed.
explode: true
in: query
name: return_to
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/recoveryFlow'
description: recoveryFlow
"303":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Recovery Flow for Browsers
tags:
- frontend
/self-service/recovery/flows:
get:
description: "This endpoint returns a recovery flow's context with, for example,\
\ error details and other information.\n\nBrowser flows expect the anti-CSRF\
\ cookie to be included in the request's HTTP Cookie Header.\nFor AJAX requests\
\ you must ensure that cookies are included in the request or requests will\
\ fail.\n\nIf you use the browser-flow for server-side apps, the services\
\ need to run on a common top-level-domain\nand you need to forward the incoming\
\ HTTP Cookie header to this endpoint:\n\n```js\npseudo-code example\nrouter.get('/recovery',\
\ async function (req, res) {\nconst flow = await client.getRecoveryFlow(req.header('Cookie'),\
\ req.query['flow'])\n\nres.render('recovery', flow)\n})\n```\n\nMore information\
\ can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery)."
operationId: getRecoveryFlow
parameters:
- description: |-
The Flow ID
The value for this parameter comes from `request` URL Query parameter sent to your
application (e.g. `/recovery?flow=abcde`).
explode: true
in: query
name: id
required: true
schema:
type: string
style: form
- description: "HTTP Cookies\n\nWhen using the SDK in a browser app, on the\
\ server side you must include the HTTP Cookie Header\nsent by the client\
\ to your server here. This ensures that CSRF and session cookies are respected."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/recoveryFlow'
description: recoveryFlow
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"410":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get Recovery Flow
tags:
- frontend
/self-service/registration:
post:
description: "Use this endpoint to complete a registration flow by sending an\
\ identity's traits and password. This endpoint\nbehaves differently for API\
\ and browser flows.\n\nAPI flows expect `application/json` to be sent in\
\ the body and respond with\nHTTP 200 and a application/json body with the\
\ created identity success - if the session hook is configured the\n`session`\
\ and `session_token` will also be included;\nHTTP 410 if the original flow\
\ expired with the appropriate error messages set and optionally a `use_flow_id`\
\ parameter in the body;\nHTTP 400 on form validation errors.\n\nBrowser flows\
\ expect a Content-Type of `application/x-www-form-urlencoded` or `application/json`\
\ to be sent in the body and respond with\na HTTP 303 redirect to the post/after\
\ registration URL or the `return_to` value if it was set and if the registration\
\ succeeded;\na HTTP 303 redirect to the registration UI URL with the flow\
\ ID containing the validation errors otherwise.\n\nBrowser flows with an\
\ accept header of `application/json` will not redirect but instead respond\
\ with\nHTTP 200 and a application/json body with the signed in identity and\
\ a `Set-Cookie` header on success;\nHTTP 303 redirect to a fresh login flow\
\ if the original flow expired with the appropriate error messages set;\n\
HTTP 400 on form validation errors.\n\nIf this endpoint is called with `Accept:\
\ application/json` in the header, the response contains the flow without\
\ a redirect. In the\ncase of an error, the `error.id` of the JSON response\
\ body can be one of:\n\n`session_already_available`: The user is already\
\ signed in.\n`security_csrf_violation`: Unable to fetch the flow because\
\ a CSRF violation occurred.\n`security_identity_mismatch`: The requested\
\ `?return_to` address is not allowed to be used. Adjust this in the configuration!\n\
`browser_location_change_required`: Usually sent when an AJAX request indicates\
\ that the browser needs to open a specific URL.\nMost likely used in Social\
\ Sign In flows.\n\nMore information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login)\
\ and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration)."
operationId: updateRegistrationFlow
parameters:
- description: |-
The Registration Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/registration?flow=abcde`).
explode: true
in: query
name: flow
required: true
schema:
type: string
style: form
- description: "HTTP Cookies\n\nWhen using the SDK in a browser app, on the\
\ server side you must include the HTTP Cookie Header\nsent by the client\
\ to your server here. This ensures that CSRF and session cookies are respected."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateRegistrationFlowBody'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/updateRegistrationFlowBody'
required: true
x-originalParamName: Body
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/successfulNativeRegistration'
description: successfulNativeRegistration
"303":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/registrationFlow'
description: registrationFlow
"410":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"422":
content:
application/json:
schema:
$ref: '#/components/schemas/errorBrowserLocationChangeRequired'
description: errorBrowserLocationChangeRequired
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Update Registration Flow
tags:
- frontend
/self-service/registration/api:
get:
description: "This endpoint initiates a registration flow for API clients such\
\ as mobile devices, smart TVs, and so on.\n\nIf a valid provided session\
\ cookie or session token is provided, a 400 Bad Request error\nwill be returned\
\ unless the URL query parameter `?refresh=true` is set.\n\nTo fetch an existing\
\ registration flow call `/self-service/registration/flows?flow=`.\n\
\nYou MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS,\
\ AngularJS) nor server-side (Java Server\nPages, NodeJS, PHP, Golang, ...)\
\ browser applications. Using this endpoint in these applications will make\n\
you vulnerable to a variety of CSRF attacks.\n\nIn the case of an error, the\
\ `error.id` of the JSON response body can be one of:\n\n`session_already_available`:\
\ The user is already signed in.\n`security_csrf_violation`: Unable to fetch\
\ the flow because a CSRF violation occurred.\n\nThis endpoint MUST ONLY be\
\ used in scenarios such as native mobile apps (React Native, Objective C,\
\ Swift, Java, ...).\n\nMore information can be found at [Ory Kratos User\
\ Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and\
\ [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration)."
operationId: createNativeRegistrationFlow
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/registrationFlow'
description: registrationFlow
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Registration Flow for Native Apps
tags:
- frontend
/self-service/registration/browser:
get:
description: "This endpoint initializes a browser-based user registration flow.\
\ This endpoint will set the appropriate\ncookies and anti-CSRF measures required\
\ for browser-based flows.\n\n:::info\n\nThis endpoint is EXPERIMENTAL and\
\ subject to potential breaking changes in the future.\n\n:::\n\nIf this endpoint\
\ is opened as a link in the browser, it will be redirected to\n`selfservice.flows.registration.ui_url`\
\ with the flow ID set as the query parameter `?flow=`. If a valid user session\n\
exists already, the browser will be redirected to `urls.default_redirect_url`.\n\
\nIf this endpoint is called via an AJAX request, the response contains the\
\ flow without a redirect. In the\ncase of an error, the `error.id` of the\
\ JSON response body can be one of:\n\n`session_already_available`: The user\
\ is already signed in.\n`security_csrf_violation`: Unable to fetch the flow\
\ because a CSRF violation occurred.\n`security_identity_mismatch`: The requested\
\ `?return_to` address is not allowed to be used. Adjust this in the configuration!\n\
\nIf this endpoint is called via an AJAX request, the response contains the\
\ registration flow without a redirect.\n\nThis endpoint is NOT INTENDED for\
\ clients that do not have a browser (Chrome, Firefox, ...) as cookies are\
\ needed.\n\nMore information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login)\
\ and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration)."
operationId: createBrowserRegistrationFlow
parameters:
- description: The URL to return the browser to after the flow was completed.
explode: true
in: query
name: return_to
required: false
schema:
type: string
style: form
- description: |-
Ory OAuth 2.0 Login Challenge.
If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider.
The value for this parameter comes from `login_challenge` URL Query parameter sent to your
application (e.g. `/registration?login_challenge=abcde`).
This feature is compatible with Ory Hydra when not running on the Ory Network.
explode: true
in: query
name: login_challenge
required: false
schema:
type: string
style: form
- description: "The URL to return the browser to after the verification flow\
\ was completed.\n\nAfter the registration flow is completed, the user will\
\ be sent a verification email.\nUpon completing the verification flow,\
\ this URL will be used to override the default\n`selfservice.flows.verification.after.default_redirect_to`\
\ value."
explode: true
in: query
name: after_verification_return_to
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/registrationFlow'
description: registrationFlow
"303":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Registration Flow for Browsers
tags:
- frontend
/self-service/registration/flows:
get:
description: "This endpoint returns a registration flow's context with, for\
\ example, error details and other information.\n\nBrowser flows expect the\
\ anti-CSRF cookie to be included in the request's HTTP Cookie Header.\nFor\
\ AJAX requests you must ensure that cookies are included in the request or\
\ requests will fail.\n\nIf you use the browser-flow for server-side apps,\
\ the services need to run on a common top-level-domain\nand you need to forward\
\ the incoming HTTP Cookie header to this endpoint:\n\n```js\npseudo-code\
\ example\nrouter.get('/registration', async function (req, res) {\nconst\
\ flow = await client.getRegistrationFlow(req.header('cookie'), req.query['flow'])\n\
\nres.render('registration', flow)\n})\n```\n\nThis request may fail due to\
\ several reasons. The `error.id` can be one of:\n\n`session_already_available`:\
\ The user is already signed in.\n`self_service_flow_expired`: The flow is\
\ expired and you should request a new one.\n\nMore information can be found\
\ at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login)\
\ and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration)."
operationId: getRegistrationFlow
parameters:
- description: |-
The Registration Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/registration?flow=abcde`).
explode: true
in: query
name: id
required: true
schema:
type: string
style: form
- description: "HTTP Cookies\n\nWhen using the SDK in a browser app, on the\
\ server side you must include the HTTP Cookie Header\nsent by the client\
\ to your server here. This ensures that CSRF and session cookies are respected."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/registrationFlow'
description: registrationFlow
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"410":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get Registration Flow
tags:
- frontend
/self-service/settings:
post:
description: "Use this endpoint to complete a settings flow by sending an identity's\
\ updated password. This endpoint\nbehaves differently for API and browser\
\ flows.\n\nAPI-initiated flows expect `application/json` to be sent in the\
\ body and respond with\nHTTP 200 and an application/json body with the session\
\ token on success;\nHTTP 303 redirect to a fresh settings flow if the original\
\ flow expired with the appropriate error messages set;\nHTTP 400 on form\
\ validation errors.\nHTTP 401 when the endpoint is called without a valid\
\ session token.\nHTTP 403 when `selfservice.flows.settings.privileged_session_max_age`\
\ was reached or the session's AAL is too low.\nImplies that the user needs\
\ to re-authenticate.\n\nBrowser flows without HTTP Header `Accept` or with\
\ `Accept: text/*` respond with\na HTTP 303 redirect to the post/after settings\
\ URL or the `return_to` value if it was set and if the flow succeeded;\n\
a HTTP 303 redirect to the Settings UI URL with the flow ID containing the\
\ validation errors otherwise.\na HTTP 303 redirect to the login endpoint\
\ when `selfservice.flows.settings.privileged_session_max_age` was reached\
\ or the session's AAL is too low.\n\nBrowser flows with HTTP Header `Accept:\
\ application/json` respond with\nHTTP 200 and a application/json body with\
\ the signed in identity and a `Set-Cookie` header on success;\nHTTP 303 redirect\
\ to a fresh login flow if the original flow expired with the appropriate\
\ error messages set;\nHTTP 401 when the endpoint is called without a valid\
\ session cookie.\nHTTP 403 when the page is accessed without a session cookie\
\ or the session's AAL is too low.\nHTTP 400 on form validation errors.\n\n\
Depending on your configuration this endpoint might return a 403 error if\
\ the session has a lower Authenticator\nAssurance Level (AAL) than is possible\
\ for the identity. This can happen if the identity has password + webauthn\n\
credentials (which would result in AAL2) but the session has only AAL1. If\
\ this error occurs, ask the user\nto sign in with the second factor (happens\
\ automatically for server-side browser flows) or change the configuration.\n\
\nIf this endpoint is called with a `Accept: application/json` HTTP header,\
\ the response contains the flow without a redirect. In the\ncase of an error,\
\ the `error.id` of the JSON response body can be one of:\n\n`session_refresh_required`:\
\ The identity requested to change something that needs a privileged session.\
\ Redirect\nthe identity to the login init endpoint with query parameters\
\ `?refresh=true&return_to=`,\nor initiate a refresh\
\ login flow otherwise.\n`security_csrf_violation`: Unable to fetch the flow\
\ because a CSRF violation occurred.\n`session_inactive`: No Ory Session was\
\ found - sign in a user first.\n`security_identity_mismatch`: The flow was\
\ interrupted with `session_refresh_required` but apparently some other\n\
identity logged in instead.\n`security_identity_mismatch`: The requested `?return_to`\
\ address is not allowed to be used. Adjust this in the configuration!\n`browser_location_change_required`:\
\ Usually sent when an AJAX request indicates that the browser needs to open\
\ a specific URL.\nMost likely used in Social Sign In flows.\n\nMore information\
\ can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings)."
operationId: updateSettingsFlow
parameters:
- description: |-
The Settings Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/settings?flow=abcde`).
explode: true
in: query
name: flow
required: true
schema:
type: string
style: form
- description: The Session Token of the Identity performing the settings flow.
explode: false
in: header
name: X-Session-Token
required: false
schema:
type: string
style: simple
- description: "HTTP Cookies\n\nWhen using the SDK in a browser app, on the\
\ server side you must include the HTTP Cookie Header\nsent by the client\
\ to your server here. This ensures that CSRF and session cookies are respected."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateSettingsFlowBody'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/updateSettingsFlowBody'
required: true
x-originalParamName: Body
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/settingsFlow'
description: settingsFlow
"303":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/settingsFlow'
description: settingsFlow
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"410":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"422":
content:
application/json:
schema:
$ref: '#/components/schemas/errorBrowserLocationChangeRequired'
description: errorBrowserLocationChangeRequired
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- sessionToken: []
summary: Complete Settings Flow
tags:
- frontend
/self-service/settings/api:
get:
description: "This endpoint initiates a settings flow for API clients such as\
\ mobile devices, smart TVs, and so on.\nYou must provide a valid Ory Kratos\
\ Session Token for this endpoint to respond with HTTP 200 OK.\n\nTo fetch\
\ an existing settings flow call `/self-service/settings/flows?flow=`.\n\
\nYou MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS,\
\ AngularJS) nor server-side (Java Server\nPages, NodeJS, PHP, Golang, ...)\
\ browser applications. Using this endpoint in these applications will make\n\
you vulnerable to a variety of CSRF attacks.\n\nDepending on your configuration\
\ this endpoint might return a 403 error if the session has a lower Authenticator\n\
Assurance Level (AAL) than is possible for the identity. This can happen if\
\ the identity has password + webauthn\ncredentials (which would result in\
\ AAL2) but the session has only AAL1. If this error occurs, ask the user\n\
to sign in with the second factor or change the configuration.\n\nIn the case\
\ of an error, the `error.id` of the JSON response body can be one of:\n\n\
`security_csrf_violation`: Unable to fetch the flow because a CSRF violation\
\ occurred.\n`session_inactive`: No Ory Session was found - sign in a user\
\ first.\n\nThis endpoint MUST ONLY be used in scenarios such as native mobile\
\ apps (React Native, Objective C, Swift, Java, ...).\n\nMore information\
\ can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings)."
operationId: createNativeSettingsFlow
parameters:
- description: The Session Token of the Identity performing the settings flow.
explode: false
in: header
name: X-Session-Token
required: false
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/settingsFlow'
description: settingsFlow
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Settings Flow for Native Apps
tags:
- frontend
/self-service/settings/browser:
get:
description: "This endpoint initializes a browser-based user settings flow.\
\ Once initialized, the browser will be redirected to\n`selfservice.flows.settings.ui_url`\
\ with the flow ID set as the query parameter `?flow=`. If no valid\nOry Kratos\
\ Session Cookie is included in the request, a login flow will be initialized.\n\
\nIf this endpoint is opened as a link in the browser, it will be redirected\
\ to\n`selfservice.flows.settings.ui_url` with the flow ID set as the query\
\ parameter `?flow=`. If no valid user session\nwas set, the browser will\
\ be redirected to the login endpoint.\n\nIf this endpoint is called via an\
\ AJAX request, the response contains the settings flow without any redirects\n\
or a 401 forbidden error if no valid session was set.\n\nDepending on your\
\ configuration this endpoint might return a 403 error if the session has\
\ a lower Authenticator\nAssurance Level (AAL) than is possible for the identity.\
\ This can happen if the identity has password + webauthn\ncredentials (which\
\ would result in AAL2) but the session has only AAL1. If this error occurs,\
\ ask the user\nto sign in with the second factor (happens automatically for\
\ server-side browser flows) or change the configuration.\n\nIf this endpoint\
\ is called via an AJAX request, the response contains the flow without a\
\ redirect. In the\ncase of an error, the `error.id` of the JSON response\
\ body can be one of:\n\n`security_csrf_violation`: Unable to fetch the flow\
\ because a CSRF violation occurred.\n`session_inactive`: No Ory Session was\
\ found - sign in a user first.\n`security_identity_mismatch`: The requested\
\ `?return_to` address is not allowed to be used. Adjust this in the configuration!\n\
\nThis endpoint is NOT INTENDED for clients that do not have a browser (Chrome,\
\ Firefox, ...) as cookies are needed.\n\nMore information can be found at\
\ [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings)."
operationId: createBrowserSettingsFlow
parameters:
- description: The URL to return the browser to after the flow was completed.
explode: true
in: query
name: return_to
required: false
schema:
type: string
style: form
- description: "HTTP Cookies\n\nWhen using the SDK in a browser app, on the\
\ server side you must include the HTTP Cookie Header\nsent by the client\
\ to your server here. This ensures that CSRF and session cookies are respected."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/settingsFlow'
description: settingsFlow
"303":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Settings Flow for Browsers
tags:
- frontend
/self-service/settings/flows:
get:
description: "When accessing this endpoint through Ory Kratos' Public API you\
\ must ensure that either the Ory Kratos Session Cookie\nor the Ory Kratos\
\ Session Token are set.\n\nDepending on your configuration this endpoint\
\ might return a 403 error if the session has a lower Authenticator\nAssurance\
\ Level (AAL) than is possible for the identity. This can happen if the identity\
\ has password + webauthn\ncredentials (which would result in AAL2) but the\
\ session has only AAL1. If this error occurs, ask the user\nto sign in with\
\ the second factor or change the configuration.\n\nYou can access this endpoint\
\ without credentials when using Ory Kratos' Admin API.\n\nIf this endpoint\
\ is called via an AJAX request, the response contains the flow without a\
\ redirect. In the\ncase of an error, the `error.id` of the JSON response\
\ body can be one of:\n\n`security_csrf_violation`: Unable to fetch the flow\
\ because a CSRF violation occurred.\n`session_inactive`: No Ory Session was\
\ found - sign in a user first.\n`security_identity_mismatch`: The flow was\
\ interrupted with `session_refresh_required` but apparently some other\n\
identity logged in instead.\n\nMore information can be found at [Ory Kratos\
\ User Settings & Profile Management Documentation](../self-service/flows/user-settings)."
operationId: getSettingsFlow
parameters:
- description: |-
ID is the Settings Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/settings?flow=abcde`).
explode: true
in: query
name: id
required: true
schema:
type: string
style: form
- description: "The Session Token\n\nWhen using the SDK in an app without a\
\ browser, please include the\nsession token here."
explode: false
in: header
name: X-Session-Token
required: false
schema:
type: string
style: simple
- description: "HTTP Cookies\n\nWhen using the SDK in a browser app, on the\
\ server side you must include the HTTP Cookie Header\nsent by the client\
\ to your server here. This ensures that CSRF and session cookies are respected."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/settingsFlow'
description: settingsFlow
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"410":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get Settings Flow
tags:
- frontend
/self-service/verification:
post:
description: "Use this endpoint to complete a verification flow. This endpoint\n\
behaves differently for API and browser flows and has several states:\n\n\
`choose_method` expects `flow` (in the URL query) and `email` (in the body)\
\ to be sent\nand works with API- and Browser-initiated flows.\nFor API clients\
\ and Browser clients with HTTP Header `Accept: application/json` it either\
\ returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form\
\ is invalid\nand a HTTP 303 See Other redirect with a fresh verification\
\ flow if the flow was otherwise invalid (e.g. expired).\nFor Browser clients\
\ without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP\
\ 303 See Other redirect to the Verification UI URL with the Verification\
\ Flow ID appended.\n`sent_email` is the success state after `choose_method`\
\ when using the `link` method and allows the user to request another verification\
\ email. It\nworks for both API and Browser-initiated flows and returns the\
\ same responses as the flow in `choose_method` state.\n`passed_challenge`\
\ expects a `token` to be sent in the URL query and given the nature of the\
\ flow (\"sending a verification link\")\ndoes not have any API capabilities.\
\ The server responds with a HTTP 303 See Other redirect either to the Settings\
\ UI URL\n(if the link was valid) and instructs the user to update their password,\
\ or a redirect to the Verification UI URL with\na new Verification Flow ID\
\ which contains an error message that the verification link was invalid.\n\
\nMore information can be found at [Ory Kratos Email and Phone Verification\
\ Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation)."
operationId: updateVerificationFlow
parameters:
- description: |-
The Verification Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/verification?flow=abcde`).
explode: true
in: query
name: flow
required: true
schema:
type: string
style: form
- description: |-
Verification Token
The verification token which completes the verification request. If the token
is invalid (e.g. expired) an error will be shown to the end-user.
This parameter is usually set in a link and not used by any direct API call.
explode: true
in: query
name: token
required: false
schema:
type: string
style: form
- description: "HTTP Cookies\n\nWhen using the SDK in a browser app, on the\
\ server side you must include the HTTP Cookie Header\nsent by the client\
\ to your server here. This ensures that CSRF and session cookies are respected."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateVerificationFlowBody'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/updateVerificationFlowBody'
required: true
x-originalParamName: Body
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/verificationFlow'
description: verificationFlow
"303":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/verificationFlow'
description: verificationFlow
"410":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Complete Verification Flow
tags:
- frontend
/self-service/verification/api:
get:
description: "This endpoint initiates a verification flow for API clients such\
\ as mobile devices, smart TVs, and so on.\n\nTo fetch an existing verification\
\ flow call `/self-service/verification/flows?flow=`.\n\nYou MUST\
\ NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS)\
\ nor server-side (Java Server\nPages, NodeJS, PHP, Golang, ...) browser applications.\
\ Using this endpoint in these applications will make\nyou vulnerable to a\
\ variety of CSRF attacks.\n\nThis endpoint MUST ONLY be used in scenarios\
\ such as native mobile apps (React Native, Objective C, Swift, Java, ...).\n\
\nMore information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation)."
operationId: createNativeVerificationFlow
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/verificationFlow'
description: verificationFlow
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Verification Flow for Native Apps
tags:
- frontend
/self-service/verification/browser:
get:
description: "This endpoint initializes a browser-based account verification\
\ flow. Once initialized, the browser will be redirected to\n`selfservice.flows.verification.ui_url`\
\ with the flow ID set as the query parameter `?flow=`.\n\nIf this endpoint\
\ is called via an AJAX request, the response contains the recovery flow without\
\ any redirects.\n\nThis endpoint is NOT INTENDED for API clients and only\
\ works with browsers (Chrome, Firefox, ...).\n\nMore information can be found\
\ at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation)."
operationId: createBrowserVerificationFlow
parameters:
- description: The URL to return the browser to after the flow was completed.
explode: true
in: query
name: return_to
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/verificationFlow'
description: verificationFlow
"303":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Verification Flow for Browser Clients
tags:
- frontend
/self-service/verification/flows:
get:
description: "This endpoint returns a verification flow's context with, for\
\ example, error details and other information.\n\nBrowser flows expect the\
\ anti-CSRF cookie to be included in the request's HTTP Cookie Header.\nFor\
\ AJAX requests you must ensure that cookies are included in the request or\
\ requests will fail.\n\nIf you use the browser-flow for server-side apps,\
\ the services need to run on a common top-level-domain\nand you need to forward\
\ the incoming HTTP Cookie header to this endpoint:\n\n```js\npseudo-code\
\ example\nrouter.get('/recovery', async function (req, res) {\nconst flow\
\ = await client.getVerificationFlow(req.header('cookie'), req.query['flow'])\n\
\nres.render('verification', flow)\n})\n```\n\nMore information can be found\
\ at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation)."
operationId: getVerificationFlow
parameters:
- description: |-
The Flow ID
The value for this parameter comes from `request` URL Query parameter sent to your
application (e.g. `/verification?flow=abcde`).
explode: true
in: query
name: id
required: true
schema:
type: string
style: form
- description: |-
HTTP Cookies
When using the SDK on the server side you must include the HTTP Cookie Header
originally sent to your HTTP handler here.
explode: false
in: header
name: cookie
required: false
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/verificationFlow'
description: verificationFlow
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get Verification Flow
tags:
- frontend
/sessions:
delete:
description: |-
Calling this endpoint invalidates all except the current session that belong to the logged-in user.
Session data are not deleted.
operationId: disableMyOtherSessions
parameters:
- description: Set the Session Token when calling from non-browser clients.
A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`.
explode: false
in: header
name: X-Session-Token
required: false
schema:
type: string
style: simple
- description: "Set the Cookie Header. This is especially useful when calling\
\ this endpoint from a server-side application. In that\nscenario you must\
\ include the HTTP Cookie Header which originally was included in the request\
\ to your server.\nAn example of a session in the HTTP Cookie Header is:\
\ `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`.\n\
\nIt is ok if more than one cookie are included here as all other cookies\
\ will be ignored."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/deleteMySessionsCount'
description: deleteMySessionsCount
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Disable my other sessions
tags:
- frontend
get:
description: |-
This endpoints returns all other active sessions that belong to the logged-in user.
The current session can be retrieved by calling the `/sessions/whoami` endpoint.
operationId: listMySessions
parameters:
- description: |-
Items per Page
This is the number of items per page.
explode: true
in: query
name: per_page
required: false
schema:
default: 250
format: int64
maximum: 1000
minimum: 1
type: integer
style: form
- description: "Pagination Page\n\nThis value is currently an integer, but it\
\ is not sequential. The value is not the page number, but a\nreference.\
\ The next page can be any number and some numbers might return an empty\
\ list.\n\nFor example, page 2 might not follow after page 1. And even if\
\ page 3 and 5 exist, but page 4 might not exist."
explode: true
in: query
name: page
required: false
schema:
default: 1
format: int64
minimum: 1
type: integer
style: form
- description: Set the Session Token when calling from non-browser clients.
A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`.
explode: false
in: header
name: X-Session-Token
required: false
schema:
type: string
style: simple
- description: "Set the Cookie Header. This is especially useful when calling\
\ this endpoint from a server-side application. In that\nscenario you must\
\ include the HTTP Cookie Header which originally was included in the request\
\ to your server.\nAn example of a session in the HTTP Cookie Header is:\
\ `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`.\n\
\nIt is ok if more than one cookie are included here as all other cookies\
\ will be ignored."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/session'
type: array
description: List My Session Response
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get My Active Sessions
tags:
- frontend
/sessions/whoami:
get:
description: "Uses the HTTP Headers in the GET request to determine (e.g. by\
\ using checking the cookies) who is authenticated.\nReturns a session object\
\ in the body or 401 if the credentials are invalid or no credentials were\
\ sent.\nWhen the request it successful it adds the user ID to the 'X-Kratos-Authenticated-Identity-Id'\
\ header\nin the response.\n\nIf you call this endpoint from a server-side\
\ application, you must forward the HTTP Cookie Header to this endpoint:\n\
\n```js\npseudo-code example\nrouter.get('/protected-endpoint', async function\
\ (req, res) {\nconst session = await client.toSession(undefined, req.header('cookie'))\n\
\nconsole.log(session)\n})\n```\n\nWhen calling this endpoint from a non-browser\
\ application (e.g. mobile app) you must include the session token:\n\n```js\n\
pseudo-code example\n...\nconst session = await client.toSession(\"the-session-token\"\
)\n\nconsole.log(session)\n```\n\nDepending on your configuration this endpoint\
\ might return a 403 status code if the session has a lower Authenticator\n\
Assurance Level (AAL) than is possible for the identity. This can happen if\
\ the identity has password + webauthn\ncredentials (which would result in\
\ AAL2) but the session has only AAL1. If this error occurs, ask the user\n\
to sign in with the second factor or change the configuration.\n\nThis endpoint\
\ is useful for:\n\nAJAX calls. Remember to send credentials and set up CORS\
\ correctly!\nReverse proxies and API Gateways\nServer-side calls - use the\
\ `X-Session-Token` header!\n\nThis endpoint authenticates users by checking:\n\
\nif the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie;\n\
if the `Authorization: bearer ` HTTP header was set with\
\ a valid Ory Kratos Session Token;\nif the `X-Session-Token` HTTP header\
\ was set with a valid Ory Kratos Session Token.\n\nIf none of these headers\
\ are set or the cooke or token are invalid, the endpoint returns a HTTP 401\
\ status code.\n\nAs explained above, this request may fail due to several\
\ reasons. The `error.id` can be one of:\n\n`session_inactive`: No active\
\ session was found in the request (e.g. no Ory Session Cookie / Ory Session\
\ Token).\n`session_aal2_required`: An active session was found but it does\
\ not fulfil the Authenticator Assurance Level, implying that the session\
\ must (e.g.) authenticate the second factor."
operationId: toSession
parameters:
- description: Set the Session Token when calling from non-browser clients.
A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`.
example: MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj
explode: false
in: header
name: X-Session-Token
required: false
schema:
type: string
style: simple
- description: "Set the Cookie Header. This is especially useful when calling\
\ this endpoint from a server-side application. In that\nscenario you must\
\ include the HTTP Cookie Header which originally was included in the request\
\ to your server.\nAn example of a session in the HTTP Cookie Header is:\
\ `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`.\n\
\nIt is ok if more than one cookie are included here as all other cookies\
\ will be ignored."
example: ory_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/session'
description: session
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Check Who the Current HTTP Session Belongs To
tags:
- frontend
/sessions/{id}:
delete:
description: |-
Calling this endpoint invalidates the specified session. The current session cannot be revoked.
Session data are not deleted.
operationId: disableMySession
parameters:
- description: ID is the session's ID.
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
- description: Set the Session Token when calling from non-browser clients.
A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`.
explode: false
in: header
name: X-Session-Token
required: false
schema:
type: string
style: simple
- description: "Set the Cookie Header. This is especially useful when calling\
\ this endpoint from a server-side application. In that\nscenario you must\
\ include the HTTP Cookie Header which originally was included in the request\
\ to your server.\nAn example of a session in the HTTP Cookie Header is:\
\ `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`.\n\
\nIt is ok if more than one cookie are included here as all other cookies\
\ will be ignored."
explode: false
in: header
name: Cookie
required: false
schema:
type: string
style: simple
responses:
"204":
description: "Empty responses are sent when, for example, resources are\
\ deleted. The HTTP status code for empty responses is typically 201."
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Disable one of my sessions
tags:
- frontend
/version:
get:
description: "This endpoint returns the version of Ory Kratos.\n\nIf the service\
\ supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto`\
\ header to be set.\n\nBe aware that if you are running multiple nodes of\
\ this service, the version will never\nrefer to the cluster state, only to\
\ a single instance."
operationId: getVersion
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/getVersion_200_response'
description: Returns the Ory Kratos version.
summary: Return Running Software Version.
tags:
- metadata
components:
responses:
emptyResponse:
description: "Empty responses are sent when, for example, resources are deleted.\
\ The HTTP status code for empty responses is typically 201."
identitySchemas:
content:
application/json:
schema:
$ref: '#/components/schemas/identitySchemas'
description: List Identity JSON Schemas Response
listCourierMessages:
content:
application/json:
schema:
items:
$ref: '#/components/schemas/message'
type: array
description: Paginated Courier Message List Response
listIdentities:
content:
application/json:
schema:
items:
$ref: '#/components/schemas/identity'
type: array
description: Paginated Identity List Response
listIdentitySessions:
content:
application/json:
schema:
items:
$ref: '#/components/schemas/session'
type: array
description: List Identity Sessions Response
listMySessions:
content:
application/json:
schema:
items:
$ref: '#/components/schemas/session'
type: array
description: List My Session Response
listSessions:
content:
application/json:
schema:
items:
$ref: '#/components/schemas/session'
type: array
description: |-
Session List Response
The response given when listing sessions in an administrative context.
schemas:
DefaultError: {}
Duration:
description: |-
A Duration represents the elapsed time between two instants
as an int64 nanosecond count. The representation limits the
largest representable duration to approximately 290 years.
format: int64
type: integer
ID:
format: int64
type: integer
JSONRawMessage:
title: "JSONRawMessage represents a json.RawMessage that works well with JSON,\
\ SQL, and Swagger."
type: object
NullBool:
nullable: true
type: boolean
NullInt:
nullable: true
type: integer
NullString:
nullable: true
type: string
NullTime:
format: date-time
nullable: true
type: string
NullUUID:
format: uuid4
nullable: true
type: string
OAuth2Client:
example:
metadata: ""
token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg
client_uri: client_uri
jwt_bearer_grant_access_token_lifespan: jwt_bearer_grant_access_token_lifespan
jwks: ""
logo_uri: logo_uri
created_at: 2000-01-23T04:56:07.000+00:00
registration_client_uri: registration_client_uri
allowed_cors_origins:
- allowed_cors_origins
- allowed_cors_origins
refresh_token_grant_access_token_lifespan: refresh_token_grant_access_token_lifespan
registration_access_token: registration_access_token
client_id: client_id
token_endpoint_auth_method: token_endpoint_auth_method
userinfo_signed_response_alg: userinfo_signed_response_alg
authorization_code_grant_id_token_lifespan: authorization_code_grant_id_token_lifespan
authorization_code_grant_refresh_token_lifespan: authorization_code_grant_refresh_token_lifespan
client_credentials_grant_access_token_lifespan: client_credentials_grant_access_token_lifespan
updated_at: 2000-01-23T04:56:07.000+00:00
scope: scope
request_uris:
- request_uris
- request_uris
client_secret: client_secret
backchannel_logout_session_required: true
backchannel_logout_uri: backchannel_logout_uri
client_name: client_name
policy_uri: policy_uri
owner: owner
audience:
- audience
- audience
authorization_code_grant_access_token_lifespan: authorization_code_grant_access_token_lifespan
post_logout_redirect_uris:
- post_logout_redirect_uris
- post_logout_redirect_uris
grant_types:
- grant_types
- grant_types
subject_type: subject_type
refresh_token_grant_refresh_token_lifespan: refresh_token_grant_refresh_token_lifespan
redirect_uris:
- redirect_uris
- redirect_uris
sector_identifier_uri: sector_identifier_uri
frontchannel_logout_session_required: true
frontchannel_logout_uri: frontchannel_logout_uri
refresh_token_grant_id_token_lifespan: refresh_token_grant_id_token_lifespan
implicit_grant_id_token_lifespan: implicit_grant_id_token_lifespan
client_secret_expires_at: 0
implicit_grant_access_token_lifespan: implicit_grant_access_token_lifespan
jwks_uri: jwks_uri
request_object_signing_alg: request_object_signing_alg
tos_uri: tos_uri
contacts:
- contacts
- contacts
response_types:
- response_types
- response_types
properties:
allowed_cors_origins:
items:
type: string
type: array
audience:
items:
type: string
type: array
authorization_code_grant_access_token_lifespan:
description: "Specify a time duration in milliseconds, seconds, minutes,\
\ hours."
type: string
authorization_code_grant_id_token_lifespan:
description: "Specify a time duration in milliseconds, seconds, minutes,\
\ hours."
type: string
authorization_code_grant_refresh_token_lifespan:
description: "Specify a time duration in milliseconds, seconds, minutes,\
\ hours."
type: string
backchannel_logout_session_required:
description: "OpenID Connect Back-Channel Logout Session Required Boolean\
\ value specifying whether the RP requires that a sid (session ID) Claim\
\ be included in the Logout Token to identify the RP session with the\
\ OP when the backchannel_logout_uri is used. If omitted, the default\
\ value is false."
type: boolean
backchannel_logout_uri:
description: OpenID Connect Back-Channel Logout URI RP URL that will cause
the RP to log itself out when sent a Logout Token by the OP.
type: string
client_credentials_grant_access_token_lifespan:
description: "Specify a time duration in milliseconds, seconds, minutes,\
\ hours."
type: string
client_id:
description: OAuth 2.0 Client ID The ID is autogenerated and immutable.
type: string
client_name:
description: OAuth 2.0 Client Name The human-readable name of the client
to be presented to the end-user during authorization.
type: string
client_secret:
description: "OAuth 2.0 Client Secret The secret will be included in the\
\ create request as cleartext, and then never again. The secret is kept\
\ in hashed format and is not recoverable once lost."
type: string
client_secret_expires_at:
description: OAuth 2.0 Client Secret Expires At The field is currently
not supported and its value is always 0.
format: int64
type: integer
client_uri:
description: "OAuth 2.0 Client URI ClientURI is a URL string of a web page\
\ providing information about the client. If present, the server SHOULD\
\ display this URL to the end-user in a clickable fashion."
type: string
contacts:
items:
type: string
type: array
created_at:
description: OAuth 2.0 Client Creation Date CreatedAt returns the timestamp
of the client's creation.
format: date-time
type: string
frontchannel_logout_session_required:
description: "OpenID Connect Front-Channel Logout Session Required Boolean\
\ value specifying whether the RP requires that iss (issuer) and sid (session\
\ ID) query parameters be included to identify the RP session with the\
\ OP when the frontchannel_logout_uri is used. If omitted, the default\
\ value is false."
type: boolean
frontchannel_logout_uri:
description: "OpenID Connect Front-Channel Logout URI RP URL that will\
\ cause the RP to log itself out when rendered in an iframe by the OP.\
\ An iss (issuer) query parameter and a sid (session ID) query parameter\
\ MAY be included by the OP to enable the RP to validate the request and\
\ to determine which of the potentially multiple sessions is to be logged\
\ out; if either is included, both MUST be."
type: string
grant_types:
items:
type: string
type: array
implicit_grant_access_token_lifespan:
description: "Specify a time duration in milliseconds, seconds, minutes,\
\ hours."
type: string
implicit_grant_id_token_lifespan:
description: "Specify a time duration in milliseconds, seconds, minutes,\
\ hours."
type: string
jwks:
description: "OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set\
\ [JWK] document, passed by value. The semantics of the jwks parameter\
\ are the same as the jwks_uri parameter, other than that the JWK Set\
\ is passed by value, rather than by reference. This parameter is intended\
\ only to be used by Clients that, for some reason, are unable to use\
\ the jwks_uri parameter, for instance, by native applications that might\
\ not have a location to host the contents of the JWK Set. If a Client\
\ can use jwks_uri, it MUST NOT use jwks. One significant downside of\
\ jwks is that it does not enable key rotation (which jwks_uri does, as\
\ described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The\
\ jwks_uri and jwks parameters MUST NOT be used together."
jwks_uri:
description: "OAuth 2.0 Client JSON Web Key Set URL URL for the Client's\
\ JSON Web Key Set [JWK] document. If the Client signs requests to the\
\ Server, it contains the signing key(s) the Server uses to validate signatures\
\ from the Client. The JWK Set MAY also contain the Client's encryption\
\ keys(s), which are used by the Server to encrypt responses to the Client.\
\ When both signing and encryption keys are made available, a use (Key\
\ Use) parameter value is REQUIRED for all keys in the referenced JWK\
\ Set to indicate each key's intended usage. Although some algorithms\
\ allow the same key to be used for both signatures and encryption, doing\
\ so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY\
\ be used to provide X.509 representations of keys provided. When used,\
\ the bare key values MUST still be present and MUST match those in the\
\ certificate."
type: string
jwt_bearer_grant_access_token_lifespan:
description: "Specify a time duration in milliseconds, seconds, minutes,\
\ hours."
type: string
logo_uri:
description: OAuth 2.0 Client Logo URI A URL string referencing the client's
logo.
type: string
metadata: {}
owner:
description: OAuth 2.0 Client Owner Owner is a string identifying the owner
of the OAuth 2.0 Client.
type: string
policy_uri:
description: "OAuth 2.0 Client Policy URI PolicyURI is a URL string that\
\ points to a human-readable privacy policy document that describes how\
\ the deployment organization collects, uses, retains, and discloses personal\
\ data."
type: string
post_logout_redirect_uris:
items:
type: string
type: array
redirect_uris:
items:
type: string
type: array
refresh_token_grant_access_token_lifespan:
description: "Specify a time duration in milliseconds, seconds, minutes,\
\ hours."
type: string
refresh_token_grant_id_token_lifespan:
description: "Specify a time duration in milliseconds, seconds, minutes,\
\ hours."
type: string
refresh_token_grant_refresh_token_lifespan:
description: "Specify a time duration in milliseconds, seconds, minutes,\
\ hours."
type: string
registration_access_token:
description: "OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken\
\ can be used to update, get, or delete the OAuth2 Client. It is sent\
\ when creating a client using Dynamic Client Registration."
type: string
registration_client_uri:
description: "OpenID Connect Dynamic Client Registration URL RegistrationClientURI\
\ is the URL used to update, get, or delete the OAuth2 Client."
type: string
request_object_signing_alg:
description: "OpenID Connect Request Object Signing Algorithm JWS [JWS]\
\ alg algorithm [JWA] that MUST be used for signing Request Objects sent\
\ to the OP. All Request Objects from this Client MUST be rejected, if\
\ not signed with this algorithm."
type: string
request_uris:
items:
type: string
type: array
response_types:
items:
type: string
type: array
scope:
description: "OAuth 2.0 Client Scope Scope is a string containing a space-separated\
\ list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])\
\ that the client can use when requesting access tokens."
type: string
sector_identifier_uri:
description: OpenID Connect Sector Identifier URI URL using the https scheme
to be used in calculating Pseudonymous Identifiers by the OP. The URL
references a file with a single JSON array of redirect_uri values.
type: string
subject_type:
description: OpenID Connect Subject Type The `subject_types_supported`
Discovery parameter contains a list of the supported subject_type values
for this server. Valid types include `pairwise` and `public`.
type: string
token_endpoint_auth_method:
description: "OAuth 2.0 Token Endpoint Authentication Method Requested\
\ Client Authentication method for the Token Endpoint. The options are:\
\ `client_secret_post`: (default) Send `client_id` and `client_secret`\
\ as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`:\
\ Send `client_id` and `client_secret` as `application/x-www-form-urlencoded`\
\ encoded in the HTTP Authorization header. `private_key_jwt`: Use JSON\
\ Web Tokens to authenticate the client. `none`: Used for public clients\
\ (native apps, mobile apps) which can not have secrets."
type: string
token_endpoint_auth_signing_alg:
description: OAuth 2.0 Token Endpoint Signing Algorithm Requested Client
Authentication signing algorithm for the Token Endpoint.
type: string
tos_uri:
description: OAuth 2.0 Client Terms of Service URI A URL string pointing
to a human-readable terms of service document for the client that describes
a contractual relationship between the end-user and the client that the
end-user accepts when authorizing the client.
type: string
updated_at:
description: OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp
of the last update.
format: date-time
type: string
userinfo_signed_response_alg:
description: "OpenID Connect Request Userinfo Signed Response Algorithm\
\ JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If\
\ this is specified, the response will be JWT [JWT] serialized, and signed\
\ using JWS. The default, if omitted, is for the UserInfo Response to\
\ return the Claims as a UTF-8 encoded JSON object using the application/json\
\ content-type."
type: string
title: "OAuth2Client OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID\
\ Connect flows. Usually, OAuth 2.0 clients are generated for applications\
\ which want to consume your OAuth 2.0 or OpenID Connect capabilities."
type: object
OAuth2ConsentRequestOpenIDConnectContext:
description: OAuth2ConsentRequestOpenIDConnectContext struct for OAuth2ConsentRequestOpenIDConnectContext
example:
login_hint: login_hint
ui_locales:
- ui_locales
- ui_locales
id_token_hint_claims:
key: ""
acr_values:
- acr_values
- acr_values
display: display
properties:
acr_values:
description: "ACRValues is the Authentication AuthorizationContext Class\
\ Reference requested in the OAuth 2.0 Authorization request. It is a\
\ parameter defined by OpenID Connect and expresses which level of authentication\
\ (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested\
\ Authentication AuthorizationContext Class Reference values. Space-separated\
\ string that specifies the acr values that the Authorization Server is\
\ being requested to use for processing this Authentication Request, with\
\ the values appearing in order of preference. The Authentication AuthorizationContext\
\ Class satisfied by the authentication performed is returned as the acr\
\ Claim Value, as specified in Section 2. The acr Claim is requested as\
\ a Voluntary Claim by this parameter."
items:
type: string
type: array
display:
description: "Display is a string value that specifies how the Authorization\
\ Server displays the authentication and consent user interface pages\
\ to the End-User. The defined values are: page: The Authorization Server\
\ SHOULD display the authentication and consent UI consistent with a full\
\ User Agent page view. If the display parameter is not specified, this\
\ is the default display mode. popup: The Authorization Server SHOULD\
\ display the authentication and consent UI consistent with a popup User\
\ Agent window. The popup User Agent window should be of an appropriate\
\ size for a login-focused dialog and should not obscure the entire window\
\ that it is popping up over. touch: The Authorization Server SHOULD display\
\ the authentication and consent UI consistent with a device that leverages\
\ a touch interface. wap: The Authorization Server SHOULD display the\
\ authentication and consent UI consistent with a \\\"feature phone\\\"\
\ type display. The Authorization Server MAY also attempt to detect the\
\ capabilities of the User Agent and present an appropriate display."
type: string
id_token_hint_claims:
additionalProperties: {}
description: IDTokenHintClaims are the claims of the ID Token previously
issued by the Authorization Server being passed as a hint about the End-User's
current or past authenticated session with the Client.
type: object
login_hint:
description: LoginHint hints about the login identifier the End-User might
use to log in (if necessary). This hint can be used by an RP if it first
asks the End-User for their e-mail address (or other identifier) and then
wants to pass that value as a hint to the discovered authorization service.
This value MAY also be a phone number in the format specified for the
phone_number Claim. The use of this parameter is optional.
type: string
ui_locales:
description: "UILocales is the End-User'id preferred languages and scripts\
\ for the user interface, represented as a space-separated list of BCP47\
\ [RFC5646] language tag values, ordered by preference. For instance,\
\ the value \\\"fr-CA fr en\\\" represents a preference for French as\
\ spoken in Canada, then French (without a region designation), followed\
\ by English (without a region designation). An error SHOULD NOT result\
\ if some or all of the requested locales are not supported by the OpenID\
\ Provider."
items:
type: string
type: array
type: object
OAuth2LoginRequest:
description: OAuth2LoginRequest struct for OAuth2LoginRequest
example:
requested_access_token_audience:
- requested_access_token_audience
- requested_access_token_audience
subject: subject
oidc_context:
login_hint: login_hint
ui_locales:
- ui_locales
- ui_locales
id_token_hint_claims:
key: ""
acr_values:
- acr_values
- acr_values
display: display
challenge: challenge
client:
metadata: ""
token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg
client_uri: client_uri
jwt_bearer_grant_access_token_lifespan: jwt_bearer_grant_access_token_lifespan
jwks: ""
logo_uri: logo_uri
created_at: 2000-01-23T04:56:07.000+00:00
registration_client_uri: registration_client_uri
allowed_cors_origins:
- allowed_cors_origins
- allowed_cors_origins
refresh_token_grant_access_token_lifespan: refresh_token_grant_access_token_lifespan
registration_access_token: registration_access_token
client_id: client_id
token_endpoint_auth_method: token_endpoint_auth_method
userinfo_signed_response_alg: userinfo_signed_response_alg
authorization_code_grant_id_token_lifespan: authorization_code_grant_id_token_lifespan
authorization_code_grant_refresh_token_lifespan: authorization_code_grant_refresh_token_lifespan
client_credentials_grant_access_token_lifespan: client_credentials_grant_access_token_lifespan
updated_at: 2000-01-23T04:56:07.000+00:00
scope: scope
request_uris:
- request_uris
- request_uris
client_secret: client_secret
backchannel_logout_session_required: true
backchannel_logout_uri: backchannel_logout_uri
client_name: client_name
policy_uri: policy_uri
owner: owner
audience:
- audience
- audience
authorization_code_grant_access_token_lifespan: authorization_code_grant_access_token_lifespan
post_logout_redirect_uris:
- post_logout_redirect_uris
- post_logout_redirect_uris
grant_types:
- grant_types
- grant_types
subject_type: subject_type
refresh_token_grant_refresh_token_lifespan: refresh_token_grant_refresh_token_lifespan
redirect_uris:
- redirect_uris
- redirect_uris
sector_identifier_uri: sector_identifier_uri
frontchannel_logout_session_required: true
frontchannel_logout_uri: frontchannel_logout_uri
refresh_token_grant_id_token_lifespan: refresh_token_grant_id_token_lifespan
implicit_grant_id_token_lifespan: implicit_grant_id_token_lifespan
client_secret_expires_at: 0
implicit_grant_access_token_lifespan: implicit_grant_access_token_lifespan
jwks_uri: jwks_uri
request_object_signing_alg: request_object_signing_alg
tos_uri: tos_uri
contacts:
- contacts
- contacts
response_types:
- response_types
- response_types
session_id: session_id
skip: true
request_url: request_url
requested_scope:
- requested_scope
- requested_scope
properties:
challenge:
description: ID is the identifier (\"login challenge\") of the login request.
It is used to identify the session.
type: string
client:
$ref: '#/components/schemas/OAuth2Client'
oidc_context:
$ref: '#/components/schemas/OAuth2ConsentRequestOpenIDConnectContext'
request_url:
description: "RequestURL is the original OAuth 2.0 Authorization URL requested\
\ by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0\
\ Authorization Code or OAuth 2.0 Implicit flow. This URL is typically\
\ not needed, but might come in handy if you want to deal with additional\
\ request parameters."
type: string
requested_access_token_audience:
items:
type: string
type: array
requested_scope:
items:
type: string
type: array
session_id:
description: SessionID is the login session ID. If the user-agent reuses
a login session (via cookie / remember flag) this ID will remain the same.
If the user-agent did not have an existing authentication session (e.g.
remember is false) this will be a new random value. This value is used
as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel
logout. It's value can generally be used to associate consecutive login
requests by a certain user.
type: string
skip:
description: "Skip, if true, implies that the client has requested the same\
\ scopes from the same user previously. If true, you can skip asking the\
\ user to grant the requested scopes, and simply forward the user to the\
\ redirect URL. This feature allows you to update / set session information."
type: boolean
subject:
description: "Subject is the user ID of the end-user that authenticated.\
\ Now, that end user needs to grant or deny the scope requested by the\
\ OAuth 2.0 client. If this value is set and `skip` is true, you MUST\
\ include this subject type when accepting the login request, or the request\
\ will fail."
type: string
type: object
RecoveryAddressType:
title: RecoveryAddressType must not exceed 16 characters as that is the limitation
in the SQL Schema.
type: string
Time:
format: date-time
type: string
UUID:
format: uuid4
type: string
authenticatorAssuranceLevel:
description: "The authenticator assurance level can be one of \"aal1\", \"aal2\"\
, or \"aal3\". A higher number means that it is harder\nfor an attacker to\
\ compromise the account.\n\nGenerally, \"aal1\" implies that one authentication\
\ factor was used while AAL2 implies that two factors (e.g.\npassword + TOTP)\
\ have been used.\n\nTo learn more about these levels please head over to:\
\ https://www.ory.sh/kratos/docs/concepts/credentials"
enum:
- aal0
- aal1
- aal2
- aal3
title: Authenticator Assurance Level (AAL)
type: string
batchPatchIdentitiesResponse:
description: Patch identities response
example:
identities:
- patch_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
identity: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
action: create
- patch_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
identity: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
action: create
properties:
identities:
description: The patch responses for the individual identities.
items:
$ref: '#/components/schemas/identityPatchResponse'
type: array
type: object
continueWith:
discriminator:
mapping:
set_ory_session_token: '#/components/schemas/continueWithSetOrySessionToken'
show_verification_ui: '#/components/schemas/continueWithVerificationUi'
propertyName: action
oneOf:
- $ref: '#/components/schemas/continueWithVerificationUi'
- $ref: '#/components/schemas/continueWithSetOrySessionToken'
continueWithSetOrySessionToken:
description: "Indicates that a session was issued, and the application should\
\ use this token for authenticated requests"
properties:
action:
description: |-
Action will always be `set_ory_session_token`
set_ory_session_token ContinueWithActionSetOrySessionToken
show_verification_ui ContinueWithActionShowVerificationUI
enum:
- set_ory_session_token
- show_verification_ui
type: string
x-go-enum-desc: |-
set_ory_session_token ContinueWithActionSetOrySessionToken
show_verification_ui ContinueWithActionShowVerificationUI
ory_session_token:
description: Token is the token of the session
type: string
required:
- action
- ory_session_token
type: object
continueWithVerificationUi:
description: "Indicates, that the UI flow could be continued by showing a verification\
\ ui"
properties:
action:
description: |-
Action will always be `show_verification_ui`
set_ory_session_token ContinueWithActionSetOrySessionToken
show_verification_ui ContinueWithActionShowVerificationUI
enum:
- set_ory_session_token
- show_verification_ui
type: string
x-go-enum-desc: |-
set_ory_session_token ContinueWithActionSetOrySessionToken
show_verification_ui ContinueWithActionShowVerificationUI
flow:
$ref: '#/components/schemas/continueWithVerificationUiFlow'
required:
- action
- flow
type: object
continueWithVerificationUiFlow:
properties:
id:
description: The ID of the verification flow
format: uuid
type: string
url:
description: The URL of the verification flow
type: string
verifiable_address:
description: The address that should be verified in this flow
type: string
required:
- id
- verifiable_address
type: object
courierMessageStatus:
description: A Message's Status
enum:
- queued
- sent
- processing
- abandoned
type: string
courierMessageType:
description: It can either be `email` or `phone`
enum:
- email
- phone
title: A Message's Type
type: string
createIdentityBody:
description: Create Identity Body
properties:
credentials:
$ref: '#/components/schemas/identityWithCredentials'
metadata_admin:
description: Store metadata about the user which is only accessible through
admin APIs such as `GET /admin/identities/`.
metadata_public:
description: |-
Store metadata about the identity which the identity itself can see when calling for example the
session endpoint. Do not store sensitive information (e.g. credit score) about the identity in this field.
recovery_addresses:
description: |-
RecoveryAddresses contains all the addresses that can be used to recover an identity.
Use this structure to import recovery addresses for an identity. Please keep in mind
that the address needs to be represented in the Identity Schema or this field will be overwritten
on the next identity update.
items:
$ref: '#/components/schemas/recoveryIdentityAddress'
type: array
schema_id:
description: SchemaID is the ID of the JSON Schema to be used for validating
the identity's traits.
type: string
state:
$ref: '#/components/schemas/identityState'
traits:
description: "Traits represent an identity's traits. The identity is able\
\ to create, modify, and delete traits\nin a self-service manner. The\
\ input will always be validated against the JSON Schema defined\nin `schema_url`."
type: object
verifiable_addresses:
description: |-
VerifiableAddresses contains all the addresses that can be verified by the user.
Use this structure to import verified addresses for an identity. Please keep in mind
that the address needs to be represented in the Identity Schema or this field will be overwritten
on the next identity update.
items:
$ref: '#/components/schemas/verifiableIdentityAddress'
type: array
required:
- schema_id
- traits
type: object
createRecoveryCodeForIdentityBody:
description: Create Recovery Code for Identity Request Body
properties:
expires_in:
description: |-
Code Expires In
The recovery code will expire after that amount of time has passed. Defaults to the configuration value of
`selfservice.methods.code.config.lifespan`.
pattern: "^([0-9]+(ns|us|ms|s|m|h))*$"
type: string
identity_id:
description: |-
Identity to Recover
The identity's ID you wish to recover.
format: uuid
type: string
required:
- identity_id
type: object
createRecoveryLinkForIdentityBody:
description: Create Recovery Link for Identity Request Body
properties:
expires_in:
description: |-
Link Expires In
The recovery link will expire after that amount of time has passed. Defaults to the configuration value of
`selfservice.methods.code.config.lifespan`.
pattern: "^[0-9]+(ns|us|ms|s|m|h)$"
type: string
identity_id:
description: |-
Identity to Recover
The identity's ID you wish to recover.
format: uuid
type: string
required:
- identity_id
type: object
deleteMySessionsCount:
description: Deleted Session Count
example:
count: 0
properties:
count:
description: The number of sessions that were revoked.
format: int64
type: integer
type: object
errorAuthenticatorAssuranceLevelNotSatisfied:
properties:
error:
$ref: '#/components/schemas/genericError'
redirect_browser_to:
description: Points to where to redirect the user to next.
type: string
title: Is returned when an active session was found but the requested AAL is
not satisfied.
type: object
errorBrowserLocationChangeRequired:
properties:
error:
$ref: '#/components/schemas/errorGeneric'
redirect_browser_to:
description: Points to where to redirect the user to next.
type: string
title: Is sent when a flow requires a browser to change its location.
type: object
errorFlowReplaced:
description: Is sent when a flow is replaced by a different flow of the same
class
properties:
error:
$ref: '#/components/schemas/genericError'
use_flow_id:
description: The flow ID that should be used for the new flow as it contains
the correct messages.
format: uuid
type: string
type: object
errorGeneric:
description: The standard Ory JSON API error format.
properties:
error:
$ref: '#/components/schemas/genericError'
required:
- error
title: JSON API Error Response
type: object
flowError:
example:
updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
error: "{}"
properties:
created_at:
description: CreatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
error:
type: object
id:
description: ID of the error container.
format: uuid
type: string
updated_at:
description: UpdatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
required:
- id
type: object
genericError:
properties:
code:
description: The status code
example: 404
format: int64
type: integer
debug:
description: |-
Debug information
This field is often not exposed to protect against leaking
sensitive information.
example: SQL field "foo" is not a bool.
type: string
details:
additionalProperties: false
description: Further error details
type: object
id:
description: |-
The error ID
Useful when trying to identify various errors in application logic.
type: string
message:
description: |-
Error message
The error's message.
example: The resource could not be found
type: string
reason:
description: A human-readable reason for the error
example: User with ID 1234 does not exist.
type: string
request:
description: |-
The request ID
The request ID is often exposed internally in order to trace
errors across service architectures. This is often a UUID.
example: d7ef54b1-ec15-46e6-bccb-524b82c035e6
type: string
status:
description: The status description
example: Not Found
type: string
required:
- message
type: object
healthNotReadyStatus:
properties:
errors:
additionalProperties:
type: string
description: Errors contains a list of errors that caused the not ready
status.
type: object
type: object
healthStatus:
properties:
status:
description: Status always contains "ok".
type: string
type: object
identity:
description: "An [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model)\
\ represents a (human) user in Ory."
example:
traits: ""
credentials:
key:
updated_at: 2000-01-23T04:56:07.000+00:00
identifiers:
- identifiers
- identifiers
created_at: 2000-01-23T04:56:07.000+00:00
type: null
config: "{}"
version: 0
state_changed_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
recovery_addresses:
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
metadata_admin: ""
updated_at: 2000-01-23T04:56:07.000+00:00
verifiable_addresses:
- updated_at: 2014-01-01T23:28:56.782Z
verified_at: 2000-01-23T04:56:07.000+00:00
verified: true
created_at: 2014-01-01T23:28:56.782Z
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
status: status
via: via
- updated_at: 2014-01-01T23:28:56.782Z
verified_at: 2000-01-23T04:56:07.000+00:00
verified: true
created_at: 2014-01-01T23:28:56.782Z
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
status: status
via: via
schema_id: schema_id
schema_url: schema_url
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
state: null
metadata_public: ""
properties:
created_at:
description: CreatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
credentials:
additionalProperties:
$ref: '#/components/schemas/identityCredentials'
description: Credentials represents all credentials that can be used for
authenticating this identity.
type: object
id:
description: |-
ID is the identity's unique identifier.
The Identity ID can not be changed and can not be chosen. This ensures future
compatibility and optimization for distributed stores such as CockroachDB.
format: uuid
type: string
metadata_admin:
description: "NullJSONRawMessage represents a json.RawMessage that works\
\ well with JSON, SQL, and Swagger and is NULLable-"
nullable: true
metadata_public:
description: "NullJSONRawMessage represents a json.RawMessage that works\
\ well with JSON, SQL, and Swagger and is NULLable-"
nullable: true
recovery_addresses:
description: RecoveryAddresses contains all the addresses that can be used
to recover an identity.
items:
$ref: '#/components/schemas/recoveryIdentityAddress'
type: array
x-omitempty: true
schema_id:
description: SchemaID is the ID of the JSON Schema to be used for validating
the identity's traits.
type: string
schema_url:
description: "SchemaURL is the URL of the endpoint where the identity's\
\ traits schema can be fetched from.\n\nformat: url"
type: string
state:
$ref: '#/components/schemas/identityState'
state_changed_at:
format: date-time
title: NullTime implements sql.NullTime functionality.
type: string
traits:
description: "Traits represent an identity's traits. The identity is able\
\ to create, modify, and delete traits\nin a self-service manner. The\
\ input will always be validated against the JSON Schema defined\nin `schema_url`."
updated_at:
description: UpdatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
verifiable_addresses:
description: VerifiableAddresses contains all the addresses that can be
verified by the user.
items:
$ref: '#/components/schemas/verifiableIdentityAddress'
type: array
x-omitempty: true
required:
- id
- schema_id
- schema_url
- traits
title: Identity represents an Ory Kratos identity
type: object
identityCredentials:
description: Credentials represents a specific credential type
example:
updated_at: 2000-01-23T04:56:07.000+00:00
identifiers:
- identifiers
- identifiers
created_at: 2000-01-23T04:56:07.000+00:00
type: null
config: "{}"
version: 0
properties:
config:
title: "JSONRawMessage represents a json.RawMessage that works well with\
\ JSON, SQL, and Swagger."
type: object
created_at:
description: CreatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
identifiers:
description: Identifiers represents a list of unique identifiers this credential
type matches.
items:
type: string
type: array
type:
$ref: '#/components/schemas/identityCredentialsType'
updated_at:
description: UpdatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
version:
description: Version refers to the version of the credential. Useful when
changing the config schema.
format: int64
type: integer
type: object
identityCredentialsOidc:
properties:
providers:
items:
$ref: '#/components/schemas/identityCredentialsOidcProvider'
type: array
title: CredentialsOIDC is contains the configuration for credentials of the
type oidc.
type: object
identityCredentialsOidcProvider:
properties:
initial_access_token:
type: string
initial_id_token:
type: string
initial_refresh_token:
type: string
provider:
type: string
subject:
type: string
title: CredentialsOIDCProvider is contains a specific OpenID COnnect credential
for a particular connection (e.g. Google).
type: object
identityCredentialsPassword:
properties:
hashed_password:
description: HashedPassword is a hash-representation of the password.
type: string
title: CredentialsPassword is contains the configuration for credentials of
the type password.
type: object
identityCredentialsType:
description: and so on.
enum:
- password
- totp
- oidc
- webauthn
- lookup_secret
title: "CredentialsType represents several different credential types, like\
\ password credentials, passwordless credentials,"
type: string
identityPatch:
description: Payload for patching an identity
properties:
create:
$ref: '#/components/schemas/createIdentityBody'
patch_id:
description: "The ID of this patch.\n\nThe patch ID is optional. If specified,\
\ the ID will be returned in the\nresponse, so consumers of this API can\
\ correlate the response with the\npatch."
format: uuid
type: string
type: object
identityPatchResponse:
description: Response for a single identity patch
example:
patch_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
identity: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
action: create
properties:
action:
description: |-
The action for this specific patch
create ActionCreate Create this identity.
enum:
- create
type: string
x-go-enum-desc: create ActionCreate Create this identity.
identity:
description: The identity ID payload of this patch
format: uuid
type: string
patch_id:
description: "The ID of this patch response, if an ID was specified in the\
\ patch."
format: uuid
type: string
type: object
identitySchema:
description: Raw JSON Schema
type: object
identitySchemaContainer:
description: An Identity JSON Schema Container
example:
schema: "{}"
id: id
properties:
id:
description: The ID of the Identity JSON Schema
type: string
schema:
description: The actual Identity JSON Schema
type: object
type: object
identitySchemas:
description: List of Identity JSON Schemas
items:
$ref: '#/components/schemas/identitySchemaContainer'
type: array
identityState:
description: The state can either be `active` or `inactive`.
enum:
- active
- inactive
title: An Identity's State
type: string
identityTraits:
description: "Traits represent an identity's traits. The identity is able to\
\ create, modify, and delete traits\nin a self-service manner. The input will\
\ always be validated against the JSON Schema defined\nin `schema_url`."
identityVerifiableAddressStatus:
description: VerifiableAddressStatus must not exceed 16 characters as that is
the limitation in the SQL Schema
type: string
identityVerifiableAddressType:
description: VerifiableAddressType must not exceed 16 characters as that is
the limitation in the SQL Schema
type: string
identityWithCredentials:
description: Create Identity and Import Credentials
properties:
oidc:
$ref: '#/components/schemas/identityWithCredentialsOidc'
password:
$ref: '#/components/schemas/identityWithCredentialsPassword'
type: object
identityWithCredentialsOidc:
description: Create Identity and Import Social Sign In Credentials
properties:
config:
$ref: '#/components/schemas/identityWithCredentialsOidcConfig'
type: object
identityWithCredentialsOidcConfig:
properties:
config:
$ref: '#/components/schemas/identityWithCredentialsPasswordConfig'
providers:
description: A list of OpenID Connect Providers
items:
$ref: '#/components/schemas/identityWithCredentialsOidcConfigProvider'
type: array
type: object
identityWithCredentialsOidcConfigProvider:
description: Create Identity and Import Social Sign In Credentials Configuration
properties:
provider:
description: The OpenID Connect provider to link the subject to. Usually
something like `google` or `github`.
type: string
subject:
description: The subject (`sub`) of the OpenID Connect connection. Usually
the `sub` field of the ID Token.
type: string
required:
- provider
- subject
type: object
identityWithCredentialsPassword:
description: Create Identity and Import Password Credentials
properties:
config:
$ref: '#/components/schemas/identityWithCredentialsPasswordConfig'
type: object
identityWithCredentialsPasswordConfig:
description: Create Identity and Import Password Credentials Configuration
properties:
hashed_password:
description: "The hashed password in [PHC format]( https://www.ory.sh/docs/kratos/concepts/credentials/username-email-password#hashed-password-format)"
type: string
password:
description: The password in plain text if no hash is available.
type: string
type: object
jsonPatch:
description: A JSONPatch document as defined by RFC 6902
properties:
from:
description: "This field is used together with operation \"move\" and uses\
\ JSON Pointer notation.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5)."
example: /name
type: string
op:
description: "The operation to be performed. One of \"add\", \"remove\"\
, \"replace\", \"move\", \"copy\", or \"test\"."
example: replace
type: string
path:
description: "The path to the target path. Uses JSON pointer notation.\n\
\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5)."
example: /name
type: string
value:
description: "The value to be used within the operations.\n\nLearn more\
\ [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5)."
example: foobar
required:
- op
- path
type: object
jsonPatchDocument:
description: A JSONPatchDocument request
items:
$ref: '#/components/schemas/jsonPatch'
type: array
loginFlow:
description: "This object represents a login flow. A login flow is initiated\
\ at the \"Initiate Login API / Browser Flow\"\nendpoint by a client.\n\n\
Once a login flow is completed successfully, a session cookie or session token\
\ will be issued."
example:
requested_aal: null
active: null
created_at: 2000-01-23T04:56:07.000+00:00
refresh: true
return_to: return_to
type: type
issued_at: 2000-01-23T04:56:07.000+00:00
request_url: request_url
expires_at: 2000-01-23T04:56:07.000+00:00
oauth2_login_request:
requested_access_token_audience:
- requested_access_token_audience
- requested_access_token_audience
subject: subject
oidc_context:
login_hint: login_hint
ui_locales:
- ui_locales
- ui_locales
id_token_hint_claims:
key: ""
acr_values:
- acr_values
- acr_values
display: display
challenge: challenge
client:
metadata: ""
token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg
client_uri: client_uri
jwt_bearer_grant_access_token_lifespan: jwt_bearer_grant_access_token_lifespan
jwks: ""
logo_uri: logo_uri
created_at: 2000-01-23T04:56:07.000+00:00
registration_client_uri: registration_client_uri
allowed_cors_origins:
- allowed_cors_origins
- allowed_cors_origins
refresh_token_grant_access_token_lifespan: refresh_token_grant_access_token_lifespan
registration_access_token: registration_access_token
client_id: client_id
token_endpoint_auth_method: token_endpoint_auth_method
userinfo_signed_response_alg: userinfo_signed_response_alg
authorization_code_grant_id_token_lifespan: authorization_code_grant_id_token_lifespan
authorization_code_grant_refresh_token_lifespan: authorization_code_grant_refresh_token_lifespan
client_credentials_grant_access_token_lifespan: client_credentials_grant_access_token_lifespan
updated_at: 2000-01-23T04:56:07.000+00:00
scope: scope
request_uris:
- request_uris
- request_uris
client_secret: client_secret
backchannel_logout_session_required: true
backchannel_logout_uri: backchannel_logout_uri
client_name: client_name
policy_uri: policy_uri
owner: owner
audience:
- audience
- audience
authorization_code_grant_access_token_lifespan: authorization_code_grant_access_token_lifespan
post_logout_redirect_uris:
- post_logout_redirect_uris
- post_logout_redirect_uris
grant_types:
- grant_types
- grant_types
subject_type: subject_type
refresh_token_grant_refresh_token_lifespan: refresh_token_grant_refresh_token_lifespan
redirect_uris:
- redirect_uris
- redirect_uris
sector_identifier_uri: sector_identifier_uri
frontchannel_logout_session_required: true
frontchannel_logout_uri: frontchannel_logout_uri
refresh_token_grant_id_token_lifespan: refresh_token_grant_id_token_lifespan
implicit_grant_id_token_lifespan: implicit_grant_id_token_lifespan
client_secret_expires_at: 0
implicit_grant_access_token_lifespan: implicit_grant_access_token_lifespan
jwks_uri: jwks_uri
request_object_signing_alg: request_object_signing_alg
tos_uri: tos_uri
contacts:
- contacts
- contacts
response_types:
- response_types
- response_types
session_id: session_id
skip: true
request_url: request_url
requested_scope:
- requested_scope
- requested_scope
ui:
nodes:
- meta:
label:
context: "{}"
id: 6
text: text
type: info
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
attributes: null
type: text
group: default
- meta:
label:
context: "{}"
id: 6
text: text
type: info
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
attributes: null
type: text
group: default
method: method
action: action
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
updated_at: 2000-01-23T04:56:07.000+00:00
oauth2_login_challenge: oauth2_login_challenge
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
properties:
active:
$ref: '#/components/schemas/identityCredentialsType'
created_at:
description: CreatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
expires_at:
description: "ExpiresAt is the time (UTC) when the flow expires. If the\
\ user still wishes to log in,\na new flow has to be initiated."
format: date-time
type: string
id:
description: "ID represents the flow's unique ID. When performing the login\
\ flow, this\nrepresents the id in the login UI's query parameter: http:///?flow="
format: uuid
type: string
issued_at:
description: IssuedAt is the time (UTC) when the flow started.
format: date-time
type: string
oauth2_login_challenge:
format: uuid4
nullable: true
type: string
oauth2_login_request:
$ref: '#/components/schemas/OAuth2LoginRequest'
refresh:
description: Refresh stores whether this login flow should enforce re-authentication.
type: boolean
request_url:
description: |-
RequestURL is the initial URL that was requested from Ory Kratos. It can be used
to forward information contained in the URL's path or query for example.
type: string
requested_aal:
$ref: '#/components/schemas/authenticatorAssuranceLevel'
return_to:
description: ReturnTo contains the requested return_to URL.
type: string
type:
description: The flow type can either be `api` or `browser`.
title: Type is the flow type.
type: string
ui:
$ref: '#/components/schemas/uiContainer'
updated_at:
description: UpdatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
required:
- expires_at
- id
- issued_at
- request_url
- type
- ui
title: Login Flow
type: object
logoutFlow:
description: Logout Flow
example:
logout_url: logout_url
logout_token: logout_token
properties:
logout_token:
description: LogoutToken can be used to perform logout using AJAX.
type: string
logout_url:
description: "LogoutURL can be opened in a browser to sign the user out.\n\
\nformat: uri"
type: string
required:
- logout_token
- logout_url
type: object
message:
example:
dispatches:
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
message_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
error: "{}"
status: failed
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
message_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
error: "{}"
status: failed
updated_at: 2000-01-23T04:56:07.000+00:00
subject: subject
recipient: recipient
created_at: 2000-01-23T04:56:07.000+00:00
send_count: 0
template_type: recovery_invalid
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
body: body
type: null
status: null
properties:
body:
type: string
created_at:
description: CreatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
dispatches:
description: "Dispatches store information about the attempts of delivering\
\ a message\nMay contain an error if any happened, or just the `success`\
\ state."
items:
$ref: '#/components/schemas/messageDispatch'
type: array
id:
format: uuid
type: string
recipient:
type: string
send_count:
format: int64
type: integer
status:
$ref: '#/components/schemas/courierMessageStatus'
subject:
type: string
template_type:
description: |2-
recovery_invalid TypeRecoveryInvalid
recovery_valid TypeRecoveryValid
recovery_code_invalid TypeRecoveryCodeInvalid
recovery_code_valid TypeRecoveryCodeValid
verification_invalid TypeVerificationInvalid
verification_valid TypeVerificationValid
verification_code_invalid TypeVerificationCodeInvalid
verification_code_valid TypeVerificationCodeValid
otp TypeOTP
stub TypeTestStub
enum:
- recovery_invalid
- recovery_valid
- recovery_code_invalid
- recovery_code_valid
- verification_invalid
- verification_valid
- verification_code_invalid
- verification_code_valid
- otp
- stub
type: string
x-go-enum-desc: |-
recovery_invalid TypeRecoveryInvalid
recovery_valid TypeRecoveryValid
recovery_code_invalid TypeRecoveryCodeInvalid
recovery_code_valid TypeRecoveryCodeValid
verification_invalid TypeVerificationInvalid
verification_valid TypeVerificationValid
verification_code_invalid TypeVerificationCodeInvalid
verification_code_valid TypeVerificationCodeValid
otp TypeOTP
stub TypeTestStub
type:
$ref: '#/components/schemas/courierMessageType'
updated_at:
description: UpdatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
required:
- body
- created_at
- id
- recipient
- send_count
- status
- subject
- template_type
- type
- updated_at
type: object
messageDispatch:
description: |-
MessageDispatch represents an attempt of sending a courier message
It contains the status of the attempt (failed or successful) and the error if any occured
example:
updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
message_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
error: "{}"
status: failed
properties:
created_at:
description: CreatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
error:
title: "JSONRawMessage represents a json.RawMessage that works well with\
\ JSON, SQL, and Swagger."
type: object
id:
description: The ID of this message dispatch
format: uuid
type: string
message_id:
description: The ID of the message being dispatched
format: uuid
type: string
status:
description: |-
The status of this dispatch
Either "failed" or "success"
failed CourierMessageDispatchStatusFailed
success CourierMessageDispatchStatusSuccess
enum:
- failed
- success
type: string
x-go-enum-desc: |-
failed CourierMessageDispatchStatusFailed
success CourierMessageDispatchStatusSuccess
updated_at:
description: UpdatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
required:
- created_at
- id
- message_id
- status
- updated_at
type: object
needsPrivilegedSessionError:
properties:
error:
$ref: '#/components/schemas/genericError'
redirect_browser_to:
description: Points to where to redirect the user to next.
type: string
required:
- redirect_browser_to
title: Is sent when a privileged session is required to perform the settings
update.
type: object
nullDuration:
nullable: true
pattern: "^[0-9]+(ns|us|ms|s|m|h)$"
type: string
nullInt64:
nullable: true
type: integer
nullJsonRawMessage:
description: "NullJSONRawMessage represents a json.RawMessage that works well\
\ with JSON, SQL, and Swagger and is NULLable-"
nullable: true
nullTime:
format: date-time
title: NullTime implements sql.NullTime functionality.
type: string
pagination:
properties:
page:
default: 1
description: "Pagination Page\n\nThis value is currently an integer, but\
\ it is not sequential. The value is not the page number, but a\nreference.\
\ The next page can be any number and some numbers might return an empty\
\ list.\n\nFor example, page 2 might not follow after page 1. And even\
\ if page 3 and 5 exist, but page 4 might not exist."
format: int64
minimum: 1
type: integer
per_page:
default: 250
description: |-
Items per Page
This is the number of items per page.
format: int64
maximum: 1000
minimum: 1
type: integer
type: object
patchIdentitiesBody:
description: Patch Identities Body
properties:
identities:
description: |-
Identities holds the list of patches to apply
required
items:
$ref: '#/components/schemas/identityPatch'
type: array
type: object
performNativeLogoutBody:
description: Perform Native Logout Request Body
properties:
session_token:
description: |-
The Session Token
Invalidate this session token.
type: string
required:
- session_token
type: object
recoveryCodeForIdentity:
description: Used when an administrator creates a recovery code for an identity.
example:
expires_at: 2000-01-23T04:56:07.000+00:00
recovery_code: recovery_code
recovery_link: recovery_link
properties:
expires_at:
description: |-
Expires At is the timestamp of when the recovery flow expires
The timestamp when the recovery link expires.
format: date-time
type: string
recovery_code:
description: RecoveryCode is the code that can be used to recover the account
type: string
recovery_link:
description: |-
RecoveryLink with flow
This link opens the recovery UI with an empty `code` field.
type: string
required:
- recovery_code
- recovery_link
title: Recovery Code for Identity
type: object
recoveryFlow:
description: "This request is used when an identity wants to recover their account.\n\
\nWe recommend reading the [Account Recovery Documentation](../self-service/flows/password-reset-account-recovery)"
example:
expires_at: 2000-01-23T04:56:07.000+00:00
ui:
nodes:
- meta:
label:
context: "{}"
id: 6
text: text
type: info
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
attributes: null
type: text
group: default
- meta:
label:
context: "{}"
id: 6
text: text
type: info
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
attributes: null
type: text
group: default
method: method
action: action
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
active: active
return_to: return_to
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
state: null
type: type
issued_at: 2000-01-23T04:56:07.000+00:00
request_url: request_url
properties:
active:
description: "Active, if set, contains the recovery method that is being\
\ used. It is initially\nnot set."
type: string
expires_at:
description: "ExpiresAt is the time (UTC) when the request expires. If the\
\ user still wishes to update the setting,\na new request has to be initiated."
format: date-time
type: string
id:
description: "ID represents the request's unique ID. When performing the\
\ recovery flow, this\nrepresents the id in the recovery ui's query parameter:\
\ http://?request="
format: uuid
type: string
issued_at:
description: IssuedAt is the time (UTC) when the request occurred.
format: date-time
type: string
request_url:
description: |-
RequestURL is the initial URL that was requested from Ory Kratos. It can be used
to forward information contained in the URL's path or query for example.
type: string
return_to:
description: ReturnTo contains the requested return_to URL.
type: string
state:
$ref: '#/components/schemas/recoveryFlowState'
type:
description: The flow type can either be `api` or `browser`.
title: Type is the flow type.
type: string
ui:
$ref: '#/components/schemas/uiContainer'
required:
- expires_at
- id
- issued_at
- request_url
- state
- type
- ui
title: A Recovery Flow
type: object
recoveryFlowState:
description: "The state represents the state of the recovery flow.\n\nchoose_method:\
\ ask the user to choose a method (e.g. recover account via email)\nsent_email:\
\ the email has been sent to the user\npassed_challenge: the request was successful\
\ and the recovery challenge was passed."
enum:
- choose_method
- sent_email
- passed_challenge
title: Recovery Flow State
type: string
recoveryIdentityAddress:
example:
updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
properties:
created_at:
description: CreatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
id:
format: uuid
type: string
updated_at:
description: UpdatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
value:
type: string
via:
title: RecoveryAddressType must not exceed 16 characters as that is the
limitation in the SQL Schema.
type: string
required:
- id
- value
- via
type: object
recoveryLinkForIdentity:
description: Used when an administrator creates a recovery link for an identity.
example:
expires_at: 2000-01-23T04:56:07.000+00:00
recovery_link: recovery_link
properties:
expires_at:
description: |-
Recovery Link Expires At
The timestamp when the recovery link expires.
format: date-time
type: string
recovery_link:
description: |-
Recovery Link
This link can be used to recover the account.
type: string
required:
- recovery_link
title: Identity Recovery Link
type: object
registrationFlow:
example:
expires_at: 2000-01-23T04:56:07.000+00:00
oauth2_login_request:
requested_access_token_audience:
- requested_access_token_audience
- requested_access_token_audience
subject: subject
oidc_context:
login_hint: login_hint
ui_locales:
- ui_locales
- ui_locales
id_token_hint_claims:
key: ""
acr_values:
- acr_values
- acr_values
display: display
challenge: challenge
client:
metadata: ""
token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg
client_uri: client_uri
jwt_bearer_grant_access_token_lifespan: jwt_bearer_grant_access_token_lifespan
jwks: ""
logo_uri: logo_uri
created_at: 2000-01-23T04:56:07.000+00:00
registration_client_uri: registration_client_uri
allowed_cors_origins:
- allowed_cors_origins
- allowed_cors_origins
refresh_token_grant_access_token_lifespan: refresh_token_grant_access_token_lifespan
registration_access_token: registration_access_token
client_id: client_id
token_endpoint_auth_method: token_endpoint_auth_method
userinfo_signed_response_alg: userinfo_signed_response_alg
authorization_code_grant_id_token_lifespan: authorization_code_grant_id_token_lifespan
authorization_code_grant_refresh_token_lifespan: authorization_code_grant_refresh_token_lifespan
client_credentials_grant_access_token_lifespan: client_credentials_grant_access_token_lifespan
updated_at: 2000-01-23T04:56:07.000+00:00
scope: scope
request_uris:
- request_uris
- request_uris
client_secret: client_secret
backchannel_logout_session_required: true
backchannel_logout_uri: backchannel_logout_uri
client_name: client_name
policy_uri: policy_uri
owner: owner
audience:
- audience
- audience
authorization_code_grant_access_token_lifespan: authorization_code_grant_access_token_lifespan
post_logout_redirect_uris:
- post_logout_redirect_uris
- post_logout_redirect_uris
grant_types:
- grant_types
- grant_types
subject_type: subject_type
refresh_token_grant_refresh_token_lifespan: refresh_token_grant_refresh_token_lifespan
redirect_uris:
- redirect_uris
- redirect_uris
sector_identifier_uri: sector_identifier_uri
frontchannel_logout_session_required: true
frontchannel_logout_uri: frontchannel_logout_uri
refresh_token_grant_id_token_lifespan: refresh_token_grant_id_token_lifespan
implicit_grant_id_token_lifespan: implicit_grant_id_token_lifespan
client_secret_expires_at: 0
implicit_grant_access_token_lifespan: implicit_grant_access_token_lifespan
jwks_uri: jwks_uri
request_object_signing_alg: request_object_signing_alg
tos_uri: tos_uri
contacts:
- contacts
- contacts
response_types:
- response_types
- response_types
session_id: session_id
skip: true
request_url: request_url
requested_scope:
- requested_scope
- requested_scope
transient_payload: "{}"
ui:
nodes:
- meta:
label:
context: "{}"
id: 6
text: text
type: info
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
attributes: null
type: text
group: default
- meta:
label:
context: "{}"
id: 6
text: text
type: info
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
attributes: null
type: text
group: default
method: method
action: action
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
oauth2_login_challenge: oauth2_login_challenge
active: null
return_to: return_to
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
type: type
issued_at: 2000-01-23T04:56:07.000+00:00
request_url: request_url
properties:
active:
$ref: '#/components/schemas/identityCredentialsType'
expires_at:
description: "ExpiresAt is the time (UTC) when the flow expires. If the\
\ user still wishes to log in,\na new flow has to be initiated."
format: date-time
type: string
id:
description: "ID represents the flow's unique ID. When performing the registration\
\ flow, this\nrepresents the id in the registration ui's query parameter:\
\ http:///?flow="
format: uuid
type: string
issued_at:
description: IssuedAt is the time (UTC) when the flow occurred.
format: date-time
type: string
oauth2_login_challenge:
format: uuid4
nullable: true
type: string
oauth2_login_request:
$ref: '#/components/schemas/OAuth2LoginRequest'
request_url:
description: |-
RequestURL is the initial URL that was requested from Ory Kratos. It can be used
to forward information contained in the URL's path or query for example.
type: string
return_to:
description: ReturnTo contains the requested return_to URL.
type: string
transient_payload:
description: TransientPayload is used to pass data from the registration
to a webhook
type: object
type:
description: The flow type can either be `api` or `browser`.
title: Type is the flow type.
type: string
ui:
$ref: '#/components/schemas/uiContainer'
required:
- expires_at
- id
- issued_at
- request_url
- type
- ui
type: object
selfServiceFlowExpiredError:
description: Is sent when a flow is expired
properties:
error:
$ref: '#/components/schemas/genericError'
expired_at:
description: When the flow has expired
format: date-time
type: string
since:
description: |-
A Duration represents the elapsed time between two instants
as an int64 nanosecond count. The representation limits the
largest representable duration to approximately 290 years.
format: int64
type: integer
use_flow_id:
description: The flow ID that should be used for the new flow as it contains
the correct messages.
format: uuid
type: string
type: object
selfServiceFlowType:
description: The flow type can either be `api` or `browser`.
title: Type is the flow type.
type: string
session:
description: A Session
example:
expires_at: 2000-01-23T04:56:07.000+00:00
devices:
- location: location
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
ip_address: ip_address
user_agent: user_agent
- location: location
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
ip_address: ip_address
user_agent: user_agent
authentication_methods:
- completed_at: 2000-01-23T04:56:07.000+00:00
method: link_recovery
aal: null
- completed_at: 2000-01-23T04:56:07.000+00:00
method: link_recovery
aal: null
authenticator_assurance_level: null
identity:
traits: ""
credentials:
key:
updated_at: 2000-01-23T04:56:07.000+00:00
identifiers:
- identifiers
- identifiers
created_at: 2000-01-23T04:56:07.000+00:00
type: null
config: "{}"
version: 0
state_changed_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
recovery_addresses:
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
metadata_admin: ""
updated_at: 2000-01-23T04:56:07.000+00:00
verifiable_addresses:
- updated_at: 2014-01-01T23:28:56.782Z
verified_at: 2000-01-23T04:56:07.000+00:00
verified: true
created_at: 2014-01-01T23:28:56.782Z
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
status: status
via: via
- updated_at: 2014-01-01T23:28:56.782Z
verified_at: 2000-01-23T04:56:07.000+00:00
verified: true
created_at: 2014-01-01T23:28:56.782Z
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
status: status
via: via
schema_id: schema_id
schema_url: schema_url
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
state: null
metadata_public: ""
authenticated_at: 2000-01-23T04:56:07.000+00:00
active: true
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
issued_at: 2000-01-23T04:56:07.000+00:00
properties:
active:
description: Active state. If false the session is no longer active.
type: boolean
authenticated_at:
description: |-
The Session Authentication Timestamp
When this session was authenticated at. If multi-factor authentication was used this
is the time when the last factor was authenticated (e.g. the TOTP code challenge was completed).
format: date-time
type: string
authentication_methods:
description: A list of authenticators which were used to authenticate the
session.
items:
$ref: '#/components/schemas/sessionAuthenticationMethod'
title: List of (Used) AuthenticationMethods
type: array
authenticator_assurance_level:
$ref: '#/components/schemas/authenticatorAssuranceLevel'
devices:
description: Devices has history of all endpoints where the session was
used
items:
$ref: '#/components/schemas/sessionDevice'
type: array
expires_at:
description: |-
The Session Expiry
When this session expires at.
format: date-time
type: string
id:
description: Session ID
format: uuid
type: string
identity:
$ref: '#/components/schemas/identity'
issued_at:
description: |-
The Session Issuance Timestamp
When this session was issued at. Usually equal or close to `authenticated_at`.
format: date-time
type: string
required:
- id
- identity
type: object
sessionAuthenticationMethod:
description: A singular authenticator used during authentication / login.
example:
completed_at: 2000-01-23T04:56:07.000+00:00
method: link_recovery
aal: null
properties:
aal:
$ref: '#/components/schemas/authenticatorAssuranceLevel'
completed_at:
description: When the authentication challenge was completed.
format: date-time
type: string
method:
enum:
- link_recovery
- code_recovery
- password
- totp
- oidc
- webauthn
- lookup_secret
- v0.6_legacy_session
title: The method used
type: string
title: AuthenticationMethod identifies an authentication method
type: object
sessionAuthenticationMethods:
description: A list of authenticators which were used to authenticate the session.
items:
$ref: '#/components/schemas/sessionAuthenticationMethod'
title: List of (Used) AuthenticationMethods
type: array
sessionDevice:
description: Device corresponding to a Session
example:
location: location
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
ip_address: ip_address
user_agent: user_agent
properties:
id:
description: Device record ID
format: uuid
type: string
ip_address:
description: IPAddress of the client
type: string
location:
description: Geo Location corresponding to the IP Address
type: string
user_agent:
description: UserAgent of the client
type: string
required:
- id
type: object
settingsFlow:
description: "This flow is used when an identity wants to update settings\n\
(e.g. profile data, passwords, ...) in a selfservice manner.\n\nWe recommend\
\ reading the [User Settings Documentation](../self-service/flows/user-settings)"
example:
expires_at: 2000-01-23T04:56:07.000+00:00
ui:
nodes:
- meta:
label:
context: "{}"
id: 6
text: text
type: info
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
attributes: null
type: text
group: default
- meta:
label:
context: "{}"
id: 6
text: text
type: info
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
attributes: null
type: text
group: default
method: method
action: action
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
identity:
traits: ""
credentials:
key:
updated_at: 2000-01-23T04:56:07.000+00:00
identifiers:
- identifiers
- identifiers
created_at: 2000-01-23T04:56:07.000+00:00
type: null
config: "{}"
version: 0
state_changed_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
recovery_addresses:
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
metadata_admin: ""
updated_at: 2000-01-23T04:56:07.000+00:00
verifiable_addresses:
- updated_at: 2014-01-01T23:28:56.782Z
verified_at: 2000-01-23T04:56:07.000+00:00
verified: true
created_at: 2014-01-01T23:28:56.782Z
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
status: status
via: via
- updated_at: 2014-01-01T23:28:56.782Z
verified_at: 2000-01-23T04:56:07.000+00:00
verified: true
created_at: 2014-01-01T23:28:56.782Z
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
status: status
via: via
schema_id: schema_id
schema_url: schema_url
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
state: null
metadata_public: ""
continue_with:
- null
- null
active: active
return_to: return_to
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
state: null
type: type
issued_at: 2000-01-23T04:56:07.000+00:00
request_url: request_url
properties:
active:
description: "Active, if set, contains the registration method that is being\
\ used. It is initially\nnot set."
type: string
continue_with:
description: "Contains a list of actions, that could follow this flow\n\n\
It can, for example, contain a reference to the verification flow, created\
\ as part of the user's\nregistration."
items:
$ref: '#/components/schemas/continueWith'
type: array
expires_at:
description: "ExpiresAt is the time (UTC) when the flow expires. If the\
\ user still wishes to update the setting,\na new flow has to be initiated."
format: date-time
type: string
id:
description: "ID represents the flow's unique ID. When performing the settings\
\ flow, this\nrepresents the id in the settings ui's query parameter:\
\ http://?flow="
format: uuid
type: string
identity:
$ref: '#/components/schemas/identity'
issued_at:
description: IssuedAt is the time (UTC) when the flow occurred.
format: date-time
type: string
request_url:
description: |-
RequestURL is the initial URL that was requested from Ory Kratos. It can be used
to forward information contained in the URL's path or query for example.
type: string
return_to:
description: ReturnTo contains the requested return_to URL.
type: string
state:
$ref: '#/components/schemas/settingsFlowState'
type:
description: The flow type can either be `api` or `browser`.
title: Type is the flow type.
type: string
ui:
$ref: '#/components/schemas/uiContainer'
required:
- expires_at
- id
- identity
- issued_at
- request_url
- state
- type
- ui
title: Flow represents a Settings Flow
type: object
settingsFlowState:
description: "show_form: No user data has been collected, or it is invalid,\
\ and thus the form should be shown.\nsuccess: Indicates that the settings\
\ flow has been updated successfully with the provided data.\nDone will stay\
\ true when repeatedly checking. If set to true, done will revert back to\
\ false only\nwhen a flow with invalid (e.g. \"please use a valid phone number\"\
) data was sent."
enum:
- show_form
- success
title: 'State represents the state of this flow. It knows two states:'
type: string
successfulNativeLogin:
description: The Response for Login Flows via API
example:
session_token: session_token
session:
expires_at: 2000-01-23T04:56:07.000+00:00
devices:
- location: location
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
ip_address: ip_address
user_agent: user_agent
- location: location
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
ip_address: ip_address
user_agent: user_agent
authentication_methods:
- completed_at: 2000-01-23T04:56:07.000+00:00
method: link_recovery
aal: null
- completed_at: 2000-01-23T04:56:07.000+00:00
method: link_recovery
aal: null
authenticator_assurance_level: null
identity:
traits: ""
credentials:
key:
updated_at: 2000-01-23T04:56:07.000+00:00
identifiers:
- identifiers
- identifiers
created_at: 2000-01-23T04:56:07.000+00:00
type: null
config: "{}"
version: 0
state_changed_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
recovery_addresses:
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
metadata_admin: ""
updated_at: 2000-01-23T04:56:07.000+00:00
verifiable_addresses:
- updated_at: 2014-01-01T23:28:56.782Z
verified_at: 2000-01-23T04:56:07.000+00:00
verified: true
created_at: 2014-01-01T23:28:56.782Z
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
status: status
via: via
- updated_at: 2014-01-01T23:28:56.782Z
verified_at: 2000-01-23T04:56:07.000+00:00
verified: true
created_at: 2014-01-01T23:28:56.782Z
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
status: status
via: via
schema_id: schema_id
schema_url: schema_url
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
state: null
metadata_public: ""
authenticated_at: 2000-01-23T04:56:07.000+00:00
active: true
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
issued_at: 2000-01-23T04:56:07.000+00:00
properties:
session:
$ref: '#/components/schemas/session'
session_token:
description: "The Session Token\n\nA session token is equivalent to a session\
\ cookie, but it can be sent in the HTTP Authorization\nHeader:\n\nAuthorization:\
\ bearer ${session-token}\n\nThe session token is only issued for API\
\ flows, not for Browser flows!"
type: string
required:
- session
type: object
successfulNativeRegistration:
description: The Response for Registration Flows via API
example:
session_token: session_token
identity:
traits: ""
credentials:
key:
updated_at: 2000-01-23T04:56:07.000+00:00
identifiers:
- identifiers
- identifiers
created_at: 2000-01-23T04:56:07.000+00:00
type: null
config: "{}"
version: 0
state_changed_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
recovery_addresses:
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
metadata_admin: ""
updated_at: 2000-01-23T04:56:07.000+00:00
verifiable_addresses:
- updated_at: 2014-01-01T23:28:56.782Z
verified_at: 2000-01-23T04:56:07.000+00:00
verified: true
created_at: 2014-01-01T23:28:56.782Z
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
status: status
via: via
- updated_at: 2014-01-01T23:28:56.782Z
verified_at: 2000-01-23T04:56:07.000+00:00
verified: true
created_at: 2014-01-01T23:28:56.782Z
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
status: status
via: via
schema_id: schema_id
schema_url: schema_url
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
state: null
metadata_public: ""
session:
expires_at: 2000-01-23T04:56:07.000+00:00
devices:
- location: location
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
ip_address: ip_address
user_agent: user_agent
- location: location
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
ip_address: ip_address
user_agent: user_agent
authentication_methods:
- completed_at: 2000-01-23T04:56:07.000+00:00
method: link_recovery
aal: null
- completed_at: 2000-01-23T04:56:07.000+00:00
method: link_recovery
aal: null
authenticator_assurance_level: null
identity:
traits: ""
credentials:
key:
updated_at: 2000-01-23T04:56:07.000+00:00
identifiers:
- identifiers
- identifiers
created_at: 2000-01-23T04:56:07.000+00:00
type: null
config: "{}"
version: 0
state_changed_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
recovery_addresses:
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
- updated_at: 2000-01-23T04:56:07.000+00:00
created_at: 2000-01-23T04:56:07.000+00:00
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
via: via
metadata_admin: ""
updated_at: 2000-01-23T04:56:07.000+00:00
verifiable_addresses:
- updated_at: 2014-01-01T23:28:56.782Z
verified_at: 2000-01-23T04:56:07.000+00:00
verified: true
created_at: 2014-01-01T23:28:56.782Z
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
status: status
via: via
- updated_at: 2014-01-01T23:28:56.782Z
verified_at: 2000-01-23T04:56:07.000+00:00
verified: true
created_at: 2014-01-01T23:28:56.782Z
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
value: value
status: status
via: via
schema_id: schema_id
schema_url: schema_url
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
state: null
metadata_public: ""
authenticated_at: 2000-01-23T04:56:07.000+00:00
active: true
id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
issued_at: 2000-01-23T04:56:07.000+00:00
continue_with:
- null
- null
properties:
continue_with:
description: "Contains a list of actions, that could follow this flow\n\n\
It can, for example, this will contain a reference to the verification\
\ flow, created as part of the user's\nregistration or the token of the\
\ session."
items:
$ref: '#/components/schemas/continueWith'
type: array
identity:
$ref: '#/components/schemas/identity'
session:
$ref: '#/components/schemas/session'
session_token:
description: "The Session Token\n\nThis field is only set when the session\
\ hook is configured as a post-registration hook.\n\nA session token is\
\ equivalent to a session cookie, but it can be sent in the HTTP Authorization\n\
Header:\n\nAuthorization: bearer ${session-token}\n\nThe session token\
\ is only issued for API flows, not for Browser flows!"
type: string
required:
- identity
type: object
tokenPagination:
properties:
page_size:
default: 250
description: "Items per page\n\nThis is the number of items per page to\
\ return.\nFor details on pagination please head over to the [pagination\
\ documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination)."
format: int64
maximum: 1000
minimum: 1
type: integer
page_token:
default: "1"
description: "Next Page Token\n\nThe next page token.\nFor details on pagination\
\ please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination)."
minimum: 1
type: string
type: object
tokenPaginationHeaders:
properties:
link:
description: "The link header contains pagination links.\n\nFor details\
\ on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).\n\
\nin: header"
type: string
x-total-count:
description: "The total number of clients.\n\nin: header"
type: string
type: object
uiContainer:
description: Container represents a HTML Form. The container can work with both
HTTP Form and JSON requests
example:
nodes:
- meta:
label:
context: "{}"
id: 6
text: text
type: info
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
attributes: null
type: text
group: default
- meta:
label:
context: "{}"
id: 6
text: text
type: info
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
attributes: null
type: text
group: default
method: method
action: action
messages:
- context: "{}"
id: 6
text: text
type: info
- context: "{}"
id: 6
text: text
type: info
properties:
action:
description: "Action should be used as the form action URL `