Skip to content

REST API

Direct REST API integration without SDKs.

Authentication

All API requests require authentication:

Authorization: Bearer YOUR_ACCESS_TOKEN

Base URL

http://localhost:8000/api/sso/v1

Common Endpoints

Login

POST /auth/login
Content-Type: application/json

{
  "identifier": "[email protected]",
  "secret": "password123"
}

Get Current User

GET /me
Authorization: Bearer TOKEN

List Users

GET /users?page=1&limit=20
Authorization: Bearer TOKEN

Create User

POST /users
Authorization: Bearer TOKEN
Content-Type: application/json

{
  "identifier": "[email protected]",
  "password": "SecurePass123!",
  "roles": ["viewer"]
}

Error Responses

{
  "error": "Unauthorized",
  "detail": "Invalid token",
  "code": "TOKEN_INVALID"
}

Status Codes

  • 200 - Success
  • 201 - Created
  • 400 - Bad Request
  • 401 - Unauthorized
  • 403 - Forbidden
  • 404 - Not Found
  • 500 - Server Error

Full API Reference →