---
search:
  tags:
    - users
    - POST
seo:
  description: >-
    The user must change the initial password at the first login. Reference for
    the POST /api/v1/users endpoint in the TimescaleDB Enterprise API.
  noindex: true
sidebar:
  label: Create a local user
  badge: POST
title: Create a local user
type: openapi-operation
---
The user must change the initial password at the first login.

`POST /api/v1/users`

**Request body** (`application/json`, required)

- `display_name` (string)
- `password` (string) — Initial password. The user must change it at the first login.
- `role` (string) — none, viewer, operator or admin
- `username` (string)

Request body example:

```json
{
  "display_name": "string",
  "password": "string",
  "role": "string",
  "username": "string"
}
```

**Responses**

- `201` — Created
- `default` — Error

Response example, 201:

```json
{
  "created_at": "2019-08-24T14:15:22Z",
  "disabled": true,
  "display_name": "string",
  "id": "string",
  "last_login_at": "2019-08-24T14:15:22Z",
  "must_change_password": true,
  "role": "none",
  "service_grants": [
    {
      "role": "viewer",
      "service_id": "string"
    }
  ],
  "source": "local",
  "two_factor": true,
  "updated_at": "2019-08-24T14:15:22Z",
  "username": "string"
}
```
