HeyDonto Authentication Documentation (1.0)

API documentation for HeyDonto Authentication and User Management

Overview
Languages
Servers
Mock server
https://docs.heydonto.com/_mock/apis/authentication/openapi/
Sandbox
https://api-staging.heydonto.com/
Production
https://api.heydonto.com/

Users

Operations

Retrieve a list of users

Request

Query
userRolestringrequired
curl -i -X GET \
  'https://docs.heydonto.com/_mock/apis/authentication/openapi/user?userRole=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Returns an array of users.

Create a new user

Request

Bodyapplication/jsonrequired
emailstringrequired

The email of the user

Example: "john.doe@example.com"
firstNamestringrequired

The first name of the user

Example: "John"
lastNamestringrequired

The last name of the user

Example: "Doe"
passwordstringwrite-onlyrequired

The password of the user

Example: "password123"
isEnabledboolean

Indicates if the user is enabled

Example: true
rolestringrequired

The role of the user

Example: "ADMIN"
organizationIdnumber

The organization ID

Example: 1
brandIdnumber

The brand ID

Example: 1
siteIdnumber

The site ID

Example: 1
curl -i -X POST \
  https://docs.heydonto.com/_mock/apis/authentication/openapi/user \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "john.doe@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "password": "password123",
    "isEnabled": true,
    "role": "ADMIN",
    "organizationId": 1,
    "brandId": 1,
    "siteId": 1
  }'

Responses

The user has been successfully created.

Update a user

Request

Path
userIdnumberrequired
Bodyapplication/jsonrequired
emailstringrequired

The email of the user

Example: "john.doe@example.com"
firstNamestringrequired

The first name of the user

Example: "John"
lastNamestringrequired

The last name of the user

Example: "Doe"
isEnabledboolean

Indicates if the user is enabled

Example: true
rolestringrequired

The role of the user

Example: "ADMIN"
idnumberrequired

The ID of the user

Example: 123
curl -i -X PUT \
  'https://docs.heydonto.com/_mock/apis/authentication/openapi/user/{userId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "john.doe@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "isEnabled": true,
    "role": "ADMIN",
    "id": 123
  }'

Responses

The user has been successfully updated.

Delete a user

Request

Path
userIdnumberrequired
curl -i -X DELETE \
  'https://docs.heydonto.com/_mock/apis/authentication/openapi/user/{userId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

The user has been successfully deleted.

Authentication

Operations