Skip to content

Update the current user's profile

PATCH
/me
curl --request PATCH \
--url https://api.engram.page/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "display_name": "Ada Lovelace", "locale": "en" }'

Updates the authenticated user’s mutable profile fields (display_name, locale, analytics_opt_out) and returns the updated user.

Profile fields

Media typeapplication/json
UpdateProfileRequest
object
analytics_opt_out

True objects to product analytics and erases the user’s PostHog person; false withdraws the objection

boolean
display_name
string
nullable
locale

BCP 47 language tag, stored in canonical casing

string
<= 35 characters /^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/

Example

pt-BR

Example

{
"display_name": "Ada Lovelace",
"locale": "en"
}

Updated user

Media typeapplication/json
UserResponse
object
user
required
User
object
analytics_id
required

Keyed pseudonymous identifier (HMAC of the user’s email) for client-side analytics identify calls; null when the user opted out. See Engram.Analytics.client_id/1.

string
nullable
analytics_opt_out
required

The user objected to analytics; the client must send nothing.

boolean
display_name
string
nullable
email
required
string format: email
id
required
string format: uuid
locale

UI language as a BCP 47 tag, as last reported by a client.

string
nullable
role
string

Example

{
"user": {
"locale": "pt-BR",
"role": "user"
}
}

Validation error

Media typeapplication/json
Error
object
errors
One of:
string

Example generated

{
"errors": {}
}