Endpoint summary
Public endpoints
POST /api/contact
POST /api/contact
Request body:
POST /api/waitlist
POST /api/waitlist
Request body:
GET /api/health
GET /api/health
Core response shape:
- it returns
200when active features are healthy, - it returns
503when an active feature is still missing required config or the database check fails, - the response also includes a per-feature map with
enabled,missing_env, anddisabled_by_flag.
Logged-in user endpoints
POST /api/payments
POST /api/payments
Request body:
POST /api/subscription
POST /api/subscription
Request body:
cancelresume
POST /api/profile
POST /api/profile
Request body:
POST /api/profile/avatar
POST /api/profile/avatar
Request body:
Admin endpoint
POST /api/admin/users/role
POST /api/admin/users/role
Request body:
AI endpoints
POST /api/ai/chat
POST /api/ai/chat
Request body:
- returns a UI message stream rather than a plain JSON object,
- usage is tracked after the stream finishes.
POST /api/ai/generate
POST /api/ai/generate
Request body:
Provider webhook endpoints
POST /api/webhooks/midtrans
POST /api/webhooks/midtrans
Use this endpoint as a Midtrans callback, not as a browser-facing route.Verified fields:
order_idstatus_codegross_amountsignature_keytransaction_status
- invalid signature returns
401, - invalid payload returns
400, - missing payment record returns
404, - duplicate delivery can return
{ "received": true, "duplicate": true }, - valid events update
payments, may activatesubscriptions, and write intowebhook_eventsandaudit_logs.
POST /api/webhooks/doku
POST /api/webhooks/doku
Use this endpoint as a Doku JOKUL callback, not as a browser-facing route.Verified fields:
order.invoice_numberorder.amounttransaction.statustransaction.original_request_idsecurity.check_word
- invalid signature returns
401, - invalid payload returns
400, - missing payment record returns
404, - duplicate delivery is traceable through
webhook_events, - valid events update
payments, may activatesubscriptions, and write an audit trail.
/auth/confirm is an auth callback route, not an /api endpoint. To understand where it fits in login, OTP, and OAuth flows, read End-to-end flows.