---
title: "Create Admin"
method: POST
path: "/v1/admin_console/admin_auth/admins"
tags: ["admin_console", "admin_auth"]
---

# Create Admin

`POST /v1/admin_console/admin_auth/admins`

## 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`
- Auth: HTTP bearer

Promote a customer-user (by email) to admin. Admin-role only.

## Request body

- AdminUserCreatePayload: Add a new admin by email. Email need not pre-exist anywhere. The service resolves a firebase_uid by (1) checking the customer `user` table, (2) checking Firebase Auth, (3) creating a new Firebase user via Admin SDK. Either way the admin can sign in via the email-link flow with no further setup.
  - `email` string, email, required
  - `role` 'ADMIN' | 'VIEWER' | 'SEO_ADMIN' | 'TESTING_ADMIN'
  - `name` string, nullable

## Response `201`

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)
