MemoryKit

Update User

Update an end-user's profile.

PUT/v1/users/{user_id}

Path parameters

user_idstringrequired

The user's external ID.

Request body

All fields are optional. Only provided fields are updated.

emailstring

User's email.

namestring

Display name.

metadataobject

Replaces entire metadata object. Use POST /v1/users for merge semantics.

Response

Returns 200 OK with the updated user object.

idstring

The user ID.

emailstring

User's email.

namestring

User's display name.

metadataobject

Updated metadata object.

created_atstring

ISO 8601 creation timestamp.

updated_atstring

ISO 8601 last update timestamp.

Example response
{
  "id": "user_123",
  "email": "alice@newdomain.com",
  "name": "Alice Smith",
  "metadata": { "plan": "enterprise" },
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-15T14:00:00Z"
}
const user = await mk.users.update("user_123", {
  name: "Alice Smith",
  metadata: { plan: "enterprise" },
});
Edit on GitHub

On this page