Start typing to search.

API Reference

Create a user

View Markdown
POST /api/users

Creates a new user account with a one-time invite token. Superadmin can create admins and viewers. Admins can only create viewers. The invite token should be shared with the user so they can set their own password and enroll TOTP via /invite/{token}.

Operation IDcreateUser

Authentication

  • BearerAuth·http bearer·API key token (envoy_<hex>). Create keys from Settings → API Keys — see Using the API.

Request body

This request body is required.

Content typeapplication/json

requestobject
2 properties
usernamestringrequired
rolestring

Success response body

201User created with invite token

User created with invite token

Content typeapplication/json

responseobject
8 properties
idinteger
usernamestring
rolestring
totp_verifiedinteger
invite_pendingboolean
created_atstring · date-time
updated_atstring · date-time
invite_tokenstring

One-time invite token (48h expiry)

Error responses

400Validation error

Validation error

Content typeapplication/json

responseobject
2 properties
errorstring
messagestring
Example response
{
  "error": "VALIDATION_ERROR",
  "message": "Invalid input"
}

403Insufficient permissions

Insufficient permissions

No response content schema is documented.