Central Auth โ€บ Client API Reference
https://centralauth.serveo.net/api/v1
Base URL
https://centralauth.serveo.net
API Prefix
/api/v1
Content-Type
application/json
๐Ÿ“‹
All Endpoints
Method Endpoint Description Auth
POST /api/v1/identities/ Register a new account โ€”
POST /api/v1/auth/login Login with email & password โ€”
POST /api/v1/auth/otp/request Request OTP (login, reset, verify, link) โ€”
POST /api/v1/auth/phone/verify OTP login via phone โ€”
POST /api/v1/auth/google Google Sign-In token exchange โ€”
POST /api/v1/auth/verify-email Verify email with OTP โ€”
POST /api/v1/auth/resend-verification Resend email verification โ€”
POST /api/v1/auth/forgot-password Request password reset โ€”
POST /api/v1/auth/reset-password Reset password with OTP โ€”
GET /api/v1/identities/me Get current user profile ๐Ÿ”’ Bearer
POST /api/v1/identities/me/phone Link phone number ๐Ÿ”’ Bearer
POST /api/v1/identities/me/email Link email address ๐Ÿ”’ Bearer
POST /api/v1/identities/me/password Update / set password ๐Ÿ”’ Bearer
DELETE /api/v1/identities/me Delete account (soft delete) ๐Ÿ”’ Bearer
POST /api/v1/auth/refresh Refresh tokens ๐Ÿช Cookie
POST /api/v1/auth/logout Logout & revoke session โ€”
GET /api/v1/auth/activities View login activities ๐Ÿ”’ Bearer

1
Registration
/api/v1/identities
POST /api/v1/identities/ Register a new account โ–ถ
Request Body
JSON
{
  "email": "[email protected]",
  "password": "SecurePassword123!",
  "clientId": "your_client_id"
}
201 Returns the created user identity object.

2
Authentication
/api/v1/auth
POST /api/v1/auth/login Login with email & password โ–ถ
Request Body
JSON
{
  "email": "[email protected]",
  "password": "SecurePassword123!",
  "clientId": "your_client_id"
}
200 Returns user info plus Access and Refresh Tokens.
POST /api/v1/auth/otp/request Request OTP (unified) โ–ถ
โ„น
Unified OTP endpoint Supports types: LOGIN, RESET, VERIFY, LINK. Target can be email or phone number.
Request Body
JSON
{
  "target": "[email protected]",  // OR "+1234567890"
  "type": "LOGIN"         // LOGIN | RESET | VERIFY | LINK
}
POST /api/v1/auth/phone/verify OTP login via phone โ–ถ
Request Body
JSON
{
  "target": "+1234567890",
  "code": "123456",
  "clientId": "your_client_id"
}
POST /api/v1/auth/google Google Sign-In token exchange โ–ถ
โ„น
Google ID Token Exchange Exchanges a Google ID Token from the native Flutter/Android SDK for Central Auth tokens.
Request Body
JSON
{
  "token": "eyJhbG... (Google ID Token)",
  "clientId": "your_client_id"
}

3
Verification & Recovery
/api/v1/auth
POST /api/v1/auth/verify-email Verify email with OTP โ–ถ
JSON
{ "email": "[email protected]", "otp": "123456" }
POST /api/v1/auth/resend-verification Resend verification email โ–ถ
JSON
{ "email": "[email protected]" }
POST /api/v1/auth/forgot-password Request password reset โ–ถ
JSON
{ "email": "[email protected]" }
POST /api/v1/auth/reset-password Reset password with OTP โ–ถ
JSON
{
  "email": "[email protected]",
  "otp": "123456",
  "newPassword": "NewPassword123!"
}

4
Protected Identity Management
/api/v1/identities/me
โš 
Authentication Required All endpoints in this section require: Authorization: Bearer <access_token>
GET /api/v1/identities/me Get current user profile โ–ถ

No request body required. Pass the access token in the Authorization header.

200 Returns the current user's identity object.
POST /api/v1/identities/me/phone Link phone number โ–ถ
โš 
Send an OTP first via /api/v1/auth/otp/request with type LINK before calling this endpoint.
JSON
{
  "phone": "+1234567890",
  "code": "123456"
}
POST /api/v1/identities/me/email Link email address โ–ถ
JSON
{
  "email": "[email protected]",
  "code": "123456"
}
POST /api/v1/identities/me/password Update / set password โ–ถ
JSON
{
  "target": "[email protected]",
  "code": "123456",
  "newPassword": "NewPassword123!"
}
DELETE /api/v1/identities/me Delete account (soft delete) โ–ถ

No request body required. This performs a soft delete โ€” the account is marked as deleted but data is retained.

200 Account successfully soft-deleted.

5
Session Management
/api/v1/auth
POST /api/v1/auth/refresh Refresh tokens โ–ถ
๐Ÿช
Cookie Required The refresh-token must be present as an httpOnly cookie. No request body needed.
200 Returns new access and refresh tokens.
POST /api/v1/auth/logout Logout & revoke session โ–ถ

Revokes the current session and clears authentication cookies. No request body required.

GET /api/v1/auth/activities View login activities โ–ถ
Required Header
HTTP
Authorization: Bearer <access_token>
200 Returns login history for the current user.

๐Ÿ”„
Authentication Flow Guide
๐Ÿ“ง Email / Password
1
Register via POST /identities/
2
Verify email via POST /auth/verify-email
3
Login via POST /auth/login โ†’ receive tokens
4
Use Authorization: Bearer <token> on protected routes
๐Ÿ“ฑ OTP Phone Login
1
Request OTP via POST /auth/otp/request with type LOGIN
2
Verify OTP via POST /auth/phone/verify โ†’ receive tokens
๐Ÿ”ต Google Sign-In
1
Get Google ID Token from Flutter/Android SDK
2
Exchange via POST /auth/google โ†’ receive Central Auth tokens
๐Ÿ” Token Refresh
1
Access token expires
2
Call POST /auth/refresh โ€” refresh token sent automatically via httpOnly cookie
3
Receive new access + refresh tokens
Central Auth Platform โ€” Client API Reference  ยท  All endpoints return application/json