---
title: "Create an account"
method: POST
path: "/api/v1/ac/accounts"
tags: ["AccessControl"]
---

# Create an account

`POST /api/v1/ac/accounts`

Create an account

## Request body

- AcCreateAccountParam
  - `description` string
  - `nickname` string, required
  - `password` string, required
  - `roles` string[], required
  - `username` string, required

## Response `200`

OK

- object
  - `data` AcAccount, required
    - `description` string
    - `lastLoginAt` string
    - `needReset` boolean
    - `nickname` string
    - `roles` AcRole[], required
      - `description` string
      - `name` string, required
      - `policies` AcPolicy[], required
        - `action` string, required
        - `domain` string, required
        - `object` string, required
    - `username` string, required
  - `message` string, required
  - `successful` boolean, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

## Changes

- **2024-07-16** `3859f794d536` — 1 info
  - endpoint added
- **2024-02-27** `643ae3c8d824` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/oceanbase/apis/oceanbase-dashboard-api/changes/api/v1/ac/accounts/post.md)

---

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