Change the person's portal settings
const url = 'http://localhost:8000/api/portal/settings/';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"notify_messages_email":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:8000/api/portal/settings/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "notify_messages_email": false }'Either field, or both; a field left out keeps its value. language: null clears the choice (each card’s invite language again). notify_messages_email: false is the same switch the e-mail’s unsubscribe link flips. 400 for an unknown language.
Account level: the signed-in person’s own settings, whichever cards they hold. 404 while client access is switched off on the environment; a partner API key gets 403; 429 past the account’s rate (client_portal, 120/min).
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
Examples
Switch the e-mail off
{ "notify_messages_email": false}Back to each card's language
{ "language": null}Responses
Section titled “Responses”GET / PATCH /api/portal/settings/ — per person, not per card.
object
E-mail when a message waits unread for 10 minutes — at most one per conversation every 6 hours, never with the message’s words. The e-mail’s unsubscribe link switches the same setting off. A coach’s own chat e-mail (on /api/me/) is a separate switch.
Examples
{ "language": "ru", "notify_messages_email": false}The body was rejected: errors keyed by field.
Validation errors keyed by field — each key an offending field of the body, each value its human-readable messages (or a stable code, e.g. not_editable).
object
Examples
400 — unknown language
{ "language": [ "\"de\" is not a valid choice." ]}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Example generated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Example generated
{ "detail": "example"}object
Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).
Example generated
{ "detail": "example"}object
429 — throttled: this account’s (or address’s) rate for the route is used up; try again after wait seconds, which Retry-After repeats. A route with a limit of its own answers its own code instead, documented there.
With throttled: whole seconds until the next request can pass.
Example generated
{ "detail": "example", "wait": 1}