Update user

Update a user by username (staff or self).

Endpoint

PUT /api/v1/users/{username}
StaffSelf

Request

JSON body supports partial fields like name, email, username; is_active is rejected here.

Usage

curl --request PUT --header "Authorization: Bearer $GHIT_API_TOKEN" --header "Content-Type: application/json" --data '{"name":"Alice Doe"}' "$GHIT_API_URL/v1/users/alice"

Success

200 OK with updated user.

{ "uuid": "...", "username": "alice", "name": "Alice Doe" }

Errors

  • 400 Bad Request for disallowed fields (for example is_active).
  • 404 Not Found when username does not exist.
  • 409 Conflict for duplicate username/email.

Common auth errors are documented on the API overview page.