Skip to main content
Sign Up
Registers a new user within the specified project. On success, returns an access token, refresh token, and the created user object. The endpoint also accepts optional profile data and image file uploads for the avatar and banner. When the project requires email verification before sign-in (Dashboard → Settings → SDK → Require email verification before sign-in), sign-up works differently: it returns 202 with no session, emails a confirmation link or code, and answers the same way whether or not the email already has an account. See With email verification required.
This endpoint accepts multipart/form-data when uploading avatar or banner images. Send application/json for text-only registration.

Body Parameters

string
required
User’s email address. Must be a valid email format. Automatically lowercased.
string
required
User’s password.
string
Display name.
string
Unique username within the project. Automatically lowercased. Fails with 409 if already taken.
string
URL of the user’s avatar image. Ignored if avatarFile is also provided.
string
Short bio text.
object
Geographic location.
string
ISO 8601 datetime string representing the user’s date of birth.
object
Public custom key-value data attached to the user.
object
Custom key-value data. No API response returns it, to this user or anyone else; your backend receives it in webhooks. The user can write it themselves, so don’t store anything your app needs to trust here.
file
Avatar image file (multipart). Maximum 50 MB. Must be a valid image format. Requires avatarFile.options to also be present.
string
Stringified JSON describing how to process the avatar. Must include a mode field; see Upload Image for the modes and optional fields. Not used when no avatarFile is sent, but still validated: invalid JSON or options get a 400. A key the options don’t take, a key of another mode included (for example sizes with exact-dimensions), is refused with 400 auth/invalid-body, param naming it.
file
Banner image file (multipart). Maximum 50 MB. Must be a valid image format. Requires bannerFile.options to also be present.
string
Stringified JSON describing how to process the banner, as avatarFile.options. Not used when no bannerFile is sent, but still validated: invalid JSON or options get a 400.
object
How the confirmation email is sent when the project requires email verification before sign-in. Ignored when the setting is off. In a multipart/form-data request, send it as a JSON string.

Response

On success, returns HTTP 201 with:
boolean
true on successful registration.
string
Short-lived JWT access token. Expires in 30 minutes.
string
Long-lived JWT refresh token. Expires in 30 days.
object
The created user’s profile.

With email verification required

When the project requires email verification before sign-in, every sign-up that passes validation returns HTTP 202 with:
boolean
Always true.
boolean
Always true. No user, accessToken or refreshToken is returned: the user signs in after confirming their email.
string
Present when emailVerification.mode is "code". Keep it with the sign-up screen (in memory is enough) and send it with the code to Verify Email. If it’s lost, sign in again with the same email and password: the refused sign-in returns the verificationId of the code already sent (or of a new one, if the last email is more than 10 minutes old).
What happens behind the same answer:
  • New email — the account is created (unconfirmed) and a confirmation email is sent. The link or code lasts 24 hours.
  • Email that already has an account — nothing is created and nothing changes. Any uploaded avatar or banner is discarded. The address is sent an email saying someone tried to sign up with it, pointing to sign-in or password reset. In code mode the response still carries a verificationId, which confirms nothing.
The confirmation emails sent to one address are limited to one every 10 minutes and five a day; past that, the response is the same but no email is sent. Validation still runs first, in the same order: an invalid body, an image error, a user.created validation webhook that refuses, or a taken username still returns its error. Usernames are public through the username check, so a taken username is still reported.
The setting stops sign-up from telling a new email from a registered one, but not every way of finding out. A sign-in with the password just used at sign-up answers “confirm your email first” (403 auth/email-not-verified) for an account that sign-up created and “incorrect password” (401 auth/invalid-credentials) for one that already existed. A sign-up that sent a username shows it too: the username is taken afterwards only if sign-up created the account. With the setting off, sign-up’s 409 tells anyone whether an email is registered.

Error Responses

Only when the project doesn’t require email verification before sign-in. It tells the caller the email is registered.
emailVerification.redirectUrl isn’t an https address on one of the project’s Verified Domains (or localhost). Only checked when the project requires email verification before sign-in. Nothing is created and no email is sent.
The image is over 50 MB. param names its field: avatarFile or bannerFile.
Returned when the uploaded file cannot be parsed as an image. Also returned for the banner file with "Banner file is not a valid image." and param: "bannerFile". An image over 10000 px on a side gets the same code. error gives its size:
For bannerFile:
Returned when avatarFile or bannerFile is uploaded without the corresponding .options field. param is avatarFile.options or bannerFile.options.
The .options field isn’t valid JSON. param names the field: avatarFile.options or bannerFile.options. avatarFile.options without mode, or with a mode that isn’t one of the five (other options fields the same way, named in error and param):
In an aspect-ratio mode, a variant’s computed side would be outside 1–10000 px. Checked once the image is read, before anything is stored. param names the option:
In aspect-ratio-height-based it names a heights option and gives a width. In multi-aspect-ratio it names a sizes option, and the ratio is the one in aspectRatios closest to the image, so the text reads ”… at the 3:1 aspect ratio, the one in aspectRatios closest to this image. Each side of a variant must be 1–10000 px.” More than 30 entries in dimensions, widths, heights or sizes (one variant each). param names the option:
A variant name that uses a character other than letters, digits, _, - and ., that is longer than 64 characters, that contains .., or that is original. param names the option:
A key the options don’t take (also a key of another mode). error names the object holding it, param the key itself:
A file was refused as the body was read: auth/unsupported-file-type or auth/unexpected-file-field (a file in another field, or a second file in avatarFile or bannerFile), with param naming the field when there is one. A body over 250 MB gets 413 request/body-too-large; one that can’t be read at all gets request/invalid-multipart or request/field-too-large. See Upload errors.
Returned when avatarFile or bannerFile is uploaded on a project without the files-images bundle. missingTables lists the tables that aren’t installed and bundleId the bundle to install. While the bundle is still being installed, the response is 503 database/tables-provisioning instead. See Bundles.
Returned when your user.created validation webhook rejects the new user. error carries the message your webhook returned (User validation failed when it returned none). No user is created.
A uniqueness conflict the checks above didn’t catch (for example, two sign-ups racing for the same value). param names the field. The code is auth/username-taken, auth/email-taken or auth/foreign-id-taken when the field is one of those, auth/duplicate-field for any other.
Returned when an uploaded avatar or banner would take the project past its plan’s file-storage limit. No user is created.
Rate limit: 5 requests per 5 minutes per IP. Exceeding it returns 429 request/rate-limited, with Too many sign up attempts, please wait 5 minutes as error — distinct from the quota 429 above (project/quota-reached).

See Also