Skip to main content
POST
/
:projectId
/
api
/
v7
/
auth
/
sign-up
Sign Up
curl --request POST \
  --url https://api.replyke.com/api/v6/:projectId/api/v7/auth/sign-up \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "password": "<string>",
  "name": "<string>",
  "username": "<string>",
  "avatar": "<string>",
  "bio": "<string>",
  "location": {
    "latitude": 123,
    "longitude": 123
  },
  "birthdate": "<string>",
  "metadata": {},
  "secureMetadata": {}
}
'
{
  "success": true,
  "accessToken": "<string>",
  "refreshToken": "<string>",
  "user": {
    "id": "<string>",
    "foreignId": {},
    "role": "<string>",
    "email": {},
    "name": {},
    "username": {},
    "avatar": {},
    "bio": {},
    "metadata": {},
    "reputation": {},
    "isVerified": {},
    "isActive": {},
    "lastActive": {},
    "suspensions": [
      {}
    ],
    "avatarFile": {},
    "bannerFile": {},
    "authMethods": [
      "<string>"
    ],
    "createdAt": "<string>"
  }
}
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.
This endpoint accepts multipart/form-data when uploading avatar or banner images. Send application/json for text-only registration.

Body Parameters

email
string
required
User’s email address. Must be a valid email format. Automatically lowercased.
password
string
required
User’s password.
name
string
Display name.
username
string
Unique username within the project. Automatically lowercased. Fails with 409 if already taken.
avatar
string
URL of the user’s avatar image. Ignored if avatarFile is also provided.
bio
string
Short bio text.
location
object
Geographic location.
birthdate
string
ISO 8601 datetime string representing the user’s date of birth.
metadata
object
Public custom key-value data attached to the user.
secureMetadata
object
Private custom key-value data. Not returned to other users.
avatarFile
file
Avatar image file (multipart). Maximum 50 MB. Must be a valid image format. Requires avatarFile.options to also be present.
bannerFile
file
Banner image file (multipart). Maximum 50 MB. Must be a valid image format. Requires bannerFile.options to also be present.

Response

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

Error Responses

{
  "error": "Email already in use",
  "field": "email",
  "code": "DUPLICATE_EMAIL"
}
{
  "error": "Username already taken",
  "field": "username",
  "code": "DUPLICATE_USERNAME"
}
{
  "error": "...",
  "code": "auth/invalid-body"
}
{
  "error": "Avatar image exceeds 50MB limit.",
  "code": "auth/file-too-large"
}
Also returned with "Banner image exceeds 50MB limit." for the banner file.
{
  "error": "Avatar file is not a valid image: ...",
  "code": "auth/invalid-image"
}
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: ...".
{
  "error": "Image options are required when uploading an avatar. Must include mode property.",
  "code": "auth/missing-image-options"
}
Returned when avatarFile or bannerFile is uploaded without the corresponding .options field.
{
  "error": "User validation failed",
  "code": "auth/validation-failed"
}

See Also