Skip to main content

Register an account

POST /auth/b2b/register
devhttps://api.sandbox.ovok.com

This API endpoint registers a user to a project.

Example cURL request

curl -X POST \
--url 'https://api.dev.ovok.com/auth/b2b/register' \
-H 'Content-Type: application/json' \
-d '{
"email": "max.mustermann@example.com",
"password": "A[.DmUv]2vE|n_+]",
"name": "Max",
"surname": "Mustermann",
"tenantId": "87ea5dfc-8b8e-384d-8489-79496e706390",
"clientId": "87ea5dfc-8b8e-384d-8489-79496e706390"
}'

Request body

Content-Type: application/json

  • email: string (required) — The email of the user registering, must be a valid email in order to send a verification email
  • password: string (required)
  • name: string (required) — The name of the user registering.
  • surname: string (required) — The surname of the user registering.
  • tenantId: string (required) — ID of the parent project.
  • clientId: string (required) — ID of the client.

Responses

CodeDescription
200Login response with tokens and IDs.
400The request could not be operated by the server.
401The resource owner or authorization server denied the request.
404The requested resource could not be found.
422The request could not be validated by the server.
500The server encountered an unexpected condition. Please try again later.

200ResponseRegisterLoginDto (application/json)

  • accessToken: string (required) — Bearer access token. Expires in 1 hour.
  • refreshToken: string — Refresh token.
  • expiresIn: integer — Token expiration.
  • project: object (required)
    • reference: string (required) — Reference of the project.
    • display: string (required) — Display name of the project.
  • profile: object (required)
    • reference: string (required) — Reference of the profile.
    • display: string (required) — Display name of the profile.

Example

{
"accessToken": "example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY",
"refreshToken": "example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY",
"expiresIn": 3600,
"project": {
"reference": "Project/f6f4da8d-93e8-8a08-220e-03b7810451d3",
"display": "My Medical Project"
},
"profile": {
"reference": "Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498",
"display": "Max Mustermann"
}
}