Registration & Auth

Create an account, verify your email, and manage sessions.

Register

POST /auth/register

Create a developer account. A verification email is sent automatically. New accounts receive 1,000 free credits.

Request body:

{
  "email": "dev@example.com",
  "password": "securepassword",
  "company_name": "Acme Corp",
  "use_case": "MDM integration for fleet valuation"
}
FieldTypeRequiredDescription
emailstringYesValid email address
passwordstringYesMinimum 8 characters
company_namestringNoYour organization name
use_casestringNoHow you plan to use the API

Response 201

{
  "message": "Account created. Check your email to verify your address.",
  "developer_id": "550e8400-e29b-41d4-a716-446655440000"
}

Log in

POST /auth/login

Sign in and get a session token. Your email must be verified first.

Request body:

{
  "email": "dev@example.com",
  "password": "securepassword"
}

Response 200

{
  "access_token": "eyJ...",
  "refresh_token": "abc...",
  "expires_in": 3600
}

Use the access_token as a Bearer token for all /account/* endpoints. Tokens expire after expires_in seconds (1 hour).

Refresh token

POST /auth/refresh

Exchange a refresh token for a new access token.

Request body:

{
  "refresh_token": "abc..."
}

Response 200 — same shape as login response.

Forgot password

POST /auth/forgot-password

Send a password reset email. Always returns success to prevent email enumeration.

Request body:

{
  "email": "dev@example.com"
}

Response 200

{
  "message": "If an account exists with that email, a password reset link has been sent."
}