---
title: "Update user's account data."
method: PUT
path: "/admin/users/{userId}"
tags: ["admin"]
---

# Update user's account data.

`PUT /admin/users/{userId}`

## Request body

- UserSchema — Object describing the user related to the issued access and refresh tokens.
  - `id` string, uuid
  - `aud` string
  - `role` string
  - `email` string — User's primary contact email. In most cases you can uniquely identify a user by their email address, but not in all cases.
  - `email_confirmed_at` string, date-time
  - `phone` string, phone — User's primary contact phone number. In most cases you can uniquely identify a user by their phone number, but not in all cases.
  - `phone_confirmed_at` string, date-time
  - `confirmation_sent_at` string, date-time
  - `confirmed_at` string, date-time
  - `recovery_sent_at` string, date-time
  - `new_email` string, email
  - `email_change_sent_at` string, date-time
  - `new_phone` string, phone
  - `phone_change_sent_at` string, date-time
  - `reauthentication_sent_at` string, date-time
  - `last_sign_in_at` string, date-time
  - `app_metadata` object
  - `user_metadata` object
  - `factors` MFAFactorSchema[]
    - `id` string, uuid
    - `status` string — Usually one of: - verified - unverified
    - `friendly_name` string
    - `factor_type` string — Usually one of: - totp
  - `identities` object[]
  - `banned_until` string, date-time
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `deleted_at` string, date-time

## Response `200`

User's account data was updated.

- UserSchema — Object describing the user related to the issued access and refresh tokens.
  - `id` string, uuid
  - `aud` string
  - `role` string
  - `email` string — User's primary contact email. In most cases you can uniquely identify a user by their email address, but not in all cases.
  - `email_confirmed_at` string, date-time
  - `phone` string, phone — User's primary contact phone number. In most cases you can uniquely identify a user by their phone number, but not in all cases.
  - `phone_confirmed_at` string, date-time
  - `confirmation_sent_at` string, date-time
  - `confirmed_at` string, date-time
  - `recovery_sent_at` string, date-time
  - `new_email` string, email
  - `email_change_sent_at` string, date-time
  - `new_phone` string, phone
  - `phone_change_sent_at` string, date-time
  - `reauthentication_sent_at` string, date-time
  - `last_sign_in_at` string, date-time
  - `app_metadata` object
  - `user_metadata` object
  - `factors` MFAFactorSchema[]
    - `id` string, uuid
    - `status` string — Usually one of: - verified - unverified
    - `friendly_name` string
    - `factor_type` string — Usually one of: - totp
  - `identities` object[]
  - `banned_until` string, date-time
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `deleted_at` string, date-time

## Other responses

- `401` — HTTP Unauthorizred response.
- `403` — HTTP Forbidden response.
- `404` — There is no such user.

## Changes

- **2023-02-01** `144a34ca6d74` — 36 warning
  - removed the request property `factors/items/created_at`
  - removed the request property `factors/items/last_challenged_at`
  - removed the request property `factors/items/phone`
  - removed the request property `factors/items/updated_at`
  - …32 more

[Change history](https://skmtc.dev/supabase/apis/supabase-auth-rest-api/changes/admin/users/:userId/put.md)

---

[API](https://skmtc.dev/supabase/apis/supabase-auth-rest-api.md) · [All operations](https://skmtc.dev/supabase/apis/supabase-auth-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/supabase/supabase-auth-rest-api/revisions/144a34ca6d74/schema)
