POST /v1/auth/register

Register

Create a new user account.

Creates a new user account and returns an access token. A refresh token is set as an httpOnly cookie.

Rate limited to 5 requests per 60 seconds.

Body parameters

email string REQUIRED
password string REQUIRED
min length: 8max length: 128

Responses

201

400

Validation failed

409

Email already registered

Request

curl -X POST https://api.example.com/v1/auth/register \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "email": "example_email",
  "password": "example_password"
}'

Response

201 201 Created
{
  "accessToken": "example_accessToken",
  "expiresAt": 0
}