---
title: "Creates an API user."
method: POST
path: "/apiusers"
tags: ["apiUsers"]
---

# Creates an API user.

`POST /apiusers`

Beware: API users will also be returned in the /users response when including
            archived users.

<Check title="Required Permissions" icon="key">The user must be an admin or have `workspace-manage-config:write` permissions.</Check>

## Headers

- `Authorization` string, required

## Request body

- ApiUserPostForm
  - `name` string, required — The name of the API user.
  - `roleId` string, uuid, nullable — The role the user should be in. If no role is specified, the user will become an admin.
  - `clientId` string, nullable — The client id this API user belongs to.

## Response `200`

OK

- ApiUser
  - `name` string, required — The name of the API user.
  - `roleId` string, uuid, nullable — The role the user should be in. If no role is specified, the user will become an admin.
  - `clientId` string, nullable — The client id this API user belongs to.
  - `id` string, uuid — The id of the API user.
  - `createdOn` string, date-time — The date this user was created.
  - `createdBy` string, uuid — The id of the user who created this user.
  - `updatedOn` string, date-time — The date when this user was last updated.
  - `updatedBy` string, uuid — The id of the user who updated the entity.

## Other responses

- `400` — Bad Request
- `404` — Not Found

## Changes

- **2026-08-21** `a13e7c704262` — 1 breaking
  - the `name` request property's minLength was increased from `0` to `1`

[Change history](https://skmtc.dev/awork-io/apis/api-v1-reference/changes/apiusers/post.md)

---

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