Update communication preferences
Partially update communication preferences. Only provided fields are changed. Writes to locked channels return 403 LOCKED_CHANNEL_WRITE. Returns updated values + policy matrix.
Authorization
bearerAuth Supabase JWT bearer token for dashboard / user-scoped endpoints. Role-derived scopes: ROOT/ADMIN → full admin; USER → read-only treasury.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://loading/v1/auth/comm-prefs/" \ -H "Content-Type: application/json" \ -d '{}'{
"success": true,
"timestamp": "2019-08-24T14:15:22Z",
"data": null,
"message": "string"
}{
"success": false,
"timestamp": "2019-08-24T14:15:22Z",
"error": {
"code": "string",
"message": "string",
"details": null
}
}{
"success": false,
"timestamp": "2019-08-24T14:15:22Z",
"error": {
"code": "string",
"message": "string",
"details": null
}
}{
"success": false,
"timestamp": "2019-08-24T14:15:22Z",
"error": {
"code": "string",
"message": "string",
"details": null
}
}{
"success": false,
"timestamp": "2019-08-24T14:15:22Z",
"error": {
"code": "string",
"message": "string",
"details": null
}
}Get communication preferences
Fetch the authenticated user's communication preferences. Response includes current channel values and per-channel policy (locked/lock_reason). Locked channels are forced-on for owner/super-admin roles and cannot be disabled.
Create a new company
This endpoint allows users to create a new company by providing the necessary details in the request body. The request must adhere to the CompaniesPostBody schema. The response includes success or error details based on the request validity and authentication status.