Skip to content

Sign in to an existing account

POST
/auth/login

Authenticate with email and password. Returns a JWT token for dashboard access.

object
email
required

Account email address

string format: email
Example
dev@example.com
password
required

Account password

string format: password

Authentication successful

object
data
required
object
token
required

JWT token for dashboard authentication

string
Example
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
account
required
object
id
required

Account ID (prefixed with acc_)

string
Example
acc_a1b2c3d4e5
email
required
string format: email
Example
dev@example.com
name
string
nullable
Example
Jane Developer
plan
required
string
Allowed values: trial starter pro scale
Example
trial

Request validation failed

object
error
required
object
code
required

Machine-readable error code

string
Allowed values: VALIDATION_ERROR AUTHENTICATION_ERROR NOT_FOUND CONFLICT RATE_LIMIT_EXCEEDED USAGE_LIMIT_EXCEEDED EXTERNAL_SERVICE_ERROR INTERNAL_ERROR
Example
VALIDATION_ERROR
message
required

Human-readable error message

string
Example
Invalid request body
details

Additional error details (e.g., validation issues)

object
key
additional properties
any
Example
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body",
"details": {
"issues": [
{
"path": [
"name"
],
"message": "Required"
}
]
}
}
}

Invalid credentials

object
error
required
object
code
required

Machine-readable error code

string
Allowed values: VALIDATION_ERROR AUTHENTICATION_ERROR NOT_FOUND CONFLICT RATE_LIMIT_EXCEEDED USAGE_LIMIT_EXCEEDED EXTERNAL_SERVICE_ERROR INTERNAL_ERROR
Example
VALIDATION_ERROR
message
required

Human-readable error message

string
Example
Invalid request body
details

Additional error details (e.g., validation issues)

object
key
additional properties
any
Example
{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Invalid email or password"
}
}