API Conventions
Success response
All /api/v1/... endpoints wrap data in { "data": T }:
{
"data": { ... }
}
GET /api/health returns a flat object (no wrapper).
Error response
{
"code": "1002",
"message": "Unauthorized."
}
Error codes
| Code | Meaning |
|---|---|
1000 | Invalid request |
1001 | Internal server error |
1002 | Unauthorized |
2000 | Template not found |
2002 | Subject not found |
2003 | System not found |
HTTP status codes
| Status | Meaning |
|---|---|
200 | Success (GET) |
201 | Created (POST) |
400 | Bad request |
401 | Unauthorized |
404 | Not found |
500 | Server error |