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

Authentication

Operations

Login to generate JWT token

Request

Bodyapplication/jsonrequired

User login credentials

emailstringrequired

The email address of the user

Example: "user@example.com"
passwordstringrequired

The password of the user

Example: "password123"
curl -i -X POST \
  https://docs.heydonto.com/_mock/apis/authentication/openapi/auth/login \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "user@example.com",
    "password": "password123"
  }'

Responses

Successfully logged in, returns JWT token.

Bodyapplication/json
any
Response
application/json
{ "accessToken": "generatedAccessToken" }

Get the currently authenticated user

Request

curl -i -X GET \
  https://docs.heydonto.com/_mock/apis/authentication/openapi/auth/user \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Returns the current authenticated user.

Bodyapplication/json
emailstringrequired
Example: "user@example.com"
fhirStoreIdstringrequired
Example: "heydonto-sandbox"
idstringrequired
Example: "1234"
organizationIdsArray of stringsrequired
Example: [1,2]
brandIdsArray of stringsrequired
Example: [1,3]
siteIdsArray of stringsrequired
Example: [4,5]
rolestringrequired
Example: "ADMIN"
firstNamestringrequired
Example: "John"
lastNamestringrequired
Example: "Doe"
Response
application/json
{ "email": "user@example.com", "fhirStoreId": "heydonto-sandbox", "id": "1234", "organizationIds": [ 1, 2 ], "brandIds": [ 1, 3 ], "siteIds": [ 4, 5 ], "role": "ADMIN", "firstName": "John", "lastName": "Doe" }