Skip to content
You're viewing documentation for v2026.11.6-beta. It may be out of date.Go to latest
TimescaleDB Enterprise
Esc
↑↓navigate↵open⌘Jpreview

Create a local user

The user must change the initial password at the first login.

POST/api/v1/users
Authorization
tse_sessionAPI key · cookierequired
Request body
requiredapplication/json
display_namestring
passwordstring

Initial password. The user must change it at the first login.

rolestring

none, viewer, operator or admin

usernamestring
Responses
201

Created

created_atstring<date-time>required
disabledbooleanrequired
display_namestringrequired
idstringrequired
last_login_atstring<date-time>
must_change_passwordbooleanrequired
rolestringrequired

The default role. none: the user sees only the database services of the grants

Allowed:nonevieweroperatoradmin
service_grantsAuthMeServiceGrant[]required

The roles of the user on single database services

Show properties
Array of AuthMeServiceGrant
rolestringrequired
Allowed:vieweroperator
service_idstringrequired
sourcestringrequired

local: a username and a password. oidc: a user of the identity provider. The first SSO login adds the user, and each login sets the role from the claims

Allowed:localoidc
two_factorbooleanrequired

The user has confirmed TOTP two-factor authentication

updated_atstring<date-time>required
usernamestringrequired
default

Error

codestring

Stable code of the refusal, when the route has codes

detailsstring[]

Additional detail, e.g. per-field validation failures

errorstringrequired

Human-readable error message

Request
curl -X POST 'https://console.example.com/api/v1/users' \
  -H 'Cookie: tse_session=YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "display_name": "string",
  "password": "string",
  "role": "string",
  "username": "string"
}'
Response
{
  "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"
}