createUser
POST
/api/v1/users
const url = 'https://example.com/api/v1/users';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","name":"example","password":"example","role":"viewer"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/users \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "name": "example", "password": "example", "role": "viewer" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
string format: email
name
string
password
required
Temporary password. The user must change it at first login.
string
role
required
string
key
additional properties
any
Responses
Section titled “ Responses ”Created
Media typeapplication/json
object
created_at
required
string format: date-time
disabled
required
boolean
email
required
string
id
required
string
last_login_at
string format: date-time
must_change_password
required
boolean
name
required
string
role
required
string
key
additional properties
any
Example
{ "role": "viewer"}default
Section titled “default”Error
Media typeapplication/json
object
error
required
object
code
required
string
details
message
required
string
key
additional properties
any
key
additional properties
any
Examplegenerated
{ "error": { "code": "example", "details": "example", "message": "example" }}