Skip to content

Latest commit

 

History

History
93 lines (67 loc) · 1.86 KB

reference.md

File metadata and controls

93 lines (67 loc) · 1.86 KB

API Reference

Base URLs

  • Second API version (empty scaffold): /v2

Documentation Endpoints

When environment is LOCAL, DEV, or STG:

  • /v1/docs
  • /v1/redoc
  • /v1/openapi.json
  • /v2/docs
  • /v2/redoc
  • /v2/openapi.json

Root /docs, /redoc, and /openapi.json are intentionally disabled.

Authentication Endpoints (v1)

  • POST /v1/auth/login
  • POST /v1/auth/signup
  • POST /v1/auth/refresh-token
  • POST /v1/auth/logout

User Endpoints (v1)

  • GET /v1/users/me

Item Endpoints (v1, example domain)

  • GET /v1/items
  • POST /v1/items
  • GET /v1/items/{item_id}
  • PATCH /v1/items/{item_id}
  • DELETE /v1/items/{item_id}

Health Endpoint

  • GET /health

Auth Header

Use bearer token for protected routes:

  • Authorization: Bearer <access_token>

Error Format

Errors follow FastAPI/HTTP exception responses with a detail field.

Example:

{
  "detail": "Not Found"
}

Status Code Conventions

  • 200: Success
  • 201: Created
  • 400: Bad request/domain validation failure mapping
  • 401: Authentication failure
  • 403: Forbidden
  • 403 is also returned when the CSRF check fails
  • 404: Not found
  • 429: Rate limited
  • 500: Unexpected server error