---
title: "Create account"
method: POST
path: "/api/auth/admin/users/{user_id}/accounts"
tags: ["Admin Accounts"]
---

# Create account

`POST /api/auth/admin/users/{user_id}/accounts`

Creates a new account for a user.

## Path parameters

- `user_id` string, required

## Request body

- CreateAccountRequest
  - `access_token` string, nullable
  - `access_token_expires_at` string, date-time, nullable
  - `account_id` string, required
  - `id_token` string, nullable
  - `password` string, nullable
  - `provider_id` string, required
  - `refresh_token` string, nullable
  - `refresh_token_expires_at` string, date-time, nullable
  - `scope` string, nullable

## Response `201`

Created

- CreateAccountResponse
  - `account` Account, required
    - `access_token` string, nullable
    - `access_token_expires_at` string, date-time, nullable
    - `account_id` string, required
    - `created_at` string, date-time, required
    - `id` string, required
    - `id_token` string, nullable
    - `password` string, nullable
    - `provider_id` string, required
    - `refresh_token` string, nullable
    - `refresh_token_expires_at` string, date-time, nullable
    - `scope` string, nullable
    - `updated_at` string, date-time, required
    - `user_id` string, required

## Changes

- **2026-07-08** `61a78375af21` — 6 info
  - the response property `account/account_id` became required for the status `201`
  - the response property `account/created_at` became required for the status `201`
  - the response property `account/id` became required for the status `201`
  - the response property `account/provider_id` became required for the status `201`
  - …2 more
- **2026-07-08** `2ff1d8d3f239` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/authula/apis/authula-api/changes/api/auth/admin/users/:user_id/accounts/post.md)

---

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