Skip to content

HeyDonto API Documentation (1.0)

API documentation for HeyDonto API

Overview
Languages
Servers
Mock server

https://docs.heydonto.com/_mock/apis/heydonto/openapi/

Sandbox

https://api-staging.heydonto.com/

Production

https://api.heydonto.com/

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations

Retrieve all users with optional filters and pagination

Request

Security
bearer
Query
searchstring

Search across firstName, lastName, and email

Example: search=john
roleArray of strings

Filter by user role(s)

Items Enum"ADMIN""ORGANIZATION_USER""BRAND_USER""SITE_USER""CLIENT_ACCOUNT_USER""SITE_MANAGER_USER"
Example: role=ADMIN&role=CLIENT_ACCOUNT_USER
isEnabledbooleanrequired

Filter by enabled status

Example: isEnabled=true
clientAccountIdArray of numbers

Filter by client account IDs

Example: clientAccountId=1&clientAccountId=2
organizationIdArray of numbers

Filter by organization IDs

Example: organizationId=1&organizationId=2
brandIdArray of numbers

Filter by brand IDs

Example: brandId=1&brandId=2
siteIdArray of numbers

Filter by site IDs

Example: siteId=1&siteId=2
pagenumber>= 0

Page number (0-based)

Default 0
Example: page=0
pageSizenumber[ 1 .. 100 ]

Number of items per page

Default 10
Example: pageSize=10
fieldstring

Field to sort by

Enum"id""firstName""lastName""email""role""isEnabled""createdAt""updatedAt"
Example: field=createdAt
sortBy[0][field]string

First sort field

Enum"id""firstName""lastName""email""role""isEnabled""createdAt""updatedAt"
sortBy[0][dir]string

First sort direction

Enum"asc""desc"
sortBy[1][field]string

Second sort field

Enum"id""firstName""lastName""email""role""isEnabled""createdAt""updatedAt"
sortBy[1][dir]string

Second sort direction

Enum"asc""desc"
curl -i -X GET \
  'https://docs.heydonto.com/_mock/apis/heydonto/openapi/users?search=john&role=ADMIN%2CCLIENT_ACCOUNT_USER&isEnabled=true&clientAccountId=1%2C2&organizationId=1%2C2&brandId=1%2C2&siteId=1%2C2&page=0&pageSize=10&field=createdAt&sortBy%5B0%5D%5Bfield%5D=id&sortBy%5B0%5D%5Bdir%5D=asc&sortBy%5B1%5D%5Bfield%5D=id&sortBy%5B1%5D%5Bdir%5D=asc' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

List of users retrieved successfully.

Bodyapplication/json
dataArray of objects(UserDto)required

Array of users

data[].​idnumberrequired

Unique identifier for the user

Example: 1
data[].​emailstringrequired

Email address of the user

Example: "admin@admin.com"
data[].​firstNamestringrequired

First name of the user

Example: "John"
data[].​lastNamestringrequired

Last name of the user

Example: "Doe"
data[].​rolestringrequired

Role of the user

Enum"ADMIN""ORGANIZATION_USER""BRAND_USER""SITE_USER""CLIENT_ACCOUNT_USER""SITE_MANAGER_USER"
Example: "ADMIN"
data[].​isEnabledbooleanrequired

Is the user enabled

Example: true
data[].​createdAtstring(date-time)required

Creation date of the user

Example: "2024-01-01T00:00:00.000Z"
data[].​updatedAtstring(date-time)required

Last update date of the user

Example: "2024-01-02T00:00:00.000Z"
data[].​userOrganizationsArray of strings

Organizations associated with the user

data[].​userBrandsArray of strings

Brands associated with the user

data[].​userSitesArray of strings

Sites associated with the user

data[].​userClientAccountsArray of strings

Client accounts associated with the user

data[].​clientAccountSiteManagersArray of strings

Client account site management permissions

data[].​tosAcceptedAtstring(date-time)required

Time stamp of the Terms of Services acceptance

Example: "2024-01-02T00:00:00.000Z"
metaobjectrequired
meta.​pagenumberrequired

Current page number (0-based)

Example: 0
meta.​pageSizenumberrequired

Number of items per page

Example: 10
meta.​totalnumberrequired

Total number of items

Example: 150
meta.​totalPagesnumberrequired

Total number of pages

Example: 15
meta.​hasNextbooleanrequired

Whether there is a next page

Example: true
meta.​hasPreviousbooleanrequired

Whether there is a previous page

Example: false
Response
application/json
{ "data": [ { … } ], "meta": { "page": 0, "pageSize": 10, "total": 150, "totalPages": 15, "hasNext": true, "hasPrevious": false } }

Request

Security
bearer
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
organizationIdnumber

The organization ID

Example: 1
brandIdnumber

The brand ID

Example: 1
siteIdnumber

The site ID

Example: 1
rolestringrequired

The role of the user

Enum"ADMIN""ORGANIZATION_USER""BRAND_USER""SITE_USER""CLIENT_ACCOUNT_USER""SITE_MANAGER_USER"
Example: "ADMIN"
clientAccountIdArray of numbers

List of client account IDs

Default []
Example: [1,2,3]
curl -i -X POST \
  https://docs.heydonto.com/_mock/apis/heydonto/openapi/users \
  -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,
    "organizationId": 1,
    "brandId": 1,
    "siteId": 1,
    "role": "ADMIN",
    "clientAccountId": [
      1,
      2,
      3
    ]
  }'

Responses

The user has been successfully created by admin.

Response
No content

Request

Security
bearer
Path
userIdnumberrequired
Bodyapplication/jsonrequired
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
clientAccountIdArray of numbersrequired

List of client account IDs

Example: [1,2,3]
curl -i -X PUT \
  'https://docs.heydonto.com/_mock/apis/heydonto/openapi/users/{userId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "firstName": "John",
    "lastName": "Doe",
    "isEnabled": true,
    "clientAccountId": [
      1,
      2,
      3
    ]
  }'

Responses

The user has been successfully updated.

Response
No content

Request

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

Responses

The user has been successfully deleted.

Response
No content

Request

Security
bearer
Path
userIdnumberrequired
curl -i -X POST \
  'https://docs.heydonto.com/_mock/apis/heydonto/openapi/users/{userId}/resend-invitation' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

The invitation email has been resent successfully.

Response
No content
Operations