Skip to content

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/

Operations
Operations

Login to set authentication cookie or get JWT token for third-party integration

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 for third-party requests or sets cookie for frontend requests.

Bodyapplication/json
any
Response
application/json
{ "message": "Login successful", "token": "jwt_token_here" }

Logout user and clear authentication cookie

Request

curl -i -X POST \
  https://docs.heydonto.com/_mock/apis/authentication/openapi/auth/logout

Responses

Successfully logged out.

Get the currently authenticated user

Request

Security
bearer
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: "SITE_USER"
firstNamestringrequired
Example: "John"
lastNamestringrequired
Example: "Doe"
tosAcceptedAtstring(date-time)required

Time stamp of the Terms of Services acceptance

Example: "2024-01-02T00:00:00.000Z"
Response
application/json
{ "email": "user@example.com", "fhirStoreId": "heydonto-sandbox", "id": "1234", "organizationIds": [ "1", "2" ], "brandIds": [ "1", "3" ], "siteIds": [ "4", "5" ], "role": "SITE_USER", "firstName": "John", "lastName": "Doe", "tosAcceptedAt": "2024-01-02T00:00:00.000Z" }

Confirm accepting terms of service

Request

Security
bearer
curl -i -X POST \
  https://docs.heydonto.com/_mock/apis/authentication/openapi/auth/tos-accept \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Terms of Service accepted successfully.

Response
No content

Request

Bodyapplication/jsonrequired
object(ForgotPasswordDto)
curl -i -X POST \
  https://docs.heydonto.com/_mock/apis/authentication/openapi/auth/forgot-password \
  -H 'Content-Type: application/json' \
  -d '{}'

Responses

Password reset email sent successfully.

Request

Bodyapplication/jsonrequired
object(SetPasswordDto)
curl -i -X POST \
  https://docs.heydonto.com/_mock/apis/authentication/openapi/auth/set-password \
  -H 'Content-Type: application/json' \
  -d '{}'

Responses

Password set successfully.

Request

curl -i -X POST \
  https://docs.heydonto.com/_mock/apis/authentication/openapi/auth/regenerate-invitation

Responses

Invitation token regenerated successfully.

Operations