Begin sign up
const url = 'https://your-app.toriiauth.eu/_torii/auth/signup?_is_native=false';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"[email protected]","password":"example","name":"Jane Doe","captchaToken":"example","legalConsentAccepted":true,"unsafeMetadata":{"onboardingStep":0}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://your-app.toriiauth.eu/_torii/auth/signup?_is_native=false' \ --header 'Content-Type: application/json' \ --data '{ "email": "[email protected]", "password": "example", "name": "Jane Doe", "captchaToken": "example", "legalConsentAccepted": true, "unsafeMetadata": { "onboardingStep": 0 } }'Validates the signup. Emails a 6-digit code (default), or creates the session immediately when the environment disables email verification.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Query Parameters
Section titled “Query Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Payload for creating a new user within a project environment. Project environment is identified by the X-API-Key header.
object
Plain text password that will be hashed prior to persistence
User’s display name (split into first/last on the profile)
Example
Jane DoeCloudflare Turnstile CAPTCHA token (required when Turnstile is enabled)
Whether the user ticked the legal-consent checkbox on the signup form. Must be true when GET /_torii/legal reports requireConsent: true — otherwise the server rejects the signup with 422 legal_consent_required.
Optional unsafe metadata to seed on the new user. This is the only metadata bag the end-user may write. Part of the 8 KB combined metadata budget; oversized payloads are rejected with 400.
object
Example
{ "onboardingStep": 0}Responses
Section titled “Responses”OK
object
Examplegenerated
{}