Skip to main content
POST
/
auth
/
register
Register
curl --request POST \
  --url https://api.example.com/auth/register \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "password": "<string>",
  "displayName": "<string>"
}
'
{
  "user": {
    "id": "<string>",
    "email": "<string>",
    "name": "<string>",
    "displayName": "<string>",
    "avatarUrl": {},
    "createdAt": "<string>"
  },
  "accessToken": "<string>"
}
Register a new user account in Neuron Meet.

Request Body

email
string
required
User’s email address. Must be a valid email format.
password
string
required
User’s password. Must be between 8 and 100 characters.
displayName
string
required
User’s display name. Must be between 2 and 50 characters.

Response

user
object
The newly created user object.
id
string
Unique identifier for the user.
email
string
User’s email address.
name
string
User’s name.
displayName
string
User’s display name.
avatarUrl
string | null
URL to user’s avatar image, if set.
createdAt
string
ISO 8601 timestamp of when the user was created.
accessToken
string
JWT access token for authenticating subsequent requests. Valid for 7 days.

Example Request

curl -X POST https://api.neuronmeet.com/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "securePassword123",
    "displayName": "John Doe"
  }'

Example Response

{
  "user": {
    "id": "clx1234567890abcdef",
    "email": "[email protected]",
    "name": "John Doe",
    "displayName": "John Doe",
    "avatarUrl": null,
    "createdAt": "2024-03-15T10:30:00.000Z"
  },
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Error Responses

409 Conflict

Returned when the email address is already registered.
{
  "statusCode": 409,
  "message": "Email already registered",
  "error": "Conflict"
}

400 Bad Request

Returned when validation fails for any field.
{
  "statusCode": 400,
  "message": [
    "email must be an email",
    "password must be longer than or equal to 8 characters",
    "displayName must be longer than or equal to 2 characters"
  ],
  "error": "Bad Request"
}

Build docs developers (and LLMs) love