API Reference
Authentication Service API
API reference for user authentication and account management
The Authentication Service handles user registration, login, and account management operations.
Endpoints
Sign Up
Create a new user account with organization.
Endpoint: POST /api/auth/signup
Request Body:
Field | Type | Required | Description |
---|---|---|---|
email | string | Yes | User’s email address |
first_name | string | Yes | User’s first name |
last_name | string | Yes | User’s last name |
password | string | Yes | User’s password (must meet security requirements) |
Response:
Field | Type | Description |
---|---|---|
id | string (UUID) | The user’s unique identifier |
email | string | User’s email address |
first_name | string | User’s first name |
last_name | string | User’s last name |
Login
Authenticate a user and receive an access token.
Endpoint: POST /api/auth/login
Request Body:
Field | Type | Required | Description |
---|---|---|---|
email | string | Yes | User’s email address |
password | string | Yes | User’s password |
Response:
Field | Type | Description |
---|---|---|
access_token | string | JWT token to be used for authenticated requests |
token_type | string | The type of token (always “bearer”) |
Sign Up via Invitation
Register a new user account through an invitation.
Endpoint: POST /api/auth/signup_invite
Request Body:
Field | Type | Required | Description |
---|---|---|---|
first_name | string | Yes | User’s first name |
last_name | string | Yes | User’s last name |
password | string | Yes | User’s password |
invite_token | string | Yes | The invitation token received via email |
Response:
Field | Type | Description |
---|---|---|
id | string (UUID) | The user’s unique identifier |
email | string | User’s email address (from invitation) |
first_name | string | User’s first name |
last_name | string | User’s last name |
access_token | string | JWT token for authentication |
Error Responses
Status Code | Description |
---|---|
400 | Bad Request - Invalid input or validation error |
401 | Unauthorized - Invalid credentials |
409 | Conflict - User already exists |
422 | Unprocessable Entity - Input validation failed |
500 | Internal Server Error - Server-side error |
Authentication
Most endpoints in this service do not require authentication, as they are used for the authentication process itself. The exceptions are:
- Password reset endpoints may require a valid reset token
- Account management endpoints may require a valid JWT token
Implementation Notes
- Passwords are securely hashed using SHA-256
- JWT tokens have a configurable expiration time
- Failed login attempts are rate-limited to prevent brute force attacks
Was this page helpful?