HeyDonto Authentication Documentation (1.0)

API documentation for HeyDonto Authentication and User Management

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

Users

User management endpoints for creating, retrieving, updating, and deleting users in the system. Users are core entities in the HeyDonto platform that represent individuals with access to the system. Each user:

  • Has a unique email address
  • Is assigned a specific role (e.g., ADMIN)
  • Can be associated with multiple organizations, brands, and sites
  • Can be enabled or disabled
  • Must provide valid credentials for authentication
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

Authentication endpoints for managing user sessions and access control. The authentication system:

  • Uses JWT (JSON Web Tokens) for secure authentication
  • Requires email/password credentials for login
  • Provides session management capabilities
  • Returns user context information including permissions and access levels
Operations