Skip to main content

Authentication API

Manage user authentication, sessions, and API keys.

User Authentication

POST /v1/auth/login

Authenticate user and create session.
curl -X POST "https://api.whizo.ai/v1/auth/login" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "your_password"
  }'

Response

{
  "success": true,
  "data": {
    "user": {
      "id": "user_123",
      "email": "[email protected]",
      "plan": "pro"
    },
    "token": "jwt_token_here",
    "expiresIn": 3600
  }
}

API Key Management

POST /v1/auth/api-keys

Create a new API key.
curl -X POST "https://api.whizo.ai/v1/auth/api-keys" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production API Key",
    "permissions": ["scrape", "extract"],
    "rateLimit": {
      "requestsPerHour": 1000,
      "requestsPerDay": 10000
    }
  }'

GET /v1/auth/api-keys

List all API keys.
curl -X GET "https://api.whizo.ai/v1/auth/api-keys" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

DELETE /v1/auth/api-keys/{keyId}

Revoke an API key.
curl -X DELETE "https://api.whizo.ai/v1/auth/api-keys/key_123" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"