---
title: "Update Admin"
method: PATCH
path: "/v1/admin_console/admin_auth/admins/{admin_id}"
tags: ["admin_console", "admin_auth"]
---

# Update Admin

`PATCH /v1/admin_console/admin_auth/admins/{admin_id}`

## Request

- Base URL: `https://api.linktodm.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.linktodm.com/v1/admin_console/admin_auth/admins/{admin_id}`
- Auth: HTTP bearer

Change role / is_active / name on an admin_user row. Admin-role only.

Self-deactivate and last-admin demotion are blocked with 400.

## Path parameters

- `admin_id` integer, required

## Request body

- AdminUserUpdatePayload
  - `role` 'ADMIN' | 'VIEWER' | 'SEO_ADMIN' | 'TESTING_ADMIN'
  - `is_active` boolean, nullable
  - `name` string, nullable

## Response `200`

Successful Response

- AdminUserResponse: Public-facing shape of an admin user.
  - `id` integer, required
  - `firebase_uid` string, required
  - `email` string, email, required
  - `name` string, nullable
  - `role` 'ADMIN' | 'VIEWER' | 'SEO_ADMIN' | 'TESTING_ADMIN', required
  - `is_active` boolean, required
  - `created_at` string, date-time, nullable
  - `updated_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/linktodm/apis/salesmorph.md) - [All operations](https://skmtc.dev/linktodm/apis/salesmorph/llms.txt) - [OpenAPI document](https://skmtc.dev/linktodm/apis/salesmorph/revisions/4af0ad5dbe92?raw)
