{"openapi":"3.2.0","info":{"contact":{"email":"hi@hedia.com","name":"Hedia ApS","url":"https://hedia.com"},"termsOfService":"https://www.hedia.com/terms-and-conditions","title":"ID API","version":"2.0.0"},"servers":[{"url":"https://id.hedia.com/api/v2"}],"tags":[{"name":"Languages","description":"Browse languages.","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/operations#languages","description":"Documentation"}},{"name":"Users","description":"Manage users.","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/operations#users","description":"Documentation"}}],"paths":{"/languages":{"get":{"summary":"List languages","operationId":"listLanguages","responses":{"200":{"description":"OK","headers":{"Cache-Control":{"required":false,"schema":{"$ref":"#/components/schemas/CacheControl"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Languages"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"default":{"$ref":"#/components/responses/InternalServerError"}},"security":[{}],"tags":["Languages"],"externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/operations/listLanguages","description":"Documentation"}}},"/user":{"get":{"summary":"Get current user profile","operationId":"getCurrentUserProfile","description":"Get the profile of the current user. Returns only the fields the app has been granted access to, further restricted by the token's scopes.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfile"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"accessToken":[]}],"tags":["Users"],"externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/operations/getCurrentUserProfile","description":"Documentation"}}},"/users":{"query":{"summary":"Query users","operationId":"queryUsers","description":"Query users by their email address. Supports exact matches only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryUsersRequestBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"service":[]}],"tags":["Users"]}},"/users/{userId}":{"get":{"summary":"Get a user","operationId":"getUser","description":"Get the details for a single user.","parameters":[{"$ref":"#/components/parameters/UserIdPathParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"service":[]}],"tags":["Users"],"externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/operations/getUser","description":"Documentation"}}},"/users/{userId}/profile":{"get":{"summary":"Get a user's profile","operationId":"getUserProfile","description":"Get the profile of a user. Returns only the fields the app has been granted access to.","parameters":[{"$ref":"#/components/parameters/UserIdPathParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"app":[]}],"tags":["Users"],"externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/operations/getUserProfile","description":"Documentation"}}}},"components":{"securitySchemes":{"accessToken":{"description":"An Access Token Bearer JSON Web Token obtained through OAuth2 flow.","type":"http","scheme":"bearer","bearerFormat":"JWT"},"app":{"description":"An Application Bearer JSON Web Token. The token should include an issuer (the app ID), a software version (a string) and an audience (the API URL). The public key should be uploaded to developer website in the app keys section.","type":"http","scheme":"bearer","bearerFormat":"JWT"},"service":{"description":"A Service Bearer JSON Web Token.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ProblemDetails":{"title":"Problem Details","description":"A problem details object provides additional information about a problem that occurred during an API request.","type":"object","properties":{"type":{"type":"string","description":"A URI reference that identifies the problem type.","examples":["/problems/unauthorized","about:blank"]},"title":{"type":"string","description":"A short, human-readable summary of the problem type.","examples":["Unauthorized"]},"status":{"type":"number","description":"The HTTP status code generated by the origin server for this occurrence of the problem.","examples":[401]},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","examples":["You must authenticate and provide the necessary permissions to access this resource. Please check your credentials or token."]}},"required":["type"],"$id":"./components/schemas/ProblemDetails","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/ProblemDetails","description":"Documentation"}},"CacheControl":{"title":"Cache Control","description":"The `Cache-Control` header is used to specify directives to control how, and for how long, the response should be cached.","type":"string","example":"max-age=60, public","$id":"./components/schemas/CacheControl","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/CacheControl","description":"Documentation"}},"Language":{"title":"Language","description":"Two-letter language code (ISO 639-1).","type":"string","enum":["da","de","en","es","fr","it","pl","sv"],"example":"da","$id":"./components/schemas/Language","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/Language","description":"Documentation"}},"Languages":{"title":"Languages","description":"List of language codes","type":"array","items":{"$ref":"#/components/schemas/Language"},"uniqueItems":true,"$id":"./components/schemas/Languages","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/Languages","description":"Documentation"}},"UserId":{"title":"User ID","description":"The user ID is a unique identifier for a user.","type":"string","format":"uuid","example":"9352258f-0263-47d1-b9c7-16cd93be7501","$id":"./components/schemas/UserId","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/UserId","description":"Documentation"}},"Country":{"title":"Country","description":"The two-letter (A-2) ISO 3166-1 code for the user's country of residence. Only countries supported by Hedia are allowed.","type":"string","enum":["AT","CL","DE","DK","ES","FR","GB","IE","IT","LU","MT","PL","SE"],"example":"DK","$id":"./components/schemas/Country","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/Country","description":"Documentation"}},"UserEmail":{"title":"User Email","description":"The email is a unique email address to identify and communicate with the user.","type":"string","format":"email","example":"john@doe.com","$id":"./components/schemas/UserEmail","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/UserEmail","description":"Documentation"}},"UserInitials":{"title":"User Initials","description":"The user's initials, how they will be addressed in the app.","type":"string","minLength":1,"maxLength":2,"example":"JD","$id":"./components/schemas/UserInitials","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/UserInitials","description":"Documentation"}},"UserName":{"title":"User Name","description":"The name is the user's name, and how they will be addressed in the app.","type":"string","pattern":".*\\S.*","minLength":1,"maxLength":255,"example":"John Doe","$id":"./components/schemas/UserName","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/UserName","description":"Documentation"}},"UserProfile":{"title":"User Profile","type":"object","properties":{"id":{"$ref":"#/components/schemas/UserId"},"country":{"$ref":"#/components/schemas/Country"},"email":{"$ref":"#/components/schemas/UserEmail"},"initials":{"$ref":"#/components/schemas/UserInitials"},"language":{"$ref":"#/components/schemas/Language"},"name":{"$ref":"#/components/schemas/UserName"}},"required":["id"],"additionalProperties":false,"$id":"./components/schemas/UserProfile","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/UserProfile","description":"Documentation"}},"QueryUsersRequestBody":{"title":"Query Users Request Body","type":"object","properties":{"email":{"$ref":"#/components/schemas/UserEmail"}},"required":["email"],"additionalProperties":false,"$id":"./components/schemas/QueryUsersRequestBody","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/QueryUsersRequestBody","description":"Documentation"}},"UserBlocked":{"title":"User Blocked","description":"The blocked property determines whether or not a user can use their account.","type":"boolean","$id":"./components/schemas/UserBlocked","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/UserBlocked","description":"Documentation"}},"UserRole":{"title":"User Role","description":"The role property grants a specific set of permissions to the user.","type":"string","enum":["user","developer","support","admin"],"$id":"./components/schemas/UserRole","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/UserRole","description":"Documentation"}},"CreatedAt":{"title":"Created At","type":"string","format":"date-time","$id":"./components/schemas/CreatedAt","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/CreatedAt","description":"Documentation"}},"CreatedBy":{"title":"Created By","type":"string","format":"uuid","$id":"./components/schemas/CreatedBy","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/CreatedBy","description":"Documentation"}},"UpdatedAt":{"title":"Updated At","type":"string","format":"date-time","$id":"./components/schemas/UpdatedAt","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/UpdatedAt","description":"Documentation"}},"UpdatedBy":{"title":"Updated By","type":"string","format":"uuid","$id":"./components/schemas/UpdatedBy","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/UpdatedBy","description":"Documentation"}},"User":{"title":"User","type":"object","properties":{"id":{"$ref":"#/components/schemas/UserId"},"blocked":{"$ref":"#/components/schemas/UserBlocked"},"name":{"$ref":"#/components/schemas/UserName"},"initials":{"$ref":"#/components/schemas/UserInitials"},"country":{"$ref":"#/components/schemas/Country"},"language":{"$ref":"#/components/schemas/Language"},"role":{"$ref":"#/components/schemas/UserRole"},"createdAt":{"$ref":"#/components/schemas/CreatedAt"},"createdBy":{"$ref":"#/components/schemas/CreatedBy"},"updatedAt":{"$ref":"#/components/schemas/UpdatedAt"},"updatedBy":{"$ref":"#/components/schemas/UpdatedBy"}},"required":["id","blocked","language","role","createdAt","createdBy"],"additionalProperties":false,"$id":"./components/schemas/User","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/User","description":"Documentation"}},"UserList":{"title":"User List","description":"A list of users.","type":"array","items":{"$ref":"#/components/schemas/User"},"$id":"./components/schemas/UserList","externalDocs":{"url":"https://developer.hedia.com/services/id/api/v2/components/schemas/UserList","description":"Documentation"}}},"responses":{"InternalServerError":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"BadRequest":{"description":"Bad Request","content":{"application/json":{},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"NotFound":{"description":"Not Found","content":{"application/json":{},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"parameters":{"UserIdPathParameter":{"name":"userId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/UserId"}}}},"externalDocs":{"url":"https://developer.hedia.com/","description":"Documentation"}}