---
title: "Update the current user's profile"
method: PATCH
path: "/api/me"
tags: ["Account"]
---

# Update the current user's profile

`PATCH /api/me`

## Request

- Base URL: `https://api.engram.page`
- URL: `https://api.engram.page/api/me`
- Auth: HTTP bearer

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

## Request body

- UpdateProfileRequest
  - `analytics_opt_out` boolean: true objects to product analytics and erases the user's PostHog person; false withdraws the objection
  - `display_name` string, nullable
  - `locale` string: BCP 47 language tag, stored in canonical casing

## Response `200`

Updated user

- UserResponse
  - `user` User, required
    - `analytics_id` string, nullable, 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.
    - `analytics_opt_out` boolean, required: The user objected to analytics; the client must send nothing.
    - `display_name` string, nullable
    - `email` string, email, required
    - `id` string, uuid, required
    - `locale` string, nullable: UI language as a BCP 47 tag, as last reported by a client.
    - `role` string

## Other responses

- `422`: Validation error

---

[API](https://skmtc.dev/engram/apis/engram-api.md) · [All operations](https://skmtc.dev/engram/apis/engram-api/llms.txt) · [OpenAPI document](https://skmtc.dev/engram/apis/engram-api/revisions/8c4c2eec29dc?raw)
