Skip to main content
POST
/
auth
/
signup
Sign Up
curl --request POST \
  --url https://api.example.com/auth/signup \
  --header 'Content-Type: application/json' \
  --data '
{
  "displayName": "<string>",
  "email": "<string>",
  "password": "<string>"
}
'
{
  "token": "<string>",
  "error": "<string>"
}

Request

displayName
string
required
The display name for the new user account
email
string
required
The email address for the new user account
password
string
required
The password for the new user account

Response

token
string
Authentication token for the newly created user

Success Response

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Error Responses

error
string
Error message describing what went wrong

400 Bad Request

Returned when required fields are missing from the request body.
{
  "error": "Invalid request: Missing required fields"
}

500 Internal Server Error

Returned when an unexpected error occurs during account creation.
{
  "error": "An unexpected error occurred. Please try again later."
}

Examples

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

Build docs developers (and LLMs) love