Skip to content

Change the person's portal settings

PATCH
/api/portal/settings/
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).

object
language
One of:
  • en - English
  • ru - Русский
  • es - Español
string
Allowed values: en ru es
notify_messages_email
boolean

Examples

Switch the e-mail off

{
"notify_messages_email": false
}
Media typeapplication/json

GET / PATCH /api/portal/settings/ — per person, not per card.

object
language
required
One of:
  • en - English
  • ru - Русский
  • es - Español
string
Allowed values: en ru es
notify_messages_email
required

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.

boolean

Examples

ExampleSettings
{
"language": "ru",
"notify_messages_email": false
}

The body was rejected: errors keyed by field.

Media typeapplication/json

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
key
additional properties
Array<string>

Examples

Example400—UnknownLanguage

400 — unknown language

{
"language": [
"\"de\" is not a valid choice."
]
}
Media typeapplication/json
object
detail
required

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).

string

Example generated

{
"detail": "example"
}
Media typeapplication/json
object
detail
required

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).

string

Example generated

{
"detail": "example"
}
Media typeapplication/json
object
detail
required

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).

string

Example generated

{
"detail": "example"
}
Media typeapplication/json
object
detail
required

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.

string
wait

With throttled: whole seconds until the next request can pass.

integer
nullable

Example generated

{
"detail": "example",
"wait": 1
}