---
title: "Creates a new user account"
method: POST
path: "/useraccounts"
tags: ["users"]
---

# Creates a new user account

`POST /useraccounts`

Creates a new user account, under the same client account that the current user belongs. Only users with appropriate permissions can create new user accounts.

## Query parameters

- `clientAccountId` number

## Request body

- CreateUserAccountType — Necessary information to create a user account, apart from the password
  - `username` string — The username of the user account
  - `email` string — The email of the user
  - `firstName` string — The first name of the user
  - `lastName` string — The last name of the user
  - `contactNumber` string — The contact number for the user
  - `testUserId` string — Optional user ID to be used for testing

## Response `201`

The user was created succesfully

- UserAccountType — Information that is only returned but never provided
  - `username` string — The username of the user account
  - `email` string — The email of the user
  - `firstName` string — The first name of the user
  - `lastName` string — The last name of the user
  - `contactNumber` string — The contact number for the user
  - `testUserId` string — Optional user ID to be used for testing
  - `id` string, required — System wide unique identifier of the entity
  - `apikey` string — The API key associated with this user. Currently API key is only returned when for the currently logged in user account.
  - `lastlogin` string, date-time — ISODateTimeType, ISO8601 date format with optional time part. For instance, 1970-01-18T09:19:41.204+0000
  - `lastip` string — Last access IP using this user account

## Other responses

- `400` — Malformed request
- `403` — User is not allowed to create a new user account.
- `409` — Conflict
- `default` — Unexpected error

---

[API](https://skmtc.net/gameanalytics/apis/datatiger-management-api.md) · [All operations](https://skmtc.net/gameanalytics/apis/datatiger-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gameanalytics/datatiger-management-api/revisions/20a4f732a0b7/schema)
