Sign up a new user + organization
const url = 'https://api.tovarifinancial.com/auth/signup';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","password":"example","name":"example","orgName":"example","inviteCode":"example"}'};
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://api.tovarifinancial.com/auth/signup \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "password": "example", "name": "example", "orgName": "example", "inviteCode": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "email": "hello@example.com", "password": "example", "name": "example", "orgName": "example", "inviteCode": "example"}Responses
Section titled “Responses”Account created; auth tokens issued
object
object
object
object
Examplegenerated
{ "data": { "user": { "id": "example", "email": "example", "name": "example", "orgId": "example", "role": "example" }, "tokens": { "idToken": "example", "accessToken": "example", "refreshToken": "example", "expiresIn": 1, "tokenType": "example" }, "isNewUser": true }, "message": "example", "requestId": "example", "timestamp": "2026-04-15T12:00:00Z"}Validation failed — see errorCode / fieldErrors
object
Machine-readable error code (AUTH_ERROR_CODES).
Optional field-level validation errors, keyed by field name.
object
Example
{ "errorCode": "INVALID_EMAIL_FORMAT"}Conflict. errorCode is IDEMPOTENCY_CONFLICT when an X-Idempotency-Key was replayed with a different request payload; where the operation instead detects a resource-state conflict it carries that endpoint’s own errorCode (a duplicate name, an import that is no longer committable, an account already linked to a bank connection).
object
Machine-readable error code (AUTH_ERROR_CODES).
Optional field-level validation errors, keyed by field name.
object
Example
{ "errorCode": "INVALID_EMAIL_FORMAT"}Internal error (no internal detail leaked)
object
Machine-readable error code (AUTH_ERROR_CODES).
Optional field-level validation errors, keyed by field name.
object
Example
{ "errorCode": "INVALID_EMAIL_FORMAT"}Service temporarily unavailable — errorCode is SERVICE_UNAVAILABLE. A TRANSIENT, RETRYABLE condition rather than a defect in the request: a query that exceeded its time budget, a lost or refused database connection, a saturated connection pool, or an outage at an upstream provider the request depends on (the authentication provider, or the bank data provider on a bank-connection operation). The identical request may succeed on retry — back off briefly and, on a write, resend the same X-Idempotency-Key where the operation accepts one.
object
Machine-readable error code (AUTH_ERROR_CODES).
Optional field-level validation errors, keyed by field name.
object
Example
{ "errorCode": "INVALID_EMAIL_FORMAT"}