---
title: "Admin update user (for changing permissions)"
method: PUT
path: "/api/v1/users/{id}/admin"
tags: ["Users", "internal"]
---

# Admin update user (for changing permissions)

`PUT /api/v1/users/{id}/admin`

## Path parameters

- `id` string, uuid, required

## Request body

- User
  - `email` string, required
  - `email_settings` EmailSettings — Per-user toggles for the user-pausable email categories. Each field maps 1:1 to a [`PausableCategory`]; required emails are never gated here. Stored as a JSONB blob, so new categories are added as new fields rather than via migration. New fields carry `#[serde(default = "default_true")]` so a category is opted in by default if its key is absent from the stored JSON.
    - `daemon_alerts` boolean
    - `discovery_digest` boolean, required
    - `product_onboarding` boolean
    - `trial_and_usage` boolean
  - `email_verified` boolean — Whether the user has verified their email address
  - `has_password` boolean — Whether the user has a password set — computed from password_hash, never stored in DB
  - `network_ids` string[], required
  - `oidc_linked_at` string, date-time, nullable
  - `oidc_provider` string, nullable
  - `organization_id` string, uuid, required
  - `permissions` 'Owner' | 'Admin' | 'Member' | 'Viewer', required
  - `terms_accepted_at` string, date-time, nullable
  - `created_at` string, date-time, required
  - `id` string, uuid, required
  - `updated_at` string, date-time, required

## Response `200`

User updated

- ApiResponseUser
  - `data` object
    - `email` string, required
    - `email_settings` EmailSettings — Per-user toggles for the user-pausable email categories. Each field maps 1:1 to a [`PausableCategory`]; required emails are never gated here. Stored as a JSONB blob, so new categories are added as new fields rather than via migration. New fields carry `#[serde(default = "default_true")]` so a category is opted in by default if its key is absent from the stored JSON.
      - `daemon_alerts` boolean
      - `discovery_digest` boolean, required
      - `product_onboarding` boolean
      - `trial_and_usage` boolean
    - `email_verified` boolean — Whether the user has verified their email address
    - `has_password` boolean — Whether the user has a password set — computed from password_hash, never stored in DB
    - `network_ids` string[], required
    - `oidc_linked_at` string, date-time, nullable
    - `oidc_provider` string, nullable
    - `organization_id` string, uuid, required
    - `permissions` 'Owner' | 'Admin' | 'Member' | 'Viewer', required
    - `terms_accepted_at` string, date-time, nullable
    - `created_at` string, date-time, required
    - `id` string, uuid, required
    - `updated_at` string, date-time, required
  - `error` string, nullable
  - `meta` ApiMeta, required — API metadata included in all responses
    - `api_version` integer, required — API version (integer, increments on breaking changes)
    - `server_version` string, required — Server version (semver)
  - `success` boolean, required

## Other responses

- `403` — Cannot update user with higher permissions
- `404` — User not found

## Changes

- **2026-06-18** `76dd60a871e6` — 6 info
  - added the new optional request property `allOf[#/components/schemas/UserBase]/email_settings/daemon_alerts`
  - added the new optional request property `allOf[#/components/schemas/UserBase]/email_settings/product_onboarding`
  - added the new optional request property `allOf[#/components/schemas/UserBase]/email_settings/trial_and_usage`
  - added the optional property `data/allOf[#/components/schemas/UserBase]/email_settings/daemon_alerts` to the response with the `200` status
  - …2 more
- **2026-06-11** `aac398d6764d` — 2 info
  - added the new optional request property `allOf[#/components/schemas/UserBase]/email_settings`
  - added the optional property `data/allOf[#/components/schemas/UserBase]/email_settings` to the response with the `200` status
- **2026-06-11** `c7bad4e3d772` — 2 warning
  - removed the request property `allOf[#/components/schemas/UserBase]/email_settings`
  - removed the optional property `data/allOf[#/components/schemas/UserBase]/email_settings` from the response with the `200` status
- **2026-06-11** `5f1208d6d875` — 2 info
  - added the new optional request property `allOf[#/components/schemas/UserBase]/email_settings`
  - added the optional property `data/allOf[#/components/schemas/UserBase]/email_settings` to the response with the `200` status
- …earlier changes not shown

[Full history](https://skmtc.dev/scanopy/apis/scanopy-api/changes/api/v1/users/:id/admin/put.md)

---

[API](https://skmtc.dev/scanopy/apis/scanopy-api.md) · [All operations](https://skmtc.dev/scanopy/apis/scanopy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scanopy/scanopy-api/revisions/49ea97c8bb7e/schema)
