Update current user's profile
const url = 'https://example.com/v1/users/me/profile';const options = { method: 'PUT', headers: { 'X-Tenant-ID': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"first_name":"example","last_name":"example","display_name":"example","avatar_base64":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/v1/users/me/profile \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Tenant-ID: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "first_name": "example", "last_name": "example", "display_name": "example", "avatar_base64": "example" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Tenant identifier. Must match the tenant associated with the credential. Returns 403 tenant_mismatch if the credential and header belong to different tenants.
Request Body required
Section titled “Request Body required ”object
Base64-encoded image data with data URI prefix, or null to remove
Example generated
{ "first_name": "example", "last_name": "example", "display_name": "example", "avatar_base64": "example"}Responses
Section titled “ Responses ”OK
object
When oidc/saml, first_name/last_name/email are managed by IdP and read-only
Base64-encoded image data with data URI prefix (max ~256KB)
Example
{ "auth_provider": "local"}Invalid input (avatar too large, SSO-managed fields)
object
Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).
Human-readable description of the error.
Optional additional context about the error.
object
Policy notices from determining Cedar rules, if applicable.
Example generated
{ "code": "example", "message": "example", "details": {}, "notices": [ "example" ]}Unauthenticated
object
Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).
Human-readable description of the error.
Optional additional context about the error.
object
Policy notices from determining Cedar rules, if applicable.
Example generated
{ "code": "example", "message": "example", "details": {}, "notices": [ "example" ]}