Ory Kratos API
Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs
are exposed on different ports. Public APIs can face the public internet without any protection
while administrative APIs should never be exposed without prior authorization. To protect
the administative API port you should use something like Nginx, Ory Oathkeeper, or any other
technology capable of authorizing incoming requests.
Endpoints 37
admin
- GETCheck HTTP Server Status
/health/aliveThis endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the… - GETCheck HTTP Server and Database Status
/health/readyThis endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the… - GETList Identities
/identities?per_page=100&page=0Lists all identities. Does not support search at the moment. Learn how identities work in Ory Kratos' User And Identity Model Documentation. - POSTCreate an Identity
/identitiesThis endpoint creates an identity. It is NOT possible to set an identity's credentials (password, ...) using this method! A way to achieve that will be… - GETGet an Identity
/identities/:idLearn how identities work in Ory Kratos' User And Identity Model Documentation. - PUTUpdate an Identity
/identities/:idThis endpoint updates an identity. It is NOT possible to set an identity's credentials (password, ...) using this method! A way to achieve that will be… - DELETEDelete an Identity
/identities/:idCalling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the… - GETGet snapshot metrics from the Kratos service. If you're using k8s, you can then add annotations to
your deployment like so:
/metrics/prometheusmetadata: annotations: prometheus.io/port: "4434" prometheus.io/path: "/metrics/prometheus" - POSTCreate a Recovery Link
/recovery/linkThis endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account. - GETReturn Running Software Version.
/versionThis endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the X-Forwarded-Proto header to…
public
- GETgetSchema
/schemas/:idGet a Traits Schema Definition - GETInitialize Browser-Based Logout User Flow
/self-service/browser/flows/logoutThis endpoint initializes a logout flow. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). On successful… - POSTComplete the Browser-Based Settings Flow for the OpenID Connect Strategy
/self-service/browser/flows/registration/strategies/oidc/settings/connectionsThis endpoint completes a browser-based settings flow. This is usually achieved by POSTing data to this endpoint. > This endpoint is NOT INTENDED for API… - GETGet User-Facing Self-Service Errors
/self-service/errors?error=stringThis endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI:… - GETInitialize Login Flow for API clients
/self-service/login/api?refresh=trueThis endpoint initiates a login flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is… - GETInitialize Login Flow for browsers
/self-service/login/browserThis endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to selfservice.flows.login.ui_url with the flow ID… - GETGet Login Flow
/self-service/login/flows?id=stringThis endpoint returns a login flow's context with, for example, error details and other information. More information can be found at Ory Kratos User Login… - POSTComplete Login Flow with Username/Email Password Method
/self-service/login/methods/password?flow=stringUse this endpoint to complete a login flow by sending an identity's identifier and password. This endpoint behaves differently for API and browser flows. API… - GETInitialize Recovery Flow for API Clients
/self-service/recovery/apiThis endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is… - GETInitialize Recovery Flow for Browser Clients
/self-service/recovery/browserThis endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to selfservice.flows.recovery.ui_url with… - GETGet information about a recovery flow
/self-service/recovery/flows?id=stringThis endpoint returns a recovery flow's context with, for example, error details and other information. More information can be found at Ory Kratos Account… - POSTComplete Recovery Flow with Link Method
/self-service/recovery/methods/link?token=string&flow=stringUse this endpoint to complete a recovery flow using the link method. This endpoint behaves differently for API and browser flows and has several states:… - GETInitialize Registration Flow for API clients
/self-service/registration/apiThis endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token… - GETInitialize Registration Flow for browsers
/self-service/registration/browserThis endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to selfservice.flows.registration.ui_url… - GETGet Registration Flow
/self-service/registration/flows?id=stringThis endpoint returns a registration flow's context with, for example, error details and other information. More information can be found at Ory Kratos User… - POSTComplete Registration Flow with Username/Email Password Method
/self-service/registration/methods/password?flow=stringUse this endpoint to complete a registration flow by sending an identity's traits and password. This endpoint behaves differently for API and browser flows.… - GETInitialize Settings Flow for API Clients
/self-service/settings/apiThis endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid Ory Kratos Session Token for… - GETInitialize Settings Flow for Browsers
/self-service/settings/browserThis endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to selfservice.flows.settings.ui_url with the… - GETGet Settings Flow
/self-service/settings/flows?id=stringWhen accessing this endpoint through Ory Kratos' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set.… - POSTComplete Settings Flow with Username/Email Password Method
/self-service/settings/methods/password?flow=stringUse this endpoint to complete a settings flow by sending an identity's updated password. This endpoint behaves differently for API and browser flows.… - POSTComplete Settings Flow with Profile Method
/self-service/settings/methods/profile?flow=stringUse this endpoint to complete a settings flow by sending an identity's updated traits. This endpoint behaves differently for API and browser flows.… - GETInitialize Verification Flow for API Clients
/self-service/verification/apiThis endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call… - GETInitialize Verification Flow for Browser Clients
/self-service/verification/browserThis endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to selfservice.flows.verification.ui_url… - GETGet Verification Flow
/self-service/verification/flows?id=stringThis endpoint returns a verification flow's context with, for example, error details and other information. More information can be found at Ory Kratos Email… - POSTComplete Verification Flow with Link Method
/self-service/verification/methods/link?token=string&flow=stringUse this endpoint to complete a verification flow using the link method. This endpoint behaves differently for API and browser flows and has several states:… - DELETERevoke and Invalidate a Session
/sessionsUse this endpoint to revoke a session using its token. This endpoint is particularly useful for API clients such as mobile apps to log the user out of the… - GETCheck Who the Current HTTP Session Belongs To
/sessions/whoami?Authorization=stringUses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401…
API details
- Base URL
https://{tenant}.tenants.oryapis.com/api/kratos/{api}- Authentication
- An API key in the ory_kratos_session cookie
An API key in the X-Session-Token header - Operations
- 37 operations on 34 pathsGET 25POST 9DELETE 2PUT 1
- Main resources
- public 27admin 17
- Response formats
application/json- Description format
- OpenAPI 3.0.3
- Links
- OpenAPI document
- Listed from
- Ory Kratos's published OpenAPI description (ory/kratos) (Apache-2.0)
How to test the Ory Kratos API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Ory Kratos API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the ory_kratos_session cookie. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Check HTTP Server Status” (GET /health/alive), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Ory Kratos API?
Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the… It is listed under Identity & security and has 37 endpoints.
Who publishes the Ory Kratos API?
It is listed from Ory Kratos's public API description (an OpenAPI document), not published by Ory Kratos on Swastik Codes. Anyone who controls ory.sh can claim the profile by adding a DNS TXT record.
What is the base URL of the Ory Kratos API?
Requests go to https://{tenant}.tenants.oryapis.com/api/kratos/{api}. Endpoint paths are added to this base URL.
How do I authenticate with the Ory Kratos API?
It accepts 2 methods: an API key in the ory_kratos_session cookie; an API key in the X-Session-Token header.
How many endpoints does the Ory Kratos API have?
37 operations on 34 paths (25 GET, 9 POST, 2 DELETE, 1 PUT). The largest groups are public, admin.
Is forking the Ory Kratos API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.