Begin sign up
const url = 'https://your-app.torii.so/_torii/auth/signup?_is_native=false';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"founder@example.com","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.torii.so/_torii/auth/signup?_is_native=false' \ --header 'Content-Type: application/json' \ --data '{ "email": "founder@example.com", "password": "example", "name": "Jane Doe", "captchaToken": "example", "legalConsentAccepted": true, "unsafeMetadata": { "onboardingStep": 0 } }'Validates the signup and emails a 6-digit verification code. No session is created until the code is verified.
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Query Parameters
Section titled “Query Parameters ”Request Body required
Section titled “Request Body required ”Payload for creating a new user within a project environment. Project environment is identified by the X-API-Key header.
object
Email address to associate with the new user
Example
founder@example.comPlain 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. Capped at 512 bytes serialized; oversized payloads are rejected with 400.
object
Example
{ "onboardingStep": 0}Responses
Section titled “ Responses ”OK
object
Example generated
{ "token": "example", "email": "example"}