palbaseDocs

Palbase Messaging · API

PATCH/messaging/me

Change the reader's own profile

The reader's name and picture, whether others see when they were last here, and how long the messages of the conversations they open from now on live (null: for good).

Called by a signed-in user of your app, with their token and the publishable key.

Request body

default_timer_secondsinteger · optionalHow long the messages of conversations they open from now on live.
imagestring · optionalWhere the app reads the picture.
namestring · optionalA name (1 to 100 characters).
read_receiptsboolean · optionalWhether their reads show in a direct conversation (off: nor do the other's to them).
show_last_seenboolean · optionalWhether others see when they were last here.
curl
curl -X PATCH "https://<your-ref>.palbase.studio/messaging/me" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "content-type: application/json" \
  -d '{"default_timer_seconds":5,"image":"string","name":"string","read_receipts":false,"show_last_seen":false}'

Responses

200Their profile

400The request is malformed, or a field breaks a rule (the error names which)

401No key, a key of no project, a token not valid (the edge's answer), or no person's session (`user_required`)

409The reader's account was deleted (`user_deleted`)

413The request body is too large (`request_too_large`)

429Over the project's request limit; Retry-After says when to try again

503Temporarily unavailable; retrying is safe after Retry-After

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation UpdateMyProfile of messaging's contract.