For native applications (mobile, desktop, server-to-server):
curl -X GET \ 'https://{project}.projects.oryapis.com/self-service/registration/api' \ -H 'Accept: application/json'
Additional query parameters:
return_session_token_exchange_code - Request a code to exchange for a session token after registration
Registration can be disabled in the configuration. If disabled, this endpoint returns a 400 error with message “Registration is not allowed because it was disabled.”
Status: 400 Bad RequestThe user is already authenticated. Registration is not available for authenticated users.Solution: Redirect to the default return URL or logout first.
Status: 410 GoneThe registration flow has expired.Solution: Initialize a new flow.Browser flows include a redirect_to URL in the error response.
Status: 403 ForbiddenCSRF token validation failed.Solution: Ensure cookies are properly forwarded in browser flows.
Status: 400 Bad RequestRegistration has been disabled in the configuration.Solution: Enable registration or use invitation-only flows.
# 1. Initialize the flowcurl -X GET 'https://{project}.projects.oryapis.com/self-service/registration/browser'# Browser is redirected to UI with flow ID# User visits: https://your-app.com/registration?flow=<flow_id># 2. Fetch the flowcurl -X GET \ 'https://{project}.projects.oryapis.com/self-service/registration/flows?id=<flow_id>'# 3. Submit registrationcurl -X POST \ 'https://{project}.projects.oryapis.com/self-service/registration?flow=<flow_id>' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'method=password&traits.email=user@example.com&traits.name.first=John&traits.name.last=Doe&password=secret&csrf_token=...'# Browser is redirected with session cookie set