API Documentation
All API requests require bearer token authentication.
POST/api/auth/token/
Generate an API token using your email and password. This token is used to authenticate all other API endpoints.
⚠️ Security Note:
- Always use HTTPS for authentication to ensure credentials are encrypted in transit
- Never send credentials over HTTP - requests will be rejected
Request Body
{
"email": "your.email@example.com",
"password": "your_password"
}| Parameter | Type | Description |
|---|---|---|
| email (required) | string | Your registered email address |
| password (required) | string | Your account password |
Success Response (200 OK)
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_at": "2024-03-20T15:30:00Z"
}Error Response (401 Unauthorized)
{
"error": "Invalid credentials"
}Example Usage
# IMPORTANT: Always use HTTPS!
curl -X POST https://api.capstanplace.com/api/auth/token/ \
-H "Content-Type: application/json" \
-d '{"email": "your.email@example.com", "password": "your_password"}'
# The response will include a token to use in subsequent requests:
# Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...