---
title: "User Create"
method: POST
path: "/api/user"
tags: ["User"]
---

# User Create

`POST /api/user`

## Request

- Base URL: `https://api.lytics.io`
- URL: `https://api.lytics.io/api/user`
- Auth: API key in header `Authorization`

Create/Invite A **Lytics Admin User** this will either create
a new user if that email is new, or invite user to have access to
current account.

```sh

# Create/Invite new user for current LIOKEY account
#  with suppression to not send welcome email

curl -v -XPOST "https://api.lytics.io/api/user?suppress=true"  \
  -H 'Content-type: application/json' \
  -H "Authorization: $LIOKEY" \
  -d '{
    "email" : "fakeuser2@lytics.io"
    , "password":"aNotSoGoodPassword%^"
    , "name":"aaron"
    , "roles": ["api","admin"]
}'


```

## Query parameters

- `account_id` string
- `suppress` boolean

## Request body

- object
  - `name` string
  - `email` string

## Response `201`

Created

- UserModel
  - `data` object
    - `account_id` string
    - `aid` number
    - `created` string
    - `updated` string
    - `email` string
    - `id` string
    - `name` string
    - `accounts` object[]
      - `aid` number
      - `account_id` string
      - `granted_by` string
      - `roles` string[]
      - `created` string
      - `updated` string

---

[API](https://skmtc.dev/lytics/apis/v1-lytics-api.md) - [All operations](https://skmtc.dev/lytics/apis/v1-lytics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lytics/apis/v1-lytics-api/revisions/339fd1d88486?raw)
