REACT_APP_ORGANIZATIONS_API_BASE_URL (default: https://api.makakoo.com/ma-metrics-wsp-ms/v1/api).
All requests require Api-Key and Authorization: Bearer <token> headers.
Get User Settings
Client identifier. Use
"web" for browser clients. Defaults to "web".Comma-separated additional data to include. Pass
"dashboard" to include dashboard cache data alongside sidebar data.Sidebar navigation data. Ready for direct rendering — no transformation required.
The user’s last-selected organization ID, synced across devices.
The user’s last-selected project ID, synced across devices.
The user’s preferred language code (e.g.,
"en").The user’s preferred theme:
"light" or "dark".Whether the sidebar is open.
Dashboard cache data (only present when
includes=dashboard).Update User Settings
localStorage so the UI reflects the change without waiting for the API response.
Client identifier. Defaults to
"web".User’s preferred theme:
"light" or "dark".User’s preferred language code (e.g.,
"en", "es").Whether the sidebar should be open.
The ID of the currently active organization. Accepts both integer and UUID formats.
The ID of the currently active project.
200 OK.
To avoid excessive API calls when the user changes settings rapidly, the client debounces calls to this endpoint with a 500ms delay. Build the same behaviour into custom integrations.
Update Pinned Projects
Client identifier. Defaults to
"web".Must be
"sidebar".The organization ID whose pinned projects you are updating.
Ordered array of project IDs (integers) to pin. The position in the array determines display order.
Mark Onboarding Step
The onboarding step identifier, e.g.,
"sentinel_pass_discovered" or "is_hidden".Client identifier. Defaults to
"web".The value to set for the step. Defaults to
true.200 OK on success, false return value from the service on error (non-throwing).
Cross-Device Sync Behaviour
User settings follow a local-first strategy:- On login, call
GET /user_settings?client=webto load the latest settings and sidebar data from the server. - Write settings to
localStorageimmediately for fast local reads. - When a setting changes, update
localStoragefirst, then callPATCH /user_settingsin the background. - API call failures are logged as warnings and do not affect the local state. The client continues to function using
localStoragewhen the API is unavailable. - Debounce rapid setting changes at 500ms to avoid excessive API traffic.
ID Validation
Organization and project IDs are validated before being sent to the API:- UUID format (8-4-4-4-12 hex characters): sent as a string.
- Numeric format: parsed as an integer.
- Invalid or empty values: converted to
nulland omitted from the payload.