---
title: "Update User"
method: PUT
path: "/api/v1/users/{user_id}"
tags: ["users"]
---

# Update User

`PUT /api/v1/users/{user_id}`

## Request

- Base URL: `https://api.gnosari.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gnosari.com/api/v1/users/{user_id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-AUTH-TOKEN`

Update user.
Users can update their own data or data within the same account.

## Path parameters

- `user_id` integer, required

## Request body

- UserUpdate: Schema for updating a user with optional validation.
  - `email` string, email, nullable: User email address
  - `password` string, nullable: User password (minimum 8 characters)

## Response `200`

Successful Response

- UserPublic: Public schema for user without sensitive information.
  - `email` string, email, required: User email address
  - `id` integer, required: User ID
  - `roles` string[]: User roles
  - `is_verified` boolean: Whether the user has verified their email address (soft-gate driver).
  - `created_at` string, date-time, required: Creation timestamp
  - `updated_at` string, date-time, nullable: Last update timestamp

## Other responses

- `422`: Validation Error

---

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