---
title: "Create or update an auth user"
method: POST
path: "/auth/v1/admin/users"
tags: ["Auth"]
---

# Create or update an auth user

`POST /auth/v1/admin/users`

## Request

- Base URL: `https://api.run402.com`
- URL: `https://api.run402.com/auth/v1/admin/users`
- Auth: one of:
  - API key in header `apikey`
  - API key in header `apikey` and HTTP bearer

Service-key endpoint for creating a project auth user, changing admin status, and optionally sending a trusted invite magic link. Lifecycle-gated for non-active projects and DB-rate-limited by project, email, and service-key identity.

## Request body

- object
  - `email` string, email, required
  - `is_admin` boolean
  - `send_invite` boolean
  - `redirect_url` string, uri: Required when send_invite=true. Must be an allowed project auth redirect origin.
  - `client_state` unknown

## Response `200`

Existing user updated

- object
  - `id` string, uuid
  - `email` string, email
  - `is_admin` boolean
  - `email_verified_at` string, date-time, nullable
  - `created` boolean
  - `invite_sent` boolean

## Other responses

- `201`: User created
- `400`: Bad request
- `403`: Service key required

---

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