openapi: 3.0.3
info:
  title: 'Aether API'
  description: ''
  version: 1.0.0
servers:
  -
    url: 'http://localhost:8000'
tags:
  -
    name: Acadle
    description: 'Endpoints related to Acadle integration'
  -
    name: 'Activation codes'
    description: 'API endpoints for activation codes'
  -
    name: Authentication
    description: 'API endpoints for managing authentication'
  -
    name: Chat
    description: 'API endpoints for chat management'
  -
    name: Config
    description: 'API endpoints for device config management'
  -
    name: 'Config Demo'
    description: 'API endpoints for managing config demos'
  -
    name: 'Config Modes'
    description: 'API endpoints for managing config modes'
  -
    name: 'Config Notes'
    description: 'API endpoints for config history notes'
  -
    name: 'Config Schema'
    description: 'API endpoints for config schema management'
  -
    name: 'Config Templates'
    description: 'API endpoints for managing config templates'
  -
    name: 'Config Templates Notes'
    description: 'API endpoints for config templates notes'
  -
    name: 'Custom Grips'
    description: 'API endpoints for custom grips management'
  -
    name: 'Device Models'
    description: 'API endpoints for device models management'
  -
    name: Devices
    description: 'API endpoints for devices management'
  -
    name: Documents
    description: 'API endpoints for documents management'
  -
    name: Feedback
    description: 'Endpoints related to feedback collecting'
  -
    name: GeoData
    description: 'API endpoints for geodata'
  -
    name: Goals
    description: "API endpoints for goals\n\nThe goals module consists of:\n - <strong>exercises</strong> - predefined actions which should be performed by patient. Exercises can be managed only by SuperAdmin,\n - <strong>goals</strong> - objectives defined for each patient which could consists of exercises, grips and grip switches,\n - <strong>goal conditions</strong> - parts of the goal, single condition of type exercise, grips goal or switches goal."
  -
    name: Invitations
    description: ''
  -
    name: Logs
    description: 'API endpoints for managing event logs'
  -
    name: Messages
    description: 'API endpoints for message center'
  -
    name: 'Mobile logs'
    description: 'API endpoints for managing mobile logs'
  -
    name: 'P2P Sessions'
    description: 'API endpoints for managing P2P (peer-to-peer) sessions'
  -
    name: 'Product features and toggles'
    description: "API endpoints for product features and toggles management\n\nDefinitions:\n<ul>\n<li><strong>Product feature</strong> - part of application which can be considered\nas hardware compatible (with for example specific PCB version)\nor software compatible (with for example specific firmware version).\nProduct features are used in versions compatibility matrix.</li>\n<li><strong>Product toggle</strong> - part of application which can be enabled and disabled for current environment.</li>\n</ul>"
  -
    name: Releases
    description: 'API endpoints for releases management'
  -
    name: Search
    description: 'API endpoints for search'
  -
    name: Servicing
    description: 'API endpoints for servicing'
  -
    name: Settings
    description: 'API endpoints for app settings'
  -
    name: 'Support Ticket'
    description: 'API endpoints for managing support tickets'
  -
    name: Tooltips
    description: 'API endpoints for managing tooltips'
  -
    name: Trainings
    description: 'API endpoints for trainings'
  -
    name: Users
    description: 'API endpoints for user management'
  -
    name: Versions
    description: 'API endpoints for versions management'
  -
    name: 'Video sessions'
    description: 'API endpoints for managing video sessions'
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: "<h3>Token based authentication</h3>\n<p>You can retrieve your access token by calling <a href=\"#login-user\">api/login</a> endpoint.</p>\n<p>Access tokens are valid 7 days, then expire. You can obtain new access token with expiring access token by calling\n<a href=\"#refresh-access-token\">/api/token/refresh</a>.\nYou can only refresh still valid tokens, otherwise new request to <a href=\"#login-user\">api/login</a> will be required.</p>\n\n<h3>Cookie based authentication</h3>\n<p>You can also authenticate using cookie-based sessions. Before calling any other endpoints you have to obtain XSRF cookie by hitting <code>/sanctum/csrf-cookie</code> endpoint.\nIn return you receive XSRF-TOKEN cookie, which content you have to attach to each request as X-XSRF-TOKEN header.</p>\n<p>Then call <a href=\"#login-user-spa\">/login</a> endpoint. When your authenticated session is created, call any endpoint using X-XSRF-TOKEN header.</p>\n\n<h3>Multi-Factor Authorization (MFA)</h3>\n<p>User can protect its account setting up the MFA as email or one-time passwords (OTP).\nIf <code>mfa_enabled</code> is set to 1 and <code>mfa_method</code> is set to any of email or otp values,\nuser will have to use preferred method as second factor on login.<p>\n<p>If <code>mfa_method</code> is email, API will automatically send MFA code to user's email inbox.</p>\n<p>Most of API endpoints are secured with additional layer and cannot be properly called without this second-factor authorization done.\nInstead of endpoint response API will reply with message <code>\"MFA is required for this request.\"</code> and HTTP code <code>401 Unauthorized</code>.\nThat means user did not successfully authorized itself with second-factor.</p>\n\n<h3>Multi-Factor Authorization (MFA) - Remember Session</h3>\n<p>The user has the option to remember their device, which means they won't have to enter the MFA code for 30 days.\nIf using a Token based authentication, you need to add a header named <b><code>X-MFA-Session-Token</code></b> with the value <b><code>{mfa_token}</code></b> obtained from the <a href=\"#verify-mfa-code\">/verify</a> endpoint.\n</p>"
security:
  -
    default: []
paths:
  /api/acadle/sso:
    post:
      summary: 'Acadle SSO'
      operationId: acadleSSO
      description: 'Creates the SSO authorization link. The link expires after 60 seconds, but can be re-generated without any limits.'
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  sso_url: 'https://adp.acadle.com/sso/authenticate/callback?ssoToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MzczNzU3OTksImV4cCI6MTczNzM3NTg1OSwiZmlyc3RuYW1lIjoiVG9tIiwibGFzdG5hbWUiOiJTbWl0aCIsImVtYWlsIjoidGVzdEBleGFtcGxlLmNvbSIsInVzZXJuYW1lIjpudWxsLCJ0aW1lem9uZSI6IlVUQyJ9.VzE2q6V53bdYJM7aB6CWWxDqcxF4gpdiEF80dD9j-5k'
                  sso_expires: 1737375859
                properties:
                  sso_url:
                    type: string
                    example: 'https://adp.acadle.com/sso/authenticate/callback?ssoToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MzczNzU3OTksImV4cCI6MTczNzM3NTg1OSwiZmlyc3RuYW1lIjoiVG9tIiwibGFzdG5hbWUiOiJTbWl0aCIsImVtYWlsIjoidGVzdEBleGFtcGxlLmNvbSIsInVzZXJuYW1lIjpudWxsLCJ0aW1lem9uZSI6IlVUQyJ9.VzE2q6V53bdYJM7aB6CWWxDqcxF4gpdiEF80dD9j-5k'
                  sso_expires:
                    type: integer
                    example: 1737375859
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to use Acadle'
                      code: 'ACADLE:SSO:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to use Acadle'
                      code:
                        type: string
                        example: 'ACADLE:SSO:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Survey required'
                    type: object
                    example:
                      message: 'Completing the survey is required to proceed to Acadle'
                      code: 'ACADLE:SSO:SURVEY_REQUIRED'
                    properties:
                      message:
                        type: string
                        example: 'Completing the survey is required to proceed to Acadle'
                      code:
                        type: string
                        example: 'ACADLE:SSO:SURVEY_REQUIRED'
      tags:
        - Acadle
  /api/acadle/survey/status:
    get:
      summary: 'Check Acadle survey status'
      operationId: checkAcadleSurveyStatus
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  survey_sent: false
                  survey_id: null
                properties:
                  survey_sent:
                    type: boolean
                    example: false
                  survey_id:
                    type: string
                    example: null
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to use Acadle'
                  code: 'ACADLE:SURVEY_STATUS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to use Acadle'
                  code:
                    type: string
                    example: 'ACADLE:SURVEY_STATUS:INSUFFICIENT_PERMISSION'
      tags:
        - Acadle
  /api/acadle/survey:
    get:
      summary: 'Get Acadle survey data'
      operationId: getAcadleSurveyData
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  user_id: 296
                  cpo_number: '101'
                  country: 'Falkland Islands (Malvinas)'
                  medical_training: physician
                  myo_exp_zeus: '1'
                  has_demo_hand_access: 0
                  wants_demo_hand: 1
                  myo_exp_covvi: 1
                  myo_exp_fillauer: 0
                  myo_exp_ossur: 0
                  myo_exp_ottobock: 0
                  myo_exp_steeper: 1
                  myo_exp_taska: 1
                  myo_exp_vincent: 1
                  myo_exp_pattern_recognition: 0
                  myo_exp_other: 'Nisi reiciendis dolor itaque impedit ullam sapiente et.'
                  partial_hand_protheses: '1'
                  below_elbow_protheses_single_action: '4'
                  below_elbow_protheses_multi_action: '2'
                  above_elbow_protheses: '0'
                  shoulder_protheses: '5'
                  zeus_components_description: 'Odio a ipsam voluptas aut qui culpa.'
                  contact_name: Brendan
                  contact_surname: Hayes
                  company_name: 'VonRueden, Feeney and Mann'
                  street: '229 Saul Orchard'
                  city: Howellshire
                  postal_code: '49071'
                  email: dmurphy@howe.com
                  phone: 475-876-0115
                  phone_country: gh
                  device_side: R
                  created_at: '2025-12-10T12:00:20.000000Z'
                  updated_at: '2025-12-10T12:00:20.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  user_id:
                    type: integer
                    example: 296
                  cpo_number:
                    type: string
                    example: '101'
                  country:
                    type: string
                    example: 'Falkland Islands (Malvinas)'
                  medical_training:
                    type: string
                    example: physician
                  myo_exp_zeus:
                    type: string
                    example: '1'
                  has_demo_hand_access:
                    type: integer
                    example: 0
                  wants_demo_hand:
                    type: integer
                    example: 1
                  myo_exp_covvi:
                    type: integer
                    example: 1
                  myo_exp_fillauer:
                    type: integer
                    example: 0
                  myo_exp_ossur:
                    type: integer
                    example: 0
                  myo_exp_ottobock:
                    type: integer
                    example: 0
                  myo_exp_steeper:
                    type: integer
                    example: 1
                  myo_exp_taska:
                    type: integer
                    example: 1
                  myo_exp_vincent:
                    type: integer
                    example: 1
                  myo_exp_pattern_recognition:
                    type: integer
                    example: 0
                  myo_exp_other:
                    type: string
                    example: 'Nisi reiciendis dolor itaque impedit ullam sapiente et.'
                  partial_hand_protheses:
                    type: string
                    example: '1'
                  below_elbow_protheses_single_action:
                    type: string
                    example: '4'
                  below_elbow_protheses_multi_action:
                    type: string
                    example: '2'
                  above_elbow_protheses:
                    type: string
                    example: '0'
                  shoulder_protheses:
                    type: string
                    example: '5'
                  zeus_components_description:
                    type: string
                    example: 'Odio a ipsam voluptas aut qui culpa.'
                  contact_name:
                    type: string
                    example: Brendan
                  contact_surname:
                    type: string
                    example: Hayes
                  company_name:
                    type: string
                    example: 'VonRueden, Feeney and Mann'
                  street:
                    type: string
                    example: '229 Saul Orchard'
                  city:
                    type: string
                    example: Howellshire
                  postal_code:
                    type: string
                    example: '49071'
                  email:
                    type: string
                    example: dmurphy@howe.com
                  phone:
                    type: string
                    example: 475-876-0115
                  phone_country:
                    type: string
                    example: gh
                  device_side:
                    type: string
                    example: R
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:20.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:20.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to use Acadle'
                  code: 'ACADLE:SURVEY_RESULTS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to use Acadle'
                  code:
                    type: string
                    example: 'ACADLE:SURVEY_RESULTS:INSUFFICIENT_PERMISSION'
        404:
          description: 'Survey not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Survey not found'
                  code: 'ACADLE:SURVEY_RESULTS:SURVEY_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Survey not found'
                  code:
                    type: string
                    example: 'ACADLE:SURVEY_RESULTS:SURVEY_NOT_FOUND'
      tags:
        - Acadle
    post:
      summary: 'Send Acadle survey'
      operationId: sendAcadleSurvey
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 5
                  user_id: 300
                  cpo_number: '8'
                  country: Korea
                  medical_training: physician
                  myo_exp_zeus: '0'
                  has_demo_hand_access: 0
                  wants_demo_hand: 1
                  myo_exp_covvi: 1
                  myo_exp_fillauer: 1
                  myo_exp_ossur: 0
                  myo_exp_ottobock: 1
                  myo_exp_steeper: 1
                  myo_exp_taska: 1
                  myo_exp_vincent: 1
                  myo_exp_pattern_recognition: 0
                  myo_exp_other: 'Omnis voluptas praesentium magnam cum qui eligendi.'
                  partial_hand_protheses: '2'
                  below_elbow_protheses_single_action: '5'
                  below_elbow_protheses_multi_action: '1'
                  above_elbow_protheses: '1'
                  shoulder_protheses: '5'
                  zeus_components_description: 'Eos sit perspiciatis maxime illum.'
                  contact_name: Cecile
                  contact_surname: Balistreri
                  company_name: 'Zboncak, Hettinger and Hilpert'
                  street: '819 Brown Road Suite 506'
                  city: Bettyeville
                  postal_code: 61643-7278
                  email: geovanny02@wiegand.com
                  phone: 651.362.6138
                  phone_country: pk
                  device_side: R
                  created_at: '2025-12-10T12:00:20.000000Z'
                  updated_at: '2025-12-10T12:00:20.000000Z'
                properties:
                  id:
                    type: integer
                    example: 5
                  user_id:
                    type: integer
                    example: 300
                  cpo_number:
                    type: string
                    example: '8'
                  country:
                    type: string
                    example: Korea
                  medical_training:
                    type: string
                    example: physician
                  myo_exp_zeus:
                    type: string
                    example: '0'
                  has_demo_hand_access:
                    type: integer
                    example: 0
                  wants_demo_hand:
                    type: integer
                    example: 1
                  myo_exp_covvi:
                    type: integer
                    example: 1
                  myo_exp_fillauer:
                    type: integer
                    example: 1
                  myo_exp_ossur:
                    type: integer
                    example: 0
                  myo_exp_ottobock:
                    type: integer
                    example: 1
                  myo_exp_steeper:
                    type: integer
                    example: 1
                  myo_exp_taska:
                    type: integer
                    example: 1
                  myo_exp_vincent:
                    type: integer
                    example: 1
                  myo_exp_pattern_recognition:
                    type: integer
                    example: 0
                  myo_exp_other:
                    type: string
                    example: 'Omnis voluptas praesentium magnam cum qui eligendi.'
                  partial_hand_protheses:
                    type: string
                    example: '2'
                  below_elbow_protheses_single_action:
                    type: string
                    example: '5'
                  below_elbow_protheses_multi_action:
                    type: string
                    example: '1'
                  above_elbow_protheses:
                    type: string
                    example: '1'
                  shoulder_protheses:
                    type: string
                    example: '5'
                  zeus_components_description:
                    type: string
                    example: 'Eos sit perspiciatis maxime illum.'
                  contact_name:
                    type: string
                    example: Cecile
                  contact_surname:
                    type: string
                    example: Balistreri
                  company_name:
                    type: string
                    example: 'Zboncak, Hettinger and Hilpert'
                  street:
                    type: string
                    example: '819 Brown Road Suite 506'
                  city:
                    type: string
                    example: Bettyeville
                  postal_code:
                    type: string
                    example: 61643-7278
                  email:
                    type: string
                    example: geovanny02@wiegand.com
                  phone:
                    type: string
                    example: 651.362.6138
                  phone_country:
                    type: string
                    example: pk
                  device_side:
                    type: string
                    example: R
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:20.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:20.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to use Acadle'
                      code: 'ACADLE:SURVEY_SEND:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to use Acadle'
                      code:
                        type: string
                        example: 'ACADLE:SURVEY_SEND:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Survey already sent'
                    type: object
                    example:
                      message: 'Survey already sent'
                      code: 'ACADLE:SURVEY_SEND:SURVEY_ALREADY_SENT'
                    properties:
                      message:
                        type: string
                        example: 'Survey already sent'
                      code:
                        type: string
                        example: 'ACADLE:SURVEY_SEND:SURVEY_ALREADY_SENT'
      tags:
        - Acadle
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                cpo_number:
                  type: string
                  description: 'CPO Number.'
                  example: 546935
                country:
                  type: string
                  description: 'Country name.'
                  example: 'French Polynesia'
                medical_training:
                  type: string
                  description: "Clinician's medical/clinical training."
                  example: clinician
                  enum:
                    - clinician
                    - physiotherapist
                    - physician
                    - biomedical_engineer
                    - other
                    - prosthetist
                myo_exp_zeus:
                  type: boolean
                  description: 'Does clinician have an experience working with Zeus hands.'
                  example: false
                myo_exp_covvi:
                  type: boolean
                  description: 'Does clinician have an experience working with Covvi hands.'
                  example: false
                myo_exp_fillauer:
                  type: boolean
                  description: 'Does clinician have an experience working with Fillauer hands.'
                  example: false
                myo_exp_ossur:
                  type: boolean
                  description: 'Does clinician have an experience working with Ossur hands.'
                  example: false
                myo_exp_ottobock:
                  type: boolean
                  description: 'Does clinician have an experience working with Ottobock hands.'
                  example: false
                myo_exp_steeper:
                  type: boolean
                  description: 'Does clinician have an experience working with Steeper hands.'
                  example: false
                myo_exp_taska:
                  type: boolean
                  description: 'Does clinician have an experience working with Taska hands.'
                  example: false
                myo_exp_vincent:
                  type: boolean
                  description: 'Does clinician have an experience working with Vincent hands.'
                  example: false
                myo_exp_pattern_recognition:
                  type: boolean
                  description: 'Does clinician have an experience working with Pattern Recognition.'
                  example: false
                myo_exp_other:
                  type: string
                  description: 'Does clinician have an experience working with any other hands. MINIMUM:STRING_LENGTH:3.'
                  example: 'Error minima animi blanditiis ex inventore.'
                has_demo_hand_access:
                  type: boolean
                  description: 'Does clinician have access to a demo hand.'
                  example: false
                wants_demo_hand:
                  type: boolean
                  description: 'Does clinician want a demo hand.'
                  example: false
                partial_hand_protheses:
                  type: string
                  description: 'How many prostheses of type partial hand does clinician make per year.'
                  example: 1-5
                below_elbow_protheses_single_action:
                  type: string
                  description: 'How many prostheses of type below elbow (single-action) does clinician make per year.'
                  example: 1-5
                below_elbow_protheses_multi_action:
                  type: string
                  description: 'How many prostheses of type below elbow (multi-action) does clinician make per year.'
                  example: 5-10
                above_elbow_protheses:
                  type: string
                  description: 'How many prostheses of type above elbow does clinician make per year.'
                  example: 50+
                shoulder_protheses:
                  type: string
                  description: 'How many prostheses of type shoulder does clinician make per year.'
                  example: 1-5
                zeus_components_description:
                  type: string
                  description: 'Description which components would clinician like to use with a Zeus hand. MINIMUM:STRING_LENGTH:10.'
                  example: 'Nihil non cumque et dolores fugit et.'
                contact_name:
                  type: string
                  description: 'Contact information: full name. This field is required when <code>wants_demo_hand</code> is <code>true</code>.'
                  example: Tressie
                company_name:
                  type: string
                  description: 'Contact information: company name. This field is required when <code>wants_demo_hand</code> is <code>true</code>.'
                  example: 'Barton, Ryan and Ankunding'
                street:
                  type: string
                  description: 'Contact information: street. This field is required when <code>wants_demo_hand</code> is <code>true</code>.'
                  example: '609 Marcelle Islands'
                city:
                  type: string
                  description: 'Contact information: city/state. This field is required when <code>wants_demo_hand</code> is <code>true</code>.'
                  example: 'East Phoebe'
                postal_code:
                  type: string
                  description: 'Contact information: postal code. This field is required when <code>wants_demo_hand</code> is <code>true</code>.'
                  example: 60406-2400
                email:
                  type: string
                  description: 'Contact information: email. This field is required when <code>wants_demo_hand</code> is <code>true</code>. MUST_BE_EMAIL.'
                  example: psporer@ohara.com
                phone:
                  type: string
                  description: 'Contact information: phone. This field is required when <code>wants_demo_hand</code> is <code>true</code>.'
                  example: 1-443-740-6213
                phone_country:
                  type: string
                  description: 'Contact information: phone country. This field is required when <code>wants_demo_hand</code> is <code>true</code>. SIZE:STRING_LENGTH:2.'
                  example: KY
                device_side:
                  type: string
                  description: 'The side of the hand. This field is required when <code>wants_demo_hand</code> is <code>true</code>.'
                  example: R
                  enum:
                    - L
                    - R
              required:
                - country
                - medical_training
                - myo_exp_zeus
                - myo_exp_covvi
                - myo_exp_fillauer
                - myo_exp_ossur
                - myo_exp_ottobock
                - myo_exp_steeper
                - myo_exp_taska
                - myo_exp_vincent
                - myo_exp_pattern_recognition
                - has_demo_hand_access
                - wants_demo_hand
  '/api/acadle/survey/{id}':
    get:
      summary: 'Get Acadle survey data (SuperAdmin)'
      operationId: getAcadleSurveyDataSuperAdmin
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 2
                  user_id: 297
                  cpo_number: '36084010'
                  country: 'Marshall Islands'
                  medical_training: physiotherapist
                  myo_exp_zeus: '1'
                  has_demo_hand_access: 1
                  wants_demo_hand: 1
                  myo_exp_covvi: 1
                  myo_exp_fillauer: 0
                  myo_exp_ossur: 0
                  myo_exp_ottobock: 1
                  myo_exp_steeper: 0
                  myo_exp_taska: 0
                  myo_exp_vincent: 0
                  myo_exp_pattern_recognition: 0
                  myo_exp_other: 'Pariatur ea consectetur sequi odio saepe.'
                  partial_hand_protheses: '1'
                  below_elbow_protheses_single_action: '5'
                  below_elbow_protheses_multi_action: '0'
                  above_elbow_protheses: '0'
                  shoulder_protheses: '0'
                  zeus_components_description: 'Eveniet qui aut voluptates nostrum architecto eos ipsa.'
                  contact_name: Cara
                  contact_surname: Wisozk
                  company_name: 'Marks and Sons'
                  street: '70210 Cummerata Unions Apt. 518'
                  city: Candaceton
                  postal_code: 78841-9165
                  email: wisoky.amalia@mcclure.net
                  phone: 650.454.1116
                  phone_country: ar
                  device_side: R
                  created_at: '2025-12-10T12:00:20.000000Z'
                  updated_at: '2025-12-10T12:00:20.000000Z'
                properties:
                  id:
                    type: integer
                    example: 2
                  user_id:
                    type: integer
                    example: 297
                  cpo_number:
                    type: string
                    example: '36084010'
                  country:
                    type: string
                    example: 'Marshall Islands'
                  medical_training:
                    type: string
                    example: physiotherapist
                  myo_exp_zeus:
                    type: string
                    example: '1'
                  has_demo_hand_access:
                    type: integer
                    example: 1
                  wants_demo_hand:
                    type: integer
                    example: 1
                  myo_exp_covvi:
                    type: integer
                    example: 1
                  myo_exp_fillauer:
                    type: integer
                    example: 0
                  myo_exp_ossur:
                    type: integer
                    example: 0
                  myo_exp_ottobock:
                    type: integer
                    example: 1
                  myo_exp_steeper:
                    type: integer
                    example: 0
                  myo_exp_taska:
                    type: integer
                    example: 0
                  myo_exp_vincent:
                    type: integer
                    example: 0
                  myo_exp_pattern_recognition:
                    type: integer
                    example: 0
                  myo_exp_other:
                    type: string
                    example: 'Pariatur ea consectetur sequi odio saepe.'
                  partial_hand_protheses:
                    type: string
                    example: '1'
                  below_elbow_protheses_single_action:
                    type: string
                    example: '5'
                  below_elbow_protheses_multi_action:
                    type: string
                    example: '0'
                  above_elbow_protheses:
                    type: string
                    example: '0'
                  shoulder_protheses:
                    type: string
                    example: '0'
                  zeus_components_description:
                    type: string
                    example: 'Eveniet qui aut voluptates nostrum architecto eos ipsa.'
                  contact_name:
                    type: string
                    example: Cara
                  contact_surname:
                    type: string
                    example: Wisozk
                  company_name:
                    type: string
                    example: 'Marks and Sons'
                  street:
                    type: string
                    example: '70210 Cummerata Unions Apt. 518'
                  city:
                    type: string
                    example: Candaceton
                  postal_code:
                    type: string
                    example: 78841-9165
                  email:
                    type: string
                    example: wisoky.amalia@mcclure.net
                  phone:
                    type: string
                    example: 650.454.1116
                  phone_country:
                    type: string
                    example: ar
                  device_side:
                    type: string
                    example: R
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:20.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:20.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to use Acadle'
                  code: 'ACADLE:SURVEY_RESULTS_ADMIN:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to use Acadle'
                  code:
                    type: string
                    example: 'ACADLE:SURVEY_RESULTS_ADMIN:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'User not found'
                    type: object
                    example:
                      message: 'User not found'
                      code: 'ACADLE:SURVEY_RESULTS_ADMIN:USER_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'User not found'
                      code:
                        type: string
                        example: 'ACADLE:SURVEY_RESULTS_ADMIN:USER_NOT_FOUND'
                  -
                    description: 'Survey not found'
                    type: object
                    example:
                      message: 'Survey not found'
                      code: 'ACADLE:SURVEY_RESULTS_ADMIN:SURVEY_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Survey not found'
                      code:
                        type: string
                        example: 'ACADLE:SURVEY_RESULTS_ADMIN:SURVEY_NOT_FOUND'
      tags:
        - Acadle
    parameters:
      -
        in: path
        name: id
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/acadle/surveys:
    get:
      summary: 'List all Acadle surveys (SuperAdmin)'
      operationId: listAllAcadleSurveysSuperAdmin
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Filter surveys by searching in: user name, user email, contact name, contact surname, contact email, CPO number.'
          example: john
          required: false
          schema:
            type: string
            description: 'Filter surveys by searching in: user name, user email, contact name, contact surname, contact email, CPO number.'
            example: john
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>user</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>user</code>).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>date</code>, <code>user_name</code>, <code>user_email</code>, <code>contact_name</code>, <code>contact_surname</code>, <code>country</code>, <code>medical_training</code>, <code>cpo_number</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>date</code>, <code>user_name</code>, <code>user_email</code>, <code>contact_name</code>, <code>contact_surname</code>, <code>country</code>, <code>medical_training</code>, <code>cpo_number</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 3
                      user_id: 298
                      cpo_number: '849902454'
                      country: France
                      medical_training: clinician
                      myo_exp_zeus: '0'
                      has_demo_hand_access: 0
                      wants_demo_hand: 0
                      myo_exp_covvi: 0
                      myo_exp_fillauer: 1
                      myo_exp_ossur: 1
                      myo_exp_ottobock: 0
                      myo_exp_steeper: 1
                      myo_exp_taska: 0
                      myo_exp_vincent: 0
                      myo_exp_pattern_recognition: 0
                      myo_exp_other: 'Exercitationem voluptatem quo quis ducimus sed.'
                      partial_hand_protheses: '2'
                      below_elbow_protheses_single_action: '1'
                      below_elbow_protheses_multi_action: '1'
                      above_elbow_protheses: '0'
                      shoulder_protheses: '2'
                      zeus_components_description: 'Quod consequatur rerum sapiente et.'
                      contact_name: Judah
                      contact_surname: Langosh
                      company_name: 'Bergnaum Group'
                      street: '414 Sherwood Courts Apt. 841'
                      city: 'Lake Hassieshire'
                      postal_code: '01637'
                      email: mlangworth@beahan.com
                      phone: +1.801.546.6790
                      phone_country: mk
                      device_side: R
                      created_at: '2025-12-10T12:00:20.000000Z'
                      updated_at: '2025-12-10T12:00:20.000000Z'
                    -
                      id: 4
                      user_id: 299
                      cpo_number: '9250589'
                      country: Bangladesh
                      medical_training: biomedical_engineer
                      myo_exp_zeus: '0'
                      has_demo_hand_access: 0
                      wants_demo_hand: 1
                      myo_exp_covvi: 1
                      myo_exp_fillauer: 1
                      myo_exp_ossur: 0
                      myo_exp_ottobock: 0
                      myo_exp_steeper: 0
                      myo_exp_taska: 0
                      myo_exp_vincent: 1
                      myo_exp_pattern_recognition: 0
                      myo_exp_other: 'Numquam non nesciunt corrupti fugiat cumque a nihil.'
                      partial_hand_protheses: '1'
                      below_elbow_protheses_single_action: '2'
                      below_elbow_protheses_multi_action: '5'
                      above_elbow_protheses: '4'
                      shoulder_protheses: '1'
                      zeus_components_description: 'Perferendis voluptatem commodi quae unde voluptatem.'
                      contact_name: Clay
                      contact_surname: Runolfsson
                      company_name: Miller-Corwin
                      street: '28069 Lubowitz Causeway Apt. 847'
                      city: Gleasonchester
                      postal_code: '08989'
                      email: samson06@kihn.com
                      phone: 458-951-6369
                      phone_country: yt
                      device_side: R
                      created_at: '2025-12-10T12:00:20.000000Z'
                      updated_at: '2025-12-10T12:00:20.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 3
                        user_id: 298
                        cpo_number: '849902454'
                        country: France
                        medical_training: clinician
                        myo_exp_zeus: '0'
                        has_demo_hand_access: 0
                        wants_demo_hand: 0
                        myo_exp_covvi: 0
                        myo_exp_fillauer: 1
                        myo_exp_ossur: 1
                        myo_exp_ottobock: 0
                        myo_exp_steeper: 1
                        myo_exp_taska: 0
                        myo_exp_vincent: 0
                        myo_exp_pattern_recognition: 0
                        myo_exp_other: 'Exercitationem voluptatem quo quis ducimus sed.'
                        partial_hand_protheses: '2'
                        below_elbow_protheses_single_action: '1'
                        below_elbow_protheses_multi_action: '1'
                        above_elbow_protheses: '0'
                        shoulder_protheses: '2'
                        zeus_components_description: 'Quod consequatur rerum sapiente et.'
                        contact_name: Judah
                        contact_surname: Langosh
                        company_name: 'Bergnaum Group'
                        street: '414 Sherwood Courts Apt. 841'
                        city: 'Lake Hassieshire'
                        postal_code: '01637'
                        email: mlangworth@beahan.com
                        phone: +1.801.546.6790
                        phone_country: mk
                        device_side: R
                        created_at: '2025-12-10T12:00:20.000000Z'
                        updated_at: '2025-12-10T12:00:20.000000Z'
                      -
                        id: 4
                        user_id: 299
                        cpo_number: '9250589'
                        country: Bangladesh
                        medical_training: biomedical_engineer
                        myo_exp_zeus: '0'
                        has_demo_hand_access: 0
                        wants_demo_hand: 1
                        myo_exp_covvi: 1
                        myo_exp_fillauer: 1
                        myo_exp_ossur: 0
                        myo_exp_ottobock: 0
                        myo_exp_steeper: 0
                        myo_exp_taska: 0
                        myo_exp_vincent: 1
                        myo_exp_pattern_recognition: 0
                        myo_exp_other: 'Numquam non nesciunt corrupti fugiat cumque a nihil.'
                        partial_hand_protheses: '1'
                        below_elbow_protheses_single_action: '2'
                        below_elbow_protheses_multi_action: '5'
                        above_elbow_protheses: '4'
                        shoulder_protheses: '1'
                        zeus_components_description: 'Perferendis voluptatem commodi quae unde voluptatem.'
                        contact_name: Clay
                        contact_surname: Runolfsson
                        company_name: Miller-Corwin
                        street: '28069 Lubowitz Causeway Apt. 847'
                        city: Gleasonchester
                        postal_code: '08989'
                        email: samson06@kihn.com
                        phone: 458-951-6369
                        phone_country: yt
                        device_side: R
                        created_at: '2025-12-10T12:00:20.000000Z'
                        updated_at: '2025-12-10T12:00:20.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 3
                        user_id:
                          type: integer
                          example: 298
                        cpo_number:
                          type: string
                          example: '849902454'
                        country:
                          type: string
                          example: France
                        medical_training:
                          type: string
                          example: clinician
                        myo_exp_zeus:
                          type: string
                          example: '0'
                        has_demo_hand_access:
                          type: integer
                          example: 0
                        wants_demo_hand:
                          type: integer
                          example: 0
                        myo_exp_covvi:
                          type: integer
                          example: 0
                        myo_exp_fillauer:
                          type: integer
                          example: 1
                        myo_exp_ossur:
                          type: integer
                          example: 1
                        myo_exp_ottobock:
                          type: integer
                          example: 0
                        myo_exp_steeper:
                          type: integer
                          example: 1
                        myo_exp_taska:
                          type: integer
                          example: 0
                        myo_exp_vincent:
                          type: integer
                          example: 0
                        myo_exp_pattern_recognition:
                          type: integer
                          example: 0
                        myo_exp_other:
                          type: string
                          example: 'Exercitationem voluptatem quo quis ducimus sed.'
                        partial_hand_protheses:
                          type: string
                          example: '2'
                        below_elbow_protheses_single_action:
                          type: string
                          example: '1'
                        below_elbow_protheses_multi_action:
                          type: string
                          example: '1'
                        above_elbow_protheses:
                          type: string
                          example: '0'
                        shoulder_protheses:
                          type: string
                          example: '2'
                        zeus_components_description:
                          type: string
                          example: 'Quod consequatur rerum sapiente et.'
                        contact_name:
                          type: string
                          example: Judah
                        contact_surname:
                          type: string
                          example: Langosh
                        company_name:
                          type: string
                          example: 'Bergnaum Group'
                        street:
                          type: string
                          example: '414 Sherwood Courts Apt. 841'
                        city:
                          type: string
                          example: 'Lake Hassieshire'
                        postal_code:
                          type: string
                          example: '01637'
                        email:
                          type: string
                          example: mlangworth@beahan.com
                        phone:
                          type: string
                          example: +1.801.546.6790
                        phone_country:
                          type: string
                          example: mk
                        device_side:
                          type: string
                          example: R
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:20.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:20.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to use Acadle'
                  code: 'ACADLE:SURVEYS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to use Acadle'
                  code:
                    type: string
                    example: 'ACADLE:SURVEYS:INSUFFICIENT_PERMISSION'
      tags:
        - Acadle
  /api/activation-codes:
    get:
      summary: 'Get activation codes'
      operationId: getActivationCodes
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      code: P45RYM
                      created_by: 37
                      used_by: 38
                      used_at: null
                      active: 0
                      created_at: '2025-12-10T11:59:57.000000Z'
                      updated_at: '2025-12-10T11:59:57.000000Z'
                    -
                      id: 2
                      code: 2QIPMR
                      created_by: 39
                      used_by: 40
                      used_at: null
                      active: 1
                      created_at: '2025-12-10T11:59:58.000000Z'
                      updated_at: '2025-12-10T11:59:58.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        code: P45RYM
                        created_by: 37
                        used_by: 38
                        used_at: null
                        active: 0
                        created_at: '2025-12-10T11:59:57.000000Z'
                        updated_at: '2025-12-10T11:59:57.000000Z'
                      -
                        id: 2
                        code: 2QIPMR
                        created_by: 39
                        used_by: 40
                        used_at: null
                        active: 1
                        created_at: '2025-12-10T11:59:58.000000Z'
                        updated_at: '2025-12-10T11:59:58.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        code:
                          type: string
                          example: P45RYM
                        created_by:
                          type: integer
                          example: 37
                        used_by:
                          type: integer
                          example: 38
                        used_at:
                          type: string
                          example: null
                        active:
                          type: integer
                          example: 0
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:57.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:57.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage activation codes'
                  code: 'ACTIVATION_CODE:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage activation codes'
                  code:
                    type: string
                    example: 'ACTIVATION_CODE:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - 'Activation codes'
    post:
      summary: 'Create activation code'
      operationId: createActivationCode
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 6
                  code: HX58VK
                  created_by: null
                  used_by: null
                  used_at: null
                  active: 0
                  created_at: '2025-12-10T11:59:58.000000Z'
                  updated_at: '2025-12-10T11:59:58.000000Z'
                properties:
                  id:
                    type: integer
                    example: 6
                  code:
                    type: string
                    example: HX58VK
                  created_by:
                    type: string
                    example: null
                  used_by:
                    type: string
                    example: null
                  used_at:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 0
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:58.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:58.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage activation codes'
                  code: 'ACTIVATION_CODE:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage activation codes'
                  code:
                    type: string
                    example: 'ACTIVATION_CODE:CREATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server error: activation code not created'
                  code: 'ACTIVATION_CODE:CREATE:SERVER_ERROR'
                properties:
                  message:
                    type: string
                    example: 'Server error: activation code not created'
                  code:
                    type: string
                    example: 'ACTIVATION_CODE:CREATE:SERVER_ERROR'
      tags:
        - 'Activation codes'
  /api/activation-codes/active:
    get:
      summary: 'Get active activation codes'
      operationId: getActiveActivationCodes
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 3
                      code: 2LE9B9
                      created_by: 41
                      used_by: 42
                      used_at: null
                      active: 1
                      created_at: '2025-12-10T11:59:58.000000Z'
                      updated_at: '2025-12-10T11:59:58.000000Z'
                    -
                      id: 4
                      code: NI44ID
                      created_by: 43
                      used_by: 44
                      used_at: null
                      active: 0
                      created_at: '2025-12-10T11:59:58.000000Z'
                      updated_at: '2025-12-10T11:59:58.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 3
                        code: 2LE9B9
                        created_by: 41
                        used_by: 42
                        used_at: null
                        active: 1
                        created_at: '2025-12-10T11:59:58.000000Z'
                        updated_at: '2025-12-10T11:59:58.000000Z'
                      -
                        id: 4
                        code: NI44ID
                        created_by: 43
                        used_by: 44
                        used_at: null
                        active: 0
                        created_at: '2025-12-10T11:59:58.000000Z'
                        updated_at: '2025-12-10T11:59:58.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 3
                        code:
                          type: string
                          example: 2LE9B9
                        created_by:
                          type: integer
                          example: 41
                        used_by:
                          type: integer
                          example: 42
                        used_at:
                          type: string
                          example: null
                        active:
                          type: integer
                          example: 1
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:58.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:58.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage activation codes'
                  code: 'ACTIVATION_CODE:ACTIVE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage activation codes'
                  code:
                    type: string
                    example: 'ACTIVATION_CODE:ACTIVE:INSUFFICIENT_PERMISSION'
      tags:
        - 'Activation codes'
  '/api/activation-codes/find/{code}':
    get:
      summary: 'Find activation code'
      operationId: findActivationCode
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 5
                  code: VIH70A
                  created_by: null
                  used_by: null
                  used_at: null
                  active: 1
                  created_at: '2025-12-10T11:59:58.000000Z'
                  updated_at: '2025-12-10T11:59:58.000000Z'
                properties:
                  id:
                    type: integer
                    example: 5
                  code:
                    type: string
                    example: VIH70A
                  created_by:
                    type: string
                    example: null
                  used_by:
                    type: string
                    example: null
                  used_at:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:58.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:58.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage activation codes'
                  code: 'ACTIVATION_CODE:FIND:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage activation codes'
                  code:
                    type: string
                    example: 'ACTIVATION_CODE:FIND:INSUFFICIENT_PERMISSION'
        404:
          description: 'Activation code not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Activation code not found'
                  code: 'ACTIVATION_CODE:FIND:CODE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Activation code not found'
                  code:
                    type: string
                    example: 'ACTIVATION_CODE:FIND:CODE_NOT_FOUND'
      tags:
        - 'Activation codes'
    parameters:
      -
        in: path
        name: code
        description: 'Activation code (not ID).'
        example: vel
        required: true
        schema:
          type: string
  '/api/activation-codes/{code}':
    post:
      summary: 'Create activation code (multi-region)'
      operationId: createActivationCodemultiRegion
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 7
                  code: E5ZSZI
                  created_by: null
                  used_by: null
                  used_at: null
                  active: 1
                  created_at: '2025-12-10T11:59:58.000000Z'
                  updated_at: '2025-12-10T11:59:58.000000Z'
                properties:
                  id:
                    type: integer
                    example: 7
                  code:
                    type: string
                    example: E5ZSZI
                  created_by:
                    type: string
                    example: null
                  used_by:
                    type: string
                    example: null
                  used_at:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:58.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:58.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage activation codes'
                  code: 'ACTIVATION_CODE:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage activation codes'
                  code:
                    type: string
                    example: 'ACTIVATION_CODE:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - 'Activation codes'
    parameters:
      -
        in: path
        name: code
        description: ''
        example: 11
        required: true
        schema:
          type: integer
  '/api/activation-codes/{codeId}':
    delete:
      summary: 'Deactivate activation code'
      operationId: deactivateActivationCode
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 8
                  code: 5MS9NA
                  created_by: null
                  used_by: null
                  used_at: null
                  active: 1
                  created_at: '2025-12-10T11:59:58.000000Z'
                  updated_at: '2025-12-10T11:59:58.000000Z'
                properties:
                  id:
                    type: integer
                    example: 8
                  code:
                    type: string
                    example: 5MS9NA
                  created_by:
                    type: string
                    example: null
                  used_by:
                    type: string
                    example: null
                  used_at:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:58.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:58.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to manage activation codes'
                      code: 'ACTIVATION_CODE:DEACTIVATE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to manage activation codes'
                      code:
                        type: string
                        example: 'ACTIVATION_CODE:DEACTIVATE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Activation code is not active'
                    type: object
                    example:
                      message: 'Cannot deactivate: code is not active'
                      code: 'ACTIVATION_CODE:DEACTIVATE:CODE_NOT_ACTIVE'
                    properties:
                      message:
                        type: string
                        example: 'Cannot deactivate: code is not active'
                      code:
                        type: string
                        example: 'ACTIVATION_CODE:DEACTIVATE:CODE_NOT_ACTIVE'
        404:
          description: 'Activation code not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Activation code not found'
                  code: 'ACTIVATION_CODE:DEACTIVATE:CODE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Activation code not found'
                  code:
                    type: string
                    example: 'ACTIVATION_CODE:DEACTIVATE:CODE_NOT_FOUND'
        500:
          description: 'Server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server error: activation code not deactivated'
                  code: 'ACTIVATION_CODE:DEACTIVATE:SERVER_ERROR'
                properties:
                  message:
                    type: string
                    example: 'Server error: activation code not deactivated'
                  code:
                    type: string
                    example: 'ACTIVATION_CODE:DEACTIVATE:SERVER_ERROR'
      tags:
        - 'Activation codes'
    parameters:
      -
        in: path
        name: codeId
        description: 'Activation code ID.'
        example: 4
        required: true
        schema:
          type: integer
  /api/login:
    post:
      summary: 'Login user'
      operationId: loginUser
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  access_token: 7|x7de9EgE0xiBNLgHU91DHvhj85HVgTG1bekCssIA
                  expires: '2021-10-25 17:05:25'
                properties:
                  access_token:
                    type: string
                    example: 7|x7de9EgE0xiBNLgHU91DHvhj85HVgTG1bekCssIA
                  expires:
                    type: string
                    example: '2021-10-25 17:05:25'
        403:
          description: 'Too many attempts'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Login: too many attempts'
                  code: 'GENERAL:TOO_MANY_ATTEMPTS'
                properties:
                  message:
                    type: string
                    example: 'Login: too many attempts'
                  code:
                    type: string
                    example: 'GENERAL:TOO_MANY_ATTEMPTS'
        422:
          description: 'Invalid credentials'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    email:
                      - 'Given credentials not found'
                  code: 'AUTH:LOGIN:INVALID_CREDENTIALS'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      email:
                        type: array
                        example:
                          - 'Given credentials not found'
                        items:
                          type: string
                  code:
                    type: string
                    example: 'AUTH:LOGIN:INVALID_CREDENTIALS'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'User email. MUST_BE_EMAIL.'
                  example: test@example.com
                password:
                  type: string
                  description: 'User password.'
                  example: secretpassword
              required:
                - email
                - password
      security: []
  /api/register:
    post:
      summary: 'Register user'
      operationId: registerUser
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 2
                  mrn: HBKW1RAQ1765367993
                  name: 'Sienna Keebler Sr.'
                  email: 1765367993alexandria.hahn@example.net
                  language: en
                  phone: '(210) 478-5610'
                  phone_country: SY
                  phone_verified_at: null
                  address1: '9446 Bertrand Curve'
                  address2: 'West Gregorio, MT 46728'
                  postal_code: 04205-0704
                  city: "O'Conner, Wiza and Runolfsdottir"
                  clinic_name: Betteborough
                  clinic_location: "15696 Pinkie Grove\nAlexzanderburgh, WI 43947"
                  image: null
                  mfa_enabled: 0
                  mfa_method: null
                  mfa_verified_to: null
                  location_id: null
                  created_by: null
                  active: 1
                  notifications_timezone: null
                  notifications_at: null
                  created_at: '2025-12-10T11:59:53.000000Z'
                  updated_at: '2025-12-10T11:59:53.000000Z'
                  invitation_status: accepted
                  acadle_invitation_status: null
                  roles:
                    -
                      id: 2
                      name: ClinicAdmin
                properties:
                  id:
                    type: integer
                    example: 2
                  mrn:
                    type: string
                    example: HBKW1RAQ1765367993
                  name:
                    type: string
                    example: 'Sienna Keebler Sr.'
                  email:
                    type: string
                    example: 1765367993alexandria.hahn@example.net
                  language:
                    type: string
                    example: en
                  phone:
                    type: string
                    example: '(210) 478-5610'
                  phone_country:
                    type: string
                    example: SY
                  phone_verified_at:
                    type: string
                    example: null
                  address1:
                    type: string
                    example: '9446 Bertrand Curve'
                  address2:
                    type: string
                    example: 'West Gregorio, MT 46728'
                  postal_code:
                    type: string
                    example: 04205-0704
                  city:
                    type: string
                    example: "O'Conner, Wiza and Runolfsdottir"
                  clinic_name:
                    type: string
                    example: Betteborough
                  clinic_location:
                    type: string
                    example: "15696 Pinkie Grove\nAlexzanderburgh, WI 43947"
                  image:
                    type: string
                    example: null
                  mfa_enabled:
                    type: integer
                    example: 0
                  mfa_method:
                    type: string
                    example: null
                  mfa_verified_to:
                    type: string
                    example: null
                  location_id:
                    type: string
                    example: null
                  created_by:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  notifications_timezone:
                    type: string
                    example: null
                  notifications_at:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:53.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:53.000000Z'
                  invitation_status:
                    type: string
                    example: accepted
                  acadle_invitation_status:
                    type: string
                    example: null
                  roles:
                    type: array
                    example:
                      -
                        id: 2
                        name: ClinicAdmin
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2
                        name:
                          type: string
                          example: ClinicAdmin
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Too many attempts'
                    type: object
                    example:
                      message: 'Register: too many attempts'
                      code: 'GENERAL:TOO_MANY_ATTEMPTS'
                    properties:
                      message:
                        type: string
                        example: 'Register: too many attempts'
                      code:
                        type: string
                        example: 'GENERAL:TOO_MANY_ATTEMPTS'
                  -
                    description: 'E-mail in use (in another region)'
                    type: object
                    example:
                      message: 'E-mail address already in use (in another region)'
                      code: 'AUTH:REGISTER:EMAIL_IN_USE'
                    properties:
                      message:
                        type: string
                        example: 'E-mail address already in use (in another region)'
                      code:
                        type: string
                        example: 'AUTH:REGISTER:EMAIL_IN_USE'
                  -
                    description: 'Activation code is incorrect'
                    type: object
                    example:
                      message: 'Activation code is incorrect'
                      code: 'AUTH:REGISTER:INCORRECT_CODE'
                    properties:
                      message:
                        type: string
                        example: 'Activation code is incorrect'
                      code:
                        type: string
                        example: 'AUTH:REGISTER:INCORRECT_CODE'
        500:
          description: 'Server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server error: user not created'
                  code: 'AUTH:REGISTER:SERVER_ERROR'
                properties:
                  message:
                    type: string
                    example: 'Server error: user not created'
                  code:
                    type: string
                    example: 'AUTH:REGISTER:SERVER_ERROR'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                region:
                  type: string
                  description: 'User region.'
                  example: us
                name:
                  type: string
                  description: 'User name.'
                  example: 'Tom Smith'
                email:
                  type: string
                  description: 'User e-mail address. MUST_BE_EMAIL.'
                  example: name@domain.com
                password:
                  type: string
                  description: 'User password.'
                  example: Test123!
                phone:
                  type: string
                  description: 'User phone number.'
                  example: 757.557.5135
                phone_country:
                  type: string
                  description: "Phone number's country (2 characters). SIZE:STRING_LENGTH:2."
                  example: US
                language:
                  type: string
                  description: 'User language.'
                  example: en
                clinic_name:
                  type: string
                  description: 'Clinic name.'
                  example: 'Krajcik, Murazik and Wolff'
                clinic_location:
                  type: string
                  description: 'Clinic location.'
                  example: 'North Thomasberg'
                address1:
                  type: string
                  description: 'Address line 1.'
                  example: '6331 Asa Fort'
                address2:
                  type: string
                  description: 'Address line 2.'
                  example: "O'Connerfurt, MI 43891-8787"
                mfa_enabled:
                  type: boolean
                  description: 'MFA enabled.'
                  example: true
                mfa_method:
                  type: string
                  description: 'MFA method.'
                  example: email
                  enum:
                    - email
                    - sms
                activation_code:
                  type: string
                  description: 'Activation code. SIZE:STRING_LENGTH:6.'
                  example: 1A2B3C
              required:
                - region
                - name
                - email
                - password
                - phone
                - phone_country
                - language
                - activation_code
      security: []
  /api/mobile/register:
    post:
      summary: 'Register mobile user'
      operationId: registerMobileUser
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  mrn: KQNRS52M1765367993
                  name: 'Francesca Satterfield DVM'
                  email: 1765367993ruthe31@example.com
                  language: en
                  phone: 678-206-3724
                  phone_country: KG
                  phone_verified_at: null
                  address1: '6350 Hodkiewicz Crossing'
                  address2: 'Okunevatown, DE 80439-3153'
                  postal_code: '50315'
                  city: 'Morissette, Sawayn and Murazik'
                  clinic_name: 'New Carlee'
                  clinic_location: "74744 Annette Skyway Suite 488\nLavonborough, AZ 21120"
                  image: null
                  mfa_enabled: 0
                  mfa_method: null
                  mfa_verified_to: null
                  location_id: null
                  created_by: null
                  active: 1
                  notifications_timezone: null
                  notifications_at: null
                  created_at: '2025-12-10T11:59:53.000000Z'
                  updated_at: '2025-12-10T11:59:53.000000Z'
                  invitation_status: accepted
                  acadle_invitation_status: null
                  roles:
                    -
                      id: 2
                      name: ClinicAdmin
                properties:
                  id:
                    type: integer
                    example: 3
                  mrn:
                    type: string
                    example: KQNRS52M1765367993
                  name:
                    type: string
                    example: 'Francesca Satterfield DVM'
                  email:
                    type: string
                    example: 1765367993ruthe31@example.com
                  language:
                    type: string
                    example: en
                  phone:
                    type: string
                    example: 678-206-3724
                  phone_country:
                    type: string
                    example: KG
                  phone_verified_at:
                    type: string
                    example: null
                  address1:
                    type: string
                    example: '6350 Hodkiewicz Crossing'
                  address2:
                    type: string
                    example: 'Okunevatown, DE 80439-3153'
                  postal_code:
                    type: string
                    example: '50315'
                  city:
                    type: string
                    example: 'Morissette, Sawayn and Murazik'
                  clinic_name:
                    type: string
                    example: 'New Carlee'
                  clinic_location:
                    type: string
                    example: "74744 Annette Skyway Suite 488\nLavonborough, AZ 21120"
                  image:
                    type: string
                    example: null
                  mfa_enabled:
                    type: integer
                    example: 0
                  mfa_method:
                    type: string
                    example: null
                  mfa_verified_to:
                    type: string
                    example: null
                  location_id:
                    type: string
                    example: null
                  created_by:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  notifications_timezone:
                    type: string
                    example: null
                  notifications_at:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:53.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:53.000000Z'
                  invitation_status:
                    type: string
                    example: accepted
                  acadle_invitation_status:
                    type: string
                    example: null
                  roles:
                    type: array
                    example:
                      -
                        id: 2
                        name: ClinicAdmin
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2
                        name:
                          type: string
                          example: ClinicAdmin
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Too many attempts'
                    type: object
                    example:
                      message: 'Register: too many attempts'
                      code: 'GENERAL:TOO_MANY_ATTEMPTS'
                    properties:
                      message:
                        type: string
                        example: 'Register: too many attempts'
                      code:
                        type: string
                        example: 'GENERAL:TOO_MANY_ATTEMPTS'
                  -
                    description: 'E-mail in use (in another region)'
                    type: object
                    example:
                      message: 'E-mail address already in use (in another region)'
                      code: 'AUTH:MOBILE_REGISTER:EMAIL_IN_USE'
                    properties:
                      message:
                        type: string
                        example: 'E-mail address already in use (in another region)'
                      code:
                        type: string
                        example: 'AUTH:MOBILE_REGISTER:EMAIL_IN_USE'
        500:
          description: 'Server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server error: user not created'
                  code: 'AUTH:MOBILE_REGISTER:SERVER_ERROR'
                properties:
                  message:
                    type: string
                    example: 'Server error: user not created'
                  code:
                    type: string
                    example: 'AUTH:MOBILE_REGISTER:SERVER_ERROR'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                region:
                  type: string
                  description: 'User region.'
                  example: us
                name:
                  type: string
                  description: 'User name.'
                  example: 'Tom Smith'
                email:
                  type: string
                  description: 'User e-mail address. MUST_BE_EMAIL.'
                  example: name@domain.com
                password:
                  type: string
                  description: 'User password.'
                  example: Test123!
                language:
                  type: string
                  description: 'User language.'
                  example: en
                terms_accepted:
                  type: boolean
                  description: 'User accepted terms. Must be accepted.'
                  example: true
              required:
                - region
                - name
                - email
                - password
                - terms_accepted
      security: []
  /api/password/reset:
    post:
      summary: 'Request password reset'
      operationId: requestPasswordReset
      description: 'Request sending password reset email message with token that allows to change the password'
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  code: passwords.sent
                  message: 'Reset password link successfully sent'
                properties:
                  code:
                    type: string
                    example: passwords.sent
                  message:
                    type: string
                    example: 'Reset password link successfully sent'
        400:
          description: 'Throttled request'
          content:
            application/json:
              schema:
                type: object
                example:
                  code: passwords.throttled
                  message: 'You have requested password reset recently'
                properties:
                  code:
                    type: string
                    example: passwords.throttled
                  message:
                    type: string
                    example: 'You have requested password reset recently'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'User email. MUST_BE_EMAIL.'
                  example: test@example.com
              required:
                - email
      security: []
  /api/password/reset/verify:
    post:
      summary: 'Verify password reset token'
      operationId: verifyPasswordResetToken
      description: 'Check if token is valid before using it to reset password'
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Valid token'
                  code: 'AUTH:PASSWORD_RESET_VERIFY:VALID_TOKEN'
                properties:
                  message:
                    type: string
                    example: 'Valid token'
                  code:
                    type: string
                    example: 'AUTH:PASSWORD_RESET_VERIFY:VALID_TOKEN'
        400:
          description: 'Invalid token'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Invalid token'
                  code: 'AUTH:PASSWORD_RESET_VERIFY:INVALID_TOKEN'
                properties:
                  message:
                    type: string
                    example: 'Invalid token'
                  code:
                    type: string
                    example: 'AUTH:PASSWORD_RESET_VERIFY:INVALID_TOKEN'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'AUTH:PASSWORD_RESET_VERIFY:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'AUTH:PASSWORD_RESET_VERIFY:USER_NOT_FOUND'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: 'Password reset token.'
                  example: 158bed12188492617e43ecfcca43f5990b3f5f0383b5083247389482b70af019
                email:
                  type: string
                  description: 'User email. MUST_BE_EMAIL.'
                  example: test@example.com
              required:
                - token
                - email
      security: []
  /api/password/reset/change:
    post:
      summary: 'Change password with token'
      operationId: changePasswordWithToken
      description: 'Change user password using password reset token sent to email address'
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  code: passwords.reset
                  message: 'Password changed successfully'
                properties:
                  code:
                    type: string
                    example: passwords.reset
                  message:
                    type: string
                    example: 'Password changed successfully'
        400:
          description: 'Invalid token'
          content:
            application/json:
              schema:
                type: object
                example:
                  code: passwords.token
                  message: 'Invalid token'
                properties:
                  code:
                    type: string
                    example: passwords.token
                  message:
                    type: string
                    example: 'Invalid token'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  code: passwords.user
                  message: 'User not found'
                properties:
                  code:
                    type: string
                    example: passwords.user
                  message:
                    type: string
                    example: 'User not found'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: 'Password reset token.'
                  example: 158bed12188492617e43ecfcca43f5990b3f5f0383b5083247389482b70af019
                email:
                  type: string
                  description: 'User email. MUST_BE_EMAIL.'
                  example: test@example.com
                password:
                  type: string
                  description: 'User new password.'
                  example: secretpassword
              required:
                - token
                - email
                - password
      security: []
  /api/logout:
    post:
      summary: 'Logout current device'
      operationId: logoutCurrentDevice
      description: 'Logout and delete current access token'
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example: []
      tags:
        - Authentication
  /api/logout/everywhere:
    post:
      summary: 'Logout everywhere'
      operationId: logoutEverywhere
      description: 'Logout and delete all access tokens owned by account'
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example: []
      tags:
        - Authentication
  /api/token/refresh:
    post:
      summary: 'Refresh access token'
      operationId: refreshAccessToken
      description: 'Refresh the new access token from the expiring token'
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  access_token: 7|x7de9EgE0xiBNLgHU91DHvhj85HVgTG1bekCssIA
                  expires: '2021-10-25 17:05:25'
                properties:
                  access_token:
                    type: string
                    example: 7|x7de9EgE0xiBNLgHU91DHvhj85HVgTG1bekCssIA
                  expires:
                    type: string
                    example: '2021-10-25 17:05:25'
      tags:
        - Authentication
  /api/mfa/status:
    get:
      summary: 'Check MFA status'
      operationId: checkMFAStatus
      description: "Check any of available MFA methods.\n\t\tSupported methods: email, sms, otp."
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  enabled: 1
                  method: email
                  phone: 1
                  otp: 1
                properties:
                  enabled:
                    type: integer
                    example: 1
                    description: 'Determines if user enabled MFA'
                    enum: []
                  method:
                    type: string
                    example: email
                    description: 'Preferred MFA method'
                    enum: []
                  phone:
                    type: integer
                    example: 1
                    description: 'Determines if user has verified phone number and sms channel could be used'
                    enum: []
                  otp:
                    type: integer
                    example: 1
                    description: 'Determines if user has setup OTP with authenticator application'
                    enum: []
                required:
                  - enabled
                  - method
                  - phone
                  - otp
      tags:
        - Authentication
    post:
      summary: 'Set MFA status'
      operationId: setMFAStatus
      description: "Set MFA status and preferred method.\n\t\tSupported methods: email, sms, otp."
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  enabled: 1
                  method: email
                  phone: 1
                  otp: 1
                properties:
                  enabled:
                    type: integer
                    example: 1
                  method:
                    type: string
                    example: email
                  phone:
                    type: integer
                    example: 1
                  otp:
                    type: integer
                    example: 1
      tags:
        - Authentication
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
                  description: 'Use MFA after login.'
                  example: true
                method:
                  type: string
                  description: 'Preferred MFA method.'
                  example: email
                  enum:
                    - email
                    - sms
                    - otp
  /api/mfa/recovery-code:
    post:
      summary: 'Use recovery code'
      operationId: useRecoveryCode
      description: "Use generated recovery code in order to access account in case when other MFA methods couldn't be used.\n\t\tThis method only checks if code is valid, implement account access scenario on your own.\n\t\tSent code is removed and couldn't be used anymore.\n\t\tIf remaining_codes counter equals zero, <a href=\"#authentication-GETapi-mfa-recovery-codes\">generate a new set</a>."
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  access_token: 7|x7de9EgE0xiBNLgHU91DHvhj85HVgTG1bekCssIA
                  expires: '2021-10-25 17:05:25'
                  remaining_codes: 9
                properties:
                  access_token:
                    type: string
                    example: 7|x7de9EgE0xiBNLgHU91DHvhj85HVgTG1bekCssIA
                  expires:
                    type: string
                    example: '2021-10-25 17:05:25'
                  remaining_codes:
                    type: integer
                    example: 9
        401:
          description: 'Invalid code'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Invalid code'
                  code: 'AUTH:USE_RECOVERY_CODE:INVALID_CODE'
                properties:
                  message:
                    type: string
                    example: 'Invalid code'
                  code:
                    type: string
                    example: 'AUTH:USE_RECOVERY_CODE:INVALID_CODE'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: 'Recovery code.'
                  example: ZZASRM6S
              required:
                - code
  /api/mfa/send:
    post:
      summary: 'Send MFA code'
      operationId: sendMFACode
      description: "Send multi-factor authentication code via selected channel.\n\t\tCode is valid for 15 minutes."
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Code sent'
                  code: 'AUTH:SEND_MFA:SENT'
                properties:
                  message:
                    type: string
                    example: 'Code sent'
                  code:
                    type: string
                    example: 'AUTH:SEND_MFA:SENT'
        400:
          description: 'Channel SMS, phone number not verified'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Phone number is not verified'
                  code: 'AUTH:SEND_MFA:PHONE_NUMBER_NOT_VERIFIED'
                properties:
                  message:
                    type: string
                    example: 'Phone number is not verified'
                  code:
                    type: string
                    example: 'AUTH:SEND_MFA:PHONE_NUMBER_NOT_VERIFIED'
        500:
          description: 'Channel SMS, provider problem'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Code sending failed'
                  code: 'AUTH:SEND_MFA:SERVER_ERROR'
                properties:
                  message:
                    type: string
                    example: 'Code sending failed'
                  code:
                    type: string
                    example: 'AUTH:SEND_MFA:SERVER_ERROR'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                channel:
                  type: string
                  description: 'Authentication channel.'
                  example: email
                  enum:
                    - email
                    - sms
              required:
                - channel
  /api/mfa/verify:
    post:
      summary: 'Verify MFA code'
      operationId: verifyMFACode
      description: 'Verify multi-factor code obtained from selected channel.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'OK, token auth'
                    type: object
                    example:
                      access_token: 7|x7de9EgE0xiBNLgHU91DHvhj85HVgTG1bekCssIA
                      expires: '2021-10-25 17:05:25'
                      mfa_token: fd63e55c-2a67-44b2-95b9-a771778e9971
                      mfa_expires: '2023-04-25 21:00:00'
                    properties:
                      access_token:
                        type: string
                        example: 7|x7de9EgE0xiBNLgHU91DHvhj85HVgTG1bekCssIA
                      expires:
                        type: string
                        example: '2021-10-25 17:05:25'
                      mfa_token:
                        type: string
                        example: fd63e55c-2a67-44b2-95b9-a771778e9971
                      mfa_expires:
                        type: string
                        example: '2023-04-25 21:00:00'
                  -
                    description: 'OK, cookie auth'
                    type: object
                    example:
                      message: OK
                      mfa_token: fd63e55c-2a67-44b2-95b9-a771778e9971
                      mfa_expires: '2023-04-25 21:00:00'
                    properties:
                      message:
                        type: string
                        example: OK
                      mfa_token:
                        type: string
                        example: fd63e55c-2a67-44b2-95b9-a771778e9971
                      mfa_expires:
                        type: string
                        example: '2023-04-25 21:00:00'
        401:
          description: 'Invalid code'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Invalid code'
                  code: 'AUTH:VERIFY_MFA:INVALID_CODE'
                properties:
                  message:
                    type: string
                    example: 'Invalid code'
                  code:
                    type: string
                    example: 'AUTH:VERIFY_MFA:INVALID_CODE'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                channel:
                  type: string
                  description: 'Authentication channel.'
                  example: email
                  enum:
                    - email
                    - sms
                remember_mfa_session:
                  type: boolean
                  description: 'Do not require MFA code. By default, for 30 days.'
                  example: true
                code:
                  type: string
                  description: 'Authentication code.'
                  example: '445566'
                machine_key:
                  type: string
                  description: 'Unique machine identifier.'
                  example: 35282880-244a-4328-9435-2aaf432f3619
              required:
                - channel
                - code
  /api/mfa/phone/verify:
    post:
      summary: 'Verify phone number'
      operationId: verifyPhoneNumber
      description: 'Verify phone number with text message'
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Phone number verified'
                  code: 'AUTH:VERIFY_PHONE:VERIFIED'
                properties:
                  message:
                    type: string
                    example: 'Phone number verified'
                  code:
                    type: string
                    example: 'AUTH:VERIFY_PHONE:VERIFIED'
        401:
          description: 'Invalid code'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Invalid code'
                  code: 'AUTH:VERIFY_PHONE:INVALID_CODE'
                properties:
                  message:
                    type: string
                    example: 'Invalid code'
                  code:
                    type: string
                    example: 'AUTH:VERIFY_PHONE:INVALID_CODE'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: 'Verification code.'
                  example: '445566'
              required:
                - code
  /api/mfa/otp/verify:
    post:
      summary: 'Verify MFA OTP'
      operationId: verifyMFAOTP
      description: "Verify one-time password (OTP).\n\t\tIf verification is successful, new access token with additional permissions will be generated."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'OK, token auth'
                    type: object
                    example:
                      access_token: 7|x7de9EgE0xiBNLgHU91DHvhj85HVgTG1bekCssIA
                      expires: '2021-10-25 17:05:25'
                    properties:
                      access_token:
                        type: string
                        example: 7|x7de9EgE0xiBNLgHU91DHvhj85HVgTG1bekCssIA
                      expires:
                        type: string
                        example: '2021-10-25 17:05:25'
                  -
                    description: 'OK, cookie auth'
                    type: object
                    example:
                      message: OK
                    properties:
                      message:
                        type: string
                        example: OK
        401:
          description: 'Invalid code'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Invalid code'
                  code: 'AUTH:VERIFY_MFA_OTP:INVALID_CODE'
                properties:
                  message:
                    type: string
                    example: 'Invalid code'
                  code:
                    type: string
                    example: 'AUTH:VERIFY_MFA_OTP:INVALID_CODE'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: 'One-time password from app.'
                  example: '445566'
              required:
                - code
  /api/password/change:
    post:
      summary: 'Change password'
      operationId: changePassword
      description: 'Change authenticated user password'
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Password changed successfully'
                  code: 'AUTH:PASSWORD_CHANGE:CHANGED'
                properties:
                  message:
                    type: string
                    example: 'Password changed successfully'
                  code:
                    type: string
                    example: 'AUTH:PASSWORD_CHANGE:CHANGED'
        422:
          description: 'Invalid old password'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    old_password:
                      - 'Old password is incorrect'
                  code: 'AUTH:PASSWORD_CHANGE:INVALID_OLD_PASSWORD'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      old_password:
                        type: array
                        example:
                          - 'Old password is incorrect'
                        items:
                          type: string
                  code:
                    type: string
                    example: 'AUTH:PASSWORD_CHANGE:INVALID_OLD_PASSWORD'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                old_password:
                  type: string
                  description: 'User old password.'
                  example: oldpassword
                new_password:
                  type: string
                  description: 'User new password.'
                  example: newpassword
              required:
                - old_password
                - new_password
  /api/mfa/recovery-codes:
    get:
      summary: 'Generate recovery codes'
      operationId: generateRecoveryCodes
      description: "Generate recovery codes for authenticated user and revoke old ones.\n\t\tUser could use these codes in case when couldn't use any of MFA methods (e.g. lost device with OTP app or device is not accessible right now)."
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  recovery_codes:
                    - A3H8PF8P
                    - IZ8CGK2H
                    - DTYENLLT
                    - 0RKEZFST
                    - 9MPW91BS
                    - S38Z6HS6
                    - UF5ATOKP
                    - HSZXP8EL
                    - ZZASRM6S
                    - 07GR4CD1
                properties:
                  recovery_codes:
                    type: array
                    example:
                      - A3H8PF8P
                      - IZ8CGK2H
                      - DTYENLLT
                      - 0RKEZFST
                      - 9MPW91BS
                      - S38Z6HS6
                      - UF5ATOKP
                      - HSZXP8EL
                      - ZZASRM6S
                      - 07GR4CD1
                    items:
                      type: string
      tags:
        - Authentication
  /api/mfa/otp/setup:
    post:
      summary: 'Setup MFA OTP'
      operationId: setupMFAOTP
      description: "Setup multi-factor authentication with one-time passwords (OTP).\n\t\tUse secret on your own or generate QR code with given url.\n\t\tThen user could scan QR code with authentication app (e.g. Microsoft Authenticator, Authy).\n\t\tIf secret has been already generated, new secret will override existing one and revoke previous setup."
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  secret: VXGJ6JMIAWWDFXYDLKO3VG3RSGTS34BGMVTGQIEHMVVMJ2JBGCSNPQZDV4B6OMDIGI4UKCVCVKVMA7EASLHZEJWW4ZNKLAUTSZYN7EA
                  url: 'otpauth://totp/AetherDigitalTherapy?issuer=AetherDigitalTherapy&secret=VXGJ6JMIAWWDFXYDLKO3VG3RSGTS34BGMVTGQIEHMVVMJ2JBGCSNPQZDV4B6OMDIGI4UKCVCVKVMA7EASLHZEJWW4ZNKLAUTSZYN7EA'
                  recovery_codes:
                    - A3H8PF8P
                    - IZ8CGK2H
                    - DTYENLLT
                    - 0RKEZFST
                    - 9MPW91BS
                    - S38Z6HS6
                    - UF5ATOKP
                    - HSZXP8EL
                    - ZZASRM6S
                    - 07GR4CD1
                properties:
                  secret:
                    type: string
                    example: VXGJ6JMIAWWDFXYDLKO3VG3RSGTS34BGMVTGQIEHMVVMJ2JBGCSNPQZDV4B6OMDIGI4UKCVCVKVMA7EASLHZEJWW4ZNKLAUTSZYN7EA
                  url:
                    type: string
                    example: 'otpauth://totp/AetherDigitalTherapy?issuer=AetherDigitalTherapy&secret=VXGJ6JMIAWWDFXYDLKO3VG3RSGTS34BGMVTGQIEHMVVMJ2JBGCSNPQZDV4B6OMDIGI4UKCVCVKVMA7EASLHZEJWW4ZNKLAUTSZYN7EA'
                  recovery_codes:
                    type: array
                    example:
                      - A3H8PF8P
                      - IZ8CGK2H
                      - DTYENLLT
                      - 0RKEZFST
                      - 9MPW91BS
                      - S38Z6HS6
                      - UF5ATOKP
                      - HSZXP8EL
                      - ZZASRM6S
                      - 07GR4CD1
                    items:
                      type: string
      tags:
        - Authentication
  /login:
    post:
      summary: 'Login user (SPA)'
      operationId: loginUserSPA
      description: "Authorize user and create cookie-based session.\n\t\tHit GET /sanctum/csrf-cookie endpoint to retrieve XSRF-TOKEN cookie. Then attach X-XSRF-TOKEN HTTP header to any request to authorize.\n\t\tSee more: <a href=\"https://laravel.com/docs/8.x/sanctum#spa-authenticating\" target=\"_blank\">Laravel Sanctum documentation</a>\n\t"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 311
                  mrn: N092CEJL1765368021
                  name: 'Ivah Kilback'
                  email: 1765368021veronica01@example.com
                  language: en
                  phone: 219.773.1031
                  phone_country: NZ
                  phone_verified_at: null
                  address1: '422 Anderson Tunnel Apt. 792'
                  address2: 'Port Alayna, WV 63594-3493'
                  postal_code: 51597-2280
                  city: 'Wilkinson Inc'
                  clinic_name: 'Port Jasminstad'
                  clinic_location: "34999 Audra Land\nGradystad, NV 57984"
                  image: null
                  mfa_enabled: 0
                  mfa_method: null
                  mfa_verified_to: null
                  location_id: null
                  created_by: null
                  active: 1
                  notifications_timezone: null
                  notifications_at: null
                  created_at: '2025-12-10T12:00:21.000000Z'
                  updated_at: '2025-12-10T12:00:21.000000Z'
                  invitation_status: null
                  acadle_invitation_status: null
                  roles: []
                properties:
                  id:
                    type: integer
                    example: 311
                  mrn:
                    type: string
                    example: N092CEJL1765368021
                  name:
                    type: string
                    example: 'Ivah Kilback'
                  email:
                    type: string
                    example: 1765368021veronica01@example.com
                  language:
                    type: string
                    example: en
                  phone:
                    type: string
                    example: 219.773.1031
                  phone_country:
                    type: string
                    example: NZ
                  phone_verified_at:
                    type: string
                    example: null
                  address1:
                    type: string
                    example: '422 Anderson Tunnel Apt. 792'
                  address2:
                    type: string
                    example: 'Port Alayna, WV 63594-3493'
                  postal_code:
                    type: string
                    example: 51597-2280
                  city:
                    type: string
                    example: 'Wilkinson Inc'
                  clinic_name:
                    type: string
                    example: 'Port Jasminstad'
                  clinic_location:
                    type: string
                    example: "34999 Audra Land\nGradystad, NV 57984"
                  image:
                    type: string
                    example: null
                  mfa_enabled:
                    type: integer
                    example: 0
                  mfa_method:
                    type: string
                    example: null
                  mfa_verified_to:
                    type: string
                    example: null
                  location_id:
                    type: string
                    example: null
                  created_by:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  notifications_timezone:
                    type: string
                    example: null
                  notifications_at:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:21.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:21.000000Z'
                  invitation_status:
                    type: string
                    example: null
                  acadle_invitation_status:
                    type: string
                    example: null
                  roles:
                    type: array
                    example: []
        403:
          description: 'Too many attempts'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Login: too many attempts'
                  code: 'GENERAL:TOO_MANY_ATTEMPTS'
                properties:
                  message:
                    type: string
                    example: 'Login: too many attempts'
                  code:
                    type: string
                    example: 'GENERAL:TOO_MANY_ATTEMPTS'
        422:
          description: 'Invalid credentials'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    email:
                      - 'Given credentials not found'
                  code: 'AUTH:LOGIN_COOKIE:INVALID_CREDENTIALS'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      email:
                        type: array
                        example:
                          - 'Given credentials not found'
                        items:
                          type: string
                  code:
                    type: string
                    example: 'AUTH:LOGIN_COOKIE:INVALID_CREDENTIALS'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'User email. MUST_BE_EMAIL.'
                  example: test@example.com
                password:
                  type: string
                  description: 'User password.'
                  example: secretpassword
              required:
                - email
                - password
      security: []
  /api/chat/authorize-user:
    get:
      summary: 'Authorize a user'
      operationId: authorizeAUser
      description: "This method authorizes a user using Ably service. Endpoint used only by Ably SDK\n\nCheck more details on https://ably.com/docs/auth/token"
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: api.responses.general.unauthenticated
                  code: 'GENERAL:UNAUTHENTICATED'
                properties:
                  message:
                    type: string
                    example: api.responses.general.unauthenticated
                  code:
                    type: string
                    example: 'GENERAL:UNAUTHENTICATED'
      tags:
        - Chat
  /api/chat/rooms:
    get:
      summary: 'List all chat rooms'
      operationId: listAllChatRooms
      description: "This method retrieves all chat rooms.\n\t\tPossible extend options:\n\t\t<ul>\n\t\t\t<li>participants - user assigned to chat room</li>\n\t\t\t<li>participants.roles - roles assigned to chat participants</li>\n\t\t\t<li>owner - the clinician assigned to patient</li>\n\t\t\t<li>patient - the patient for whom the chat was created</li>\n\t\t\t<li>messages - the messages related to chat room</li>\n\t\t\t<li>messages.author - the author of message/li>\n\t\t</ul>\n\t"
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      owner: null
                      patient_id: null
                      encryption_key: rW4lSUH9Q39WbvoYP6YqqsSR8pJrDXy+p7CPcIuzqqM=
                      name: nisi
                      friendly_name: nisi
                      created_at: '2025-12-10T12:00:19.000000Z'
                      deleted_at: null
                      updated_at: '2025-12-10T12:00:19.000000Z'
                    -
                      id: 2
                      owner: null
                      patient_id: null
                      encryption_key: Ywm5w3YW8ZWtZdutNdUoyIYJXYUqnPPgJqqqyJGdxws=
                      name: amet
                      friendly_name: amet
                      created_at: '2025-12-10T12:00:19.000000Z'
                      deleted_at: null
                      updated_at: '2025-12-10T12:00:19.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        owner: null
                        patient_id: null
                        encryption_key: rW4lSUH9Q39WbvoYP6YqqsSR8pJrDXy+p7CPcIuzqqM=
                        name: nisi
                        friendly_name: nisi
                        created_at: '2025-12-10T12:00:19.000000Z'
                        deleted_at: null
                        updated_at: '2025-12-10T12:00:19.000000Z'
                      -
                        id: 2
                        owner: null
                        patient_id: null
                        encryption_key: Ywm5w3YW8ZWtZdutNdUoyIYJXYUqnPPgJqqqyJGdxws=
                        name: amet
                        friendly_name: amet
                        created_at: '2025-12-10T12:00:19.000000Z'
                        deleted_at: null
                        updated_at: '2025-12-10T12:00:19.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        owner:
                          type: string
                          example: null
                        patient_id:
                          type: string
                          example: null
                        encryption_key:
                          type: string
                          example: rW4lSUH9Q39WbvoYP6YqqsSR8pJrDXy+p7CPcIuzqqM=
                        name:
                          type: string
                          example: nisi
                        friendly_name:
                          type: string
                          example: nisi
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:19.000000Z'
                        deleted_at:
                          type: string
                          example: null
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:19.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list chat room'
                  code: 'CHAT:LIST_ROOMS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list chat room'
                  code:
                    type: string
                    example: 'CHAT:LIST_ROOMS:INSUFFICIENT_PERMISSION'
      tags:
        - Chat
  '/api/chat/room/{roomName}':
    get:
      summary: 'Retrieve a chat room'
      operationId: retrieveAChatRoom
      description: "This method retrieves a single chat room identified by roomId.\n\t\tPossible extend options:\n\t\t<ul>\n\t\t\t<li>participants - user assigned to chat room</li>\n\t\t\t<li>owner - the clinician assigned to patient</li>\n\t\t\t<li>patient - the patient for whom the chat was created</li>\n\t\t\t<li>messages - the messages related to chat room</li>\n\t\t\t<li>messages.author - the author of message/li>\n\t\t</ul>\n\t"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  owner: null
                  patient_id: null
                  encryption_key: 5nyOTrMnebBC5R+GVhzyeGkMWWp1XoKyPLLYYj07nK4=
                  name: odit
                  friendly_name: odit
                  created_at: '2025-12-10T12:00:19.000000Z'
                  deleted_at: null
                  updated_at: '2025-12-10T12:00:19.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  owner:
                    type: string
                    example: null
                  patient_id:
                    type: string
                    example: null
                  encryption_key:
                    type: string
                    example: 5nyOTrMnebBC5R+GVhzyeGkMWWp1XoKyPLLYYj07nK4=
                  name:
                    type: string
                    example: odit
                  friendly_name:
                    type: string
                    example: odit
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:19.000000Z'
                  deleted_at:
                    type: string
                    example: null
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:19.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view chat room'
                  code: 'CHAT:GET_ROOM:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view chat room'
                  code:
                    type: string
                    example: 'CHAT:GET_ROOM:INSUFFICIENT_PERMISSION'
        404:
          description: 'Chat room not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Chat room not found'
                  code: 'CHAT:GET_ROOM:ROOM_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Chat room not found'
                  code:
                    type: string
                    example: 'CHAT:GET_ROOM:ROOM_NOT_FOUND'
      tags:
        - Chat
    parameters:
      -
        in: path
        name: roomName
        description: ''
        example: perferendis
        required: true
        schema:
          type: string
  /api/chat/room:
    post:
      summary: 'Create a new chat room'
      operationId: createANewChatRoom
      description: "This method creates a new chat room using the authenticated user's ID, a name for the room, and a list of participants.\n\t\t\n\t\tThe list of participants should contain the IDs of the users who will be participants in the room.\n\t"
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  owner: null
                  patient_id: null
                  encryption_key: m/yL/hPYYfFH/W6qvfbPYzLs2zqHpFFWfISYV+WcNH0=
                  name: rerum
                  friendly_name: rerum
                  created_at: '2025-12-10T12:00:19.000000Z'
                  deleted_at: null
                  updated_at: '2025-12-10T12:00:19.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  owner:
                    type: string
                    example: null
                  patient_id:
                    type: string
                    example: null
                  encryption_key:
                    type: string
                    example: m/yL/hPYYfFH/W6qvfbPYzLs2zqHpFFWfISYV+WcNH0=
                  name:
                    type: string
                    example: rerum
                  friendly_name:
                    type: string
                    example: rerum
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:19.000000Z'
                  deleted_at:
                    type: string
                    example: null
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:19.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view chat room'
                  code: 'CHAT:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view chat room'
                  code:
                    type: string
                    example: 'CHAT:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - Chat
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                owner:
                  type: string
                  description: 'The <code>id</code> of an existing record in the App\Models\User table.'
                  example: 1
                name:
                  type: string
                  description: 'Name of chat room. MAXIMUM:STRING_LENGTH:255.'
                  example: my-chat
                patient_id:
                  type: string
                  description: 'The <code>id</code> of an existing record in the App\Models\User table.'
                  example: 1
                participants:
                  type: array
                  description: 'Chat room participant. The <code>id</code> of an existing record in the App\Models\User table.'
                  example:
                    - '1'
                  items:
                    type: string
              required:
                - owner
                - name
                - patient_id
  '/api/chat/room/{id}':
    put:
      summary: 'Update an existing chat room'
      operationId: updateAnExistingChatRoom
      description: "This method updates an existing chat room using the authenticated user's ID, a new name for the room, and a list of participants.\n\t\n\t\tThe list of participants should contain the IDs of the users who will be participants in the room.\n\t"
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 5
                  owner: null
                  patient_id: null
                  encryption_key: kIkJG7Gt0iN6D7krkNG+KfLxB0gmYgVbgJTBCrdiqvA=
                  name: nihil
                  friendly_name: nihil
                  created_at: '2025-12-10T12:00:19.000000Z'
                  deleted_at: null
                  updated_at: '2025-12-10T12:00:19.000000Z'
                properties:
                  id:
                    type: integer
                    example: 5
                  owner:
                    type: string
                    example: null
                  patient_id:
                    type: string
                    example: null
                  encryption_key:
                    type: string
                    example: kIkJG7Gt0iN6D7krkNG+KfLxB0gmYgVbgJTBCrdiqvA=
                  name:
                    type: string
                    example: nihil
                  friendly_name:
                    type: string
                    example: nihil
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:19.000000Z'
                  deleted_at:
                    type: string
                    example: null
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:19.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update chat room'
                  code: 'CHAT:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update chat room'
                  code:
                    type: string
                    example: 'CHAT:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Chat room not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Chat room not found'
                  code: 'CHAT:UPDATE:ROOM_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Chat room not found'
                  code:
                    type: string
                    example: 'CHAT:UPDATE:ROOM_NOT_FOUND'
      tags:
        - Chat
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                owner:
                  type: string
                  description: 'The <code>id</code> of an existing record in the App\Models\User table.'
                  example: 1
                name:
                  type: string
                  description: 'Name of chat room. MAXIMUM:STRING_LENGTH:255.'
                  example: my-chat
                participants:
                  type: array
                  description: 'Chat room participant. The <code>id</code> of an existing record in the App\Models\User table.'
                  example:
                    - '1'
                  items:
                    type: string
                participants_del:
                  type: array
                  description: 'Chat room participant to be deleted. The <code>id</code> of an existing record in the App\Models\User table.'
                  example:
                    - '1'
                  items:
                    type: string
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the room.'
        example: dolorem
        required: true
        schema:
          type: string
  '/api/chat/room/{id}/archive':
    get:
      summary: 'Chat room archives'
      operationId: chatRoomArchives
      description: "Get archived messages for room\n\t\tPossible extend options:\n\t\t<ul>\n\t\t\t<li>author - this field represent user who send message</li>\n\t\t</ul>\n\t"
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>timestamp</code>). Default: timestamp, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>timestamp</code>). Default: timestamp, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 1
                    count: 1
                    perpage: 5
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 651a8e4868d5dc27c0000cc2
                      channel: chat.messages.room.44.56bf7d37-4ed6-4db4-947b-d68a1066677c.communication-channel
                      clientId: '95'
                      msgId: b8673175-01e6-4b6d-9032-226d3df20637
                      data: '{"encryptedMessage":{"message":"z6z1zNihCjlEePltz+BG8g==","initialVector":"7376fcbf0b32fbdcd5c5b62c087b7600"},"user":{"id":95,"name":"Bartosz Druga firmaa","email":"bartosz+drugafirma@refericon.pl","image":"https://aether-dev-bucket.s3.amazonaws.com/users/7T6im01PAj4cahksWHllrL7se2SQ9buquIjGGFtp.jpg","permissions":[],"roles":[{"id":2,"name":"Clinician"}]},"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","recipients":[{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"95"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"44"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"1250"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"3067"}]}'
                      name: message
                      recipients:
                        -
                          delivered: true
                          msgId: b8673175-01e6-4b6d-9032-226d3df20637
                          seen: true
                          clientId: '95'
                        -
                          delivered: true
                          msgId: b8673175-01e6-4b6d-9032-226d3df20637
                          seen: false
                          clientId: '44'
                        -
                          delivered: true
                          msgId: b8673175-01e6-4b6d-9032-226d3df20637
                          seen: false
                          clientId: '1250'
                        -
                          delivered: true
                          msgId: b8673175-01e6-4b6d-9032-226d3df20637
                          seen: false
                          clientId: '3067'
                      timestamp: 1696239176715
                      created_at: '2023-10-02 09:32:56'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 1
                      count:
                        type: integer
                        example: 1
                      perpage:
                        type: integer
                        example: 5
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 651a8e4868d5dc27c0000cc2
                        channel: chat.messages.room.44.56bf7d37-4ed6-4db4-947b-d68a1066677c.communication-channel
                        clientId: '95'
                        msgId: b8673175-01e6-4b6d-9032-226d3df20637
                        data: '{"encryptedMessage":{"message":"z6z1zNihCjlEePltz+BG8g==","initialVector":"7376fcbf0b32fbdcd5c5b62c087b7600"},"user":{"id":95,"name":"Bartosz Druga firmaa","email":"bartosz+drugafirma@refericon.pl","image":"https://aether-dev-bucket.s3.amazonaws.com/users/7T6im01PAj4cahksWHllrL7se2SQ9buquIjGGFtp.jpg","permissions":[],"roles":[{"id":2,"name":"Clinician"}]},"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","recipients":[{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"95"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"44"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"1250"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"3067"}]}'
                        name: message
                        recipients:
                          -
                            delivered: true
                            msgId: b8673175-01e6-4b6d-9032-226d3df20637
                            seen: true
                            clientId: '95'
                          -
                            delivered: true
                            msgId: b8673175-01e6-4b6d-9032-226d3df20637
                            seen: false
                            clientId: '44'
                          -
                            delivered: true
                            msgId: b8673175-01e6-4b6d-9032-226d3df20637
                            seen: false
                            clientId: '1250'
                          -
                            delivered: true
                            msgId: b8673175-01e6-4b6d-9032-226d3df20637
                            seen: false
                            clientId: '3067'
                        timestamp: 1696239176715
                        created_at: '2023-10-02 09:32:56'
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 651a8e4868d5dc27c0000cc2
                        channel:
                          type: string
                          example: chat.messages.room.44.56bf7d37-4ed6-4db4-947b-d68a1066677c.communication-channel
                        clientId:
                          type: string
                          example: '95'
                        msgId:
                          type: string
                          example: b8673175-01e6-4b6d-9032-226d3df20637
                        data:
                          type: string
                          example: '{"encryptedMessage":{"message":"z6z1zNihCjlEePltz+BG8g==","initialVector":"7376fcbf0b32fbdcd5c5b62c087b7600"},"user":{"id":95,"name":"Bartosz Druga firmaa","email":"bartosz+drugafirma@refericon.pl","image":"https://aether-dev-bucket.s3.amazonaws.com/users/7T6im01PAj4cahksWHllrL7se2SQ9buquIjGGFtp.jpg","permissions":[],"roles":[{"id":2,"name":"Clinician"}]},"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","recipients":[{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"95"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"44"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"1250"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"3067"}]}'
                        name:
                          type: string
                          example: message
                        recipients:
                          type: array
                          example:
                            -
                              delivered: true
                              msgId: b8673175-01e6-4b6d-9032-226d3df20637
                              seen: true
                              clientId: '95'
                            -
                              delivered: true
                              msgId: b8673175-01e6-4b6d-9032-226d3df20637
                              seen: false
                              clientId: '44'
                            -
                              delivered: true
                              msgId: b8673175-01e6-4b6d-9032-226d3df20637
                              seen: false
                              clientId: '1250'
                            -
                              delivered: true
                              msgId: b8673175-01e6-4b6d-9032-226d3df20637
                              seen: false
                              clientId: '3067'
                          items:
                            type: object
                            properties:
                              delivered:
                                type: boolean
                                example: true
                              msgId:
                                type: string
                                example: b8673175-01e6-4b6d-9032-226d3df20637
                              seen:
                                type: boolean
                                example: true
                              clientId:
                                type: string
                                example: '95'
                        timestamp:
                          type: integer
                          example: 1696239176715
                        created_at:
                          type: string
                          example: '2023-10-02 09:32:56'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view archived messages'
                  code: 'CHAT:GET_ARCHIVES:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view archived messages'
                  code:
                    type: string
                    example: 'CHAT:GET_ARCHIVES:INSUFFICIENT_PERMISSION'
        404:
          description: 'Chat room not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Chat room not found'
                  code: 'CHAT:GET_ARCHIVES:ROOM_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Chat room not found'
                  code:
                    type: string
                    example: 'CHAT:GET_ARCHIVES:ROOM_NOT_FOUND'
      tags:
        - Chat
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the room.'
        example: qui
        required: true
        schema:
          type: string
  /api/chat/messages/unread:
    get:
      summary: 'Unread messages'
      operationId: unreadMessages
      description: "Get unread messaged for chat room.\n\t\tPossible extend options:\n\t\t<ul>\n\t\t\t<li>author - this field represent user who send message</li>\n\t\t</ul>\n\t"
      parameters:
        -
          in: query
          name: room
          description: "Filter unread messages by room.\n\t\tProvide single ID (<code>room=1</code>), array of IDs (<code>room[]=1&room[]=2</code>) or comma-separated list of IDs (<code>room=1,2</code>)."
          example: 17
          required: false
          schema:
            type: integer
            description: "Filter unread messages by room.\n\t\tProvide single ID (<code>room=1</code>), array of IDs (<code>room[]=1&room[]=2</code>) or comma-separated list of IDs (<code>room=1,2</code>)."
            example: 17
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 1
                    count: 1
                    perpage: 5
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 651a8e4868d5dc27c0000cc2
                      channel: chat.messages.room.44.56bf7d37-4ed6-4db4-947b-d68a1066677c.communication-channel
                      clientId: '95'
                      msgId: b8673175-01e6-4b6d-9032-226d3df20637
                      data: '{"encryptedMessage":{"message":"z6z1zNihCjlEePltz+BG8g==","initialVector":"7376fcbf0b32fbdcd5c5b62c087b7600"},"user":{"id":95,"name":"Bartosz Druga firmaa","email":"bartosz+drugafirma@refericon.pl","image":"https://aether-dev-bucket.s3.amazonaws.com/users/7T6im01PAj4cahksWHllrL7se2SQ9buquIjGGFtp.jpg","permissions":[],"roles":[{"id":2,"name":"Clinician"}]},"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","recipients":[{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"95"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"44"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"1250"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"3067"}]}'
                      name: message
                      recipients:
                        -
                          delivered: true
                          msgId: b8673175-01e6-4b6d-9032-226d3df20637
                          seen: true
                          clientId: '95'
                        -
                          delivered: true
                          msgId: b8673175-01e6-4b6d-9032-226d3df20637
                          seen: false
                          clientId: '44'
                        -
                          delivered: true
                          msgId: b8673175-01e6-4b6d-9032-226d3df20637
                          seen: false
                          clientId: '1250'
                        -
                          delivered: true
                          msgId: b8673175-01e6-4b6d-9032-226d3df20637
                          seen: false
                          clientId: '3067'
                      timestamp: 1696239176715
                      created_at: '2023-10-02 09:32:56'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 1
                      count:
                        type: integer
                        example: 1
                      perpage:
                        type: integer
                        example: 5
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 651a8e4868d5dc27c0000cc2
                        channel: chat.messages.room.44.56bf7d37-4ed6-4db4-947b-d68a1066677c.communication-channel
                        clientId: '95'
                        msgId: b8673175-01e6-4b6d-9032-226d3df20637
                        data: '{"encryptedMessage":{"message":"z6z1zNihCjlEePltz+BG8g==","initialVector":"7376fcbf0b32fbdcd5c5b62c087b7600"},"user":{"id":95,"name":"Bartosz Druga firmaa","email":"bartosz+drugafirma@refericon.pl","image":"https://aether-dev-bucket.s3.amazonaws.com/users/7T6im01PAj4cahksWHllrL7se2SQ9buquIjGGFtp.jpg","permissions":[],"roles":[{"id":2,"name":"Clinician"}]},"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","recipients":[{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"95"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"44"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"1250"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"3067"}]}'
                        name: message
                        recipients:
                          -
                            delivered: true
                            msgId: b8673175-01e6-4b6d-9032-226d3df20637
                            seen: true
                            clientId: '95'
                          -
                            delivered: true
                            msgId: b8673175-01e6-4b6d-9032-226d3df20637
                            seen: false
                            clientId: '44'
                          -
                            delivered: true
                            msgId: b8673175-01e6-4b6d-9032-226d3df20637
                            seen: false
                            clientId: '1250'
                          -
                            delivered: true
                            msgId: b8673175-01e6-4b6d-9032-226d3df20637
                            seen: false
                            clientId: '3067'
                        timestamp: 1696239176715
                        created_at: '2023-10-02 09:32:56'
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 651a8e4868d5dc27c0000cc2
                        channel:
                          type: string
                          example: chat.messages.room.44.56bf7d37-4ed6-4db4-947b-d68a1066677c.communication-channel
                        clientId:
                          type: string
                          example: '95'
                        msgId:
                          type: string
                          example: b8673175-01e6-4b6d-9032-226d3df20637
                        data:
                          type: string
                          example: '{"encryptedMessage":{"message":"z6z1zNihCjlEePltz+BG8g==","initialVector":"7376fcbf0b32fbdcd5c5b62c087b7600"},"user":{"id":95,"name":"Bartosz Druga firmaa","email":"bartosz+drugafirma@refericon.pl","image":"https://aether-dev-bucket.s3.amazonaws.com/users/7T6im01PAj4cahksWHllrL7se2SQ9buquIjGGFtp.jpg","permissions":[],"roles":[{"id":2,"name":"Clinician"}]},"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","recipients":[{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"95"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"44"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"1250"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"3067"}]}'
                        name:
                          type: string
                          example: message
                        recipients:
                          type: array
                          example:
                            -
                              delivered: true
                              msgId: b8673175-01e6-4b6d-9032-226d3df20637
                              seen: true
                              clientId: '95'
                            -
                              delivered: true
                              msgId: b8673175-01e6-4b6d-9032-226d3df20637
                              seen: false
                              clientId: '44'
                            -
                              delivered: true
                              msgId: b8673175-01e6-4b6d-9032-226d3df20637
                              seen: false
                              clientId: '1250'
                            -
                              delivered: true
                              msgId: b8673175-01e6-4b6d-9032-226d3df20637
                              seen: false
                              clientId: '3067'
                          items:
                            type: object
                            properties:
                              delivered:
                                type: boolean
                                example: true
                              msgId:
                                type: string
                                example: b8673175-01e6-4b6d-9032-226d3df20637
                              seen:
                                type: boolean
                                example: true
                              clientId:
                                type: string
                                example: '95'
                        timestamp:
                          type: integer
                          example: 1696239176715
                        created_at:
                          type: string
                          example: '2023-10-02 09:32:56'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view unread messages list'
                  code: 'CHAT:UNREAD_MESSAGES:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view unread messages list'
                  code:
                    type: string
                    example: 'CHAT:UNREAD_MESSAGES:INSUFFICIENT_PERMISSION'
      tags:
        - Chat
  '/api/chat/messages/{msgId}':
    delete:
      summary: 'Delete chat message'
      operationId: deleteChatMessage
      description: ''
      parameters:
        -
          in: query
          name: msgId
          description: 'Message ID.'
          example: earum
          required: true
          schema:
            type: string
            description: 'Message ID.'
            example: earum
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 1
                    count: 1
                    perpage: 5
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 651a8e4868d5dc27c0000cc2
                      channel: chat.messages.room.44.56bf7d37-4ed6-4db4-947b-d68a1066677c.communication-channel
                      clientId: '95'
                      msgId: b8673175-01e6-4b6d-9032-226d3df20637
                      data: '{"encryptedMessage":{"message":"z6z1zNihCjlEePltz+BG8g==","initialVector":"7376fcbf0b32fbdcd5c5b62c087b7600"},"user":{"id":95,"name":"Bartosz Druga firmaa","email":"bartosz+drugafirma@refericon.pl","image":"https://aether-dev-bucket.s3.amazonaws.com/users/7T6im01PAj4cahksWHllrL7se2SQ9buquIjGGFtp.jpg","permissions":[],"roles":[{"id":2,"name":"Clinician"}]},"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","recipients":[{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"95"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"44"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"1250"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"3067"}]}'
                      name: message
                      recipients:
                        -
                          delivered: true
                          msgId: b8673175-01e6-4b6d-9032-226d3df20637
                          seen: true
                          clientId: '95'
                        -
                          delivered: true
                          msgId: b8673175-01e6-4b6d-9032-226d3df20637
                          seen: false
                          clientId: '44'
                        -
                          delivered: true
                          msgId: b8673175-01e6-4b6d-9032-226d3df20637
                          seen: false
                          clientId: '1250'
                        -
                          delivered: true
                          msgId: b8673175-01e6-4b6d-9032-226d3df20637
                          seen: false
                          clientId: '3067'
                      timestamp: 1696239176715
                      created_at: '2023-10-02 09:32:56'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 1
                      count:
                        type: integer
                        example: 1
                      perpage:
                        type: integer
                        example: 5
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 651a8e4868d5dc27c0000cc2
                        channel: chat.messages.room.44.56bf7d37-4ed6-4db4-947b-d68a1066677c.communication-channel
                        clientId: '95'
                        msgId: b8673175-01e6-4b6d-9032-226d3df20637
                        data: '{"encryptedMessage":{"message":"z6z1zNihCjlEePltz+BG8g==","initialVector":"7376fcbf0b32fbdcd5c5b62c087b7600"},"user":{"id":95,"name":"Bartosz Druga firmaa","email":"bartosz+drugafirma@refericon.pl","image":"https://aether-dev-bucket.s3.amazonaws.com/users/7T6im01PAj4cahksWHllrL7se2SQ9buquIjGGFtp.jpg","permissions":[],"roles":[{"id":2,"name":"Clinician"}]},"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","recipients":[{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"95"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"44"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"1250"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"3067"}]}'
                        name: message
                        recipients:
                          -
                            delivered: true
                            msgId: b8673175-01e6-4b6d-9032-226d3df20637
                            seen: true
                            clientId: '95'
                          -
                            delivered: true
                            msgId: b8673175-01e6-4b6d-9032-226d3df20637
                            seen: false
                            clientId: '44'
                          -
                            delivered: true
                            msgId: b8673175-01e6-4b6d-9032-226d3df20637
                            seen: false
                            clientId: '1250'
                          -
                            delivered: true
                            msgId: b8673175-01e6-4b6d-9032-226d3df20637
                            seen: false
                            clientId: '3067'
                        timestamp: 1696239176715
                        created_at: '2023-10-02 09:32:56'
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 651a8e4868d5dc27c0000cc2
                        channel:
                          type: string
                          example: chat.messages.room.44.56bf7d37-4ed6-4db4-947b-d68a1066677c.communication-channel
                        clientId:
                          type: string
                          example: '95'
                        msgId:
                          type: string
                          example: b8673175-01e6-4b6d-9032-226d3df20637
                        data:
                          type: string
                          example: '{"encryptedMessage":{"message":"z6z1zNihCjlEePltz+BG8g==","initialVector":"7376fcbf0b32fbdcd5c5b62c087b7600"},"user":{"id":95,"name":"Bartosz Druga firmaa","email":"bartosz+drugafirma@refericon.pl","image":"https://aether-dev-bucket.s3.amazonaws.com/users/7T6im01PAj4cahksWHllrL7se2SQ9buquIjGGFtp.jpg","permissions":[],"roles":[{"id":2,"name":"Clinician"}]},"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","recipients":[{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"95"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"44"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"1250"},{"delivered":true,"msgId":"b8673175-01e6-4b6d-9032-226d3df20637","seen":false,"clientId":"3067"}]}'
                        name:
                          type: string
                          example: message
                        recipients:
                          type: array
                          example:
                            -
                              delivered: true
                              msgId: b8673175-01e6-4b6d-9032-226d3df20637
                              seen: true
                              clientId: '95'
                            -
                              delivered: true
                              msgId: b8673175-01e6-4b6d-9032-226d3df20637
                              seen: false
                              clientId: '44'
                            -
                              delivered: true
                              msgId: b8673175-01e6-4b6d-9032-226d3df20637
                              seen: false
                              clientId: '1250'
                            -
                              delivered: true
                              msgId: b8673175-01e6-4b6d-9032-226d3df20637
                              seen: false
                              clientId: '3067'
                          items:
                            type: object
                            properties:
                              delivered:
                                type: boolean
                                example: true
                              msgId:
                                type: string
                                example: b8673175-01e6-4b6d-9032-226d3df20637
                              seen:
                                type: boolean
                                example: true
                              clientId:
                                type: string
                                example: '95'
                        timestamp:
                          type: integer
                          example: 1696239176715
                        created_at:
                          type: string
                          example: '2023-10-02 09:32:56'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to delete message'
                  code: 'CHAT:DELETE_MESSAGE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to delete message'
                  code:
                    type: string
                    example: 'CHAT:DELETE_MESSAGE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Message not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Chat message not found'
                  code: 'CHAT:DELETE_MESSAGE:MESSAGE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Chat message not found'
                  code:
                    type: string
                    example: 'CHAT:DELETE_MESSAGE:MESSAGE_NOT_FOUND'
      tags:
        - Chat
    parameters:
      -
        in: path
        name: msgId
        description: ''
        example: 8
        required: true
        schema:
          type: integer
  '/api/chat/tickets/{roomId}':
    get:
      summary: 'Get tickets list for chat room'
      operationId: getTicketsListForChatRoom
      description: "Possible extend options:\n\t\t<ul>\n\t\t\t<li>sender - the user who created ticket</li>\n\t\t\t<li>recipient - the user who was ticket recipient</li>\n\t\t\t<li>messages - message allocated to ticket</li>\n\t\t\t<li>messages.attachments - list of attachments assigned to message and ticket</li>\n\t\t\t<li>messages.sender - the user who wrote the message</li>\n\t\t</ul>\n\t"
      parameters:
        -
          in: query
          name: status
          description: 'Filter tickets by status (available: <code>new</code>,<code>in_progress</code>,<code>closed</code>,<code>reopened</code>.'
          example: quasi
          required: false
          schema:
            type: string
            description: 'Filter tickets by status (available: <code>new</code>,<code>in_progress</code>,<code>closed</code>,<code>reopened</code>.'
            example: quasi
        -
          in: query
          name: sender
          description: 'Filter tickets by sender.'
          example: 19
          required: false
          schema:
            type: integer
            description: 'Filter tickets by sender.'
            example: 19
        -
          in: query
          name: recipient
          description: 'Filter tickets by recipient.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'Filter tickets by recipient.'
            example: 20
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>sender</code>, <code>recipient</code>, <code>messages</code>, <code>messages.attachments</code>, <code>messages.sender</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>sender</code>, <code>recipient</code>, <code>messages</code>, <code>messages.attachments</code>, <code>messages.sender</code>).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 87
                      sender_id: 288
                      recipient_id: 289
                      device_id: null
                      meeting_date: '2025-12-10 12:00:19'
                      meeting_type: online_meeting
                      contact_email: marisa07@hotmail.com
                      status: new
                      created_at: '2025-12-10T12:00:19.000000Z'
                      updated_at: '2025-12-10T12:00:19.000000Z'
                      sender:
                        id: 288
                        mrn: P749U3E61765368019
                        name: 'Mr. Loy Greenfelder II'
                        email: 1765368019rachelle51@example.com
                        language: en
                        phone: 878-755-1231
                        phone_country: ID
                        phone_verified_at: null
                        address1: '397 Champlin Road'
                        address2: 'West Marcusside, WY 48547'
                        postal_code: '35586'
                        city: 'Stokes, Hessel and Smith'
                        clinic_name: Travonport
                        clinic_location: "77843 Theo Lodge\nNorth Zakaryberg, IA 72434-3332"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:19.000000Z'
                        updated_at: '2025-12-10T12:00:19.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                      recipient:
                        id: 289
                        mrn: C7CRVJYW1765368019
                        name: 'Edna Haag'
                        email: 1765368019cedrick.damore@example.net
                        language: en
                        phone: 1-607-492-5672
                        phone_country: NP
                        phone_verified_at: null
                        address1: '302 Jacobi Mill'
                        address2: 'Gulgowskibury, PA 71032'
                        postal_code: '67831'
                        city: 'Fadel Group'
                        clinic_name: 'North Nadialand'
                        clinic_location: "7180 Vilma Rest\nSouth Lonie, OR 86189-9211"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:19.000000Z'
                        updated_at: '2025-12-10T12:00:19.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                      device: null
                      messages: []
                    -
                      id: 88
                      sender_id: 290
                      recipient_id: 291
                      device_id: null
                      meeting_date: '2025-12-10 12:00:19'
                      meeting_type: online_meeting
                      contact_email: brain.heaney@hotmail.com
                      status: new
                      created_at: '2025-12-10T12:00:19.000000Z'
                      updated_at: '2025-12-10T12:00:19.000000Z'
                      sender:
                        id: 290
                        mrn: ZW9BPF2B1765368019
                        name: 'Stephen Stamm'
                        email: 1765368019nmitchell@example.org
                        language: en
                        phone: 279-914-1575
                        phone_country: MT
                        phone_verified_at: null
                        address1: '40839 Vada Fall Apt. 749'
                        address2: 'Lake Alfred, WA 75142-8704'
                        postal_code: 56265-9300
                        city: "O'Hara-Funk"
                        clinic_name: Tarynburgh
                        clinic_location: "317 Schaefer Mount Suite 176\nWest Margaretteport, LA 24842"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:19.000000Z'
                        updated_at: '2025-12-10T12:00:19.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                      recipient:
                        id: 291
                        mrn: A0EFS78L1765368019
                        name: 'Prof. Obie Douglas DDS'
                        email: 1765368019ldicki@example.com
                        language: en
                        phone: 1-325-612-4390
                        phone_country: ET
                        phone_verified_at: null
                        address1: '6632 Tillman Terrace'
                        address2: 'South Ivy, NE 63496-4339'
                        postal_code: 02218-8785
                        city: 'Crist, Anderson and Beier'
                        clinic_name: Daughertyton
                        clinic_location: "508 Fausto Stream\nSouth Jackeline, IN 48074"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:19.000000Z'
                        updated_at: '2025-12-10T12:00:19.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                      device: null
                      messages: []
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 87
                        sender_id: 288
                        recipient_id: 289
                        device_id: null
                        meeting_date: '2025-12-10 12:00:19'
                        meeting_type: online_meeting
                        contact_email: marisa07@hotmail.com
                        status: new
                        created_at: '2025-12-10T12:00:19.000000Z'
                        updated_at: '2025-12-10T12:00:19.000000Z'
                        sender:
                          id: 288
                          mrn: P749U3E61765368019
                          name: 'Mr. Loy Greenfelder II'
                          email: 1765368019rachelle51@example.com
                          language: en
                          phone: 878-755-1231
                          phone_country: ID
                          phone_verified_at: null
                          address1: '397 Champlin Road'
                          address2: 'West Marcusside, WY 48547'
                          postal_code: '35586'
                          city: 'Stokes, Hessel and Smith'
                          clinic_name: Travonport
                          clinic_location: "77843 Theo Lodge\nNorth Zakaryberg, IA 72434-3332"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:19.000000Z'
                          updated_at: '2025-12-10T12:00:19.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                        recipient:
                          id: 289
                          mrn: C7CRVJYW1765368019
                          name: 'Edna Haag'
                          email: 1765368019cedrick.damore@example.net
                          language: en
                          phone: 1-607-492-5672
                          phone_country: NP
                          phone_verified_at: null
                          address1: '302 Jacobi Mill'
                          address2: 'Gulgowskibury, PA 71032'
                          postal_code: '67831'
                          city: 'Fadel Group'
                          clinic_name: 'North Nadialand'
                          clinic_location: "7180 Vilma Rest\nSouth Lonie, OR 86189-9211"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:19.000000Z'
                          updated_at: '2025-12-10T12:00:19.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                        device: null
                        messages: []
                      -
                        id: 88
                        sender_id: 290
                        recipient_id: 291
                        device_id: null
                        meeting_date: '2025-12-10 12:00:19'
                        meeting_type: online_meeting
                        contact_email: brain.heaney@hotmail.com
                        status: new
                        created_at: '2025-12-10T12:00:19.000000Z'
                        updated_at: '2025-12-10T12:00:19.000000Z'
                        sender:
                          id: 290
                          mrn: ZW9BPF2B1765368019
                          name: 'Stephen Stamm'
                          email: 1765368019nmitchell@example.org
                          language: en
                          phone: 279-914-1575
                          phone_country: MT
                          phone_verified_at: null
                          address1: '40839 Vada Fall Apt. 749'
                          address2: 'Lake Alfred, WA 75142-8704'
                          postal_code: 56265-9300
                          city: "O'Hara-Funk"
                          clinic_name: Tarynburgh
                          clinic_location: "317 Schaefer Mount Suite 176\nWest Margaretteport, LA 24842"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:19.000000Z'
                          updated_at: '2025-12-10T12:00:19.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                        recipient:
                          id: 291
                          mrn: A0EFS78L1765368019
                          name: 'Prof. Obie Douglas DDS'
                          email: 1765368019ldicki@example.com
                          language: en
                          phone: 1-325-612-4390
                          phone_country: ET
                          phone_verified_at: null
                          address1: '6632 Tillman Terrace'
                          address2: 'South Ivy, NE 63496-4339'
                          postal_code: 02218-8785
                          city: 'Crist, Anderson and Beier'
                          clinic_name: Daughertyton
                          clinic_location: "508 Fausto Stream\nSouth Jackeline, IN 48074"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:19.000000Z'
                          updated_at: '2025-12-10T12:00:19.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                        device: null
                        messages: []
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 87
                        sender_id:
                          type: integer
                          example: 288
                        recipient_id:
                          type: integer
                          example: 289
                        device_id:
                          type: string
                          example: null
                        meeting_date:
                          type: string
                          example: '2025-12-10 12:00:19'
                        meeting_type:
                          type: string
                          example: online_meeting
                        contact_email:
                          type: string
                          example: marisa07@hotmail.com
                        status:
                          type: string
                          example: new
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:19.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:19.000000Z'
                        sender:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 288
                            mrn:
                              type: string
                              example: P749U3E61765368019
                            name:
                              type: string
                              example: 'Mr. Loy Greenfelder II'
                            email:
                              type: string
                              example: 1765368019rachelle51@example.com
                            language:
                              type: string
                              example: en
                            phone:
                              type: string
                              example: 878-755-1231
                            phone_country:
                              type: string
                              example: ID
                            phone_verified_at:
                              type: string
                              example: null
                            address1:
                              type: string
                              example: '397 Champlin Road'
                            address2:
                              type: string
                              example: 'West Marcusside, WY 48547'
                            postal_code:
                              type: string
                              example: '35586'
                            city:
                              type: string
                              example: 'Stokes, Hessel and Smith'
                            clinic_name:
                              type: string
                              example: Travonport
                            clinic_location:
                              type: string
                              example: "77843 Theo Lodge\nNorth Zakaryberg, IA 72434-3332"
                            image:
                              type: string
                              example: null
                            mfa_enabled:
                              type: integer
                              example: 0
                            mfa_method:
                              type: string
                              example: null
                            mfa_verified_to:
                              type: string
                              example: null
                            location_id:
                              type: string
                              example: null
                            created_by:
                              type: string
                              example: null
                            active:
                              type: integer
                              example: 1
                            notifications_timezone:
                              type: string
                              example: null
                            notifications_at:
                              type: string
                              example: null
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:19.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:19.000000Z'
                            invitation_status:
                              type: string
                              example: null
                            acadle_invitation_status:
                              type: string
                              example: null
                            roles:
                              type: array
                              example: []
                        recipient:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 289
                            mrn:
                              type: string
                              example: C7CRVJYW1765368019
                            name:
                              type: string
                              example: 'Edna Haag'
                            email:
                              type: string
                              example: 1765368019cedrick.damore@example.net
                            language:
                              type: string
                              example: en
                            phone:
                              type: string
                              example: 1-607-492-5672
                            phone_country:
                              type: string
                              example: NP
                            phone_verified_at:
                              type: string
                              example: null
                            address1:
                              type: string
                              example: '302 Jacobi Mill'
                            address2:
                              type: string
                              example: 'Gulgowskibury, PA 71032'
                            postal_code:
                              type: string
                              example: '67831'
                            city:
                              type: string
                              example: 'Fadel Group'
                            clinic_name:
                              type: string
                              example: 'North Nadialand'
                            clinic_location:
                              type: string
                              example: "7180 Vilma Rest\nSouth Lonie, OR 86189-9211"
                            image:
                              type: string
                              example: null
                            mfa_enabled:
                              type: integer
                              example: 0
                            mfa_method:
                              type: string
                              example: null
                            mfa_verified_to:
                              type: string
                              example: null
                            location_id:
                              type: string
                              example: null
                            created_by:
                              type: string
                              example: null
                            active:
                              type: integer
                              example: 1
                            notifications_timezone:
                              type: string
                              example: null
                            notifications_at:
                              type: string
                              example: null
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:19.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:19.000000Z'
                            invitation_status:
                              type: string
                              example: null
                            acadle_invitation_status:
                              type: string
                              example: null
                            roles:
                              type: array
                              example: []
                        device:
                          type: string
                          example: null
                        messages:
                          type: array
                          example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view chat room tickets'
                  code: 'CHAT:LIST_TICKETS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view chat room tickets'
                  code:
                    type: string
                    example: 'CHAT:LIST_TICKETS:INSUFFICIENT_PERMISSION'
        404:
          description: 'Chat room not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Chat room not found'
                  code: 'CHAT:LIST_TICKETS:ROOM_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Chat room not found'
                  code:
                    type: string
                    example: 'CHAT:LIST_TICKETS:ROOM_NOT_FOUND'
      tags:
        - Chat
    parameters:
      -
        in: path
        name: roomId
        description: ''
        example: est
        required: true
        schema:
          type: string
  /api/chat/available-patients:
    get:
      summary: 'List of available patients for chat'
      operationId: listOfAvailablePatientsForChat
      description: "Possible extend options:\n\t\t<ul>\n\t\t\t<li>clinician - clinician assigned to this user</li>\n\t\t\t<li>devices - products assigned to user</li>\n\t\t\t<li>roles - user roles</li>\n\t\t</ul>\n\t"
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 292
                      mrn: FCYK88YR1765368019
                      name: 'Judy Lindgren'
                      email: 1765368019kylie44@example.net
                      language: en
                      phone: '(551) 242-0882'
                      phone_country: ER
                      phone_verified_at: null
                      address1: '562 Bernier Trafficway Apt. 243'
                      address2: 'Feilmouth, OH 03393'
                      postal_code: 23038-5346
                      city: 'Stehr Group'
                      clinic_name: Satterfieldton
                      clinic_location: "28551 Hellen Corner Suite 588\nEast Darrell, FL 11317-1867"
                      image: null
                      mfa_enabled: 0
                      mfa_method: null
                      mfa_verified_to: null
                      location_id: null
                      created_by: null
                      active: 1
                      notifications_timezone: null
                      notifications_at: null
                      created_at: '2025-12-10T12:00:19.000000Z'
                      updated_at: '2025-12-10T12:00:19.000000Z'
                      invitation_status: null
                      acadle_invitation_status: accepted
                      devices:
                        -
                          id: 140
                          serial: dd465e0c-7b1b-342e-aebf-de4266f82656
                          bluetooth_id: be4f534f-150e-3e69-ae1d-b94e9da3f950
                          company_id: null
                          model_id: null
                          amputee_id: 292
                          clinician_id: null
                          firmware_version_id: null
                          pcb_version_id: null
                          reverse_magnets: 0
                          is_electrode: 0
                          active: 1
                          last_activity_at: '0000-00-00 00:00:00'
                          created_at: '2025-12-10T12:00:19.000000Z'
                          updated_at: '2025-12-10T12:00:19.000000Z'
                      roles:
                        -
                          id: 6
                          name: AcadleUser
                    -
                      id: 293
                      mrn: 2RUM2H761765368019
                      name: 'Prof. Carrie Terry'
                      email: 1765368019olga.beahan@example.org
                      language: en
                      phone: '(704) 923-6629'
                      phone_country: DE
                      phone_verified_at: null
                      address1: '47932 Mayert Square Apt. 427'
                      address2: 'Port Annabel, AR 99453-5852'
                      postal_code: '83754'
                      city: 'Schinner, Jacobs and Spinka'
                      clinic_name: 'New Joesphhaven'
                      clinic_location: "37470 Gabe Divide\nNew Giovanny, CA 82910"
                      image: null
                      mfa_enabled: 0
                      mfa_method: null
                      mfa_verified_to: null
                      location_id: null
                      created_by: null
                      active: 1
                      notifications_timezone: null
                      notifications_at: null
                      created_at: '2025-12-10T12:00:20.000000Z'
                      updated_at: '2025-12-10T12:00:20.000000Z'
                      invitation_status: accepted
                      acadle_invitation_status: null
                      devices:
                        -
                          id: 141
                          serial: 4b436ef6-b218-3ec4-8443-f41f2dd64b61
                          bluetooth_id: e818b450-041f-3278-9177-7f4c9d05379e
                          company_id: null
                          model_id: null
                          amputee_id: 293
                          clinician_id: null
                          firmware_version_id: null
                          pcb_version_id: null
                          reverse_magnets: 0
                          is_electrode: 0
                          active: 1
                          last_activity_at: '0000-00-00 00:00:00'
                          created_at: '2025-12-10T12:00:20.000000Z'
                          updated_at: '2025-12-10T12:00:20.000000Z'
                      roles:
                        -
                          id: 4
                          name: ClinicianSupport
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 292
                        mrn: FCYK88YR1765368019
                        name: 'Judy Lindgren'
                        email: 1765368019kylie44@example.net
                        language: en
                        phone: '(551) 242-0882'
                        phone_country: ER
                        phone_verified_at: null
                        address1: '562 Bernier Trafficway Apt. 243'
                        address2: 'Feilmouth, OH 03393'
                        postal_code: 23038-5346
                        city: 'Stehr Group'
                        clinic_name: Satterfieldton
                        clinic_location: "28551 Hellen Corner Suite 588\nEast Darrell, FL 11317-1867"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:19.000000Z'
                        updated_at: '2025-12-10T12:00:19.000000Z'
                        invitation_status: null
                        acadle_invitation_status: accepted
                        devices:
                          -
                            id: 140
                            serial: dd465e0c-7b1b-342e-aebf-de4266f82656
                            bluetooth_id: be4f534f-150e-3e69-ae1d-b94e9da3f950
                            company_id: null
                            model_id: null
                            amputee_id: 292
                            clinician_id: null
                            firmware_version_id: null
                            pcb_version_id: null
                            reverse_magnets: 0
                            is_electrode: 0
                            active: 1
                            last_activity_at: '0000-00-00 00:00:00'
                            created_at: '2025-12-10T12:00:19.000000Z'
                            updated_at: '2025-12-10T12:00:19.000000Z'
                        roles:
                          -
                            id: 6
                            name: AcadleUser
                      -
                        id: 293
                        mrn: 2RUM2H761765368019
                        name: 'Prof. Carrie Terry'
                        email: 1765368019olga.beahan@example.org
                        language: en
                        phone: '(704) 923-6629'
                        phone_country: DE
                        phone_verified_at: null
                        address1: '47932 Mayert Square Apt. 427'
                        address2: 'Port Annabel, AR 99453-5852'
                        postal_code: '83754'
                        city: 'Schinner, Jacobs and Spinka'
                        clinic_name: 'New Joesphhaven'
                        clinic_location: "37470 Gabe Divide\nNew Giovanny, CA 82910"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:20.000000Z'
                        updated_at: '2025-12-10T12:00:20.000000Z'
                        invitation_status: accepted
                        acadle_invitation_status: null
                        devices:
                          -
                            id: 141
                            serial: 4b436ef6-b218-3ec4-8443-f41f2dd64b61
                            bluetooth_id: e818b450-041f-3278-9177-7f4c9d05379e
                            company_id: null
                            model_id: null
                            amputee_id: 293
                            clinician_id: null
                            firmware_version_id: null
                            pcb_version_id: null
                            reverse_magnets: 0
                            is_electrode: 0
                            active: 1
                            last_activity_at: '0000-00-00 00:00:00'
                            created_at: '2025-12-10T12:00:20.000000Z'
                            updated_at: '2025-12-10T12:00:20.000000Z'
                        roles:
                          -
                            id: 4
                            name: ClinicianSupport
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 292
                        mrn:
                          type: string
                          example: FCYK88YR1765368019
                        name:
                          type: string
                          example: 'Judy Lindgren'
                        email:
                          type: string
                          example: 1765368019kylie44@example.net
                        language:
                          type: string
                          example: en
                        phone:
                          type: string
                          example: '(551) 242-0882'
                        phone_country:
                          type: string
                          example: ER
                        phone_verified_at:
                          type: string
                          example: null
                        address1:
                          type: string
                          example: '562 Bernier Trafficway Apt. 243'
                        address2:
                          type: string
                          example: 'Feilmouth, OH 03393'
                        postal_code:
                          type: string
                          example: 23038-5346
                        city:
                          type: string
                          example: 'Stehr Group'
                        clinic_name:
                          type: string
                          example: Satterfieldton
                        clinic_location:
                          type: string
                          example: "28551 Hellen Corner Suite 588\nEast Darrell, FL 11317-1867"
                        image:
                          type: string
                          example: null
                        mfa_enabled:
                          type: integer
                          example: 0
                        mfa_method:
                          type: string
                          example: null
                        mfa_verified_to:
                          type: string
                          example: null
                        location_id:
                          type: string
                          example: null
                        created_by:
                          type: string
                          example: null
                        active:
                          type: integer
                          example: 1
                        notifications_timezone:
                          type: string
                          example: null
                        notifications_at:
                          type: string
                          example: null
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:19.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:19.000000Z'
                        invitation_status:
                          type: string
                          example: null
                        acadle_invitation_status:
                          type: string
                          example: accepted
                        devices:
                          type: array
                          example:
                            -
                              id: 140
                              serial: dd465e0c-7b1b-342e-aebf-de4266f82656
                              bluetooth_id: be4f534f-150e-3e69-ae1d-b94e9da3f950
                              company_id: null
                              model_id: null
                              amputee_id: 292
                              clinician_id: null
                              firmware_version_id: null
                              pcb_version_id: null
                              reverse_magnets: 0
                              is_electrode: 0
                              active: 1
                              last_activity_at: '0000-00-00 00:00:00'
                              created_at: '2025-12-10T12:00:19.000000Z'
                              updated_at: '2025-12-10T12:00:19.000000Z'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 140
                              serial:
                                type: string
                                example: dd465e0c-7b1b-342e-aebf-de4266f82656
                              bluetooth_id:
                                type: string
                                example: be4f534f-150e-3e69-ae1d-b94e9da3f950
                              company_id:
                                type: string
                                example: null
                              model_id:
                                type: string
                                example: null
                              amputee_id:
                                type: integer
                                example: 292
                              clinician_id:
                                type: string
                                example: null
                              firmware_version_id:
                                type: string
                                example: null
                              pcb_version_id:
                                type: string
                                example: null
                              reverse_magnets:
                                type: integer
                                example: 0
                              is_electrode:
                                type: integer
                                example: 0
                              active:
                                type: integer
                                example: 1
                              last_activity_at:
                                type: string
                                example: '0000-00-00 00:00:00'
                              created_at:
                                type: string
                                example: '2025-12-10T12:00:19.000000Z'
                              updated_at:
                                type: string
                                example: '2025-12-10T12:00:19.000000Z'
                        roles:
                          type: array
                          example:
                            -
                              id: 6
                              name: AcadleUser
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 6
                              name:
                                type: string
                                example: AcadleUser
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list available patients'
                  code: 'CHAT:LIST_PATIENTS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list available patients'
                  code:
                    type: string
                    example: 'CHAT:LIST_PATIENTS:INSUFFICIENT_PERMISSION'
      tags:
        - Chat
  '/api/chat/room/{id}/available-participants':
    get:
      summary: 'List of available participants for chat'
      operationId: listOfAvailableParticipantsForChat
      description: "Possible extend options:\n\t\t<ul>\n\t\t\t<li>roles - user roles</li>\n\t\t\t<li>permissions - user permissions</li>\n\t\t</ul>\n\t"
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>roles</code>, <code>permissions</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>roles</code>, <code>permissions</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 294
                      mrn: 6PXCAJH91765368020
                      name: 'Jennie Kling'
                      email: 1765368020fbarrows@example.org
                      language: en
                      phone: '+1 (518) 936-2252'
                      phone_country: CL
                      phone_verified_at: null
                      address1: '36010 Ramon Mountains Apt. 811'
                      address2: 'West Flo, AZ 77810'
                      postal_code: '32879'
                      city: 'Medhurst, Mraz and Towne'
                      clinic_name: 'North Halfurt'
                      clinic_location: "3387 Cronin Shoal Suite 262\nNew Janet, WA 19168"
                      image: null
                      mfa_enabled: 0
                      mfa_method: null
                      mfa_verified_to: null
                      location_id: null
                      created_by: null
                      active: 1
                      notifications_timezone: null
                      notifications_at: null
                      created_at: '2025-12-10T12:00:20.000000Z'
                      updated_at: '2025-12-10T12:00:20.000000Z'
                      invitation_status: null
                      acadle_invitation_status: null
                      roles:
                        -
                          id: 1
                          name: SuperAdmin
                    -
                      id: 295
                      mrn: BB1L7JFE1765368020
                      name: 'Madisyn Klocko Sr.'
                      email: 1765368020schuster.bernardo@example.org
                      language: en
                      phone: +1-351-647-8522
                      phone_country: CH
                      phone_verified_at: null
                      address1: '32790 Becker Spring Suite 660'
                      address2: 'New Margeland, NE 04207'
                      postal_code: '39237'
                      city: 'Jenkins Inc'
                      clinic_name: Cristalville
                      clinic_location: "38236 Jazlyn Prairie Suite 869\nCliftonstad, WV 41817"
                      image: null
                      mfa_enabled: 0
                      mfa_method: null
                      mfa_verified_to: null
                      location_id: null
                      created_by: null
                      active: 1
                      notifications_timezone: null
                      notifications_at: null
                      created_at: '2025-12-10T12:00:20.000000Z'
                      updated_at: '2025-12-10T12:00:20.000000Z'
                      invitation_status: accepted
                      acadle_invitation_status: null
                      roles:
                        -
                          id: 4
                          name: ClinicianSupport
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 294
                        mrn: 6PXCAJH91765368020
                        name: 'Jennie Kling'
                        email: 1765368020fbarrows@example.org
                        language: en
                        phone: '+1 (518) 936-2252'
                        phone_country: CL
                        phone_verified_at: null
                        address1: '36010 Ramon Mountains Apt. 811'
                        address2: 'West Flo, AZ 77810'
                        postal_code: '32879'
                        city: 'Medhurst, Mraz and Towne'
                        clinic_name: 'North Halfurt'
                        clinic_location: "3387 Cronin Shoal Suite 262\nNew Janet, WA 19168"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:20.000000Z'
                        updated_at: '2025-12-10T12:00:20.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles:
                          -
                            id: 1
                            name: SuperAdmin
                      -
                        id: 295
                        mrn: BB1L7JFE1765368020
                        name: 'Madisyn Klocko Sr.'
                        email: 1765368020schuster.bernardo@example.org
                        language: en
                        phone: +1-351-647-8522
                        phone_country: CH
                        phone_verified_at: null
                        address1: '32790 Becker Spring Suite 660'
                        address2: 'New Margeland, NE 04207'
                        postal_code: '39237'
                        city: 'Jenkins Inc'
                        clinic_name: Cristalville
                        clinic_location: "38236 Jazlyn Prairie Suite 869\nCliftonstad, WV 41817"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:20.000000Z'
                        updated_at: '2025-12-10T12:00:20.000000Z'
                        invitation_status: accepted
                        acadle_invitation_status: null
                        roles:
                          -
                            id: 4
                            name: ClinicianSupport
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 294
                        mrn:
                          type: string
                          example: 6PXCAJH91765368020
                        name:
                          type: string
                          example: 'Jennie Kling'
                        email:
                          type: string
                          example: 1765368020fbarrows@example.org
                        language:
                          type: string
                          example: en
                        phone:
                          type: string
                          example: '+1 (518) 936-2252'
                        phone_country:
                          type: string
                          example: CL
                        phone_verified_at:
                          type: string
                          example: null
                        address1:
                          type: string
                          example: '36010 Ramon Mountains Apt. 811'
                        address2:
                          type: string
                          example: 'West Flo, AZ 77810'
                        postal_code:
                          type: string
                          example: '32879'
                        city:
                          type: string
                          example: 'Medhurst, Mraz and Towne'
                        clinic_name:
                          type: string
                          example: 'North Halfurt'
                        clinic_location:
                          type: string
                          example: "3387 Cronin Shoal Suite 262\nNew Janet, WA 19168"
                        image:
                          type: string
                          example: null
                        mfa_enabled:
                          type: integer
                          example: 0
                        mfa_method:
                          type: string
                          example: null
                        mfa_verified_to:
                          type: string
                          example: null
                        location_id:
                          type: string
                          example: null
                        created_by:
                          type: string
                          example: null
                        active:
                          type: integer
                          example: 1
                        notifications_timezone:
                          type: string
                          example: null
                        notifications_at:
                          type: string
                          example: null
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:20.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:20.000000Z'
                        invitation_status:
                          type: string
                          example: null
                        acadle_invitation_status:
                          type: string
                          example: null
                        roles:
                          type: array
                          example:
                            -
                              id: 1
                              name: SuperAdmin
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: SuperAdmin
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list available participants'
                  code: 'CHAT:LIST_PARTICIPANTS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list available participants'
                  code:
                    type: string
                    example: 'CHAT:LIST_PARTICIPANTS:INSUFFICIENT_PERMISSION'
        404:
          description: 'Chat room not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Chat room not found'
                  code: 'CHAT:LIST_PARTICIPANTS:ROOM_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Chat room not found'
                  code:
                    type: string
                    example: 'CHAT:LIST_PARTICIPANTS:ROOM_NOT_FOUND'
      tags:
        - Chat
    parameters:
      -
        in: path
        name: id
        description: 'Chat room ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config':
    get:
      summary: 'Get device config'
      operationId: getDeviceConfig
      description: "Definitions:\n\t\t- config - current config entries\n\t\t- config history entry - set of changes in config, updated during the session\n\t\t- config history change - single change made to config (part of config history entry)\n\t"
      parameters:
        -
          in: query
          name: _format
          description: 'Config format. Pass <code>collection</code> to receive config as resource collection.'
          example: temporibus
          required: false
          schema:
            type: string
            description: 'Config format. Pass <code>collection</code> to receive config as resource collection.'
            example: temporibus
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Normal/compact response'
                    type: object
                    example:
                      common:
                        gripPairsConfig:
                          - 1
                          - 4
                          - 2
                          - 3
                          - 6
                          - 7
                          - 9
                          - 8
                        controlConfig:
                          - 0
                          - 1
                          - 0
                          - 0
                          - 0
                        emgThresholds:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        interval:
                          - 100
                        gripSequentialConfig:
                          - 1
                          - 2
                          - 4
                          - 3
                          - 0
                          - 255
                          - 6
                          - 7
                          - 9
                          - 8
                          - 255
                          - 255
                      modes:
                        -
                          id: 100
                          name: 'Mode 1'
                          slot: 0
                          config:
                            interval:
                              - 300
                            fingerStrength:
                              - 1
                              - 100
                            autoGrasp:
                              - 0
                              - 100
                            emgSpike:
                              - 0
                              - 300
                        -
                          id: 101
                          name: 'Mode 2'
                          slot: 1
                          config:
                            interval:
                              - 400
                            fingerStrength:
                              - 1
                              - 100
                            autoGrasp:
                              - 0
                              - 100
                            emgSpike:
                              - 0
                              - 300
                        -
                          id: 102
                          name: 'Mode 3'
                          slot: 2
                          config:
                            interval:
                              - 500
                            fingerStrength:
                              - 1
                              - 100
                            autoGrasp:
                              - 0
                              - 100
                            emgSpike:
                              - 0
                              - 300
                    properties:
                      common:
                        type: object
                        properties:
                          gripPairsConfig:
                            type: array
                            example:
                              - 1
                              - 4
                              - 2
                              - 3
                              - 6
                              - 7
                              - 9
                              - 8
                            items:
                              type: integer
                          controlConfig:
                            type: array
                            example:
                              - 0
                              - 1
                              - 0
                              - 0
                              - 0
                            items:
                              type: integer
                          emgThresholds:
                            type: array
                            example:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            items:
                              type: integer
                          interval:
                            type: array
                            example:
                              - 100
                            items:
                              type: integer
                          gripSequentialConfig:
                            type: array
                            example:
                              - 1
                              - 2
                              - 4
                              - 3
                              - 0
                              - 255
                              - 6
                              - 7
                              - 9
                              - 8
                              - 255
                              - 255
                            items:
                              type: integer
                      modes:
                        type: array
                        example:
                          -
                            id: 100
                            name: 'Mode 1'
                            slot: 0
                            config:
                              interval:
                                - 300
                              fingerStrength:
                                - 1
                                - 100
                              autoGrasp:
                                - 0
                                - 100
                              emgSpike:
                                - 0
                                - 300
                          -
                            id: 101
                            name: 'Mode 2'
                            slot: 1
                            config:
                              interval:
                                - 400
                              fingerStrength:
                                - 1
                                - 100
                              autoGrasp:
                                - 0
                                - 100
                              emgSpike:
                                - 0
                                - 300
                          -
                            id: 102
                            name: 'Mode 3'
                            slot: 2
                            config:
                              interval:
                                - 500
                              fingerStrength:
                                - 1
                                - 100
                              autoGrasp:
                                - 0
                                - 100
                              emgSpike:
                                - 0
                                - 300
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 100
                            name:
                              type: string
                              example: 'Mode 1'
                            slot:
                              type: integer
                              example: 0
                            config:
                              type: object
                              properties:
                                interval:
                                  type: array
                                  example:
                                    - 300
                                  items:
                                    type: integer
                                fingerStrength:
                                  type: array
                                  example:
                                    - 1
                                    - 100
                                  items:
                                    type: integer
                                autoGrasp:
                                  type: array
                                  example:
                                    - 0
                                    - 100
                                  items:
                                    type: integer
                                emgSpike:
                                  type: array
                                  example:
                                    - 0
                                    - 300
                                  items:
                                    type: integer
                  -
                    description: ''
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        device_id:
                          type: integer
                          example: 13
                        mode_id:
                          type: integer
                          example: 1
                        key:
                          type: string
                          example: sint
                        value:
                          type: string
                          example: velit
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:58.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:58.000000Z'
                        mode:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            device_id:
                              type: integer
                              example: 14
                            slot:
                              type: string
                              example: null
                            name:
                              type: string
                              example: 'Assumenda laboriosam debitis facilis eveniet.'
                            active:
                              type: integer
                              example: 1
                            created_at:
                              type: string
                              example: '2025-12-10T11:59:58.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T11:59:58.000000Z'
                    example:
                      -
                        id: 1
                        device_id: 13
                        mode_id: 1
                        key: sint
                        value: velit
                        created_at: '2025-12-10T11:59:58.000000Z'
                        updated_at: '2025-12-10T11:59:58.000000Z'
                        mode:
                          id: 1
                          device_id: 14
                          slot: null
                          name: 'Assumenda laboriosam debitis facilis eveniet.'
                          active: 1
                          created_at: '2025-12-10T11:59:58.000000Z'
                          updated_at: '2025-12-10T11:59:58.000000Z'
                      -
                        id: 2
                        device_id: 15
                        mode_id: 2
                        key: accusamus
                        value: voluptatem
                        created_at: '2025-12-10T11:59:58.000000Z'
                        updated_at: '2025-12-10T11:59:58.000000Z'
                        mode:
                          id: 2
                          device_id: 16
                          slot: null
                          name: 'Nemo rerum ut magni magni aut facere voluptatibus.'
                          active: 0
                          created_at: '2025-12-10T11:59:58.000000Z'
                          updated_at: '2025-12-10T11:59:58.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view device config'
                  code: 'CONFIG:GET:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view device config'
                  code:
                    type: string
                    example: 'CONFIG:GET:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'CONFIG:GET:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'CONFIG:GET:DEVICE_NOT_FOUND'
      tags:
        - Config
    post:
      summary: 'Update device config'
      operationId: updateDeviceConfig
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  common:
                    gripPairsConfig:
                      - 1
                      - 4
                      - 2
                      - 3
                      - 6
                      - 7
                      - 9
                      - 8
                    controlConfig:
                      - 0
                      - 1
                      - 0
                      - 0
                      - 0
                    emgThresholds:
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                    interval:
                      - 100
                    gripSequentialConfig:
                      - 1
                      - 2
                      - 4
                      - 3
                      - 0
                      - 255
                      - 6
                      - 7
                      - 9
                      - 8
                      - 255
                      - 255
                  modes:
                    -
                      id: 100
                      name: 'Mode 1'
                      slot: 0
                      config:
                        interval:
                          - 300
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                    -
                      id: 101
                      name: 'Mode 2'
                      slot: 1
                      config:
                        interval:
                          - 400
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                    -
                      id: 102
                      name: 'Mode 3'
                      slot: 2
                      config:
                        interval:
                          - 500
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                properties:
                  common:
                    type: object
                    properties:
                      gripPairsConfig:
                        type: array
                        example:
                          - 1
                          - 4
                          - 2
                          - 3
                          - 6
                          - 7
                          - 9
                          - 8
                        items:
                          type: integer
                      controlConfig:
                        type: array
                        example:
                          - 0
                          - 1
                          - 0
                          - 0
                          - 0
                        items:
                          type: integer
                      emgThresholds:
                        type: array
                        example:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        items:
                          type: integer
                      interval:
                        type: array
                        example:
                          - 100
                        items:
                          type: integer
                      gripSequentialConfig:
                        type: array
                        example:
                          - 1
                          - 2
                          - 4
                          - 3
                          - 0
                          - 255
                          - 6
                          - 7
                          - 9
                          - 8
                          - 255
                          - 255
                        items:
                          type: integer
                  modes:
                    type: array
                    example:
                      -
                        id: 100
                        name: 'Mode 1'
                        slot: 0
                        config:
                          interval:
                            - 300
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                      -
                        id: 101
                        name: 'Mode 2'
                        slot: 1
                        config:
                          interval:
                            - 400
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                      -
                        id: 102
                        name: 'Mode 3'
                        slot: 2
                        config:
                          interval:
                            - 500
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 100
                        name:
                          type: string
                          example: 'Mode 1'
                        slot:
                          type: integer
                          example: 0
                        config:
                          type: object
                          properties:
                            interval:
                              type: array
                              example:
                                - 300
                              items:
                                type: integer
                            fingerStrength:
                              type: array
                              example:
                                - 1
                                - 100
                              items:
                                type: integer
                            autoGrasp:
                              type: array
                              example:
                                - 0
                                - 100
                              items:
                                type: integer
                            emgSpike:
                              type: array
                              example:
                                - 0
                                - 300
                              items:
                                type: integer
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update device config'
                  code: 'CONFIG:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update device config'
                  code:
                    type: string
                    example: 'CONFIG:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'CONFIG:UPDATE:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'CONFIG:UPDATE:DEVICE_NOT_FOUND'
        422:
          description: 'Invalid config'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Config has some problems and cannot be saved.'
                  errors:
                    modes:
                      mode_3: 'Config mode 3 does not belong to device 12.'
                    values:
                      common.inputSite: 'Invalid value ["11"] for key inputSite - contains string values.'
                      common.gripsPositions.1.initial: 'Invalid value [200,"100","100","100","100"] for key gripsPositions.1.initial - contains string values.'
                      mode_1.inputSite: 'Invalid value ["11"] for key inputSite - contains string values.'
                      mode_1.gripsPositions.0.initial: 'Invalid value ["200","100","100","100","100"] for key gripsPositions.1.initial - contains string values.'
                  code: 'CONFIG:UPDATE:INVALID_CONFIG'
                properties:
                  message:
                    type: string
                    example: 'Config has some problems and cannot be saved.'
                  errors:
                    type: object
                    properties:
                      modes:
                        type: object
                        properties:
                          mode_3:
                            type: string
                            example: 'Config mode 3 does not belong to device 12.'
                      values:
                        type: object
                        properties:
                          common.inputSite:
                            type: string
                            example: 'Invalid value ["11"] for key inputSite - contains string values.'
                          common.gripsPositions.1.initial:
                            type: string
                            example: 'Invalid value [200,"100","100","100","100"] for key gripsPositions.1.initial - contains string values.'
                          mode_1.inputSite:
                            type: string
                            example: 'Invalid value ["11"] for key inputSite - contains string values.'
                          mode_1.gripsPositions.0.initial:
                            type: string
                            example: 'Invalid value ["200","100","100","100","100"] for key gripsPositions.1.initial - contains string values.'
                  code:
                    type: string
                    example: 'CONFIG:UPDATE:INVALID_CONFIG'
      tags:
        - Config
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Config history entry name (session name).'
                  example: 'Remote session 2022-05-30'
                common:
                  type: string
                  description: 'Common config as JSON string. MUST_BE_JSON.'
                  example: '{"gripPairsConfig": [1, 4, 2, 3, 6, 7, 9, 8], "controlConfig": [0, 1, 0, 0, 0], "gripSequentialConfig": [1, 2, 4, 3, 0, 255, 6, 7, 9, 8, 255, 255]'
                modes:
                  type: array
                  description: ''
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 'Config mode ID. The <code>id</code> of an existing record in the App\Models\ConfigMode table.'
                        example: 1
                      config:
                        type: string
                        description: 'Config specific for mode as JSON string. MUST_BE_JSON.'
                        example: '{"gripPairsConfig": [1, 4, 2, 3, 6, 7, 9, 8], "controlConfig": [0, 1, 0, 0, 0], "gripSequentialConfig": [1, 2, 4, 3, 0, 255, 6, 7, 9, 8, 255, 255]'
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config/history':
    get:
      summary: 'Get device config history'
      operationId: getDeviceConfigHistory
      description: 'For amputees only restore points are returned.'
      parameters:
        -
          in: query
          name: restore_point
          description: 'Filter config entries by restore point status.'
          example: 1
          required: false
          schema:
            type: boolean
            description: 'Filter config entries by restore point status.'
            example: 1
        -
          in: query
          name: factory_reset_point
          description: 'Filter config entries by factory reset point status.'
          example: 1
          required: false
          schema:
            type: boolean
            description: 'Filter config entries by factory reset point status.'
            example: 1
        -
          in: query
          name: date_from
          description: 'Filter config entries from date (timestamp).'
          example: 1642003200
          required: false
          schema:
            type: integer
            description: 'Filter config entries from date (timestamp).'
            example: 1642003200
        -
          in: query
          name: date_to
          description: 'Filter config entries to date (timestamp).'
          example: 1642003200
          required: false
          schema:
            type: integer
            description: 'Filter config entries to date (timestamp).'
            example: 1642003200
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>author</code>, <code>entries</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>author</code>, <code>entries</code>).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Normal/compact response'
                    type: object
                    example:
                      common:
                        gripPairsConfig:
                          - 1
                          - 4
                          - 2
                          - 3
                          - 6
                          - 7
                          - 9
                          - 8
                        controlConfig:
                          - 0
                          - 1
                          - 0
                          - 0
                          - 0
                        emgThresholds:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        interval:
                          - 100
                        gripSequentialConfig:
                          - 1
                          - 2
                          - 4
                          - 3
                          - 0
                          - 255
                          - 6
                          - 7
                          - 9
                          - 8
                          - 255
                          - 255
                      modes:
                        -
                          id: 100
                          name: 'Mode 1'
                          slot: 0
                          config:
                            interval:
                              - 300
                            fingerStrength:
                              - 1
                              - 100
                            autoGrasp:
                              - 0
                              - 100
                            emgSpike:
                              - 0
                              - 300
                        -
                          id: 101
                          name: 'Mode 2'
                          slot: 1
                          config:
                            interval:
                              - 400
                            fingerStrength:
                              - 1
                              - 100
                            autoGrasp:
                              - 0
                              - 100
                            emgSpike:
                              - 0
                              - 300
                        -
                          id: 102
                          name: 'Mode 3'
                          slot: 2
                          config:
                            interval:
                              - 500
                            fingerStrength:
                              - 1
                              - 100
                            autoGrasp:
                              - 0
                              - 100
                            emgSpike:
                              - 0
                              - 300
                    properties:
                      common:
                        type: object
                        properties:
                          gripPairsConfig:
                            type: array
                            example:
                              - 1
                              - 4
                              - 2
                              - 3
                              - 6
                              - 7
                              - 9
                              - 8
                            items:
                              type: integer
                          controlConfig:
                            type: array
                            example:
                              - 0
                              - 1
                              - 0
                              - 0
                              - 0
                            items:
                              type: integer
                          emgThresholds:
                            type: array
                            example:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            items:
                              type: integer
                          interval:
                            type: array
                            example:
                              - 100
                            items:
                              type: integer
                          gripSequentialConfig:
                            type: array
                            example:
                              - 1
                              - 2
                              - 4
                              - 3
                              - 0
                              - 255
                              - 6
                              - 7
                              - 9
                              - 8
                              - 255
                              - 255
                            items:
                              type: integer
                      modes:
                        type: array
                        example:
                          -
                            id: 100
                            name: 'Mode 1'
                            slot: 0
                            config:
                              interval:
                                - 300
                              fingerStrength:
                                - 1
                                - 100
                              autoGrasp:
                                - 0
                                - 100
                              emgSpike:
                                - 0
                                - 300
                          -
                            id: 101
                            name: 'Mode 2'
                            slot: 1
                            config:
                              interval:
                                - 400
                              fingerStrength:
                                - 1
                                - 100
                              autoGrasp:
                                - 0
                                - 100
                              emgSpike:
                                - 0
                                - 300
                          -
                            id: 102
                            name: 'Mode 3'
                            slot: 2
                            config:
                              interval:
                                - 500
                              fingerStrength:
                                - 1
                                - 100
                              autoGrasp:
                                - 0
                                - 100
                              emgSpike:
                                - 0
                                - 300
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 100
                            name:
                              type: string
                              example: 'Mode 1'
                            slot:
                              type: integer
                              example: 0
                            config:
                              type: object
                              properties:
                                interval:
                                  type: array
                                  example:
                                    - 300
                                  items:
                                    type: integer
                                fingerStrength:
                                  type: array
                                  example:
                                    - 1
                                    - 100
                                  items:
                                    type: integer
                                autoGrasp:
                                  type: array
                                  example:
                                    - 0
                                    - 100
                                  items:
                                    type: integer
                                emgSpike:
                                  type: array
                                  example:
                                    - 0
                                    - 300
                                  items:
                                    type: integer
                  -
                    description: ''
                    type: object
                    example:
                      paginator:
                        total: 2
                        count: 2
                        perpage: 20
                        current_page: 1
                        last_page: 1
                      items:
                        -
                          id: 1
                          device_id: 17
                          index: null
                          name: 'Consequatur nulla quaerat facilis perspiciatis quia laborum.'
                          config: '{"common":{"fingerStrength":[1,100],"gripPositions":{"_":0,"0":{"initial":[67,60,33,3,28],"limit":[95,64,38,83,48]},"1":{"initial":[2,11,31,24,23],"limit":[45,12,83,66,78]},"2":{"initial":[18,4,52,83,56],"limit":[69,49,56,95,88]},"3":{"initial":[8,41,37,24,39],"limit":[93,62,90,33,54]},"4":{"initial":[22,8,35,2,8],"limit":[32,32,39,3,92]},"5":{"initial":[86,30,40,11,19],"limit":[87,80,55,84,69]},"6":{"initial":[34,10,35,25,2],"limit":[64,29,71,95,42]},"7":{"initial":[47,22,48,56,18],"limit":[54,80,52,90,84]},"8":{"initial":[32,9,64,57,25],"limit":[60,27,89,79,81]},"9":{"initial":[45,80,2,35,49],"limit":[91,83,62,95,68]},"10":{"initial":[47,51,55,11,63],"limit":[79,91,73,27,73]},"11":{"initial":[65,3,38,65,38],"limit":[90,88,64,90,56]},"12":{"initial":[53,52,88,51,32],"limit":[58,63,90,80,94]},"13":{"initial":[52,11,11,63,74],"limit":[71,12,80,65,95]}},"inputSite":[0]},"modes":[{"id":3,"name":"Laudantium minus vel at voluptates aperiam aut.","slot":0,"config":{"autoGrasp":[1,0],"coContractionTimings":[400,300],"controlMode":[0],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[80,0,70,30,20,0,70,100,70,80],"gripPairsConfig":[2,3,8,13,11,9,1,10],"gripSequentialConfig":[255,255,6,255,255,255,255,255,12,255,11,255],"gripSwitchingMode":[2],"holdOpen":[2500,2500],"pulseTimings":[460,120,50,560],"softGrip":[1],"speedControlStrategy":[0]}},{"id":4,"name":"Delectus mollitia suscipit ex aut.","slot":1,"config":{"autoGrasp":[1,100],"coContractionTimings":[200,200],"controlMode":[1],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[80,90,0,10,0,20,60,0,10,0],"gripPairsConfig":[5,9,11,12,13,2,8,4],"gripSequentialConfig":[255,8,255,9,12,4,2,13,3,6,7,255],"gripSwitchingMode":[3],"holdOpen":[2000,2000],"pulseTimings":[400,180,30,250],"softGrip":[1],"speedControlStrategy":[0]}},{"id":5,"name":"Aliquam voluptates illum esse et minima est soluta quibusdam.","slot":2,"config":{"autoGrasp":[1,100],"coContractionTimings":[500,100],"controlMode":[1],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[80,50,100,0,20,90,30,60,60,90],"gripPairsConfig":[3,5,9,2,13,12,10,6],"gripSequentialConfig":[255,1,255,4,10,255,2,12,255,255,255,9],"gripSwitchingMode":[2],"holdOpen":[1500,2000],"pulseTimings":[450,910,140,690],"softGrip":[0],"speedControlStrategy":[1]}}]}'
                          restore_point: 0
                          factory_reset_point: 0
                          changed_by: 46
                          created_at: '2025-12-10T11:59:58.000000Z'
                          updated_at: '2025-12-10T11:59:58.000000Z'
                          author:
                            id: 46
                            mrn: ATW9Z80M1765367998
                            name: 'Moshe Rogahn'
                            email: 1765367998eulalia.herman@example.net
                            language: en
                            phone: 854-239-7765
                            phone_country: IL
                            phone_verified_at: null
                            address1: '8385 Langworth Flat Apt. 262'
                            address2: 'West Cristian, OR 12952-0665'
                            postal_code: 56362-9266
                            city: Wiegand-Kuvalis
                            clinic_name: 'New Clinton'
                            clinic_location: "2518 Jessie Creek\nAliyaview, DC 27666"
                            image: null
                            mfa_enabled: 0
                            mfa_method: null
                            mfa_verified_to: null
                            location_id: null
                            created_by: null
                            active: 1
                            notifications_timezone: null
                            notifications_at: null
                            created_at: '2025-12-10T11:59:58.000000Z'
                            updated_at: '2025-12-10T11:59:58.000000Z'
                            invitation_status: null
                            acadle_invitation_status: null
                            roles: []
                          entries:
                            -
                              id: 1
                              config_history_id: 1
                              config_id: 3
                              old_value: repellendus
                              new_value: deleniti
                              created_at: '2025-12-10T11:59:58.000000Z'
                              updated_at: '2025-12-10T11:59:58.000000Z'
                              config_entry:
                                id: 3
                                device_id: 25
                                mode_id: null
                                key: dolores
                                value: accusantium
                                created_at: '2025-12-10T11:59:58.000000Z'
                                updated_at: '2025-12-10T11:59:58.000000Z'
                        -
                          id: 3
                          device_id: 26
                          index: null
                          name: 'Quis omnis quo sit voluptatibus.'
                          config: '{"common":{"fingerStrength":[1,500],"gripPositions":{"_":0,"0":{"initial":[47,24,20,10,31],"limit":[62,30,57,51,62]},"1":{"initial":[24,30,6,9,3],"limit":[43,84,78,34,59]},"2":{"initial":[28,27,20,85,13],"limit":[88,68,40,90,92]},"3":{"initial":[14,31,41,65,70],"limit":[89,62,78,94,91]},"4":{"initial":[19,19,27,6,41],"limit":[82,48,35,43,49]},"5":{"initial":[51,63,8,7,15],"limit":[68,65,37,25,65]},"6":{"initial":[27,44,50,57,42],"limit":[34,74,89,72,44]},"7":{"initial":[23,27,65,21,35],"limit":[94,38,76,28,41]},"8":{"initial":[66,68,11,26,73],"limit":[83,81,95,60,79]},"9":{"initial":[41,1,29,6,45],"limit":[80,95,37,72,86]},"10":{"initial":[22,3,30,27,23],"limit":[26,55,42,80,42]},"11":{"initial":[7,54,3,13,20],"limit":[30,83,87,67,24]},"12":{"initial":[7,4,26,44,9],"limit":[54,12,61,76,21]},"13":{"initial":[5,13,28,23,51],"limit":[44,48,80,95,91]}},"inputSite":[1]},"modes":[{"id":9,"name":"Modi nam hic dolorem sunt.","slot":0,"config":{"autoGrasp":[0,100],"coContractionTimings":[400,200],"controlMode":[0],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[50,30,90,20,70,10,40,40,20,60],"gripPairsConfig":[5,6,10,7,9,4,1,8],"gripSequentialConfig":[13,2,255,1,255,255,3,255,5,255,12,6],"gripSwitchingMode":[2],"holdOpen":[2000,2000],"pulseTimings":[280,780,780,580],"softGrip":[0],"speedControlStrategy":[0]}},{"id":10,"name":"Est voluptatum consequuntur neque dolores et laborum.","slot":1,"config":{"autoGrasp":[0,100],"coContractionTimings":[300,100],"controlMode":[0],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[40,0,70,40,70,80,20,50,40,80],"gripPairsConfig":[13,2,6,4,9,3,11,10],"gripSequentialConfig":[13,255,5,255,9,6,8,2,11,10,12,1],"gripSwitchingMode":[2],"holdOpen":[1500,2000],"pulseTimings":[350,620,770,890],"softGrip":[1],"speedControlStrategy":[1]}},{"id":11,"name":"Nihil et maiores est sint voluptatem eius et.","slot":2,"config":{"autoGrasp":[0,100],"coContractionTimings":[400,400],"controlMode":[0],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[10,10,90,60,0,30,100,30,100,20],"gripPairsConfig":[10,7,9,4,12,1,5,11],"gripSequentialConfig":[255,5,9,255,7,255,8,2,13,4,3,255],"gripSwitchingMode":[2],"holdOpen":[2000,2500],"pulseTimings":[950,960,80,140],"softGrip":[0],"speedControlStrategy":[0]}}]}'
                          restore_point: 0
                          factory_reset_point: 0
                          changed_by: 49
                          created_at: '2025-12-10T11:59:58.000000Z'
                          updated_at: '2025-12-10T11:59:58.000000Z'
                          author:
                            id: 49
                            mrn: 730P2ULX1765367998
                            name: 'Bo Buckridge'
                            email: 1765367998theresia.hagenes@example.net
                            language: en
                            phone: 580-265-9909
                            phone_country: CF
                            phone_verified_at: null
                            address1: '75064 Johnson Summit Apt. 603'
                            address2: 'West Kennith, NV 64455-3771'
                            postal_code: 26266-3554
                            city: Rosenbaum-Kirlin
                            clinic_name: Chanelview
                            clinic_location: "491 Monahan Crest Suite 627\nGabrielleborough, TX 55804-1924"
                            image: null
                            mfa_enabled: 0
                            mfa_method: null
                            mfa_verified_to: null
                            location_id: null
                            created_by: null
                            active: 1
                            notifications_timezone: null
                            notifications_at: null
                            created_at: '2025-12-10T11:59:58.000000Z'
                            updated_at: '2025-12-10T11:59:58.000000Z'
                            invitation_status: null
                            acadle_invitation_status: null
                            roles: []
                          entries:
                            -
                              id: 2
                              config_history_id: 3
                              config_id: 4
                              old_value: illum
                              new_value: sit
                              created_at: '2025-12-10T11:59:59.000000Z'
                              updated_at: '2025-12-10T11:59:59.000000Z'
                              config_entry:
                                id: 4
                                device_id: 34
                                mode_id: null
                                key: neque
                                value: omnis
                                created_at: '2025-12-10T11:59:59.000000Z'
                                updated_at: '2025-12-10T11:59:59.000000Z'
                    properties:
                      paginator:
                        type: object
                        properties:
                          total:
                            type: integer
                            example: 2
                          count:
                            type: integer
                            example: 2
                          perpage:
                            type: integer
                            example: 20
                          current_page:
                            type: integer
                            example: 1
                          last_page:
                            type: integer
                            example: 1
                      items:
                        type: array
                        example:
                          -
                            id: 1
                            device_id: 17
                            index: null
                            name: 'Consequatur nulla quaerat facilis perspiciatis quia laborum.'
                            config: '{"common":{"fingerStrength":[1,100],"gripPositions":{"_":0,"0":{"initial":[67,60,33,3,28],"limit":[95,64,38,83,48]},"1":{"initial":[2,11,31,24,23],"limit":[45,12,83,66,78]},"2":{"initial":[18,4,52,83,56],"limit":[69,49,56,95,88]},"3":{"initial":[8,41,37,24,39],"limit":[93,62,90,33,54]},"4":{"initial":[22,8,35,2,8],"limit":[32,32,39,3,92]},"5":{"initial":[86,30,40,11,19],"limit":[87,80,55,84,69]},"6":{"initial":[34,10,35,25,2],"limit":[64,29,71,95,42]},"7":{"initial":[47,22,48,56,18],"limit":[54,80,52,90,84]},"8":{"initial":[32,9,64,57,25],"limit":[60,27,89,79,81]},"9":{"initial":[45,80,2,35,49],"limit":[91,83,62,95,68]},"10":{"initial":[47,51,55,11,63],"limit":[79,91,73,27,73]},"11":{"initial":[65,3,38,65,38],"limit":[90,88,64,90,56]},"12":{"initial":[53,52,88,51,32],"limit":[58,63,90,80,94]},"13":{"initial":[52,11,11,63,74],"limit":[71,12,80,65,95]}},"inputSite":[0]},"modes":[{"id":3,"name":"Laudantium minus vel at voluptates aperiam aut.","slot":0,"config":{"autoGrasp":[1,0],"coContractionTimings":[400,300],"controlMode":[0],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[80,0,70,30,20,0,70,100,70,80],"gripPairsConfig":[2,3,8,13,11,9,1,10],"gripSequentialConfig":[255,255,6,255,255,255,255,255,12,255,11,255],"gripSwitchingMode":[2],"holdOpen":[2500,2500],"pulseTimings":[460,120,50,560],"softGrip":[1],"speedControlStrategy":[0]}},{"id":4,"name":"Delectus mollitia suscipit ex aut.","slot":1,"config":{"autoGrasp":[1,100],"coContractionTimings":[200,200],"controlMode":[1],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[80,90,0,10,0,20,60,0,10,0],"gripPairsConfig":[5,9,11,12,13,2,8,4],"gripSequentialConfig":[255,8,255,9,12,4,2,13,3,6,7,255],"gripSwitchingMode":[3],"holdOpen":[2000,2000],"pulseTimings":[400,180,30,250],"softGrip":[1],"speedControlStrategy":[0]}},{"id":5,"name":"Aliquam voluptates illum esse et minima est soluta quibusdam.","slot":2,"config":{"autoGrasp":[1,100],"coContractionTimings":[500,100],"controlMode":[1],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[80,50,100,0,20,90,30,60,60,90],"gripPairsConfig":[3,5,9,2,13,12,10,6],"gripSequentialConfig":[255,1,255,4,10,255,2,12,255,255,255,9],"gripSwitchingMode":[2],"holdOpen":[1500,2000],"pulseTimings":[450,910,140,690],"softGrip":[0],"speedControlStrategy":[1]}}]}'
                            restore_point: 0
                            factory_reset_point: 0
                            changed_by: 46
                            created_at: '2025-12-10T11:59:58.000000Z'
                            updated_at: '2025-12-10T11:59:58.000000Z'
                            author:
                              id: 46
                              mrn: ATW9Z80M1765367998
                              name: 'Moshe Rogahn'
                              email: 1765367998eulalia.herman@example.net
                              language: en
                              phone: 854-239-7765
                              phone_country: IL
                              phone_verified_at: null
                              address1: '8385 Langworth Flat Apt. 262'
                              address2: 'West Cristian, OR 12952-0665'
                              postal_code: 56362-9266
                              city: Wiegand-Kuvalis
                              clinic_name: 'New Clinton'
                              clinic_location: "2518 Jessie Creek\nAliyaview, DC 27666"
                              image: null
                              mfa_enabled: 0
                              mfa_method: null
                              mfa_verified_to: null
                              location_id: null
                              created_by: null
                              active: 1
                              notifications_timezone: null
                              notifications_at: null
                              created_at: '2025-12-10T11:59:58.000000Z'
                              updated_at: '2025-12-10T11:59:58.000000Z'
                              invitation_status: null
                              acadle_invitation_status: null
                              roles: []
                            entries:
                              -
                                id: 1
                                config_history_id: 1
                                config_id: 3
                                old_value: repellendus
                                new_value: deleniti
                                created_at: '2025-12-10T11:59:58.000000Z'
                                updated_at: '2025-12-10T11:59:58.000000Z'
                                config_entry:
                                  id: 3
                                  device_id: 25
                                  mode_id: null
                                  key: dolores
                                  value: accusantium
                                  created_at: '2025-12-10T11:59:58.000000Z'
                                  updated_at: '2025-12-10T11:59:58.000000Z'
                          -
                            id: 3
                            device_id: 26
                            index: null
                            name: 'Quis omnis quo sit voluptatibus.'
                            config: '{"common":{"fingerStrength":[1,500],"gripPositions":{"_":0,"0":{"initial":[47,24,20,10,31],"limit":[62,30,57,51,62]},"1":{"initial":[24,30,6,9,3],"limit":[43,84,78,34,59]},"2":{"initial":[28,27,20,85,13],"limit":[88,68,40,90,92]},"3":{"initial":[14,31,41,65,70],"limit":[89,62,78,94,91]},"4":{"initial":[19,19,27,6,41],"limit":[82,48,35,43,49]},"5":{"initial":[51,63,8,7,15],"limit":[68,65,37,25,65]},"6":{"initial":[27,44,50,57,42],"limit":[34,74,89,72,44]},"7":{"initial":[23,27,65,21,35],"limit":[94,38,76,28,41]},"8":{"initial":[66,68,11,26,73],"limit":[83,81,95,60,79]},"9":{"initial":[41,1,29,6,45],"limit":[80,95,37,72,86]},"10":{"initial":[22,3,30,27,23],"limit":[26,55,42,80,42]},"11":{"initial":[7,54,3,13,20],"limit":[30,83,87,67,24]},"12":{"initial":[7,4,26,44,9],"limit":[54,12,61,76,21]},"13":{"initial":[5,13,28,23,51],"limit":[44,48,80,95,91]}},"inputSite":[1]},"modes":[{"id":9,"name":"Modi nam hic dolorem sunt.","slot":0,"config":{"autoGrasp":[0,100],"coContractionTimings":[400,200],"controlMode":[0],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[50,30,90,20,70,10,40,40,20,60],"gripPairsConfig":[5,6,10,7,9,4,1,8],"gripSequentialConfig":[13,2,255,1,255,255,3,255,5,255,12,6],"gripSwitchingMode":[2],"holdOpen":[2000,2000],"pulseTimings":[280,780,780,580],"softGrip":[0],"speedControlStrategy":[0]}},{"id":10,"name":"Est voluptatum consequuntur neque dolores et laborum.","slot":1,"config":{"autoGrasp":[0,100],"coContractionTimings":[300,100],"controlMode":[0],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[40,0,70,40,70,80,20,50,40,80],"gripPairsConfig":[13,2,6,4,9,3,11,10],"gripSequentialConfig":[13,255,5,255,9,6,8,2,11,10,12,1],"gripSwitchingMode":[2],"holdOpen":[1500,2000],"pulseTimings":[350,620,770,890],"softGrip":[1],"speedControlStrategy":[1]}},{"id":11,"name":"Nihil et maiores est sint voluptatem eius et.","slot":2,"config":{"autoGrasp":[0,100],"coContractionTimings":[400,400],"controlMode":[0],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[10,10,90,60,0,30,100,30,100,20],"gripPairsConfig":[10,7,9,4,12,1,5,11],"gripSequentialConfig":[255,5,9,255,7,255,8,2,13,4,3,255],"gripSwitchingMode":[2],"holdOpen":[2000,2500],"pulseTimings":[950,960,80,140],"softGrip":[0],"speedControlStrategy":[0]}}]}'
                            restore_point: 0
                            factory_reset_point: 0
                            changed_by: 49
                            created_at: '2025-12-10T11:59:58.000000Z'
                            updated_at: '2025-12-10T11:59:58.000000Z'
                            author:
                              id: 49
                              mrn: 730P2ULX1765367998
                              name: 'Bo Buckridge'
                              email: 1765367998theresia.hagenes@example.net
                              language: en
                              phone: 580-265-9909
                              phone_country: CF
                              phone_verified_at: null
                              address1: '75064 Johnson Summit Apt. 603'
                              address2: 'West Kennith, NV 64455-3771'
                              postal_code: 26266-3554
                              city: Rosenbaum-Kirlin
                              clinic_name: Chanelview
                              clinic_location: "491 Monahan Crest Suite 627\nGabrielleborough, TX 55804-1924"
                              image: null
                              mfa_enabled: 0
                              mfa_method: null
                              mfa_verified_to: null
                              location_id: null
                              created_by: null
                              active: 1
                              notifications_timezone: null
                              notifications_at: null
                              created_at: '2025-12-10T11:59:58.000000Z'
                              updated_at: '2025-12-10T11:59:58.000000Z'
                              invitation_status: null
                              acadle_invitation_status: null
                              roles: []
                            entries:
                              -
                                id: 2
                                config_history_id: 3
                                config_id: 4
                                old_value: illum
                                new_value: sit
                                created_at: '2025-12-10T11:59:59.000000Z'
                                updated_at: '2025-12-10T11:59:59.000000Z'
                                config_entry:
                                  id: 4
                                  device_id: 34
                                  mode_id: null
                                  key: neque
                                  value: omnis
                                  created_at: '2025-12-10T11:59:59.000000Z'
                                  updated_at: '2025-12-10T11:59:59.000000Z'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            device_id:
                              type: integer
                              example: 17
                            index:
                              type: string
                              example: null
                            name:
                              type: string
                              example: 'Consequatur nulla quaerat facilis perspiciatis quia laborum.'
                            config:
                              type: string
                              example: '{"common":{"fingerStrength":[1,100],"gripPositions":{"_":0,"0":{"initial":[67,60,33,3,28],"limit":[95,64,38,83,48]},"1":{"initial":[2,11,31,24,23],"limit":[45,12,83,66,78]},"2":{"initial":[18,4,52,83,56],"limit":[69,49,56,95,88]},"3":{"initial":[8,41,37,24,39],"limit":[93,62,90,33,54]},"4":{"initial":[22,8,35,2,8],"limit":[32,32,39,3,92]},"5":{"initial":[86,30,40,11,19],"limit":[87,80,55,84,69]},"6":{"initial":[34,10,35,25,2],"limit":[64,29,71,95,42]},"7":{"initial":[47,22,48,56,18],"limit":[54,80,52,90,84]},"8":{"initial":[32,9,64,57,25],"limit":[60,27,89,79,81]},"9":{"initial":[45,80,2,35,49],"limit":[91,83,62,95,68]},"10":{"initial":[47,51,55,11,63],"limit":[79,91,73,27,73]},"11":{"initial":[65,3,38,65,38],"limit":[90,88,64,90,56]},"12":{"initial":[53,52,88,51,32],"limit":[58,63,90,80,94]},"13":{"initial":[52,11,11,63,74],"limit":[71,12,80,65,95]}},"inputSite":[0]},"modes":[{"id":3,"name":"Laudantium minus vel at voluptates aperiam aut.","slot":0,"config":{"autoGrasp":[1,0],"coContractionTimings":[400,300],"controlMode":[0],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[80,0,70,30,20,0,70,100,70,80],"gripPairsConfig":[2,3,8,13,11,9,1,10],"gripSequentialConfig":[255,255,6,255,255,255,255,255,12,255,11,255],"gripSwitchingMode":[2],"holdOpen":[2500,2500],"pulseTimings":[460,120,50,560],"softGrip":[1],"speedControlStrategy":[0]}},{"id":4,"name":"Delectus mollitia suscipit ex aut.","slot":1,"config":{"autoGrasp":[1,100],"coContractionTimings":[200,200],"controlMode":[1],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[80,90,0,10,0,20,60,0,10,0],"gripPairsConfig":[5,9,11,12,13,2,8,4],"gripSequentialConfig":[255,8,255,9,12,4,2,13,3,6,7,255],"gripSwitchingMode":[3],"holdOpen":[2000,2000],"pulseTimings":[400,180,30,250],"softGrip":[1],"speedControlStrategy":[0]}},{"id":5,"name":"Aliquam voluptates illum esse et minima est soluta quibusdam.","slot":2,"config":{"autoGrasp":[1,100],"coContractionTimings":[500,100],"controlMode":[1],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[80,50,100,0,20,90,30,60,60,90],"gripPairsConfig":[3,5,9,2,13,12,10,6],"gripSequentialConfig":[255,1,255,4,10,255,2,12,255,255,255,9],"gripSwitchingMode":[2],"holdOpen":[1500,2000],"pulseTimings":[450,910,140,690],"softGrip":[0],"speedControlStrategy":[1]}}]}'
                            restore_point:
                              type: integer
                              example: 0
                            factory_reset_point:
                              type: integer
                              example: 0
                            changed_by:
                              type: integer
                              example: 46
                            created_at:
                              type: string
                              example: '2025-12-10T11:59:58.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T11:59:58.000000Z'
                            author:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 46
                                mrn:
                                  type: string
                                  example: ATW9Z80M1765367998
                                name:
                                  type: string
                                  example: 'Moshe Rogahn'
                                email:
                                  type: string
                                  example: 1765367998eulalia.herman@example.net
                                language:
                                  type: string
                                  example: en
                                phone:
                                  type: string
                                  example: 854-239-7765
                                phone_country:
                                  type: string
                                  example: IL
                                phone_verified_at:
                                  type: string
                                  example: null
                                address1:
                                  type: string
                                  example: '8385 Langworth Flat Apt. 262'
                                address2:
                                  type: string
                                  example: 'West Cristian, OR 12952-0665'
                                postal_code:
                                  type: string
                                  example: 56362-9266
                                city:
                                  type: string
                                  example: Wiegand-Kuvalis
                                clinic_name:
                                  type: string
                                  example: 'New Clinton'
                                clinic_location:
                                  type: string
                                  example: "2518 Jessie Creek\nAliyaview, DC 27666"
                                image:
                                  type: string
                                  example: null
                                mfa_enabled:
                                  type: integer
                                  example: 0
                                mfa_method:
                                  type: string
                                  example: null
                                mfa_verified_to:
                                  type: string
                                  example: null
                                location_id:
                                  type: string
                                  example: null
                                created_by:
                                  type: string
                                  example: null
                                active:
                                  type: integer
                                  example: 1
                                notifications_timezone:
                                  type: string
                                  example: null
                                notifications_at:
                                  type: string
                                  example: null
                                created_at:
                                  type: string
                                  example: '2025-12-10T11:59:58.000000Z'
                                updated_at:
                                  type: string
                                  example: '2025-12-10T11:59:58.000000Z'
                                invitation_status:
                                  type: string
                                  example: null
                                acadle_invitation_status:
                                  type: string
                                  example: null
                                roles:
                                  type: array
                                  example: []
                            entries:
                              type: array
                              example:
                                -
                                  id: 1
                                  config_history_id: 1
                                  config_id: 3
                                  old_value: repellendus
                                  new_value: deleniti
                                  created_at: '2025-12-10T11:59:58.000000Z'
                                  updated_at: '2025-12-10T11:59:58.000000Z'
                                  config_entry:
                                    id: 3
                                    device_id: 25
                                    mode_id: null
                                    key: dolores
                                    value: accusantium
                                    created_at: '2025-12-10T11:59:58.000000Z'
                                    updated_at: '2025-12-10T11:59:58.000000Z'
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1
                                  config_history_id:
                                    type: integer
                                    example: 1
                                  config_id:
                                    type: integer
                                    example: 3
                                  old_value:
                                    type: string
                                    example: repellendus
                                  new_value:
                                    type: string
                                    example: deleniti
                                  created_at:
                                    type: string
                                    example: '2025-12-10T11:59:58.000000Z'
                                  updated_at:
                                    type: string
                                    example: '2025-12-10T11:59:58.000000Z'
                                  config_entry:
                                    type: object
                                    properties:
                                      id: { type: integer, example: 3 }
                                      device_id: { type: integer, example: 25 }
                                      mode_id: { type: string, example: null }
                                      key: { type: string, example: dolores }
                                      value: { type: string, example: accusantium }
                                      created_at: { type: string, example: '2025-12-10T11:59:58.000000Z' }
                                      updated_at: { type: string, example: '2025-12-10T11:59:58.000000Z' }
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view device config'
                  code: 'CONFIG:HISTORY:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view device config'
                  code:
                    type: string
                    example: 'CONFIG:HISTORY:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'CONFIG:HISTORY:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'CONFIG:HISTORY:DEVICE_NOT_FOUND'
      tags:
        - Config
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                restore_point:
                  type: boolean
                  description: ''
                  example: true
                factory_reset_point:
                  type: boolean
                  description: ''
                  example: false
                date_from:
                  type: string
                  description: ''
                  example: null
                date_to:
                  type: string
                  description: ''
                  example: null
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config/history/{configId}':
    get:
      summary: 'Get device config history entry'
      operationId: getDeviceConfigHistoryEntry
      description: ''
      parameters:
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>author</code>, <code>entries</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>author</code>, <code>entries</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 5
                  device_id: 35
                  index: null
                  name: 'Ex qui omnis quis omnis tenetur.'
                  config: '{"common":{"fingerStrength":[1,500],"gripPositions":{"_":0,"0":{"initial":[3,36,75,42,83],"limit":[38,60,83,48,90]},"1":{"initial":[15,4,47,24,30],"limit":[66,70,72,91,68]},"2":{"initial":[35,20,61,46,15],"limit":[57,92,91,93,95]},"3":{"initial":[57,69,80,22,16],"limit":[70,87,83,39,43]},"4":{"initial":[25,48,31,75,29],"limit":[86,63,34,93,77]},"5":{"initial":[30,5,13,41,17],"limit":[38,64,21,91,77]},"6":{"initial":[41,7,55,6,16],"limit":[73,93,86,56,42]},"7":{"initial":[2,27,49,2,50],"limit":[44,33,51,36,89]},"8":{"initial":[22,18,40,19,9],"limit":[28,66,88,87,63]},"9":{"initial":[31,67,18,40,18],"limit":[78,83,46,68,84]},"10":{"initial":[25,2,30,43,32],"limit":[55,44,89,90,89]},"11":{"initial":[28,12,44,12,21],"limit":[89,19,82,85,54]},"12":{"initial":[19,6,18,6,53],"limit":[55,93,18,37,67]},"13":{"initial":[17,33,26,45,14],"limit":[42,65,42,54,52]}},"inputSite":[0]},"modes":[{"id":15,"name":"Magni sed quo officiis quo.","slot":0,"config":{"autoGrasp":[1,100],"coContractionTimings":[200,100],"controlMode":[0],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[40,70,50,30,80,30,10,10,40,50],"gripPairsConfig":[8,3,12,11,5,4,2,9],"gripSequentialConfig":[5,9,11,255,13,12,8,6,3,255,1,7],"gripSwitchingMode":[3],"holdOpen":[1500,2000],"pulseTimings":[90,750,180,10],"softGrip":[0],"speedControlStrategy":[1]}},{"id":16,"name":"Et atque ipsum aliquid deserunt dignissimos.","slot":1,"config":{"autoGrasp":[0,0],"coContractionTimings":[500,500],"controlMode":[1],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[100,0,50,100,100,20,0,60,50,50],"gripPairsConfig":[3,10,8,1,6,12,9,13],"gripSequentialConfig":[12,255,3,7,13,4,10,8,9,6,5,255],"gripSwitchingMode":[2],"holdOpen":[1500,2500],"pulseTimings":[730,720,470,410],"softGrip":[0],"speedControlStrategy":[0]}},{"id":17,"name":"Recusandae doloremque voluptatum et aperiam accusamus recusandae.","slot":2,"config":{"autoGrasp":[0,0],"coContractionTimings":[500,200],"controlMode":[0],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[90,30,40,80,100,100,70,20,60,60],"gripPairsConfig":[2,8,5,12,10,3,11,13],"gripSequentialConfig":[255,10,255,255,255,7,255,11,6,1,8,2],"gripSwitchingMode":[3],"holdOpen":[1500,2000],"pulseTimings":[580,880,130,210],"softGrip":[0],"speedControlStrategy":[1]}}]}'
                  restore_point: 0
                  factory_reset_point: 0
                  changed_by: 51
                  created_at: '2025-12-10T11:59:59.000000Z'
                  updated_at: '2025-12-10T11:59:59.000000Z'
                properties:
                  id:
                    type: integer
                    example: 5
                  device_id:
                    type: integer
                    example: 35
                  index:
                    type: string
                    example: null
                  name:
                    type: string
                    example: 'Ex qui omnis quis omnis tenetur.'
                  config:
                    type: string
                    example: '{"common":{"fingerStrength":[1,500],"gripPositions":{"_":0,"0":{"initial":[3,36,75,42,83],"limit":[38,60,83,48,90]},"1":{"initial":[15,4,47,24,30],"limit":[66,70,72,91,68]},"2":{"initial":[35,20,61,46,15],"limit":[57,92,91,93,95]},"3":{"initial":[57,69,80,22,16],"limit":[70,87,83,39,43]},"4":{"initial":[25,48,31,75,29],"limit":[86,63,34,93,77]},"5":{"initial":[30,5,13,41,17],"limit":[38,64,21,91,77]},"6":{"initial":[41,7,55,6,16],"limit":[73,93,86,56,42]},"7":{"initial":[2,27,49,2,50],"limit":[44,33,51,36,89]},"8":{"initial":[22,18,40,19,9],"limit":[28,66,88,87,63]},"9":{"initial":[31,67,18,40,18],"limit":[78,83,46,68,84]},"10":{"initial":[25,2,30,43,32],"limit":[55,44,89,90,89]},"11":{"initial":[28,12,44,12,21],"limit":[89,19,82,85,54]},"12":{"initial":[19,6,18,6,53],"limit":[55,93,18,37,67]},"13":{"initial":[17,33,26,45,14],"limit":[42,65,42,54,52]}},"inputSite":[0]},"modes":[{"id":15,"name":"Magni sed quo officiis quo.","slot":0,"config":{"autoGrasp":[1,100],"coContractionTimings":[200,100],"controlMode":[0],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[40,70,50,30,80,30,10,10,40,50],"gripPairsConfig":[8,3,12,11,5,4,2,9],"gripSequentialConfig":[5,9,11,255,13,12,8,6,3,255,1,7],"gripSwitchingMode":[3],"holdOpen":[1500,2000],"pulseTimings":[90,750,180,10],"softGrip":[0],"speedControlStrategy":[1]}},{"id":16,"name":"Et atque ipsum aliquid deserunt dignissimos.","slot":1,"config":{"autoGrasp":[0,0],"coContractionTimings":[500,500],"controlMode":[1],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[100,0,50,100,100,20,0,60,50,50],"gripPairsConfig":[3,10,8,1,6,12,9,13],"gripSequentialConfig":[12,255,3,7,13,4,10,8,9,6,5,255],"gripSwitchingMode":[2],"holdOpen":[1500,2500],"pulseTimings":[730,720,470,410],"softGrip":[0],"speedControlStrategy":[0]}},{"id":17,"name":"Recusandae doloremque voluptatum et aperiam accusamus recusandae.","slot":2,"config":{"autoGrasp":[0,0],"coContractionTimings":[500,200],"controlMode":[0],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[90,30,40,80,100,100,70,20,60,60],"gripPairsConfig":[2,8,5,12,10,3,11,13],"gripSequentialConfig":[255,10,255,255,255,7,255,11,6,1,8,2],"gripSwitchingMode":[3],"holdOpen":[1500,2000],"pulseTimings":[580,880,130,210],"softGrip":[0],"speedControlStrategy":[1]}}]}'
                  restore_point:
                    type: integer
                    example: 0
                  factory_reset_point:
                    type: integer
                    example: 0
                  changed_by:
                    type: integer
                    example: 51
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:59.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:59.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view device config'
                  code: 'CONFIG:HISTORY_ENTRY:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view device config'
                  code:
                    type: string
                    example: 'CONFIG:HISTORY_ENTRY:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CONFIG:HISTORY_ENTRY:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CONFIG:HISTORY_ENTRY:DEVICE_NOT_FOUND'
                  -
                    description: 'Config history entry not found'
                    type: object
                    example:
                      message: 'Config history entry not found'
                      code: 'CONFIG:HISTORY_ENTRY:HISTORY_ENTRY_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config history entry not found'
                      code:
                        type: string
                        example: 'CONFIG:HISTORY_ENTRY:HISTORY_ENTRY_NOT_FOUND'
      tags:
        - Config
    post:
      summary: 'Update config history'
      operationId: updateConfigHistory
      description: 'Returns updated config history in response.'
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 6
                  device_id: 39
                  index: null
                  name: 'Aut itaque nihil officiis vero cumque quis.'
                  config: '{"common":{"fingerStrength":[1,200],"gripPositions":{"_":0,"0":{"initial":[16,53,14,2,1],"limit":[64,72,64,28,89]},"1":{"initial":[13,12,4,13,41],"limit":[93,16,81,41,88]},"2":{"initial":[56,4,12,40,49],"limit":[85,42,69,63,71]},"3":{"initial":[14,34,20,20,43],"limit":[56,60,71,68,69]},"4":{"initial":[61,27,47,75,52],"limit":[85,73,87,93,54]},"5":{"initial":[2,55,12,43,75],"limit":[44,91,66,46,85]},"6":{"initial":[20,15,60,48,4],"limit":[75,52,89,52,8]},"7":{"initial":[53,24,37,11,5],"limit":[57,64,55,84,70]},"8":{"initial":[30,38,59,28,73],"limit":[46,83,75,47,76]},"9":{"initial":[5,1,21,8,16],"limit":[11,32,38,84,84]},"10":{"initial":[56,29,40,1,33],"limit":[93,61,94,89,69]},"11":{"initial":[60,18,15,28,13],"limit":[62,54,83,57,73]},"12":{"initial":[82,5,63,63,40],"limit":[86,57,85,95,75]},"13":{"initial":[42,44,55,3,29],"limit":[81,66,87,75,81]}},"inputSite":[1]},"modes":[{"id":18,"name":"Doloremque numquam voluptas deserunt modi aspernatur id.","slot":0,"config":{"autoGrasp":[0,100],"coContractionTimings":[300,200],"controlMode":[0],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[10,90,70,10,0,30,80,20,50,60],"gripPairsConfig":[4,6,3,11,8,12,13,10],"gripSequentialConfig":[1,6,5,255,255,4,8,11,255,10,2,3],"gripSwitchingMode":[3],"holdOpen":[2000,2500],"pulseTimings":[60,430,630,710],"softGrip":[1],"speedControlStrategy":[0]}},{"id":19,"name":"Tempora iste molestias rerum neque quia et iusto.","slot":1,"config":{"autoGrasp":[0,0],"coContractionTimings":[400,300],"controlMode":[1],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[80,80,0,30,20,10,10,20,20,50],"gripPairsConfig":[5,6,7,13,11,1,4,3],"gripSequentialConfig":[255,5,4,255,2,9,255,255,13,12,7,3],"gripSwitchingMode":[2],"holdOpen":[2000,2500],"pulseTimings":[640,40,130,570],"softGrip":[0],"speedControlStrategy":[0]}},{"id":20,"name":"Doloribus reprehenderit est modi hic dolorem et.","slot":2,"config":{"autoGrasp":[0,0],"coContractionTimings":[400,200],"controlMode":[0],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[60,10,30,0,50,0,60,0,50,70],"gripPairsConfig":[2,6,8,5,11,1,4,9],"gripSequentialConfig":[255,13,255,255,7,255,255,255,11,3,9,8],"gripSwitchingMode":[2],"holdOpen":[1500,1500],"pulseTimings":[900,970,640,800],"softGrip":[1],"speedControlStrategy":[0]}}]}'
                  restore_point: 0
                  factory_reset_point: 0
                  changed_by: 52
                  created_at: '2025-12-10T11:59:59.000000Z'
                  updated_at: '2025-12-10T11:59:59.000000Z'
                properties:
                  id:
                    type: integer
                    example: 6
                  device_id:
                    type: integer
                    example: 39
                  index:
                    type: string
                    example: null
                  name:
                    type: string
                    example: 'Aut itaque nihil officiis vero cumque quis.'
                  config:
                    type: string
                    example: '{"common":{"fingerStrength":[1,200],"gripPositions":{"_":0,"0":{"initial":[16,53,14,2,1],"limit":[64,72,64,28,89]},"1":{"initial":[13,12,4,13,41],"limit":[93,16,81,41,88]},"2":{"initial":[56,4,12,40,49],"limit":[85,42,69,63,71]},"3":{"initial":[14,34,20,20,43],"limit":[56,60,71,68,69]},"4":{"initial":[61,27,47,75,52],"limit":[85,73,87,93,54]},"5":{"initial":[2,55,12,43,75],"limit":[44,91,66,46,85]},"6":{"initial":[20,15,60,48,4],"limit":[75,52,89,52,8]},"7":{"initial":[53,24,37,11,5],"limit":[57,64,55,84,70]},"8":{"initial":[30,38,59,28,73],"limit":[46,83,75,47,76]},"9":{"initial":[5,1,21,8,16],"limit":[11,32,38,84,84]},"10":{"initial":[56,29,40,1,33],"limit":[93,61,94,89,69]},"11":{"initial":[60,18,15,28,13],"limit":[62,54,83,57,73]},"12":{"initial":[82,5,63,63,40],"limit":[86,57,85,95,75]},"13":{"initial":[42,44,55,3,29],"limit":[81,66,87,75,81]}},"inputSite":[1]},"modes":[{"id":18,"name":"Doloremque numquam voluptas deserunt modi aspernatur id.","slot":0,"config":{"autoGrasp":[0,100],"coContractionTimings":[300,200],"controlMode":[0],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[10,90,70,10,0,30,80,20,50,60],"gripPairsConfig":[4,6,3,11,8,12,13,10],"gripSequentialConfig":[1,6,5,255,255,4,8,11,255,10,2,3],"gripSwitchingMode":[3],"holdOpen":[2000,2500],"pulseTimings":[60,430,630,710],"softGrip":[1],"speedControlStrategy":[0]}},{"id":19,"name":"Tempora iste molestias rerum neque quia et iusto.","slot":1,"config":{"autoGrasp":[0,0],"coContractionTimings":[400,300],"controlMode":[1],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[80,80,0,30,20,10,10,20,20,50],"gripPairsConfig":[5,6,7,13,11,1,4,3],"gripSequentialConfig":[255,5,4,255,2,9,255,255,13,12,7,3],"gripSwitchingMode":[2],"holdOpen":[2000,2500],"pulseTimings":[640,40,130,570],"softGrip":[0],"speedControlStrategy":[0]}},{"id":20,"name":"Doloribus reprehenderit est modi hic dolorem et.","slot":2,"config":{"autoGrasp":[0,0],"coContractionTimings":[400,200],"controlMode":[0],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[60,10,30,0,50,0,60,0,50,70],"gripPairsConfig":[2,6,8,5,11,1,4,9],"gripSequentialConfig":[255,13,255,255,7,255,255,255,11,3,9,8],"gripSwitchingMode":[2],"holdOpen":[1500,1500],"pulseTimings":[900,970,640,800],"softGrip":[1],"speedControlStrategy":[0]}}]}'
                  restore_point:
                    type: integer
                    example: 0
                  factory_reset_point:
                    type: integer
                    example: 0
                  changed_by:
                    type: integer
                    example: 52
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:59.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:59.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to update device config'
                      code: 'CONFIG:HISTORY_UPDATE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to update device config'
                      code:
                        type: string
                        example: 'CONFIG:HISTORY_UPDATE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Factory reset point already exists'
                    type: object
                    example:
                      message: 'Factory reset point does not exist'
                      code: 'CONFIG:HISTORY_UPDATE:FACTORY_RESET_POINT_ALREADY_EXISTS'
                    properties:
                      message:
                        type: string
                        example: 'Factory reset point does not exist'
                      code:
                        type: string
                        example: 'CONFIG:HISTORY_UPDATE:FACTORY_RESET_POINT_ALREADY_EXISTS'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CONFIG:HISTORY_UPDATE:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CONFIG:HISTORY_UPDATE:DEVICE_NOT_FOUND'
                  -
                    description: 'Config history entry not found'
                    type: object
                    example:
                      message: 'Config history entry not found'
                      code: 'CONFIG:HISTORY_UPDATE:HISTORY_ENTRY_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config history entry not found'
                      code:
                        type: string
                        example: 'CONFIG:HISTORY_UPDATE:HISTORY_ENTRY_NOT_FOUND'
      tags:
        - Config
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Config history entry name.'
                  example: 'Remote session 2022-05-30'
                restore_point:
                  type: boolean
                  description: 'Restore point status.'
                  example: true
                factory_reset_point:
                  type: boolean
                  description: 'Point of factory reset.'
                  example: false
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: configId
        description: 'Config history entry ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config/history/undo/{configId}':
    delete:
      summary: 'Undo single config history change'
      operationId: undoSingleConfigHistoryChange
      description: 'Returns updated config in response.'
      parameters: []
      responses:
        202:
          description: 'Normal/compact response'
          content:
            application/json:
              schema:
                type: object
                example:
                  common:
                    gripPairsConfig:
                      - 1
                      - 4
                      - 2
                      - 3
                      - 6
                      - 7
                      - 9
                      - 8
                    controlConfig:
                      - 0
                      - 1
                      - 0
                      - 0
                      - 0
                    emgThresholds:
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                    interval:
                      - 100
                    gripSequentialConfig:
                      - 1
                      - 2
                      - 4
                      - 3
                      - 0
                      - 255
                      - 6
                      - 7
                      - 9
                      - 8
                      - 255
                      - 255
                  modes:
                    -
                      id: 100
                      name: 'Mode 1'
                      slot: 0
                      config:
                        interval:
                          - 300
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                    -
                      id: 101
                      name: 'Mode 2'
                      slot: 1
                      config:
                        interval:
                          - 400
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                    -
                      id: 102
                      name: 'Mode 3'
                      slot: 2
                      config:
                        interval:
                          - 500
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                properties:
                  common:
                    type: object
                    properties:
                      gripPairsConfig:
                        type: array
                        example:
                          - 1
                          - 4
                          - 2
                          - 3
                          - 6
                          - 7
                          - 9
                          - 8
                        items:
                          type: integer
                      controlConfig:
                        type: array
                        example:
                          - 0
                          - 1
                          - 0
                          - 0
                          - 0
                        items:
                          type: integer
                      emgThresholds:
                        type: array
                        example:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        items:
                          type: integer
                      interval:
                        type: array
                        example:
                          - 100
                        items:
                          type: integer
                      gripSequentialConfig:
                        type: array
                        example:
                          - 1
                          - 2
                          - 4
                          - 3
                          - 0
                          - 255
                          - 6
                          - 7
                          - 9
                          - 8
                          - 255
                          - 255
                        items:
                          type: integer
                  modes:
                    type: array
                    example:
                      -
                        id: 100
                        name: 'Mode 1'
                        slot: 0
                        config:
                          interval:
                            - 300
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                      -
                        id: 101
                        name: 'Mode 2'
                        slot: 1
                        config:
                          interval:
                            - 400
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                      -
                        id: 102
                        name: 'Mode 3'
                        slot: 2
                        config:
                          interval:
                            - 500
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 100
                        name:
                          type: string
                          example: 'Mode 1'
                        slot:
                          type: integer
                          example: 0
                        config:
                          type: object
                          properties:
                            interval:
                              type: array
                              example:
                                - 300
                              items:
                                type: integer
                            fingerStrength:
                              type: array
                              example:
                                - 1
                                - 100
                              items:
                                type: integer
                            autoGrasp:
                              type: array
                              example:
                                - 0
                                - 100
                              items:
                                type: integer
                            emgSpike:
                              type: array
                              example:
                                - 0
                                - 300
                              items:
                                type: integer
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update device config'
                  code: 'CONFIG:UNDO:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update device config'
                  code:
                    type: string
                    example: 'CONFIG:UNDO:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CONFIG:UNDO:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CONFIG:UNDO:DEVICE_NOT_FOUND'
                  -
                    description: 'Config history entry not found'
                    type: object
                    example:
                      message: 'Config history entry not found'
                      code: 'CONFIG:UNDO:HISTORY_ENTRY_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config history entry not found'
                      code:
                        type: string
                        example: 'CONFIG:UNDO:HISTORY_ENTRY_NOT_FOUND'
      tags:
        - Config
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: configId
        description: 'Config history entry ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config/restore/{configId}':
    post:
      summary: 'Restore config history entry'
      operationId: restoreConfigHistoryEntry
      description: "Restores config from given config history entry (all changes).\n\t\tSends support ticket if patient is assigned to device, returns config instead."
      parameters: []
      responses:
        200:
          description: 'Patient not assigned, returns config'
          content:
            application/json:
              schema:
                type: object
                example:
                  common:
                    gripPairsConfig:
                      - 1
                      - 4
                      - 2
                      - 3
                      - 6
                      - 7
                      - 9
                      - 8
                    controlConfig:
                      - 0
                      - 1
                      - 0
                      - 0
                      - 0
                    emgThresholds:
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                    interval:
                      - 100
                    gripSequentialConfig:
                      - 1
                      - 2
                      - 4
                      - 3
                      - 0
                      - 255
                      - 6
                      - 7
                      - 9
                      - 8
                      - 255
                      - 255
                  modes:
                    -
                      id: 100
                      name: 'Mode 1'
                      slot: 0
                      config:
                        interval:
                          - 300
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                    -
                      id: 101
                      name: 'Mode 2'
                      slot: 1
                      config:
                        interval:
                          - 400
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                    -
                      id: 102
                      name: 'Mode 3'
                      slot: 2
                      config:
                        interval:
                          - 500
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                properties:
                  common:
                    type: object
                    properties:
                      gripPairsConfig:
                        type: array
                        example:
                          - 1
                          - 4
                          - 2
                          - 3
                          - 6
                          - 7
                          - 9
                          - 8
                        items:
                          type: integer
                      controlConfig:
                        type: array
                        example:
                          - 0
                          - 1
                          - 0
                          - 0
                          - 0
                        items:
                          type: integer
                      emgThresholds:
                        type: array
                        example:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        items:
                          type: integer
                      interval:
                        type: array
                        example:
                          - 100
                        items:
                          type: integer
                      gripSequentialConfig:
                        type: array
                        example:
                          - 1
                          - 2
                          - 4
                          - 3
                          - 0
                          - 255
                          - 6
                          - 7
                          - 9
                          - 8
                          - 255
                          - 255
                        items:
                          type: integer
                  modes:
                    type: array
                    example:
                      -
                        id: 100
                        name: 'Mode 1'
                        slot: 0
                        config:
                          interval:
                            - 300
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                      -
                        id: 101
                        name: 'Mode 2'
                        slot: 1
                        config:
                          interval:
                            - 400
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                      -
                        id: 102
                        name: 'Mode 3'
                        slot: 2
                        config:
                          interval:
                            - 500
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 100
                        name:
                          type: string
                          example: 'Mode 1'
                        slot:
                          type: integer
                          example: 0
                        config:
                          type: object
                          properties:
                            interval:
                              type: array
                              example:
                                - 300
                              items:
                                type: integer
                            fingerStrength:
                              type: array
                              example:
                                - 1
                                - 100
                              items:
                                type: integer
                            autoGrasp:
                              type: array
                              example:
                                - 0
                                - 100
                              items:
                                type: integer
                            emgSpike:
                              type: array
                              example:
                                - 0
                                - 300
                              items:
                                type: integer
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  sender_id: 53
                  recipient_id: 54
                  device_id: null
                  meeting_date: '2025-12-10 11:59:59'
                  meeting_type: online_meeting
                  contact_email: gracie.beatty@rippin.com
                  status: new
                  created_at: '2025-12-10T11:59:59.000000Z'
                  updated_at: '2025-12-10T11:59:59.000000Z'
                  sender:
                    id: 53
                    mrn: 7755FXDX1765367999
                    name: 'Mrs. Salma McDermott'
                    email: 1765367999ejenkins@example.net
                    language: en
                    phone: '(406) 384-2333'
                    phone_country: GU
                    phone_verified_at: null
                    address1: '605 Stiedemann Port'
                    address2: 'South Obie, MT 70351-4747'
                    postal_code: '04182'
                    city: 'Tromp, Kunze and Fadel'
                    clinic_name: Kozeyfurt
                    clinic_location: "82487 Maya Ramp Apt. 107\nNew Emily, AR 37504"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T11:59:59.000000Z'
                    updated_at: '2025-12-10T11:59:59.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  recipient:
                    id: 54
                    mrn: MRHSB5KX1765367999
                    name: 'Prof. Ashley Daniel'
                    email: 1765367999schulist.maximus@example.net
                    language: en
                    phone: 609.665.3650
                    phone_country: SV
                    phone_verified_at: null
                    address1: '10806 Bednar Lodge'
                    address2: 'Greenfeldermouth, NV 77950-2072'
                    postal_code: 50717-9411
                    city: Jenkins-Baumbach
                    clinic_name: 'Lake Roberto'
                    clinic_location: "44538 Fahey Summit Suite 373\nNew Jackborough, WA 72048-0263"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T11:59:59.000000Z'
                    updated_at: '2025-12-10T11:59:59.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  device: null
                  messages:
                    -
                      id: 1
                      ticket_id: 1
                      sender_id: 55
                      title: Dr.
                      content: 'Est modi libero distinctio ut unde.'
                      is_read: false
                      created_at: '2025-12-10T11:59:59.000000Z'
                      updated_at: '2025-12-10T11:59:59.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  sender_id:
                    type: integer
                    example: 53
                  recipient_id:
                    type: integer
                    example: 54
                  device_id:
                    type: string
                    example: null
                  meeting_date:
                    type: string
                    example: '2025-12-10 11:59:59'
                  meeting_type:
                    type: string
                    example: online_meeting
                  contact_email:
                    type: string
                    example: gracie.beatty@rippin.com
                  status:
                    type: string
                    example: new
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:59.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:59.000000Z'
                  sender:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 53
                      mrn:
                        type: string
                        example: 7755FXDX1765367999
                      name:
                        type: string
                        example: 'Mrs. Salma McDermott'
                      email:
                        type: string
                        example: 1765367999ejenkins@example.net
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: '(406) 384-2333'
                      phone_country:
                        type: string
                        example: GU
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '605 Stiedemann Port'
                      address2:
                        type: string
                        example: 'South Obie, MT 70351-4747'
                      postal_code:
                        type: string
                        example: '04182'
                      city:
                        type: string
                        example: 'Tromp, Kunze and Fadel'
                      clinic_name:
                        type: string
                        example: Kozeyfurt
                      clinic_location:
                        type: string
                        example: "82487 Maya Ramp Apt. 107\nNew Emily, AR 37504"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T11:59:59.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T11:59:59.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  recipient:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 54
                      mrn:
                        type: string
                        example: MRHSB5KX1765367999
                      name:
                        type: string
                        example: 'Prof. Ashley Daniel'
                      email:
                        type: string
                        example: 1765367999schulist.maximus@example.net
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 609.665.3650
                      phone_country:
                        type: string
                        example: SV
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '10806 Bednar Lodge'
                      address2:
                        type: string
                        example: 'Greenfeldermouth, NV 77950-2072'
                      postal_code:
                        type: string
                        example: 50717-9411
                      city:
                        type: string
                        example: Jenkins-Baumbach
                      clinic_name:
                        type: string
                        example: 'Lake Roberto'
                      clinic_location:
                        type: string
                        example: "44538 Fahey Summit Suite 373\nNew Jackborough, WA 72048-0263"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T11:59:59.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T11:59:59.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  device:
                    type: string
                    example: null
                  messages:
                    type: array
                    example:
                      -
                        id: 1
                        ticket_id: 1
                        sender_id: 55
                        title: Dr.
                        content: 'Est modi libero distinctio ut unde.'
                        is_read: false
                        created_at: '2025-12-10T11:59:59.000000Z'
                        updated_at: '2025-12-10T11:59:59.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        ticket_id:
                          type: integer
                          example: 1
                        sender_id:
                          type: integer
                          example: 55
                        title:
                          type: string
                          example: Dr.
                        content:
                          type: string
                          example: 'Est modi libero distinctio ut unde.'
                        is_read:
                          type: boolean
                          example: false
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:59.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:59.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update device config'
                  code: 'CONFIG:RESTORE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update device config'
                  code:
                    type: string
                    example: 'CONFIG:RESTORE:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CONFIG:RESTORE:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CONFIG:RESTORE:DEVICE_NOT_FOUND'
                  -
                    description: 'Config history entry not found'
                    type: object
                    example:
                      message: 'Config history entry not found'
                      code: 'CONFIG:RESTORE:HISTORY_ENTRY_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config history entry not found'
                      code:
                        type: string
                        example: 'CONFIG:RESTORE:HISTORY_ENTRY_NOT_FOUND'
      tags:
        - Config
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: configId
        description: 'Config history entry ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config/restore-factory-reset':
    post:
      summary: 'Restore to factory reset point'
      operationId: restoreToFactoryResetPoint
      description: "Restores config from the device's factory reset point.\n\t\tSends a support ticket if the patient is assigned to the device. Returns the array that contains:\n\t\t<ul>\n\t\t\t<li><code>config</code> - The factory reset config. It might be updated with current config entries\n\t\t\twhen the restored config does not contain a key or its value is false,\n\t\t\tbut the key is available in the current config, has a non-false value, and is required by the config schema.</li>\n\t\t\t<li><code>not_modified</code> - The part of the current config that contains keys which were ignored\n\t\t\t(because they’re on the ignore list, such as custom grips settings),\n\t\t\tor were not updated with values from the factory reset config (because the values are the same in both configs,\n\t\t\tor missing in the factory reset config but present and non-false in the current config).\n\t\t\tThese are included in the <code>config</code> to ensure their values remain unchanged and are not replaced with defaults.</li>\n\t\t\t<li><code>ticket</code> - Support ticket entity, if patient is assigned, null otherwise.</li>\n\t\t</ul>"
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  config:
                    common:
                      inputSite:
                        - 1
                      generalHandSettings: false
                      batteryBeep:
                        - 1
                        - 0
                      emgGains: false
                      autoGrasp: false
                    modes:
                      -
                        id: 1
                        name: 'Mode 0'
                        slot: 0
                        config:
                          gripPairsConfig: false
                          emgThresholds: false
                          emgSpike: false
                          controlMode: false
                      -
                        id: 1530
                        name: 'Mode 1'
                        slot: 1
                        config:
                          gripPairsConfig: false
                          emgThresholds: false
                          emgSpike: false
                          controlMode: false
                      -
                        id: 1531
                        name: 'Mode 2'
                        slot: 2
                        config:
                          gripPairsConfig: false
                          emgThresholds: false
                          emgSpike: false
                          controlMode: false
                  not_modified:
                    common:
                      inputSite:
                        - 1
                      batteryBeep:
                        - 1
                        - 0
                      generalHandSettings:
                        - 1
                        - 2
                        - 3
                        - 4
                    modes:
                      -
                        userFeedbackType: false
                        buzzingVolumeSettings: false
                      -
                        userFeedbackType: false
                        buzzingVolumeSettings: false
                      -
                        userFeedbackType: false
                        buzzingVolumeSettings: false
                  ticket:
                    id: 1
                    sender_id: 1
                    recipient_id: 2
                    device_id: 1
                    meeting_date: '2025-07-22T15:00:00.000000Z'
                    meeting_type: none
                    contact_email: null
                    status: new
                    created_at: '2025-07-22T15:00:00.000000Z'
                    updated_at: '2025-07-22T15:00:00.000000Z'
                    messages:
                      -
                        id: 1
                        ticket_id: 1
                        sender_id: 1
                        title: 'New config update'
                        content: ''
                        is_read: false
                        created_at: '2025-07-22T15:00:00.000000Z'
                        updated_at: '2025-07-22T15:00:00.000000Z'
                        attachments:
                          -
                            id: 6629
                            ticket_id: 12973
                            ticket_message_id: 6517
                            type: json
                            title: 'Current config'
                            attachment: '{"common":{},"modes":[{"id":1,"name":"Mode 0","slot":0,"config":{}},{"id":2,"name":"Mode 1","slot":1,"config":{}},{"id":3,"name":"Mode 2","slot":2,"config":{}}]}'
                            created_at: '2025-07-22T15:00:00.000000Z'
                            updated_at: '2025-07-22T15:00:00.000000Z'
                          -
                            id: 6630
                            ticket_id: 12973
                            ticket_message_id: 6517
                            type: json
                            title: 'New config'
                            attachment: '{"common":{},"modes":[{"id":1,"name":"Mode 0","slot":0,"config":{}},{"id":2,"name":"Mode 1","slot":1,"config":{}},{"id":3,"name":"Mode 2","slot":2,"config":{}}]}'
                            created_at: '2025-07-22T15:00:00.000000Z'
                            updated_at: '2025-07-22T15:00:00.000000Z'
                properties:
                  config:
                    type: object
                    properties:
                      common:
                        type: object
                        properties:
                          inputSite:
                            type: array
                            example:
                              - 1
                            items:
                              type: integer
                          generalHandSettings:
                            type: boolean
                            example: false
                          batteryBeep:
                            type: array
                            example:
                              - 1
                              - 0
                            items:
                              type: integer
                          emgGains:
                            type: boolean
                            example: false
                          autoGrasp:
                            type: boolean
                            example: false
                      modes:
                        type: array
                        example:
                          -
                            id: 1
                            name: 'Mode 0'
                            slot: 0
                            config:
                              gripPairsConfig: false
                              emgThresholds: false
                              emgSpike: false
                              controlMode: false
                          -
                            id: 1530
                            name: 'Mode 1'
                            slot: 1
                            config:
                              gripPairsConfig: false
                              emgThresholds: false
                              emgSpike: false
                              controlMode: false
                          -
                            id: 1531
                            name: 'Mode 2'
                            slot: 2
                            config:
                              gripPairsConfig: false
                              emgThresholds: false
                              emgSpike: false
                              controlMode: false
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Mode 0'
                            slot:
                              type: integer
                              example: 0
                            config:
                              type: object
                              properties:
                                gripPairsConfig:
                                  type: boolean
                                  example: false
                                emgThresholds:
                                  type: boolean
                                  example: false
                                emgSpike:
                                  type: boolean
                                  example: false
                                controlMode:
                                  type: boolean
                                  example: false
                  not_modified:
                    type: object
                    properties:
                      common:
                        type: object
                        properties:
                          inputSite:
                            type: array
                            example:
                              - 1
                            items:
                              type: integer
                          batteryBeep:
                            type: array
                            example:
                              - 1
                              - 0
                            items:
                              type: integer
                          generalHandSettings:
                            type: array
                            example:
                              - 1
                              - 2
                              - 3
                              - 4
                            items:
                              type: integer
                      modes:
                        type: array
                        example:
                          -
                            userFeedbackType: false
                            buzzingVolumeSettings: false
                          -
                            userFeedbackType: false
                            buzzingVolumeSettings: false
                          -
                            userFeedbackType: false
                            buzzingVolumeSettings: false
                        items:
                          type: object
                          properties:
                            userFeedbackType:
                              type: boolean
                              example: false
                            buzzingVolumeSettings:
                              type: boolean
                              example: false
                  ticket:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      sender_id:
                        type: integer
                        example: 1
                      recipient_id:
                        type: integer
                        example: 2
                      device_id:
                        type: integer
                        example: 1
                      meeting_date:
                        type: string
                        example: '2025-07-22T15:00:00.000000Z'
                      meeting_type:
                        type: string
                        example: none
                      contact_email:
                        type: string
                        example: null
                      status:
                        type: string
                        example: new
                      created_at:
                        type: string
                        example: '2025-07-22T15:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2025-07-22T15:00:00.000000Z'
                      messages:
                        type: array
                        example:
                          -
                            id: 1
                            ticket_id: 1
                            sender_id: 1
                            title: 'New config update'
                            content: ''
                            is_read: false
                            created_at: '2025-07-22T15:00:00.000000Z'
                            updated_at: '2025-07-22T15:00:00.000000Z'
                            attachments:
                              -
                                id: 6629
                                ticket_id: 12973
                                ticket_message_id: 6517
                                type: json
                                title: 'Current config'
                                attachment: '{"common":{},"modes":[{"id":1,"name":"Mode 0","slot":0,"config":{}},{"id":2,"name":"Mode 1","slot":1,"config":{}},{"id":3,"name":"Mode 2","slot":2,"config":{}}]}'
                                created_at: '2025-07-22T15:00:00.000000Z'
                                updated_at: '2025-07-22T15:00:00.000000Z'
                              -
                                id: 6630
                                ticket_id: 12973
                                ticket_message_id: 6517
                                type: json
                                title: 'New config'
                                attachment: '{"common":{},"modes":[{"id":1,"name":"Mode 0","slot":0,"config":{}},{"id":2,"name":"Mode 1","slot":1,"config":{}},{"id":3,"name":"Mode 2","slot":2,"config":{}}]}'
                                created_at: '2025-07-22T15:00:00.000000Z'
                                updated_at: '2025-07-22T15:00:00.000000Z'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            ticket_id:
                              type: integer
                              example: 1
                            sender_id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: 'New config update'
                            content:
                              type: string
                              example: ''
                            is_read:
                              type: boolean
                              example: false
                            created_at:
                              type: string
                              example: '2025-07-22T15:00:00.000000Z'
                            updated_at:
                              type: string
                              example: '2025-07-22T15:00:00.000000Z'
                            attachments:
                              type: array
                              example:
                                -
                                  id: 6629
                                  ticket_id: 12973
                                  ticket_message_id: 6517
                                  type: json
                                  title: 'Current config'
                                  attachment: '{"common":{},"modes":[{"id":1,"name":"Mode 0","slot":0,"config":{}},{"id":2,"name":"Mode 1","slot":1,"config":{}},{"id":3,"name":"Mode 2","slot":2,"config":{}}]}'
                                  created_at: '2025-07-22T15:00:00.000000Z'
                                  updated_at: '2025-07-22T15:00:00.000000Z'
                                -
                                  id: 6630
                                  ticket_id: 12973
                                  ticket_message_id: 6517
                                  type: json
                                  title: 'New config'
                                  attachment: '{"common":{},"modes":[{"id":1,"name":"Mode 0","slot":0,"config":{}},{"id":2,"name":"Mode 1","slot":1,"config":{}},{"id":3,"name":"Mode 2","slot":2,"config":{}}]}'
                                  created_at: '2025-07-22T15:00:00.000000Z'
                                  updated_at: '2025-07-22T15:00:00.000000Z'
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 6629
                                  ticket_id:
                                    type: integer
                                    example: 12973
                                  ticket_message_id:
                                    type: integer
                                    example: 6517
                                  type:
                                    type: string
                                    example: json
                                  title:
                                    type: string
                                    example: 'Current config'
                                  attachment:
                                    type: string
                                    example: '{"common":{},"modes":[{"id":1,"name":"Mode 0","slot":0,"config":{}},{"id":2,"name":"Mode 1","slot":1,"config":{}},{"id":3,"name":"Mode 2","slot":2,"config":{}}]}'
                                  created_at:
                                    type: string
                                    example: '2025-07-22T15:00:00.000000Z'
                                  updated_at:
                                    type: string
                                    example: '2025-07-22T15:00:00.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to update device config'
                      code: 'CONFIG:RESTORE_FACTORY_RESET:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to update device config'
                      code:
                        type: string
                        example: 'CONFIG:RESTORE_FACTORY_RESET:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Config history entry not found'
                    type: object
                    example:
                      message: 'Config history entry not found'
                      code: 'CONFIG:RESTORE_FACTORY_RESET:NO_RESTORE_POINT'
                    properties:
                      message:
                        type: string
                        example: 'Config history entry not found'
                      code:
                        type: string
                        example: 'CONFIG:RESTORE_FACTORY_RESET:NO_RESTORE_POINT'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'CONFIG:RESTORE_FACTORY_RESET:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'CONFIG:RESTORE_FACTORY_RESET:DEVICE_NOT_FOUND'
      tags:
        - Config
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config/send':
    post:
      summary: 'Send test config'
      operationId: sendTestConfig
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 7
                  sender_id: 64
                  recipient_id: 65
                  device_id: null
                  meeting_date: '2025-12-10 12:00:00'
                  meeting_type: online_meeting
                  contact_email: alphonso.bode@corwin.com
                  status: new
                  created_at: '2025-12-10T12:00:00.000000Z'
                  updated_at: '2025-12-10T12:00:00.000000Z'
                  sender:
                    id: 64
                    mrn: 32Y464UU1765368000
                    name: 'Leonor Greenholt'
                    email: 1765368000mollie.dibbert@example.net
                    language: en
                    phone: '(318) 643-8839'
                    phone_country: UG
                    phone_verified_at: null
                    address1: '51058 Rempel Springs'
                    address2: 'Schummmouth, KY 58867-9851'
                    postal_code: 74596-1812
                    city: 'Jast, Olson and Crooks'
                    clinic_name: Traceshire
                    clinic_location: "8697 Schuppe Spring Apt. 371\nAmandaborough, DC 95763"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:00.000000Z'
                    updated_at: '2025-12-10T12:00:00.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  recipient:
                    id: 65
                    mrn: UT0KA11E1765368000
                    name: 'Stephany Predovic'
                    email: 1765368000auer.erik@example.org
                    language: en
                    phone: 272.473.8285
                    phone_country: AQ
                    phone_verified_at: null
                    address1: '29624 Leuschke Walk'
                    address2: 'Port Elmer, WA 11920'
                    postal_code: '53493'
                    city: Auer-Lindgren
                    clinic_name: 'New Julian'
                    clinic_location: "942 Taryn Highway\nKuphalside, MD 93253-9376"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:00.000000Z'
                    updated_at: '2025-12-10T12:00:00.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  device: null
                  messages:
                    -
                      id: 4
                      ticket_id: 7
                      sender_id: 66
                      title: Ms.
                      content: 'Officia aut eveniet aperiam sit voluptatem.'
                      is_read: false
                      created_at: '2025-12-10T12:00:00.000000Z'
                      updated_at: '2025-12-10T12:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 7
                  sender_id:
                    type: integer
                    example: 64
                  recipient_id:
                    type: integer
                    example: 65
                  device_id:
                    type: string
                    example: null
                  meeting_date:
                    type: string
                    example: '2025-12-10 12:00:00'
                  meeting_type:
                    type: string
                    example: online_meeting
                  contact_email:
                    type: string
                    example: alphonso.bode@corwin.com
                  status:
                    type: string
                    example: new
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:00.000000Z'
                  sender:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 64
                      mrn:
                        type: string
                        example: 32Y464UU1765368000
                      name:
                        type: string
                        example: 'Leonor Greenholt'
                      email:
                        type: string
                        example: 1765368000mollie.dibbert@example.net
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: '(318) 643-8839'
                      phone_country:
                        type: string
                        example: UG
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '51058 Rempel Springs'
                      address2:
                        type: string
                        example: 'Schummmouth, KY 58867-9851'
                      postal_code:
                        type: string
                        example: 74596-1812
                      city:
                        type: string
                        example: 'Jast, Olson and Crooks'
                      clinic_name:
                        type: string
                        example: Traceshire
                      clinic_location:
                        type: string
                        example: "8697 Schuppe Spring Apt. 371\nAmandaborough, DC 95763"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:00.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  recipient:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 65
                      mrn:
                        type: string
                        example: UT0KA11E1765368000
                      name:
                        type: string
                        example: 'Stephany Predovic'
                      email:
                        type: string
                        example: 1765368000auer.erik@example.org
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 272.473.8285
                      phone_country:
                        type: string
                        example: AQ
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '29624 Leuschke Walk'
                      address2:
                        type: string
                        example: 'Port Elmer, WA 11920'
                      postal_code:
                        type: string
                        example: '53493'
                      city:
                        type: string
                        example: Auer-Lindgren
                      clinic_name:
                        type: string
                        example: 'New Julian'
                      clinic_location:
                        type: string
                        example: "942 Taryn Highway\nKuphalside, MD 93253-9376"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:00.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  device:
                    type: string
                    example: null
                  messages:
                    type: array
                    example:
                      -
                        id: 4
                        ticket_id: 7
                        sender_id: 66
                        title: Ms.
                        content: 'Officia aut eveniet aperiam sit voluptatem.'
                        is_read: false
                        created_at: '2025-12-10T12:00:00.000000Z'
                        updated_at: '2025-12-10T12:00:00.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 4
                        ticket_id:
                          type: integer
                          example: 7
                        sender_id:
                          type: integer
                          example: 66
                        title:
                          type: string
                          example: Ms.
                        content:
                          type: string
                          example: 'Officia aut eveniet aperiam sit voluptatem.'
                        is_read:
                          type: boolean
                          example: false
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:00.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:00.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update device config'
                  code: 'CONFIG:SEND:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update device config'
                  code:
                    type: string
                    example: 'CONFIG:SEND:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'CONFIG:SEND:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'CONFIG:SEND:DEVICE_NOT_FOUND'
        422:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device does not have an amputee assigned'
                    type: object
                    example:
                      message: 'Device does not have an amputee assigned'
                      code: 'CONFIG:SEND:NO_PATIENT'
                    properties:
                      message:
                        type: string
                        example: 'Device does not have an amputee assigned'
                      code:
                        type: string
                        example: 'CONFIG:SEND:NO_PATIENT'
                  -
                    description: 'Invalid P2P session'
                    type: object
                    example:
                      message: 'Invalid P2P session'
                      code: 'CONFIG:SEND:INVALID_P2P_SESSION'
                    properties:
                      message:
                        type: string
                        example: 'Invalid P2P session'
                      code:
                        type: string
                        example: 'CONFIG:SEND:INVALID_P2P_SESSION'
      tags:
        - Config
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                  description: 'Config description to add in message notification.'
                  example: 'Fixed problem with grips.'
                p2p_session:
                  type: integer
                  description: 'P2P Session ID. If config was prepared during P2P session, pass its ID, if not, pass <code>null</code>. The <code>id</code> of an existing record in the App\Models\P2PSession table.'
                  example: 1
                  nullable: true
                common:
                  type: string
                  description: 'Common config as JSON string. MUST_BE_JSON.'
                  example: '{"gripPairsConfig": [1, 4, 2, 3, 6, 7, 9, 8], "controlConfig": [0, 1, 0, 0, 0], "gripSequentialConfig": [1, 2, 4, 3, 0, 255, 6, 7, 9, 8, 255, 255]'
                modes:
                  type: array
                  description: ''
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 'Config mode ID. The <code>id</code> of an existing record in the App\Models\ConfigMode table.'
                        example: 1
                      config:
                        type: string
                        description: 'Config specific for mode as JSON string. MUST_BE_JSON.'
                        example: '{"gripPairsConfig": [1, 4, 2, 3, 6, 7, 9, 8], "controlConfig": [0, 1, 0, 0, 0], "gripSequentialConfig": [1, 2, 4, 3, 0, 255, 6, 7, 9, 8, 255, 255]'
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/config/convert:
    post:
      summary: 'Convert config'
      operationId: convertConfig
      description: 'Convert config JSON to match given Firmware Version. Keys are moved between common config and modes.'
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  common:
                    gripPairsConfig:
                      - 1
                      - 4
                      - 2
                      - 3
                      - 6
                      - 7
                      - 9
                      - 8
                    controlConfig:
                      - 0
                      - 1
                      - 0
                      - 0
                      - 0
                    emgThresholds:
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                    interval:
                      - 100
                    gripSequentialConfig:
                      - 1
                      - 2
                      - 4
                      - 3
                      - 0
                      - 255
                      - 6
                      - 7
                      - 9
                      - 8
                      - 255
                      - 255
                  modes:
                    -
                      id: 100
                      name: 'Mode 1'
                      slot: 0
                      config:
                        interval:
                          - 300
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                    -
                      id: 101
                      name: 'Mode 2'
                      slot: 1
                      config:
                        interval:
                          - 400
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                    -
                      id: 102
                      name: 'Mode 3'
                      slot: 2
                      config:
                        interval:
                          - 500
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                properties:
                  common:
                    type: object
                    properties:
                      gripPairsConfig:
                        type: array
                        example:
                          - 1
                          - 4
                          - 2
                          - 3
                          - 6
                          - 7
                          - 9
                          - 8
                        items:
                          type: integer
                      controlConfig:
                        type: array
                        example:
                          - 0
                          - 1
                          - 0
                          - 0
                          - 0
                        items:
                          type: integer
                      emgThresholds:
                        type: array
                        example:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        items:
                          type: integer
                      interval:
                        type: array
                        example:
                          - 100
                        items:
                          type: integer
                      gripSequentialConfig:
                        type: array
                        example:
                          - 1
                          - 2
                          - 4
                          - 3
                          - 0
                          - 255
                          - 6
                          - 7
                          - 9
                          - 8
                          - 255
                          - 255
                        items:
                          type: integer
                  modes:
                    type: array
                    example:
                      -
                        id: 100
                        name: 'Mode 1'
                        slot: 0
                        config:
                          interval:
                            - 300
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                      -
                        id: 101
                        name: 'Mode 2'
                        slot: 1
                        config:
                          interval:
                            - 400
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                      -
                        id: 102
                        name: 'Mode 3'
                        slot: 2
                        config:
                          interval:
                            - 500
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 100
                        name:
                          type: string
                          example: 'Mode 1'
                        slot:
                          type: integer
                          example: 0
                        config:
                          type: object
                          properties:
                            interval:
                              type: array
                              example:
                                - 300
                              items:
                                type: integer
                            fingerStrength:
                              type: array
                              example:
                                - 1
                                - 100
                              items:
                                type: integer
                            autoGrasp:
                              type: array
                              example:
                                - 0
                                - 100
                              items:
                                type: integer
                            emgSpike:
                              type: array
                              example:
                                - 0
                                - 300
                              items:
                                type: integer
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update device config'
                  code: 'CONFIG:CONVERT:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update device config'
                  code:
                    type: string
                    example: 'CONFIG:CONVERT:INSUFFICIENT_PERMISSION'
        404:
          description: 'Firmware version not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Firmware version not found'
                  code: 'CONFIG:CONVERT:FIRMWARE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Firmware version not found'
                  code:
                    type: string
                    example: 'CONFIG:CONVERT:FIRMWARE_NOT_FOUND'
      tags:
        - Config
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                config:
                  type: string
                  description: 'Full config JSON. MUST_BE_JSON.'
                  example: '["esse","deserunt"]'
                firmware:
                  type: string
                  description: 'Firmware Version ID to which config should be adjusted. The <code>id</code> of an existing record in the App\Models\FirmwareVersion table.'
                  example: 1
              required:
                - config
                - firmware
  '/api/device/{deviceId}/config/demos':
    get:
      summary: 'List config demos'
      operationId: listConfigDemos
      description: ''
      parameters:
        -
          in: query
          name: accepted
          description: "Filter config demos by accepted status.\n\t\tIf not specified, all entries will be returned.\n\t\tPass -1 to get entries not accepted or rejected yet.\n\t\tThe value must be one of <code>-1</code>, <code>0</code> or <code>1</code>."
          example: 1
          required: false
          schema:
            type: integer
            description: "Filter config demos by accepted status.\n\t\tIf not specified, all entries will be returned.\n\t\tPass -1 to get entries not accepted or rejected yet.\n\t\tThe value must be one of <code>-1</code>, <code>0</code> or <code>1</code>."
            example: 1
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>message</code>, <code>message.ticket</code>, <code>message.attachments</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>message</code>, <code>message.ticket</code>, <code>message.attachments</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      device_id: 71
                      message_id: 8
                      config: 'Eius consequatur cupiditate et reiciendis.'
                      is_accepted: 1
                      notes: 'Assumenda et consequatur at rerum.'
                      created_at: '2025-12-10T12:00:01.000000Z'
                      updated_at: '2025-12-10T12:00:01.000000Z'
                      message:
                        id: 8
                        ticket_id: 15
                        sender_id: 87
                        title: Mrs.
                        content: 'Cupiditate reprehenderit ratione perspiciatis autem quis.'
                        is_read: false
                        created_at: '2025-12-10T12:00:01.000000Z'
                        updated_at: '2025-12-10T12:00:01.000000Z'
                    -
                      id: 2
                      device_id: 72
                      message_id: 10
                      config: 'Debitis labore non omnis optio.'
                      is_accepted: 0
                      notes: 'Quaerat nihil recusandae eum rerum aliquam voluptatem inventore.'
                      created_at: '2025-12-10T12:00:02.000000Z'
                      updated_at: '2025-12-10T12:00:02.000000Z'
                      message:
                        id: 10
                        ticket_id: 18
                        sender_id: 92
                        title: Mrs.
                        content: 'Minima molestias iusto enim sint ipsa et natus.'
                        is_read: false
                        created_at: '2025-12-10T12:00:02.000000Z'
                        updated_at: '2025-12-10T12:00:02.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        device_id: 71
                        message_id: 8
                        config: 'Eius consequatur cupiditate et reiciendis.'
                        is_accepted: 1
                        notes: 'Assumenda et consequatur at rerum.'
                        created_at: '2025-12-10T12:00:01.000000Z'
                        updated_at: '2025-12-10T12:00:01.000000Z'
                        message:
                          id: 8
                          ticket_id: 15
                          sender_id: 87
                          title: Mrs.
                          content: 'Cupiditate reprehenderit ratione perspiciatis autem quis.'
                          is_read: false
                          created_at: '2025-12-10T12:00:01.000000Z'
                          updated_at: '2025-12-10T12:00:01.000000Z'
                      -
                        id: 2
                        device_id: 72
                        message_id: 10
                        config: 'Debitis labore non omnis optio.'
                        is_accepted: 0
                        notes: 'Quaerat nihil recusandae eum rerum aliquam voluptatem inventore.'
                        created_at: '2025-12-10T12:00:02.000000Z'
                        updated_at: '2025-12-10T12:00:02.000000Z'
                        message:
                          id: 10
                          ticket_id: 18
                          sender_id: 92
                          title: Mrs.
                          content: 'Minima molestias iusto enim sint ipsa et natus.'
                          is_read: false
                          created_at: '2025-12-10T12:00:02.000000Z'
                          updated_at: '2025-12-10T12:00:02.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        device_id:
                          type: integer
                          example: 71
                        message_id:
                          type: integer
                          example: 8
                        config:
                          type: string
                          example: 'Eius consequatur cupiditate et reiciendis.'
                        is_accepted:
                          type: integer
                          example: 1
                        notes:
                          type: string
                          example: 'Assumenda et consequatur at rerum.'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:01.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:01.000000Z'
                        message:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 8
                            ticket_id:
                              type: integer
                              example: 15
                            sender_id:
                              type: integer
                              example: 87
                            title:
                              type: string
                              example: Mrs.
                            content:
                              type: string
                              example: 'Cupiditate reprehenderit ratione perspiciatis autem quis.'
                            is_read:
                              type: boolean
                              example: false
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:01.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:01.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to access config demos'
                  code: 'CONFIG_DEMO:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to access config demos'
                  code:
                    type: string
                    example: 'CONFIG_DEMO:LIST:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'CONFIG_DEMO:LIST:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'CONFIG_DEMO:LIST:DEVICE_NOT_FOUND'
      tags:
        - 'Config Demo'
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config/demos/{demoId}':
    put:
      summary: 'Update config demo'
      operationId: updateConfigDemo
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  device_id: 73
                  message_id: 11
                  config: 'In optio veniam non eveniet in.'
                  is_accepted: 1
                  notes: 'Minima ut dolor autem quas asperiores maiores perferendis fuga.'
                  created_at: '2025-12-10T12:00:02.000000Z'
                  updated_at: '2025-12-10T12:00:02.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  device_id:
                    type: integer
                    example: 73
                  message_id:
                    type: integer
                    example: 11
                  config:
                    type: string
                    example: 'In optio veniam non eveniet in.'
                  is_accepted:
                    type: integer
                    example: 1
                  notes:
                    type: string
                    example: 'Minima ut dolor autem quas asperiores maiores perferendis fuga.'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:02.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:02.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to access config demos'
                  code: 'CONFIG_DEMO:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to access config demos'
                  code:
                    type: string
                    example: 'CONFIG_DEMO:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CONFIG_DEMO:UPDATE:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CONFIG_DEMO:UPDATE:DEVICE_NOT_FOUND'
                  -
                    description: 'Config demo not found'
                    type: object
                    example:
                      message: 'Config demo not found'
                      code: 'CONFIG_DEMO:UPDATE:DEMO_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config demo not found'
                      code:
                        type: string
                        example: 'CONFIG_DEMO:UPDATE:DEMO_NOT_FOUND'
      tags:
        - 'Config Demo'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                is_accepted:
                  type: boolean
                  description: 'Determines if demo config was accepted by patient.'
                  example: false
                notes:
                  type: string
                  description: 'Patient notes about tested config.'
                  example: 'Something is still not working'
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: demoId
        description: 'Config demo ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config-modes':
    get:
      summary: 'List config modes'
      operationId: listConfigModes
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 72
                    device_id:
                      type: integer
                      example: 102
                    slot:
                      type: string
                      example: null
                    name:
                      type: string
                      example: 'Impedit nesciunt perspiciatis saepe rerum quam dolorem.'
                    active:
                      type: integer
                      example: 1
                    created_at:
                      type: string
                      example: '2025-12-10T12:00:03.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T12:00:03.000000Z'
                    device:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 102
                        serial:
                          type: string
                          example: ce7a1195-2958-3bfe-b510-8be499af1716
                        bluetooth_id:
                          type: string
                          example: 9dba4c2a-3e33-3297-bd93-eaecce90e0fc
                        company_id:
                          type: string
                          example: null
                        model_id:
                          type: string
                          example: null
                        amputee_id:
                          type: integer
                          example: 105
                        clinician_id:
                          type: string
                          example: null
                        firmware_version_id:
                          type: string
                          example: null
                        pcb_version_id:
                          type: string
                          example: null
                        reverse_magnets:
                          type: integer
                          example: 0
                        is_electrode:
                          type: integer
                          example: 0
                        active:
                          type: integer
                          example: 1
                        last_activity_at:
                          type: string
                          example: '0000-00-00 00:00:00'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:03.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:03.000000Z'
                example:
                  -
                    id: 72
                    device_id: 102
                    slot: null
                    name: 'Impedit nesciunt perspiciatis saepe rerum quam dolorem.'
                    active: 1
                    created_at: '2025-12-10T12:00:03.000000Z'
                    updated_at: '2025-12-10T12:00:03.000000Z'
                    device:
                      id: 102
                      serial: ce7a1195-2958-3bfe-b510-8be499af1716
                      bluetooth_id: 9dba4c2a-3e33-3297-bd93-eaecce90e0fc
                      company_id: null
                      model_id: null
                      amputee_id: 105
                      clinician_id: null
                      firmware_version_id: null
                      pcb_version_id: null
                      reverse_magnets: 0
                      is_electrode: 0
                      active: 1
                      last_activity_at: '0000-00-00 00:00:00'
                      created_at: '2025-12-10T12:00:03.000000Z'
                      updated_at: '2025-12-10T12:00:03.000000Z'
                  -
                    id: 73
                    device_id: 104
                    slot: null
                    name: 'Sapiente rerum aspernatur officia possimus laborum.'
                    active: 0
                    created_at: '2025-12-10T12:00:03.000000Z'
                    updated_at: '2025-12-10T12:00:03.000000Z'
                    config: {  }
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list config modes'
                  code: 'CONFIG_MODES:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list config modes'
                  code:
                    type: string
                    example: 'CONFIG_MODES:LIST:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'CONFIG_MODES:LIST:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'CONFIG_MODES:LIST:DEVICE_NOT_FOUND'
      tags:
        - 'Config Modes'
    post:
      summary: 'Create config mode'
      operationId: createConfigMode
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 75
                  device_id: 106
                  slot: null
                  name: 'Consectetur temporibus doloremque ut modi laboriosam itaque praesentium at.'
                  active: 1
                  created_at: '2025-12-10T12:00:03.000000Z'
                  updated_at: '2025-12-10T12:00:03.000000Z'
                properties:
                  id:
                    type: integer
                    example: 75
                  device_id:
                    type: integer
                    example: 106
                  slot:
                    type: string
                    example: null
                  name:
                    type: string
                    example: 'Consectetur temporibus doloremque ut modi laboriosam itaque praesentium at.'
                  active:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to create config modes'
                  code: 'CONFIG_MODES:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to create config modes'
                  code:
                    type: string
                    example: 'CONFIG_MODES:CREATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'CONFIG_MODES:CREATE:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'CONFIG_MODES:CREATE:DEVICE_NOT_FOUND'
      tags:
        - 'Config Modes'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                slot:
                  type: integer
                  description: 'Mode index on device.'
                  example: 0
                  enum:
                    - '0'
                    - '1'
                    - '2'
                name:
                  type: string
                  description: 'Name of mode.'
                  example: 'Sport mode'
                active:
                  type: boolean
                  description: 'Active status. Default: 1.'
                  example: true
              required:
                - name
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config-modes/{modeId}':
    get:
      summary: 'Get config mode'
      operationId: getConfigMode
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 74
                  device_id: 105
                  slot: null
                  name: 'Illo tenetur a ducimus asperiores rerum debitis possimus.'
                  active: 1
                  created_at: '2025-12-10T12:00:03.000000Z'
                  updated_at: '2025-12-10T12:00:03.000000Z'
                properties:
                  id:
                    type: integer
                    example: 74
                  device_id:
                    type: integer
                    example: 105
                  slot:
                    type: string
                    example: null
                  name:
                    type: string
                    example: 'Illo tenetur a ducimus asperiores rerum debitis possimus.'
                  active:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list config modes'
                  code: 'CONFIG_MODES:GET:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list config modes'
                  code:
                    type: string
                    example: 'CONFIG_MODES:GET:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CONFIG_MODES:GET:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CONFIG_MODES:GET:DEVICE_NOT_FOUND'
                  -
                    description: 'Config mode not found'
                    type: object
                    example:
                      message: 'Config mode not found'
                      code: 'CONFIG_MODES:GET:MODE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config mode not found'
                      code:
                        type: string
                        example: 'CONFIG_MODES:GET:MODE_NOT_FOUND'
      tags:
        - 'Config Modes'
    put:
      summary: 'Update config mode'
      operationId: updateConfigMode
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 76
                  device_id: 107
                  slot: null
                  name: 'Libero dolorum quis aut in.'
                  active: 1
                  created_at: '2025-12-10T12:00:03.000000Z'
                  updated_at: '2025-12-10T12:00:03.000000Z'
                properties:
                  id:
                    type: integer
                    example: 76
                  device_id:
                    type: integer
                    example: 107
                  slot:
                    type: string
                    example: null
                  name:
                    type: string
                    example: 'Libero dolorum quis aut in.'
                  active:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update config mode'
                  code: 'CONFIG_MODES:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update config mode'
                  code:
                    type: string
                    example: 'CONFIG_MODES:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CONFIG_MODES:UPDATE:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CONFIG_MODES:UPDATE:DEVICE_NOT_FOUND'
                  -
                    description: 'Config mode not found'
                    type: object
                    example:
                      message: 'Config mode not found'
                      code: 'CONFIG_MODES:UPDATE:MODE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config mode not found'
                      code:
                        type: string
                        example: 'CONFIG_MODES:UPDATE:MODE_NOT_FOUND'
      tags:
        - 'Config Modes'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                slot:
                  type: integer
                  description: 'Mode index on device.'
                  example: 0
                  enum:
                    - '0'
                    - '1'
                    - '2'
                name:
                  type: string
                  description: 'Name of mode.'
                  example: 'Sport mode'
                active:
                  type: boolean
                  description: 'Active status. Default: 1.'
                  example: true
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: modeId
        description: 'Config mode ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config-modes/{modeId}/from-template/{templateId}':
    post:
      summary: 'Copy device config from template'
      operationId: copyDeviceConfigFromTemplate
      description: "Copy config template into selected config mode.\n\t\tSends support ticket if patient is assigned to device, returns config instead."
      parameters: []
      responses:
        200:
          description: 'Patient not assigned, returns config'
          content:
            application/json:
              schema:
                type: object
                example:
                  common:
                    gripPairsConfig:
                      - 1
                      - 4
                      - 2
                      - 3
                      - 6
                      - 7
                      - 9
                      - 8
                    controlConfig:
                      - 0
                      - 1
                      - 0
                      - 0
                      - 0
                    emgThresholds:
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                      - 0
                    interval:
                      - 100
                    gripSequentialConfig:
                      - 1
                      - 2
                      - 4
                      - 3
                      - 0
                      - 255
                      - 6
                      - 7
                      - 9
                      - 8
                      - 255
                      - 255
                  modes:
                    -
                      id: 100
                      name: 'Mode 1'
                      slot: 0
                      config:
                        interval:
                          - 300
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                    -
                      id: 101
                      name: 'Mode 2'
                      slot: 1
                      config:
                        interval:
                          - 400
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                    -
                      id: 102
                      name: 'Mode 3'
                      slot: 2
                      config:
                        interval:
                          - 500
                        fingerStrength:
                          - 1
                          - 100
                        autoGrasp:
                          - 0
                          - 100
                        emgSpike:
                          - 0
                          - 300
                properties:
                  common:
                    type: object
                    properties:
                      gripPairsConfig:
                        type: array
                        example:
                          - 1
                          - 4
                          - 2
                          - 3
                          - 6
                          - 7
                          - 9
                          - 8
                        items:
                          type: integer
                      controlConfig:
                        type: array
                        example:
                          - 0
                          - 1
                          - 0
                          - 0
                          - 0
                        items:
                          type: integer
                      emgThresholds:
                        type: array
                        example:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        items:
                          type: integer
                      interval:
                        type: array
                        example:
                          - 100
                        items:
                          type: integer
                      gripSequentialConfig:
                        type: array
                        example:
                          - 1
                          - 2
                          - 4
                          - 3
                          - 0
                          - 255
                          - 6
                          - 7
                          - 9
                          - 8
                          - 255
                          - 255
                        items:
                          type: integer
                  modes:
                    type: array
                    example:
                      -
                        id: 100
                        name: 'Mode 1'
                        slot: 0
                        config:
                          interval:
                            - 300
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                      -
                        id: 101
                        name: 'Mode 2'
                        slot: 1
                        config:
                          interval:
                            - 400
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                      -
                        id: 102
                        name: 'Mode 3'
                        slot: 2
                        config:
                          interval:
                            - 500
                          fingerStrength:
                            - 1
                            - 100
                          autoGrasp:
                            - 0
                            - 100
                          emgSpike:
                            - 0
                            - 300
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 100
                        name:
                          type: string
                          example: 'Mode 1'
                        slot:
                          type: integer
                          example: 0
                        config:
                          type: object
                          properties:
                            interval:
                              type: array
                              example:
                                - 300
                              items:
                                type: integer
                            fingerStrength:
                              type: array
                              example:
                                - 1
                                - 100
                              items:
                                type: integer
                            autoGrasp:
                              type: array
                              example:
                                - 0
                                - 100
                              items:
                                type: integer
                            emgSpike:
                              type: array
                              example:
                                - 0
                                - 300
                              items:
                                type: integer
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 21
                  sender_id: 107
                  recipient_id: 108
                  device_id: null
                  meeting_date: '2025-12-10 12:00:03'
                  meeting_type: online_meeting
                  contact_email: xavier42@gmail.com
                  status: new
                  created_at: '2025-12-10T12:00:03.000000Z'
                  updated_at: '2025-12-10T12:00:03.000000Z'
                  sender:
                    id: 107
                    mrn: D7JXMWN21765368003
                    name: 'Raegan Goldner'
                    email: 1765368003pherman@example.com
                    language: en
                    phone: 408.279.5027
                    phone_country: MZ
                    phone_verified_at: null
                    address1: '37228 Eli Harbor Suite 116'
                    address2: 'Shanefort, SC 10269-7799'
                    postal_code: '58336'
                    city: McKenzie-Haag
                    clinic_name: 'North Herthaberg'
                    clinic_location: "3479 Garth Spur Suite 257\nTowneberg, TN 69192"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:03.000000Z'
                    updated_at: '2025-12-10T12:00:03.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  recipient:
                    id: 108
                    mrn: TN9O5I8P1765368003
                    name: 'Mrs. Minnie Mante PhD'
                    email: 1765368003jarrett60@example.com
                    language: en
                    phone: 769-440-2317
                    phone_country: MR
                    phone_verified_at: null
                    address1: '220 Olga Turnpike'
                    address2: 'North Flavie, MN 16760'
                    postal_code: 95877-3464
                    city: 'Olson, Grimes and Lindgren'
                    clinic_name: 'North Cristian'
                    clinic_location: "98686 Klein Ramp Suite 386\nSouth Tyresefort, IA 08207-8077"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:03.000000Z'
                    updated_at: '2025-12-10T12:00:03.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  device: null
                  messages:
                    -
                      id: 12
                      ticket_id: 21
                      sender_id: 109
                      title: Prof.
                      content: 'Officia molestias illo et fugiat amet.'
                      is_read: false
                      created_at: '2025-12-10T12:00:04.000000Z'
                      updated_at: '2025-12-10T12:00:04.000000Z'
                properties:
                  id:
                    type: integer
                    example: 21
                  sender_id:
                    type: integer
                    example: 107
                  recipient_id:
                    type: integer
                    example: 108
                  device_id:
                    type: string
                    example: null
                  meeting_date:
                    type: string
                    example: '2025-12-10 12:00:03'
                  meeting_type:
                    type: string
                    example: online_meeting
                  contact_email:
                    type: string
                    example: xavier42@gmail.com
                  status:
                    type: string
                    example: new
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
                  sender:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 107
                      mrn:
                        type: string
                        example: D7JXMWN21765368003
                      name:
                        type: string
                        example: 'Raegan Goldner'
                      email:
                        type: string
                        example: 1765368003pherman@example.com
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 408.279.5027
                      phone_country:
                        type: string
                        example: MZ
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '37228 Eli Harbor Suite 116'
                      address2:
                        type: string
                        example: 'Shanefort, SC 10269-7799'
                      postal_code:
                        type: string
                        example: '58336'
                      city:
                        type: string
                        example: McKenzie-Haag
                      clinic_name:
                        type: string
                        example: 'North Herthaberg'
                      clinic_location:
                        type: string
                        example: "3479 Garth Spur Suite 257\nTowneberg, TN 69192"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:03.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:03.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  recipient:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 108
                      mrn:
                        type: string
                        example: TN9O5I8P1765368003
                      name:
                        type: string
                        example: 'Mrs. Minnie Mante PhD'
                      email:
                        type: string
                        example: 1765368003jarrett60@example.com
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 769-440-2317
                      phone_country:
                        type: string
                        example: MR
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '220 Olga Turnpike'
                      address2:
                        type: string
                        example: 'North Flavie, MN 16760'
                      postal_code:
                        type: string
                        example: 95877-3464
                      city:
                        type: string
                        example: 'Olson, Grimes and Lindgren'
                      clinic_name:
                        type: string
                        example: 'North Cristian'
                      clinic_location:
                        type: string
                        example: "98686 Klein Ramp Suite 386\nSouth Tyresefort, IA 08207-8077"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:03.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:03.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  device:
                    type: string
                    example: null
                  messages:
                    type: array
                    example:
                      -
                        id: 12
                        ticket_id: 21
                        sender_id: 109
                        title: Prof.
                        content: 'Officia molestias illo et fugiat amet.'
                        is_read: false
                        created_at: '2025-12-10T12:00:04.000000Z'
                        updated_at: '2025-12-10T12:00:04.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 12
                        ticket_id:
                          type: integer
                          example: 21
                        sender_id:
                          type: integer
                          example: 109
                        title:
                          type: string
                          example: Prof.
                        content:
                          type: string
                          example: 'Officia molestias illo et fugiat amet.'
                        is_read:
                          type: boolean
                          example: false
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:04.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:04.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update config mode'
                  code: 'CONFIG_MODES:COPY_TEMPLATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update config mode'
                  code:
                    type: string
                    example: 'CONFIG_MODES:COPY_TEMPLATE:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CONFIG_MODES:COPY_TEMPLATE:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CONFIG_MODES:COPY_TEMPLATE:DEVICE_NOT_FOUND'
                  -
                    description: 'Config mode not found'
                    type: object
                    example:
                      message: 'Config mode not found'
                      code: 'CONFIG_MODES:COPY_TEMPLATE:MODE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config mode not found'
                      code:
                        type: string
                        example: 'CONFIG_MODES:COPY_TEMPLATE:MODE_NOT_FOUND'
                  -
                    description: 'Config template not found'
                    type: object
                    example:
                      message: 'Config template not found'
                      code: 'CONFIG_MODES:COPY_TEMPLATE:TEMPLATE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config template not found'
                      code:
                        type: string
                        example: 'CONFIG_MODES:COPY_TEMPLATE:TEMPLATE_NOT_FOUND'
      tags:
        - 'Config Modes'
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: modeId
        description: 'Config mode ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: templateId
        description: 'Config template ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config/{configId}/notes':
    get:
      summary: 'Get config entry notes list'
      operationId: getConfigEntryNotesList
      description: ''
      parameters:
        -
          in: query
          name: user
          description: 'Filter notes by user.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter notes by user.'
            example: 1
        -
          in: query
          name: type
          description: 'Filter notes by type (available: <code>public</code> and <code>private</code>)'
          example: public
          required: false
          schema:
            type: string
            description: 'Filter notes by type (available: <code>public</code> and <code>private</code>)'
            example: public
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      config_history_id: 7
                      user_id: 76
                      note: 'Ipsa atque culpa doloribus et eum cum voluptatem.'
                      type: public
                      created_at: '2025-12-10T12:00:01.000000Z'
                      updated_at: '2025-12-10T12:00:01.000000Z'
                      author:
                        id: 76
                        mrn: YY03TNMI1765368001
                        name: 'Mrs. Sierra McCullough'
                        email: 1765368001olson.magali@example.com
                        language: en
                        phone: '(626) 653-4239'
                        phone_country: VC
                        phone_verified_at: null
                        address1: '929 Corwin Via'
                        address2: 'Williamsontown, KS 39373-8558'
                        postal_code: '02155'
                        city: 'Gibson, Jast and McGlynn'
                        clinic_name: 'Port Frances'
                        clinic_location: "142 Sporer Vista\nKozeyborough, AZ 16854"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:01.000000Z'
                        updated_at: '2025-12-10T12:00:01.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                    -
                      id: 2
                      config_history_id: 8
                      user_id: 78
                      note: 'Enim ratione consequatur sed voluptate.'
                      type: public
                      created_at: '2025-12-10T12:00:01.000000Z'
                      updated_at: '2025-12-10T12:00:01.000000Z'
                      author:
                        id: 78
                        mrn: PBUA0FEX1765368001
                        name: 'Ara Schroeder'
                        email: 1765368001dickens.elza@example.net
                        language: en
                        phone: '(623) 732-9335'
                        phone_country: BM
                        phone_verified_at: null
                        address1: "6303 O'Connell Inlet"
                        address2: 'Brooklynberg, MD 36759-4481'
                        postal_code: '44105'
                        city: 'Barrows LLC'
                        clinic_name: 'South Onie'
                        clinic_location: "1750 Wyman Locks Apt. 096\nRoobmouth, DE 85642-2536"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:01.000000Z'
                        updated_at: '2025-12-10T12:00:01.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        config_history_id: 7
                        user_id: 76
                        note: 'Ipsa atque culpa doloribus et eum cum voluptatem.'
                        type: public
                        created_at: '2025-12-10T12:00:01.000000Z'
                        updated_at: '2025-12-10T12:00:01.000000Z'
                        author:
                          id: 76
                          mrn: YY03TNMI1765368001
                          name: 'Mrs. Sierra McCullough'
                          email: 1765368001olson.magali@example.com
                          language: en
                          phone: '(626) 653-4239'
                          phone_country: VC
                          phone_verified_at: null
                          address1: '929 Corwin Via'
                          address2: 'Williamsontown, KS 39373-8558'
                          postal_code: '02155'
                          city: 'Gibson, Jast and McGlynn'
                          clinic_name: 'Port Frances'
                          clinic_location: "142 Sporer Vista\nKozeyborough, AZ 16854"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:01.000000Z'
                          updated_at: '2025-12-10T12:00:01.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                      -
                        id: 2
                        config_history_id: 8
                        user_id: 78
                        note: 'Enim ratione consequatur sed voluptate.'
                        type: public
                        created_at: '2025-12-10T12:00:01.000000Z'
                        updated_at: '2025-12-10T12:00:01.000000Z'
                        author:
                          id: 78
                          mrn: PBUA0FEX1765368001
                          name: 'Ara Schroeder'
                          email: 1765368001dickens.elza@example.net
                          language: en
                          phone: '(623) 732-9335'
                          phone_country: BM
                          phone_verified_at: null
                          address1: "6303 O'Connell Inlet"
                          address2: 'Brooklynberg, MD 36759-4481'
                          postal_code: '44105'
                          city: 'Barrows LLC'
                          clinic_name: 'South Onie'
                          clinic_location: "1750 Wyman Locks Apt. 096\nRoobmouth, DE 85642-2536"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:01.000000Z'
                          updated_at: '2025-12-10T12:00:01.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        config_history_id:
                          type: integer
                          example: 7
                        user_id:
                          type: integer
                          example: 76
                        note:
                          type: string
                          example: 'Ipsa atque culpa doloribus et eum cum voluptatem.'
                        type:
                          type: string
                          example: public
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:01.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:01.000000Z'
                        author:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 76
                            mrn:
                              type: string
                              example: YY03TNMI1765368001
                            name:
                              type: string
                              example: 'Mrs. Sierra McCullough'
                            email:
                              type: string
                              example: 1765368001olson.magali@example.com
                            language:
                              type: string
                              example: en
                            phone:
                              type: string
                              example: '(626) 653-4239'
                            phone_country:
                              type: string
                              example: VC
                            phone_verified_at:
                              type: string
                              example: null
                            address1:
                              type: string
                              example: '929 Corwin Via'
                            address2:
                              type: string
                              example: 'Williamsontown, KS 39373-8558'
                            postal_code:
                              type: string
                              example: '02155'
                            city:
                              type: string
                              example: 'Gibson, Jast and McGlynn'
                            clinic_name:
                              type: string
                              example: 'Port Frances'
                            clinic_location:
                              type: string
                              example: "142 Sporer Vista\nKozeyborough, AZ 16854"
                            image:
                              type: string
                              example: null
                            mfa_enabled:
                              type: integer
                              example: 0
                            mfa_method:
                              type: string
                              example: null
                            mfa_verified_to:
                              type: string
                              example: null
                            location_id:
                              type: string
                              example: null
                            created_by:
                              type: string
                              example: null
                            active:
                              type: integer
                              example: 1
                            notifications_timezone:
                              type: string
                              example: null
                            notifications_at:
                              type: string
                              example: null
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:01.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:01.000000Z'
                            invitation_status:
                              type: string
                              example: null
                            acadle_invitation_status:
                              type: string
                              example: null
                            roles:
                              type: array
                              example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to access config notes'
                  code: 'CONFIG_NOTES:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to access config notes'
                  code:
                    type: string
                    example: 'CONFIG_NOTES:LIST:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CONFIG_NOTES:LIST:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CONFIG_NOTES:LIST:DEVICE_NOT_FOUND'
                  -
                    description: 'Config history entry not found'
                    type: object
                    example:
                      message: 'Config history entry not found'
                      code: 'CONFIG_NOTES:LIST:HISTORY_ENTRY_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config history entry not found'
                      code:
                        type: string
                        example: 'CONFIG_NOTES:LIST:HISTORY_ENTRY_NOT_FOUND'
      tags:
        - 'Config Notes'
    post:
      summary: 'Create config entry note'
      operationId: createConfigEntryNote
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  config_history_id: 10
                  user_id: 82
                  note: 'Nihil impedit cum aperiam quae deleniti sint pariatur.'
                  type: public
                  created_at: '2025-12-10T12:00:01.000000Z'
                  updated_at: '2025-12-10T12:00:01.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  config_history_id:
                    type: integer
                    example: 10
                  user_id:
                    type: integer
                    example: 82
                  note:
                    type: string
                    example: 'Nihil impedit cum aperiam quae deleniti sint pariatur.'
                  type:
                    type: string
                    example: public
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:01.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:01.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to add config notes'
                  code: 'CONFIG_NOTES:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to add config notes'
                  code:
                    type: string
                    example: 'CONFIG_NOTES:CREATE:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CONFIG_NOTES:CREATE:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CONFIG_NOTES:CREATE:DEVICE_NOT_FOUND'
                  -
                    description: 'Config history entry not found'
                    type: object
                    example:
                      message: 'Config history entry not found'
                      code: 'CONFIG_NOTES:CREATE:HISTORY_ENTRY_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config history entry not found'
                      code:
                        type: string
                        example: 'CONFIG_NOTES:CREATE:HISTORY_ENTRY_NOT_FOUND'
      tags:
        - 'Config Notes'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                note:
                  type: string
                  description: 'Note text.'
                  example: 'Atque qui et impedit culpa architecto.'
                type:
                  type: string
                  description: 'Type of the note. Default: public.'
                  example: public
                  enum:
                    - public
                    - private
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: configId
        description: 'Config history entry ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/config/{configId}/notes/{noteId}':
    get:
      summary: 'Get config entry note'
      operationId: getConfigEntryNote
      description: 'Returns single config history entry note in response.'
      parameters:
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  config_history_id: 9
                  user_id: 80
                  note: 'Voluptas quasi fuga est doloremque cupiditate.'
                  type: public
                  created_at: '2025-12-10T12:00:01.000000Z'
                  updated_at: '2025-12-10T12:00:01.000000Z'
                  author:
                    id: 80
                    mrn: F6C6FHHY1765368001
                    name: 'Harrison Jacobi'
                    email: 1765368001jgorczany@example.com
                    language: en
                    phone: +1-318-255-4777
                    phone_country: KE
                    phone_verified_at: null
                    address1: '3509 Reinger Lock'
                    address2: 'Stiedemannview, NH 66262-2625'
                    postal_code: 97301-1916
                    city: 'Stiedemann and Sons'
                    clinic_name: 'Lake Alexa'
                    clinic_location: "939 Hintz Club\nNorth Waylon, SD 83904-6532"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:01.000000Z'
                    updated_at: '2025-12-10T12:00:01.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                properties:
                  id:
                    type: integer
                    example: 3
                  config_history_id:
                    type: integer
                    example: 9
                  user_id:
                    type: integer
                    example: 80
                  note:
                    type: string
                    example: 'Voluptas quasi fuga est doloremque cupiditate.'
                  type:
                    type: string
                    example: public
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:01.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:01.000000Z'
                  author:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 80
                      mrn:
                        type: string
                        example: F6C6FHHY1765368001
                      name:
                        type: string
                        example: 'Harrison Jacobi'
                      email:
                        type: string
                        example: 1765368001jgorczany@example.com
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: +1-318-255-4777
                      phone_country:
                        type: string
                        example: KE
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '3509 Reinger Lock'
                      address2:
                        type: string
                        example: 'Stiedemannview, NH 66262-2625'
                      postal_code:
                        type: string
                        example: 97301-1916
                      city:
                        type: string
                        example: 'Stiedemann and Sons'
                      clinic_name:
                        type: string
                        example: 'Lake Alexa'
                      clinic_location:
                        type: string
                        example: "939 Hintz Club\nNorth Waylon, SD 83904-6532"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:01.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:01.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to access config notes'
                  code: 'CONFIG_NOTES:GET_ENTRY:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to access config notes'
                  code:
                    type: string
                    example: 'CONFIG_NOTES:GET_ENTRY:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CONFIG_NOTES:GET_ENTRY:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CONFIG_NOTES:GET_ENTRY:DEVICE_NOT_FOUND'
                  -
                    description: 'Config history entry not found'
                    type: object
                    example:
                      message: 'Config history entry not found'
                      code: 'CONFIG_NOTES:GET_ENTRY:HISTORY_ENTRY_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config history entry not found'
                      code:
                        type: string
                        example: 'CONFIG_NOTES:GET_ENTRY:HISTORY_ENTRY_NOT_FOUND'
                  -
                    description: 'Config history note not found'
                    type: object
                    example:
                      message: 'Config history note not found'
                      code: 'CONFIG_NOTES:GET_ENTRY:HISTORY_NOTE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config history note not found'
                      code:
                        type: string
                        example: 'CONFIG_NOTES:GET_ENTRY:HISTORY_NOTE_NOT_FOUND'
      tags:
        - 'Config Notes'
    delete:
      summary: 'Delete config note'
      operationId: deleteConfigNote
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Config history note deleted'
                  code: 'CONFIG_NOTES:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Config history note deleted'
                  code:
                    type: string
                    example: 'CONFIG_NOTES:DELETE:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to delete config notes'
                  code: 'CONFIG_NOTES:DELETE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to delete config notes'
                  code:
                    type: string
                    example: 'CONFIG_NOTES:DELETE:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CONFIG_NOTES:DELETE:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CONFIG_NOTES:DELETE:DEVICE_NOT_FOUND'
                  -
                    description: 'Config history entry not found'
                    type: object
                    example:
                      message: 'Config history entry not found'
                      code: 'CONFIG_NOTES:DELETE:HISTORY_ENTRY_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config history entry not found'
                      code:
                        type: string
                        example: 'CONFIG_NOTES:DELETE:HISTORY_ENTRY_NOT_FOUND'
                  -
                    description: 'Config history note not found'
                    type: object
                    example:
                      message: 'Config history note not found'
                      code: 'CONFIG_NOTES:DELETE:HISTORY_NOTE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config history note not found'
                      code:
                        type: string
                        example: 'CONFIG_NOTES:DELETE:HISTORY_NOTE_NOT_FOUND'
      tags:
        - 'Config Notes'
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: configId
        description: 'Config history entry ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: noteId
        description: 'Device config entry note ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/versions/firmware/{firmwareId}/schema':
    get:
      summary: 'Get config schema'
      operationId: getConfigSchema
      description: 'Returns list of config schema entries for given firmware version.'
      parameters:
        -
          in: query
          name: filter
          description: 'Filter entries by type (available: <code>common</code>, <code>modes</code>). By default all entries all returned.'
          example: modes
          required: false
          schema:
            type: string
            description: 'Filter entries by type (available: <code>common</code>, <code>modes</code>). By default all entries all returned.'
            example: modes
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    firmware_id:
                      type: integer
                      example: 7
                    key:
                      type: string
                      example: nostrum
                    is_common:
                      type: integer
                      example: 1
                    created_at:
                      type: string
                      example: '2025-12-10T12:00:15.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T12:00:15.000000Z'
                example:
                  -
                    id: 1
                    firmware_id: 7
                    key: nostrum
                    is_common: 1
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
                  -
                    id: 2
                    firmware_id: 9
                    key: nam
                    is_common: 0
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view config schema'
                  code: 'CONFIG_SCHEMA:GET:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view config schema'
                  code:
                    type: string
                    example: 'CONFIG_SCHEMA:GET:INSUFFICIENT_PERMISSION'
        404:
          description: 'Firmware version not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Firmware version not found'
                  code: 'CONFIG_SCHEMA:GET:FIRMWARE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Firmware version not found'
                  code:
                    type: string
                    example: 'CONFIG_SCHEMA:GET:FIRMWARE_NOT_FOUND'
      tags:
        - 'Config Schema'
    post:
      summary: 'Add config schema'
      operationId: addConfigSchema
      description: "Add one or many config schema entries. Each entry is one key in config.\n\t\tBody of this request is simple array of objects:\n\t\t<pre style=\"float: none; padding: 0;\"><code class=\"language-json hljs\" style=\"padding: 0;\">\n\t\t\t[\n\t\t\t\t{\"key\": \"key_name\", \"is_common\": 1},\n\t\t\t\t{\"key\": \"another_name\", \"is_common\": 0},\n\t\t\t\t...\n\t\t\t]\n\t\t</code></pre>"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 3
                    firmware_id:
                      type: integer
                      example: 11
                    key:
                      type: string
                      example: rem
                    is_common:
                      type: integer
                      example: 1
                    created_at:
                      type: string
                      example: '2025-12-10T12:00:15.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T12:00:15.000000Z'
                example:
                  -
                    id: 3
                    firmware_id: 11
                    key: rem
                    is_common: 1
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
                  -
                    id: 4
                    firmware_id: 13
                    key: ipsum
                    is_common: 0
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage config schema'
                  code: 'CONFIG_SCHEMA:ADD:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage config schema'
                  code:
                    type: string
                    example: 'CONFIG_SCHEMA:ADD:INSUFFICIENT_PERMISSION'
        404:
          description: 'Firmware version not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Firmware version not found'
                  code: 'CONFIG_SCHEMA:ADD:FIRMWARE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Firmware version not found'
                  code:
                    type: string
                    example: 'CONFIG_SCHEMA:ADD:FIRMWARE_NOT_FOUND'
      tags:
        - 'Config Schema'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              description: ''
              example:
                -
                  key: gripsPosition.0.initial
                  is_common: 1
              items:
                type: object
                properties:
                  key:
                    type: string
                    description: 'Config key.'
                    example: gripsPosition.0.initial
                  is_common:
                    type: integer
                    description: 'Information if the key belongs to common config (1) or to modes (0). Default: 1.'
                    example: 1
    parameters:
      -
        in: path
        name: firmwareId
        description: 'Firmware version ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/versions/firmware/{firmwareId}/schema/{schemaId}':
    delete:
      summary: 'Delete config schema'
      operationId: deleteConfigSchema
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Config schema entry deleted'
                  code: 'CONFIG_SCHEMA:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Config schema entry deleted'
                  code:
                    type: string
                    example: 'CONFIG_SCHEMA:DELETE:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage config schema'
                  code: 'CONFIG_SCHEMA:DELETE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage config schema'
                  code:
                    type: string
                    example: 'CONFIG_SCHEMA:DELETE:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Firmware version not found'
                    type: object
                    example:
                      message: 'Firmware version not found'
                      code: 'CONFIG_SCHEMA:DELETE:FIRMWARE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Firmware version not found'
                      code:
                        type: string
                        example: 'CONFIG_SCHEMA:DELETE:FIRMWARE_NOT_FOUND'
                  -
                    description: 'Config schema entry not found'
                    type: object
                    example:
                      message: 'Config schema entry not found'
                      code: 'CONFIG_SCHEMA:DELETE:SCHEMA_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config schema entry not found'
                      code:
                        type: string
                        example: 'CONFIG_SCHEMA:DELETE:SCHEMA_NOT_FOUND'
      tags:
        - 'Config Schema'
    parameters:
      -
        in: path
        name: firmwareId
        description: 'Firmware version ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: schemaId
        description: 'Config schema ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/config/templates:
    get:
      summary: 'Get config templates list'
      operationId: getConfigTemplatesList
      description: "Entries where author is present are private and owned by its author.\n\t\tEntries where author is null should be considered as global templates prepared by Aether team."
      parameters:
        -
          in: query
          name: search
          description: 'Filter config templates by name.'
          example: sport
          required: false
          schema:
            type: string
            description: 'Filter config templates by name.'
            example: sport
        -
          in: query
          name: author
          description: '<strong>Super Admin only:</strong> Filter config templates by author.'
          example: 1
          required: false
          schema:
            type: integer
            description: '<strong>Super Admin only:</strong> Filter config templates by author.'
            example: 1
        -
          in: query
          name: scope
          description: "<strong>ClinicAdmin/Clinician/ClinicianSupport only:</strong> Filter config templates by scope.\n\t\tThe value must be one of:\n\t\t<ul>\n\t\t\t<li><code>me</code> (entries where current user is author),</li>\n\t\t\t<li><code>global</code> (entries added by Aether).</li>\n\t\t</ul>"
          example: me
          required: false
          schema:
            type: string
            description: "<strong>ClinicAdmin/Clinician/ClinicianSupport only:</strong> Filter config templates by scope.\n\t\tThe value must be one of:\n\t\t<ul>\n\t\t\t<li><code>me</code> (entries where current user is author),</li>\n\t\t\t<li><code>global</code> (entries added by Aether).</li>\n\t\t</ul>"
            example: me
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      name: 'Nesciunt eligendi sed error.'
                      description: 'In beatae ullam odio.'
                      author_id: 96
                      company_id: null
                      config: '{"autoGrasp":[0,100],"coContractionTimings":[500,300],"controlMode":[1],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[20,100,70,40,60,50,10,80,40,70],"gripPairsConfig":[7,5,10,8,1,3,2,4],"gripSequentialConfig":[4,6,12,2,255,255,10,7,5,1,8,13],"gripSwitchingMode":[3],"holdOpen":[1500,1500],"pulseTimings":[320,750,20,720],"softGrip":[1],"speedControlStrategy":[1]}'
                      created_at: '2025-12-10T12:00:02.000000Z'
                      updated_at: '2025-12-10T12:00:02.000000Z'
                      author:
                        id: 96
                        mrn: HP7FZJZL1765368002
                        name: 'Jonathon Labadie'
                        email: 1765368002kaitlin.botsford@example.net
                        language: en
                        phone: 978.639.8600
                        phone_country: ET
                        phone_verified_at: null
                        address1: '574 Bogan Route'
                        address2: 'East Karolanntown, WI 60986-1205'
                        postal_code: '65418'
                        city: 'Cronin, Hoeger and Breitenberg'
                        clinic_name: 'North Jairo'
                        clinic_location: "7092 Lubowitz Lights\nSouth Ova, NY 76575"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:02.000000Z'
                        updated_at: '2025-12-10T12:00:02.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                    -
                      id: 2
                      name: 'Iste sunt sint possimus sed.'
                      description: 'Aut ut dolorem veritatis.'
                      author_id: 97
                      company_id: null
                      config: '{"autoGrasp":[0,100],"coContractionTimings":[500,300],"controlMode":[1],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[100,90,70,50,50,20,60,70,20,0],"gripPairsConfig":[12,1,11,6,3,5,13,4],"gripSequentialConfig":[255,2,255,7,9,8,255,255,1,255,255,6],"gripSwitchingMode":[2],"holdOpen":[2000,2500],"pulseTimings":[170,510,960,990],"softGrip":[1],"speedControlStrategy":[1]}'
                      created_at: '2025-12-10T12:00:02.000000Z'
                      updated_at: '2025-12-10T12:00:02.000000Z'
                      author:
                        id: 97
                        mrn: KJEBZPNZ1765368002
                        name: 'Sylvan Kihn IV'
                        email: 1765368002aurore27@example.net
                        language: en
                        phone: '+14587641069'
                        phone_country: AO
                        phone_verified_at: null
                        address1: '6672 Karl Lodge'
                        address2: 'Port Fatimaton, MT 91541'
                        postal_code: '79157'
                        city: "Bartoletti-O'Keefe"
                        clinic_name: 'Port Christyland'
                        clinic_location: "736 Maegan Spring\nBednartown, VT 85332-7676"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:02.000000Z'
                        updated_at: '2025-12-10T12:00:02.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        name: 'Nesciunt eligendi sed error.'
                        description: 'In beatae ullam odio.'
                        author_id: 96
                        company_id: null
                        config: '{"autoGrasp":[0,100],"coContractionTimings":[500,300],"controlMode":[1],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[20,100,70,40,60,50,10,80,40,70],"gripPairsConfig":[7,5,10,8,1,3,2,4],"gripSequentialConfig":[4,6,12,2,255,255,10,7,5,1,8,13],"gripSwitchingMode":[3],"holdOpen":[1500,1500],"pulseTimings":[320,750,20,720],"softGrip":[1],"speedControlStrategy":[1]}'
                        created_at: '2025-12-10T12:00:02.000000Z'
                        updated_at: '2025-12-10T12:00:02.000000Z'
                        author:
                          id: 96
                          mrn: HP7FZJZL1765368002
                          name: 'Jonathon Labadie'
                          email: 1765368002kaitlin.botsford@example.net
                          language: en
                          phone: 978.639.8600
                          phone_country: ET
                          phone_verified_at: null
                          address1: '574 Bogan Route'
                          address2: 'East Karolanntown, WI 60986-1205'
                          postal_code: '65418'
                          city: 'Cronin, Hoeger and Breitenberg'
                          clinic_name: 'North Jairo'
                          clinic_location: "7092 Lubowitz Lights\nSouth Ova, NY 76575"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:02.000000Z'
                          updated_at: '2025-12-10T12:00:02.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                      -
                        id: 2
                        name: 'Iste sunt sint possimus sed.'
                        description: 'Aut ut dolorem veritatis.'
                        author_id: 97
                        company_id: null
                        config: '{"autoGrasp":[0,100],"coContractionTimings":[500,300],"controlMode":[1],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[100,90,70,50,50,20,60,70,20,0],"gripPairsConfig":[12,1,11,6,3,5,13,4],"gripSequentialConfig":[255,2,255,7,9,8,255,255,1,255,255,6],"gripSwitchingMode":[2],"holdOpen":[2000,2500],"pulseTimings":[170,510,960,990],"softGrip":[1],"speedControlStrategy":[1]}'
                        created_at: '2025-12-10T12:00:02.000000Z'
                        updated_at: '2025-12-10T12:00:02.000000Z'
                        author:
                          id: 97
                          mrn: KJEBZPNZ1765368002
                          name: 'Sylvan Kihn IV'
                          email: 1765368002aurore27@example.net
                          language: en
                          phone: '+14587641069'
                          phone_country: AO
                          phone_verified_at: null
                          address1: '6672 Karl Lodge'
                          address2: 'Port Fatimaton, MT 91541'
                          postal_code: '79157'
                          city: "Bartoletti-O'Keefe"
                          clinic_name: 'Port Christyland'
                          clinic_location: "736 Maegan Spring\nBednartown, VT 85332-7676"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:02.000000Z'
                          updated_at: '2025-12-10T12:00:02.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Nesciunt eligendi sed error.'
                        description:
                          type: string
                          example: 'In beatae ullam odio.'
                        author_id:
                          type: integer
                          example: 96
                        company_id:
                          type: string
                          example: null
                        config:
                          type: string
                          example: '{"autoGrasp":[0,100],"coContractionTimings":[500,300],"controlMode":[1],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[20,100,70,40,60,50,10,80,40,70],"gripPairsConfig":[7,5,10,8,1,3,2,4],"gripSequentialConfig":[4,6,12,2,255,255,10,7,5,1,8,13],"gripSwitchingMode":[3],"holdOpen":[1500,1500],"pulseTimings":[320,750,20,720],"softGrip":[1],"speedControlStrategy":[1]}'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:02.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:02.000000Z'
                        author:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 96
                            mrn:
                              type: string
                              example: HP7FZJZL1765368002
                            name:
                              type: string
                              example: 'Jonathon Labadie'
                            email:
                              type: string
                              example: 1765368002kaitlin.botsford@example.net
                            language:
                              type: string
                              example: en
                            phone:
                              type: string
                              example: 978.639.8600
                            phone_country:
                              type: string
                              example: ET
                            phone_verified_at:
                              type: string
                              example: null
                            address1:
                              type: string
                              example: '574 Bogan Route'
                            address2:
                              type: string
                              example: 'East Karolanntown, WI 60986-1205'
                            postal_code:
                              type: string
                              example: '65418'
                            city:
                              type: string
                              example: 'Cronin, Hoeger and Breitenberg'
                            clinic_name:
                              type: string
                              example: 'North Jairo'
                            clinic_location:
                              type: string
                              example: "7092 Lubowitz Lights\nSouth Ova, NY 76575"
                            image:
                              type: string
                              example: null
                            mfa_enabled:
                              type: integer
                              example: 0
                            mfa_method:
                              type: string
                              example: null
                            mfa_verified_to:
                              type: string
                              example: null
                            location_id:
                              type: string
                              example: null
                            created_by:
                              type: string
                              example: null
                            active:
                              type: integer
                              example: 1
                            notifications_timezone:
                              type: string
                              example: null
                            notifications_at:
                              type: string
                              example: null
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:02.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:02.000000Z'
                            invitation_status:
                              type: string
                              example: null
                            acadle_invitation_status:
                              type: string
                              example: null
                            roles:
                              type: array
                              example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list config templates'
                  code: 'CONFIG_TEMPLATES:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list config templates'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATES:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - 'Config Templates'
    post:
      summary: 'Create new config template'
      operationId: createNewConfigTemplate
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  name: 'Commodi hic dolores id cum id.'
                  description: 'Totam et ut placeat iste deleniti ab architecto pariatur.'
                  author_id: 99
                  company_id: null
                  config: '{"autoGrasp":[0,0],"coContractionTimings":[400,200],"controlMode":[1],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[70,90,0,80,20,40,30,90,70,80],"gripPairsConfig":[4,9,5,11,1,2,10,3],"gripSequentialConfig":[4,3,255,7,13,5,11,12,9,6,2,1],"gripSwitchingMode":[3],"holdOpen":[2500,2500],"pulseTimings":[720,970,170,310],"softGrip":[1],"speedControlStrategy":[0]}'
                  created_at: '2025-12-10T12:00:02.000000Z'
                  updated_at: '2025-12-10T12:00:02.000000Z'
                  author:
                    id: 99
                    mrn: 2M454N351765368002
                    name: 'Mr. Eric Ziemann Jr.'
                    email: 1765368002santino.robel@example.net
                    language: en
                    phone: '(252) 573-3530'
                    phone_country: LI
                    phone_verified_at: null
                    address1: '30142 Pouros Radial Suite 795'
                    address2: 'Joliestad, NC 73514-4412'
                    postal_code: '13339'
                    city: Roob-Nienow
                    clinic_name: Carterport
                    clinic_location: "44598 Lockman Valleys Suite 502\nNew Kaiaville, IN 47856"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:02.000000Z'
                    updated_at: '2025-12-10T12:00:02.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                properties:
                  id:
                    type: integer
                    example: 4
                  name:
                    type: string
                    example: 'Commodi hic dolores id cum id.'
                  description:
                    type: string
                    example: 'Totam et ut placeat iste deleniti ab architecto pariatur.'
                  author_id:
                    type: integer
                    example: 99
                  company_id:
                    type: string
                    example: null
                  config:
                    type: string
                    example: '{"autoGrasp":[0,0],"coContractionTimings":[400,200],"controlMode":[1],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[70,90,0,80,20,40,30,90,70,80],"gripPairsConfig":[4,9,5,11,1,2,10,3],"gripSequentialConfig":[4,3,255,7,13,5,11,12,9,6,2,1],"gripSwitchingMode":[3],"holdOpen":[2500,2500],"pulseTimings":[720,970,170,310],"softGrip":[1],"speedControlStrategy":[0]}'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:02.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:02.000000Z'
                  author:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 99
                      mrn:
                        type: string
                        example: 2M454N351765368002
                      name:
                        type: string
                        example: 'Mr. Eric Ziemann Jr.'
                      email:
                        type: string
                        example: 1765368002santino.robel@example.net
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: '(252) 573-3530'
                      phone_country:
                        type: string
                        example: LI
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '30142 Pouros Radial Suite 795'
                      address2:
                        type: string
                        example: 'Joliestad, NC 73514-4412'
                      postal_code:
                        type: string
                        example: '13339'
                      city:
                        type: string
                        example: Roob-Nienow
                      clinic_name:
                        type: string
                        example: Carterport
                      clinic_location:
                        type: string
                        example: "44598 Lockman Valleys Suite 502\nNew Kaiaville, IN 47856"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:02.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:02.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to create config template'
                  code: 'CONFIG_TEMPLATES:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to create config template'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATES:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - 'Config Templates'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of the config template.'
                  example: 'Default config for Aether Zeus'
                description:
                  type: string
                  description: 'Description of the config template.'
                  example: 'Description of the config template.'
                owner:
                  type: string
                  description: 'Mark config template owned by clinician or company. Default: <code>me</code> (clinician).'
                  example: company
                  enum:
                    - me
                    - company
                author:
                  type: string
                  description: '<strong>Super Admin only:</strong> User ID to be the author of template. The <code>id</code> of an existing record in the App\Models\User table.'
                  example: 1
                  nullable: true
                config:
                  type: string
                  description: 'Full config. MUST_BE_JSON.'
                  example: '{"param_1": [100, 200], "param_2": [100, 200, 300]}'
              required:
                - name
                - config
  '/api/config/templates/{id}':
    get:
      summary: 'Get config template'
      operationId: getConfigTemplate
      description: ''
      parameters:
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  name: 'Quaerat tempore minima illum id.'
                  description: 'Aut voluptatem quia voluptatibus id dolorem.'
                  author_id: 98
                  company_id: null
                  config: '{"autoGrasp":[0,100],"coContractionTimings":[400,300],"controlMode":[0],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[100,80,40,50,90,10,60,20,70,60],"gripPairsConfig":[13,5,3,6,4,12,8,1],"gripSequentialConfig":[8,255,13,11,6,1,7,255,255,255,5,12],"gripSwitchingMode":[3],"holdOpen":[1500,1500],"pulseTimings":[590,850,290,520],"softGrip":[0],"speedControlStrategy":[1]}'
                  created_at: '2025-12-10T12:00:02.000000Z'
                  updated_at: '2025-12-10T12:00:02.000000Z'
                  author:
                    id: 98
                    mrn: Z8ML40HU1765368002
                    name: 'Damaris Farrell'
                    email: 1765368002ora85@example.com
                    language: en
                    phone: +1-309-861-1772
                    phone_country: GU
                    phone_verified_at: null
                    address1: '28473 Oswaldo Plains Apt. 615'
                    address2: 'Veumshire, FL 30074-8407'
                    postal_code: '43741'
                    city: 'Nolan, Adams and Braun'
                    clinic_name: 'North Leslymouth'
                    clinic_location: "7367 Nienow Trail\nLake Garnetberg, KS 88788"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:02.000000Z'
                    updated_at: '2025-12-10T12:00:02.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                properties:
                  id:
                    type: integer
                    example: 3
                  name:
                    type: string
                    example: 'Quaerat tempore minima illum id.'
                  description:
                    type: string
                    example: 'Aut voluptatem quia voluptatibus id dolorem.'
                  author_id:
                    type: integer
                    example: 98
                  company_id:
                    type: string
                    example: null
                  config:
                    type: string
                    example: '{"autoGrasp":[0,100],"coContractionTimings":[400,300],"controlMode":[0],"emgGains":[100,100],"emgSpike":[1,300],"emgThresholds":[100,80,40,50,90,10,60,20,70,60],"gripPairsConfig":[13,5,3,6,4,12,8,1],"gripSequentialConfig":[8,255,13,11,6,1,7,255,255,255,5,12],"gripSwitchingMode":[3],"holdOpen":[1500,1500],"pulseTimings":[590,850,290,520],"softGrip":[0],"speedControlStrategy":[1]}'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:02.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:02.000000Z'
                  author:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 98
                      mrn:
                        type: string
                        example: Z8ML40HU1765368002
                      name:
                        type: string
                        example: 'Damaris Farrell'
                      email:
                        type: string
                        example: 1765368002ora85@example.com
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: +1-309-861-1772
                      phone_country:
                        type: string
                        example: GU
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '28473 Oswaldo Plains Apt. 615'
                      address2:
                        type: string
                        example: 'Veumshire, FL 30074-8407'
                      postal_code:
                        type: string
                        example: '43741'
                      city:
                        type: string
                        example: 'Nolan, Adams and Braun'
                      clinic_name:
                        type: string
                        example: 'North Leslymouth'
                      clinic_location:
                        type: string
                        example: "7367 Nienow Trail\nLake Garnetberg, KS 88788"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:02.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:02.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view config template'
                  code: 'CONFIG_TEMPLATES:GET:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view config template'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATES:GET:INSUFFICIENT_PERMISSION'
        404:
          description: 'Config template not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Config template not found'
                  code: 'CONFIG_TEMPLATES:GET:TEMPLATE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Config template not found'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATES:GET:TEMPLATE_NOT_FOUND'
      tags:
        - 'Config Templates'
    put:
      summary: 'Update config template'
      operationId: updateConfigTemplate
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 5
                  name: 'Dolorum omnis deleniti est porro cupiditate qui assumenda.'
                  description: 'Et et ut eum aliquid vel rem.'
                  author_id: 100
                  company_id: null
                  config: '{"autoGrasp":[1,100],"coContractionTimings":[500,500],"controlMode":[1],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[0,20,90,90,90,20,50,40,30,70],"gripPairsConfig":[12,13,6,7,10,4,8,1],"gripSequentialConfig":[8,7,2,1,10,255,13,9,255,255,5,255],"gripSwitchingMode":[2],"holdOpen":[2000,2500],"pulseTimings":[930,290,340,150],"softGrip":[1],"speedControlStrategy":[0]}'
                  created_at: '2025-12-10T12:00:03.000000Z'
                  updated_at: '2025-12-10T12:00:03.000000Z'
                  author:
                    id: 100
                    mrn: J8L3UQQ71765368002
                    name: 'Enos Ernser'
                    email: 1765368002maynard.parker@example.net
                    language: en
                    phone: '(979) 639-6914'
                    phone_country: YE
                    phone_verified_at: null
                    address1: '9713 Bauch Manors Apt. 707'
                    address2: 'Lake Anya, WY 13769'
                    postal_code: 04072-0693
                    city: Wehner-DuBuque
                    clinic_name: Muellerland
                    clinic_location: "1130 Lind Station Suite 001\nNew Gonzalochester, AL 45468"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:03.000000Z'
                    updated_at: '2025-12-10T12:00:03.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                properties:
                  id:
                    type: integer
                    example: 5
                  name:
                    type: string
                    example: 'Dolorum omnis deleniti est porro cupiditate qui assumenda.'
                  description:
                    type: string
                    example: 'Et et ut eum aliquid vel rem.'
                  author_id:
                    type: integer
                    example: 100
                  company_id:
                    type: string
                    example: null
                  config:
                    type: string
                    example: '{"autoGrasp":[1,100],"coContractionTimings":[500,500],"controlMode":[1],"emgGains":[100,100],"emgSpike":[0,300],"emgThresholds":[0,20,90,90,90,20,50,40,30,70],"gripPairsConfig":[12,13,6,7,10,4,8,1],"gripSequentialConfig":[8,7,2,1,10,255,13,9,255,255,5,255],"gripSwitchingMode":[2],"holdOpen":[2000,2500],"pulseTimings":[930,290,340,150],"softGrip":[1],"speedControlStrategy":[0]}'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
                  author:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 100
                      mrn:
                        type: string
                        example: J8L3UQQ71765368002
                      name:
                        type: string
                        example: 'Enos Ernser'
                      email:
                        type: string
                        example: 1765368002maynard.parker@example.net
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: '(979) 639-6914'
                      phone_country:
                        type: string
                        example: YE
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '9713 Bauch Manors Apt. 707'
                      address2:
                        type: string
                        example: 'Lake Anya, WY 13769'
                      postal_code:
                        type: string
                        example: 04072-0693
                      city:
                        type: string
                        example: Wehner-DuBuque
                      clinic_name:
                        type: string
                        example: Muellerland
                      clinic_location:
                        type: string
                        example: "1130 Lind Station Suite 001\nNew Gonzalochester, AL 45468"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:03.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:03.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update config template'
                  code: 'CONFIG_TEMPLATES:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update config template'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATES:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Config template not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Config template not found'
                  code: 'CONFIG_TEMPLATES:UPDATE:TEMPLATE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Config template not found'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATES:UPDATE:TEMPLATE_NOT_FOUND'
      tags:
        - 'Config Templates'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of the config template.'
                  example: 'Default config for Aether Zeus'
                description:
                  type: string
                  description: 'Description of the config template.'
                  example: 'Description of the config template.'
                owner:
                  type: string
                  description: 'Mark config template owned by clinician or company. Default: <code>me</code> (clinician).'
                  example: company
                  enum:
                    - me
                    - company
                author:
                  type: string
                  description: '<strong>Super Admin only:</strong> User ID to be the author of template. The <code>id</code> of an existing record in the App\Models\User table.'
                  example: 1
                  nullable: true
                config:
                  type: string
                  description: 'Full config. MUST_BE_JSON.'
                  example: '{"param_1": [100, 200], "param_2": [100, 200, 300]}'
    delete:
      summary: 'Delete config template'
      operationId: deleteConfigTemplate
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Config template deleted'
                  code: 'CONFIG_TEMPLATES:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Config template deleted'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATES:DELETE:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to delete config template'
                  code: 'CONFIG_TEMPLATES:DELETE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to delete config template'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATES:DELETE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Config template not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Config template not found'
                  code: 'CONFIG_TEMPLATES:DELETE:TEMPLATE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Config template not found'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATES:DELETE:TEMPLATE_NOT_FOUND'
      tags:
        - 'Config Templates'
    parameters:
      -
        in: path
        name: id
        description: 'Config template ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/config/templates/{id}/notes':
    get:
      summary: 'Get config templates notes list'
      operationId: getConfigTemplatesNotesList
      description: ''
      parameters:
        -
          in: query
          name: user
          description: 'Filter notes by user.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter notes by user.'
            example: 1
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      template_id: 6
                      user_id: 101
                      note: 'Dolorem id voluptatem possimus quasi perspiciatis praesentium.'
                      created_at: '2025-12-10T12:00:03.000000Z'
                      updated_at: '2025-12-10T12:00:03.000000Z'
                      author:
                        id: 101
                        mrn: B2Q2O4SF1765368003
                        name: 'Eladio Wintheiser MD'
                        email: 1765368003kreinger@example.org
                        language: en
                        phone: 1-775-610-7223
                        phone_country: KN
                        phone_verified_at: null
                        address1: '452 Jordon Court Suite 584'
                        address2: 'East Vern, ND 36105'
                        postal_code: '74650'
                        city: "Weimann, Torphy and O'Conner"
                        clinic_name: 'Port Lorna'
                        clinic_location: "2860 Luettgen Lodge Suite 027\nAshtynburgh, PA 41632"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:03.000000Z'
                        updated_at: '2025-12-10T12:00:03.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                    -
                      id: 2
                      template_id: 7
                      user_id: 102
                      note: 'Impedit rem similique aliquam facere reprehenderit.'
                      created_at: '2025-12-10T12:00:03.000000Z'
                      updated_at: '2025-12-10T12:00:03.000000Z'
                      author:
                        id: 102
                        mrn: F3OOUVVR1765368003
                        name: 'Theresia Grimes'
                        email: 1765368003hettinger.junior@example.net
                        language: en
                        phone: '+1 (351) 913-5169'
                        phone_country: TV
                        phone_verified_at: null
                        address1: '63802 Gleichner Road Suite 046'
                        address2: 'Grimesshire, AL 06945-5970'
                        postal_code: 13874-6502
                        city: 'Hintz, Kemmer and Brown'
                        clinic_name: VonRuedenburgh
                        clinic_location: "7504 Trinity Port Suite 325\nPort Keshawn, DE 51054"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:03.000000Z'
                        updated_at: '2025-12-10T12:00:03.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        template_id: 6
                        user_id: 101
                        note: 'Dolorem id voluptatem possimus quasi perspiciatis praesentium.'
                        created_at: '2025-12-10T12:00:03.000000Z'
                        updated_at: '2025-12-10T12:00:03.000000Z'
                        author:
                          id: 101
                          mrn: B2Q2O4SF1765368003
                          name: 'Eladio Wintheiser MD'
                          email: 1765368003kreinger@example.org
                          language: en
                          phone: 1-775-610-7223
                          phone_country: KN
                          phone_verified_at: null
                          address1: '452 Jordon Court Suite 584'
                          address2: 'East Vern, ND 36105'
                          postal_code: '74650'
                          city: "Weimann, Torphy and O'Conner"
                          clinic_name: 'Port Lorna'
                          clinic_location: "2860 Luettgen Lodge Suite 027\nAshtynburgh, PA 41632"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:03.000000Z'
                          updated_at: '2025-12-10T12:00:03.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                      -
                        id: 2
                        template_id: 7
                        user_id: 102
                        note: 'Impedit rem similique aliquam facere reprehenderit.'
                        created_at: '2025-12-10T12:00:03.000000Z'
                        updated_at: '2025-12-10T12:00:03.000000Z'
                        author:
                          id: 102
                          mrn: F3OOUVVR1765368003
                          name: 'Theresia Grimes'
                          email: 1765368003hettinger.junior@example.net
                          language: en
                          phone: '+1 (351) 913-5169'
                          phone_country: TV
                          phone_verified_at: null
                          address1: '63802 Gleichner Road Suite 046'
                          address2: 'Grimesshire, AL 06945-5970'
                          postal_code: 13874-6502
                          city: 'Hintz, Kemmer and Brown'
                          clinic_name: VonRuedenburgh
                          clinic_location: "7504 Trinity Port Suite 325\nPort Keshawn, DE 51054"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:03.000000Z'
                          updated_at: '2025-12-10T12:00:03.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        template_id:
                          type: integer
                          example: 6
                        user_id:
                          type: integer
                          example: 101
                        note:
                          type: string
                          example: 'Dolorem id voluptatem possimus quasi perspiciatis praesentium.'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:03.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:03.000000Z'
                        author:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            mrn:
                              type: string
                              example: B2Q2O4SF1765368003
                            name:
                              type: string
                              example: 'Eladio Wintheiser MD'
                            email:
                              type: string
                              example: 1765368003kreinger@example.org
                            language:
                              type: string
                              example: en
                            phone:
                              type: string
                              example: 1-775-610-7223
                            phone_country:
                              type: string
                              example: KN
                            phone_verified_at:
                              type: string
                              example: null
                            address1:
                              type: string
                              example: '452 Jordon Court Suite 584'
                            address2:
                              type: string
                              example: 'East Vern, ND 36105'
                            postal_code:
                              type: string
                              example: '74650'
                            city:
                              type: string
                              example: "Weimann, Torphy and O'Conner"
                            clinic_name:
                              type: string
                              example: 'Port Lorna'
                            clinic_location:
                              type: string
                              example: "2860 Luettgen Lodge Suite 027\nAshtynburgh, PA 41632"
                            image:
                              type: string
                              example: null
                            mfa_enabled:
                              type: integer
                              example: 0
                            mfa_method:
                              type: string
                              example: null
                            mfa_verified_to:
                              type: string
                              example: null
                            location_id:
                              type: string
                              example: null
                            created_by:
                              type: string
                              example: null
                            active:
                              type: integer
                              example: 1
                            notifications_timezone:
                              type: string
                              example: null
                            notifications_at:
                              type: string
                              example: null
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:03.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:03.000000Z'
                            invitation_status:
                              type: string
                              example: null
                            acadle_invitation_status:
                              type: string
                              example: null
                            roles:
                              type: array
                              example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to access config templates notes'
                  code: 'CONFIG_TEMPLATE_NOTES:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to access config templates notes'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATE_NOTES:LIST:INSUFFICIENT_PERMISSION'
        404:
          description: 'Config template not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Config template not found'
                  code: 'CONFIG_TEMPLATE_NOTES:LIST:TEMPLATE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Config template not found'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATE_NOTES:LIST:TEMPLATE_NOT_FOUND'
      tags:
        - 'Config Templates Notes'
    post:
      summary: 'Create new config template note'
      operationId: createNewConfigTemplateNote
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  template_id: 9
                  user_id: 104
                  note: 'Omnis dolor rerum id aut voluptatum quia.'
                  created_at: '2025-12-10T12:00:03.000000Z'
                  updated_at: '2025-12-10T12:00:03.000000Z'
                  author:
                    id: 104
                    mrn: MVRM22671765368003
                    name: 'Prof. Jaida Stiedemann V'
                    email: 1765368003jayde50@example.net
                    language: en
                    phone: '+1 (220) 642-5006'
                    phone_country: KI
                    phone_verified_at: null
                    address1: '1132 Bode Islands Suite 364'
                    address2: 'Lockmanchester, MI 85490-6263'
                    postal_code: '83269'
                    city: 'Kuhn Group'
                    clinic_name: 'South Perry'
                    clinic_location: "33395 Stroman Rest\nCorkeryport, MI 35187"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:03.000000Z'
                    updated_at: '2025-12-10T12:00:03.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                properties:
                  id:
                    type: integer
                    example: 4
                  template_id:
                    type: integer
                    example: 9
                  user_id:
                    type: integer
                    example: 104
                  note:
                    type: string
                    example: 'Omnis dolor rerum id aut voluptatum quia.'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
                  author:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 104
                      mrn:
                        type: string
                        example: MVRM22671765368003
                      name:
                        type: string
                        example: 'Prof. Jaida Stiedemann V'
                      email:
                        type: string
                        example: 1765368003jayde50@example.net
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: '+1 (220) 642-5006'
                      phone_country:
                        type: string
                        example: KI
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '1132 Bode Islands Suite 364'
                      address2:
                        type: string
                        example: 'Lockmanchester, MI 85490-6263'
                      postal_code:
                        type: string
                        example: '83269'
                      city:
                        type: string
                        example: 'Kuhn Group'
                      clinic_name:
                        type: string
                        example: 'South Perry'
                      clinic_location:
                        type: string
                        example: "33395 Stroman Rest\nCorkeryport, MI 35187"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:03.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:03.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to add config templates notes'
                  code: 'CONFIG_TEMPLATE_NOTES:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to add config templates notes'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATE_NOTES:CREATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Config template not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Config template not found'
                  code: 'CONFIG_TEMPLATE_NOTES:CREATE:TEMPLATE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Config template not found'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATE_NOTES:CREATE:TEMPLATE_NOT_FOUND'
      tags:
        - 'Config Templates Notes'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                note:
                  type: string
                  description: 'Note text.'
                  example: 'Eaque id sed sunt quidem ipsam.'
    parameters:
      -
        in: path
        name: id
        description: 'Config template ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/config/templates/{id}/notes/{noteId}':
    get:
      summary: 'Get config template note'
      operationId: getConfigTemplateNote
      description: 'Returns single config template note in response.'
      parameters:
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>author</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  template_id: 8
                  user_id: 103
                  note: 'Maxime excepturi ut voluptatem rem velit ratione.'
                  created_at: '2025-12-10T12:00:03.000000Z'
                  updated_at: '2025-12-10T12:00:03.000000Z'
                  author:
                    id: 103
                    mrn: Z2LES9OP1765368003
                    name: 'Arvilla Crist'
                    email: 1765368003rpagac@example.com
                    language: en
                    phone: 253.205.1521
                    phone_country: LV
                    phone_verified_at: null
                    address1: '7291 Darius Viaduct'
                    address2: 'North Korbin, NE 92709-4991'
                    postal_code: '49366'
                    city: 'Runte, Davis and Greenfelder'
                    clinic_name: 'East Luella'
                    clinic_location: "736 Lorine Points Suite 190\nHansside, AZ 57018-4417"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:03.000000Z'
                    updated_at: '2025-12-10T12:00:03.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                properties:
                  id:
                    type: integer
                    example: 3
                  template_id:
                    type: integer
                    example: 8
                  user_id:
                    type: integer
                    example: 103
                  note:
                    type: string
                    example: 'Maxime excepturi ut voluptatem rem velit ratione.'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:03.000000Z'
                  author:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 103
                      mrn:
                        type: string
                        example: Z2LES9OP1765368003
                      name:
                        type: string
                        example: 'Arvilla Crist'
                      email:
                        type: string
                        example: 1765368003rpagac@example.com
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 253.205.1521
                      phone_country:
                        type: string
                        example: LV
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '7291 Darius Viaduct'
                      address2:
                        type: string
                        example: 'North Korbin, NE 92709-4991'
                      postal_code:
                        type: string
                        example: '49366'
                      city:
                        type: string
                        example: 'Runte, Davis and Greenfelder'
                      clinic_name:
                        type: string
                        example: 'East Luella'
                      clinic_location:
                        type: string
                        example: "736 Lorine Points Suite 190\nHansside, AZ 57018-4417"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:03.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:03.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to access config templates notes'
                  code: 'CONFIG_TEMPLATE_NOTES:GET:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to access config templates notes'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATE_NOTES:GET:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Config template not found'
                    type: object
                    example:
                      message: 'Config template not found'
                      code: 'CONFIG_TEMPLATE_NOTES:GET:TEMPLATE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config template not found'
                      code:
                        type: string
                        example: 'CONFIG_TEMPLATE_NOTES:GET:TEMPLATE_NOT_FOUND'
                  -
                    description: 'Config template note not found'
                    type: object
                    example:
                      message: 'Config template note not found'
                      code: 'CONFIG_TEMPLATE_NOTES:GET:NOTE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config template note not found'
                      code:
                        type: string
                        example: 'CONFIG_TEMPLATE_NOTES:GET:NOTE_NOT_FOUND'
      tags:
        - 'Config Templates Notes'
    delete:
      summary: 'Delete config template note'
      operationId: deleteConfigTemplateNote
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Config template note deleted'
                  code: 'CONFIG_TEMPLATE_NOTES:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Config template note deleted'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATE_NOTES:DELETE:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to delete config templates notes'
                  code: 'CONFIG_TEMPLATE_NOTES:DELETE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to delete config templates notes'
                  code:
                    type: string
                    example: 'CONFIG_TEMPLATE_NOTES:DELETE:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Config template not found'
                    type: object
                    example:
                      message: 'Config template not found'
                      code: 'CONFIG_TEMPLATE_NOTES:DELETE:TEMPLATE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config template not found'
                      code:
                        type: string
                        example: 'CONFIG_TEMPLATE_NOTES:DELETE:TEMPLATE_NOT_FOUND'
                  -
                    description: 'Config template note not found'
                    type: object
                    example:
                      message: 'Config template note not found'
                      code: 'CONFIG_TEMPLATE_NOTES:DELETE:NOTE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Config template note not found'
                      code:
                        type: string
                        example: 'CONFIG_TEMPLATE_NOTES:DELETE:NOTE_NOT_FOUND'
      tags:
        - 'Config Templates Notes'
    parameters:
      -
        in: path
        name: id
        description: 'Config template ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: noteId
        description: 'Config template note ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/custom-grips-templates:
    get:
      summary: 'List custom grips templates'
      operationId: listCustomGripsTemplates
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      user_id: 255
                      name: yvolkman
                      initial_position: '[50, 50, 50, 50, 50]'
                      limit_position: '[900, 900, 900, 900, 900]'
                      active_fingers: '[0, 1, 1, 1, 1]'
                      created_at: '2025-12-10T12:00:16.000000Z'
                      updated_at: '2025-12-10T12:00:16.000000Z'
                    -
                      id: 2
                      user_id: 256
                      name: owaelchi
                      initial_position: '[50, 50, 50, 50, 50]'
                      limit_position: '[900, 900, 900, 900, 900]'
                      active_fingers: '[0, 1, 1, 1, 1]'
                      created_at: '2025-12-10T12:00:16.000000Z'
                      updated_at: '2025-12-10T12:00:16.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        user_id: 255
                        name: yvolkman
                        initial_position: '[50, 50, 50, 50, 50]'
                        limit_position: '[900, 900, 900, 900, 900]'
                        active_fingers: '[0, 1, 1, 1, 1]'
                        created_at: '2025-12-10T12:00:16.000000Z'
                        updated_at: '2025-12-10T12:00:16.000000Z'
                      -
                        id: 2
                        user_id: 256
                        name: owaelchi
                        initial_position: '[50, 50, 50, 50, 50]'
                        limit_position: '[900, 900, 900, 900, 900]'
                        active_fingers: '[0, 1, 1, 1, 1]'
                        created_at: '2025-12-10T12:00:16.000000Z'
                        updated_at: '2025-12-10T12:00:16.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        user_id:
                          type: integer
                          example: 255
                        name:
                          type: string
                          example: yvolkman
                        initial_position:
                          type: string
                          example: '[50, 50, 50, 50, 50]'
                        limit_position:
                          type: string
                          example: '[900, 900, 900, 900, 900]'
                        active_fingers:
                          type: string
                          example: '[0, 1, 1, 1, 1]'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:16.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:16.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage custom grips templates'
                  code: 'CUSTOM_GRIPS_TEMPLATES:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage custom grips templates'
                  code:
                    type: string
                    example: 'CUSTOM_GRIPS_TEMPLATES:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - 'Custom Grips'
    post:
      summary: 'Create custom grip template'
      operationId: createCustomGripTemplate
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  user_id: 257
                  name: randi.jast
                  initial_position: '[50, 50, 50, 50, 50]'
                  limit_position: '[900, 900, 900, 900, 900]'
                  active_fingers: '[0, 1, 1, 1, 1]'
                  created_at: '2025-12-10T12:00:16.000000Z'
                  updated_at: '2025-12-10T12:00:16.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  user_id:
                    type: integer
                    example: 257
                  name:
                    type: string
                    example: randi.jast
                  initial_position:
                    type: string
                    example: '[50, 50, 50, 50, 50]'
                  limit_position:
                    type: string
                    example: '[900, 900, 900, 900, 900]'
                  active_fingers:
                    type: string
                    example: '[0, 1, 1, 1, 1]'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:16.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:16.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to manage custom grips templates'
                      code: 'CUSTOM_GRIPS_TEMPLATES:CREATE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to manage custom grips templates'
                      code:
                        type: string
                        example: 'CUSTOM_GRIPS_TEMPLATES:CREATE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Custom grip template name in use'
                    type: object
                    example:
                      message: 'Custom grip template name already in use'
                      code: 'CUSTOM_GRIPS_TEMPLATES:CREATE:NAME_IN_USE'
                    properties:
                      message:
                        type: string
                        example: 'Custom grip template name already in use'
                      code:
                        type: string
                        example: 'CUSTOM_GRIPS_TEMPLATES:CREATE:NAME_IN_USE'
      tags:
        - 'Custom Grips'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of custom grip template.'
                  example: 'Custom Grip Template 1'
                initial_position:
                  type: string
                  description: 'Grip initial position. Value should be a string containing the array of values. Example: <code>"[50, 50, 50, 50, 50]"</code>. Must start with one of <code>[</code> Must end with one of <code>]</code>.'
                  example: '[50, 50, 50, 50, 50]'
                limit_position:
                  type: string
                  description: 'Grip limit position. Value should be a string containing the array of values. Example: <code>"[900, 900, 900, 900, 900]"</code>. Must start with one of <code>[</code> Must end with one of <code>]</code>.'
                  example: '[900, 900, 900, 900, 900]'
                active_fingers:
                  type: string
                  description: 'Grip active fingers. Value should be a string containing the array of values. Example: <code>"[0, 1, 1, 1, 1]"</code>. Must start with one of <code>[</code> Must end with one of <code>]</code>.'
                  example: '[0, 1, 1, 1, 1]'
              required:
                - name
                - initial_position
                - limit_position
                - active_fingers
  '/api/custom-grips-templates/{id}':
    delete:
      summary: 'Delete custom grip template'
      operationId: deleteCustomGripTemplate
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Custom grip deleted'
                  code: 'CUSTOM_GRIPS_TEMPLATES:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Custom grip deleted'
                  code:
                    type: string
                    example: 'CUSTOM_GRIPS_TEMPLATES:DELETE:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage custom grips templates'
                  code: 'CUSTOM_GRIPS_TEMPLATES:DELETE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage custom grips templates'
                  code:
                    type: string
                    example: 'CUSTOM_GRIPS_TEMPLATES:DELETE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Custom grip template not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Custom grip template not found'
                  code: 'CUSTOM_GRIPS_TEMPLATES:DELETE:TEMPLATE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Custom grip template not found'
                  code:
                    type: string
                    example: 'CUSTOM_GRIPS_TEMPLATES:DELETE:TEMPLATE_NOT_FOUND'
      tags:
        - 'Custom Grips'
    parameters:
      -
        in: path
        name: id
        description: 'Custom Grip Template ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/custom-grips':
    get:
      summary: 'List custom grips'
      operationId: listCustomGrips
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      device_id: 129
                      name: znienow
                      opposed: 1
                      grip_number: 0
                      created_at: '2025-12-10T12:00:16.000000Z'
                      updated_at: '2025-12-10T12:00:16.000000Z'
                    -
                      id: 2
                      device_id: 130
                      name: pfannerstill.bart
                      opposed: 1
                      grip_number: 0
                      created_at: '2025-12-10T12:00:16.000000Z'
                      updated_at: '2025-12-10T12:00:16.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        device_id: 129
                        name: znienow
                        opposed: 1
                        grip_number: 0
                        created_at: '2025-12-10T12:00:16.000000Z'
                        updated_at: '2025-12-10T12:00:16.000000Z'
                      -
                        id: 2
                        device_id: 130
                        name: pfannerstill.bart
                        opposed: 1
                        grip_number: 0
                        created_at: '2025-12-10T12:00:16.000000Z'
                        updated_at: '2025-12-10T12:00:16.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        device_id:
                          type: integer
                          example: 129
                        name:
                          type: string
                          example: znienow
                        opposed:
                          type: integer
                          example: 1
                        grip_number:
                          type: integer
                          example: 0
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:16.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:16.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view custom grips'
                  code: 'CUSTOM_GRIPS:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view custom grips'
                  code:
                    type: string
                    example: 'CUSTOM_GRIPS:LIST:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'CUSTOM_GRIPS:LIST:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'CUSTOM_GRIPS:LIST:DEVICE_NOT_FOUND'
      tags:
        - 'Custom Grips'
    post:
      summary: 'Create custom grip'
      operationId: createCustomGrip
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  device_id: 131
                  name: vernie.orn
                  opposed: 1
                  grip_number: 0
                  created_at: '2025-12-10T12:00:16.000000Z'
                  updated_at: '2025-12-10T12:00:16.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  device_id:
                    type: integer
                    example: 131
                  name:
                    type: string
                    example: vernie.orn
                  opposed:
                    type: integer
                    example: 1
                  grip_number:
                    type: integer
                    example: 0
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:16.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:16.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to manage custom grips'
                      code: 'CUSTOM_GRIPS:CREATE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to manage custom grips'
                      code:
                        type: string
                        example: 'CUSTOM_GRIPS:CREATE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Custom grip name in use'
                    type: object
                    example:
                      message: 'Custom grip name already in use'
                      code: 'CUSTOM_GRIPS:CREATE:NAME_IN_USE'
                    properties:
                      message:
                        type: string
                        example: 'Custom grip name already in use'
                      code:
                        type: string
                        example: 'CUSTOM_GRIPS:CREATE:NAME_IN_USE'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'CUSTOM_GRIPS:CREATE:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'CUSTOM_GRIPS:CREATE:DEVICE_NOT_FOUND'
      tags:
        - 'Custom Grips'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of custom grip.'
                  example: 'Custom Grip 1'
                opposed:
                  type: boolean
                  description: 'Grip opposed status.'
                  example: true
                grip_number:
                  type: integer
                  description: 'Grip number (not ID).'
                  example: 1
              required:
                - name
                - opposed
                - grip_number
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{deviceId}/custom-grips/{gripId}':
    put:
      summary: 'Update custom grip'
      operationId: updateCustomGrip
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  device_id: 132
                  name: kiehn.april
                  opposed: 1
                  grip_number: 0
                  created_at: '2025-12-10T12:00:16.000000Z'
                  updated_at: '2025-12-10T12:00:16.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  device_id:
                    type: integer
                    example: 132
                  name:
                    type: string
                    example: kiehn.april
                  opposed:
                    type: integer
                    example: 1
                  grip_number:
                    type: integer
                    example: 0
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:16.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:16.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to manage custom grips'
                      code: 'CUSTOM_GRIPS:UPDATE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to manage custom grips'
                      code:
                        type: string
                        example: 'CUSTOM_GRIPS:UPDATE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Custom grip name in use'
                    type: object
                    example:
                      message: 'Custom grip name already in use'
                      code: 'CUSTOM_GRIPS:UPDATE:NAME_IN_USE'
                    properties:
                      message:
                        type: string
                        example: 'Custom grip name already in use'
                      code:
                        type: string
                        example: 'CUSTOM_GRIPS:UPDATE:NAME_IN_USE'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CUSTOM_GRIPS:UPDATE:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CUSTOM_GRIPS:UPDATE:DEVICE_NOT_FOUND'
                  -
                    description: 'Custom grip not found'
                    type: object
                    example:
                      message: 'Custom grip not found'
                      code: 'CUSTOM_GRIPS:UPDATE:GRIP_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Custom grip not found'
                      code:
                        type: string
                        example: 'CUSTOM_GRIPS:UPDATE:GRIP_NOT_FOUND'
      tags:
        - 'Custom Grips'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of custom grip.'
                  example: 'Custom Grip 1'
                opposed:
                  type: boolean
                  description: 'Grip opposed status.'
                  example: true
                grip_number:
                  type: integer
                  description: 'Grip number (not ID).'
                  example: 1
    delete:
      summary: 'Delete custom grip'
      operationId: deleteCustomGrip
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Custom grip template deleted'
                  code: 'CUSTOM_GRIPS:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Custom grip template deleted'
                  code:
                    type: string
                    example: 'CUSTOM_GRIPS:DELETE:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage custom grips'
                  code: 'CUSTOM_GRIPS:DELETE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage custom grips'
                  code:
                    type: string
                    example: 'CUSTOM_GRIPS:DELETE:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'CUSTOM_GRIPS:DELETE:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'CUSTOM_GRIPS:DELETE:DEVICE_NOT_FOUND'
                  -
                    description: 'Custom grip not found'
                    type: object
                    example:
                      message: 'Custom grip not found'
                      code: 'CUSTOM_GRIPS:DELETE:GRIP_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Custom grip not found'
                      code:
                        type: string
                        example: 'CUSTOM_GRIPS:DELETE:GRIP_NOT_FOUND'
      tags:
        - 'Custom Grips'
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: gripId
        description: 'Custom Grip ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/devices/models:
    get:
      summary: 'Get device models list'
      operationId: getDeviceModelsList
      description: ''
      parameters:
        -
          in: query
          name: active
          description: 'Filter device models by active status (available: 0 - only inactive, 1 - only active, any - all users). Default: 1.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter device models by active status (available: 0 - only inactive, 1 - only active, any - all users). Default: 1.'
            example: 1
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 3
                    name:
                      type: string
                      example: 'Zeus hand v1'
                    type:
                      type: string
                      example: leg
                    orientation:
                      type: string
                      example: right
                    active:
                      type: integer
                      example: 1
                    created_at:
                      type: string
                      example: '2025-12-10T11:59:57.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T11:59:57.000000Z'
                example:
                  -
                    id: 3
                    name: 'Zeus hand v1'
                    type: leg
                    orientation: right
                    active: 1
                    created_at: '2025-12-10T11:59:57.000000Z'
                    updated_at: '2025-12-10T11:59:57.000000Z'
                  -
                    id: 4
                    name: 'Zeus hand v1'
                    type: arm
                    orientation: right
                    active: 1
                    created_at: '2025-12-10T11:59:57.000000Z'
                    updated_at: '2025-12-10T11:59:57.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list device models'
                  code: 'DEVICE_MODELS:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list device models'
                  code:
                    type: string
                    example: 'DEVICE_MODELS:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - 'Device Models'
    post:
      summary: 'Create device model'
      operationId: createDeviceModel
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 5
                  name: 'Zeus hand v1'
                  type: arm
                  orientation: left
                  active: 1
                  created_at: '2025-12-10T11:59:57.000000Z'
                  updated_at: '2025-12-10T11:59:57.000000Z'
                properties:
                  id:
                    type: integer
                    example: 5
                  name:
                    type: string
                    example: 'Zeus hand v1'
                  type:
                    type: string
                    example: arm
                  orientation:
                    type: string
                    example: left
                  active:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to create device model'
                  code: 'DEVICE_MODELS:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to create device model'
                  code:
                    type: string
                    example: 'DEVICE_MODELS:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - 'Device Models'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Model name.'
                  example: 'Zeus hand v1'
                type:
                  type: string
                  description: 'Model type (e.g. hand).'
                  example: hand
                orientation:
                  type: string
                  description: 'Model orientation if specified.'
                  example: right
                active:
                  type: boolean
                  description: 'Device model active status (0 - inactive, 1 - active).'
                  example: true
              required:
                - name
  '/api/devices/models/{id}':
    put:
      summary: 'Update device model'
      operationId: updateDeviceModel
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 6
                  name: 'Zeus hand v1'
                  type: leg
                  orientation: right
                  active: 1
                  created_at: '2025-12-10T11:59:57.000000Z'
                  updated_at: '2025-12-10T11:59:57.000000Z'
                properties:
                  id:
                    type: integer
                    example: 6
                  name:
                    type: string
                    example: 'Zeus hand v1'
                  type:
                    type: string
                    example: leg
                  orientation:
                    type: string
                    example: right
                  active:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update device model'
                  code: 'DEVICE_MODELS:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update device model'
                  code:
                    type: string
                    example: 'DEVICE_MODELS:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device model not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device model not found'
                  code: 'DEVICE_MODELS:UPDATE:MODEL_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device model not found'
                  code:
                    type: string
                    example: 'DEVICE_MODELS:UPDATE:MODEL_NOT_FOUND'
      tags:
        - 'Device Models'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Model name.'
                  example: 'Zeus hand v1'
                type:
                  type: string
                  description: 'Model type (e.g. hand).'
                  example: hand
                orientation:
                  type: string
                  description: 'Model orientation if specified.'
                  example: left
                active:
                  type: boolean
                  description: 'Device model active status (0 - inactive, 1 - active).'
                  example: true
    parameters:
      -
        in: path
        name: id
        description: 'DeviceModel ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/check/{serial}':
    get:
      summary: 'Check serial number or bluetooth ID'
      operationId: checkSerialNumberOrBluetoothID
      description: "Public endpoint responding with status of given device serial number or bluetooth ID.\n\t\tIf any of these numbers can be found in database, status will be true.\n\t\tOtherwise, status will be false (device does not exist)."
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                properties:
                  status:
                    type: boolean
                    example: true
      tags:
        - Devices
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: 'Type of checked identifier.'
                  example: serial
                  enum:
                    - serial
                    - bluetooth_id
      security: []
    parameters:
      -
        in: path
        name: serial
        description: 'Device serial number or bluetooth ID.'
        example: S3R1AL-NUM83R
        required: true
        schema:
          type: string
  /api/devices:
    get:
      summary: 'Get devices list'
      operationId: getDevicesList
      description: "Possible extend options:\n\t\t<ul>\n\t\t\t<li>model - device model details</li>\n\t\t\t<li>amputee - end-user assigned to device</li>\n\t\t\t<li>clinicians - list of clinicians assigned to the device</li>\n\t\t\t<li>firmwareVersion - device firmware version</li>\n\t\t\t<li>pcbVersion - PCB version</li>\n\t\t</ul>"
      parameters:
        -
          in: query
          name: search
          description: 'Filter devices by searching in: serial number, bluetooth ID.'
          example: S3R1AL-NUM83R
          required: false
          schema:
            type: string
            description: 'Filter devices by searching in: serial number, bluetooth ID.'
            example: S3R1AL-NUM83R
        -
          in: query
          name: active
          description: 'Filter devices by active status (available: 0 - only inactive, 1 - only active, -1 - all users). Default: 1.'
          example: -1
          required: false
          schema:
            type: integer
            description: 'Filter devices by active status (available: 0 - only inactive, 1 - only active, -1 - all users). Default: 1.'
            example: -1
        -
          in: query
          name: amputee
          description: "Filter devices by amputees.\n\t\tProvide single ID (<code>amputee=1</code>), array of IDs (<code>amputee[]=1&amputee[]=2</code>) or comma-separated list of IDs (<code>amputee=1,2</code>).\n\t\tPass value 0 to get devices unassigned to any amputee."
          example: 1
          required: false
          schema:
            type: string
            description: "Filter devices by amputees.\n\t\tProvide single ID (<code>amputee=1</code>), array of IDs (<code>amputee[]=1&amputee[]=2</code>) or comma-separated list of IDs (<code>amputee=1,2</code>).\n\t\tPass value 0 to get devices unassigned to any amputee."
            example: 1
        -
          in: query
          name: clinician
          description: "Filter devices by clinicians.\n\t\tProvide single ID (<code>clinician=1</code>), array of IDs (<code>clinician[]=1&clinician[]=2</code>) or comma-separated list of IDs (<code>clinician=1,2</code>).\n\t\tPass value 0 to get devices unassigned to any clinician."
          example: 1
          required: false
          schema:
            type: string
            description: "Filter devices by clinicians.\n\t\tProvide single ID (<code>clinician=1</code>), array of IDs (<code>clinician[]=1&clinician[]=2</code>) or comma-separated list of IDs (<code>clinician=1,2</code>).\n\t\tPass value 0 to get devices unassigned to any clinician."
            example: 1
        -
          in: query
          name: model
          description: "Filter devices by device models.\n\t\tProvide single ID (<code>model=1</code>), array of IDs (<code>model[]=1&model[]=2</code>) or comma-separated list of IDs (<code>model=1,2</code>).\n\t\tPass value 0 to get devices without model."
          example: 1
          required: false
          schema:
            type: string
            description: "Filter devices by device models.\n\t\tProvide single ID (<code>model=1</code>), array of IDs (<code>model[]=1&model[]=2</code>) or comma-separated list of IDs (<code>model=1,2</code>).\n\t\tPass value 0 to get devices without model."
            example: 1
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>model</code>, <code>amputee</code>, <code>clinicians</code>, <code>firmwareVersion</code>, <code>pcbVersion</code>, <code>config</code>, <code>joinedElectrodes</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>model</code>, <code>amputee</code>, <code>clinicians</code>, <code>firmwareVersion</code>, <code>pcbVersion</code>, <code>config</code>, <code>joinedElectrodes</code>).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>serial</code>, <code>amputee_name</code>, <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>serial</code>, <code>amputee_name</code>, <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 5
                      serial: cd21d58f-9788-361f-87b8-86ef6108be01
                      bluetooth_id: 792c2aeb-3a82-3595-bb77-31e72bc97b94
                      company_id: null
                      model_id: 7
                      amputee_id: 34
                      clinician_id: null
                      firmware_version_id: null
                      pcb_version_id: null
                      reverse_magnets: 0
                      is_electrode: 0
                      active: 1
                      last_activity_at: '0000-00-00 00:00:00'
                      created_at: '2025-12-10T11:59:57.000000Z'
                      updated_at: '2025-12-10T11:59:57.000000Z'
                      model:
                        id: 7
                        name: 'Zeus hand v1'
                        type: leg
                        orientation: right
                        active: 1
                        created_at: '2025-12-10T11:59:57.000000Z'
                        updated_at: '2025-12-10T11:59:57.000000Z'
                      amputee:
                        id: 34
                        mrn: 9KKZ8TDU1765367997
                        name: 'Emiliano Brakus'
                        email: 1765367997buster23@example.com
                        language: en
                        phone: 1-559-918-2074
                        phone_country: YT
                        phone_verified_at: null
                        address1: '193 Florian Key Apt. 342'
                        address2: 'New Garnett, FL 61970-6614'
                        postal_code: '27360'
                        city: Lynch-Gleichner
                        clinic_name: 'North Yvette'
                        clinic_location: "420 Lakin Mission\nNorth Jared, ME 74246-0358"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T11:59:57.000000Z'
                        updated_at: '2025-12-10T11:59:57.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                    -
                      id: 6
                      serial: 00b3f9ba-3c41-377a-9124-8163111e8417
                      bluetooth_id: 1fd5b810-f2b6-3210-ae4d-ffe260776e2b
                      company_id: null
                      model_id: 8
                      amputee_id: 35
                      clinician_id: null
                      firmware_version_id: null
                      pcb_version_id: null
                      reverse_magnets: 0
                      is_electrode: 0
                      active: 1
                      last_activity_at: '0000-00-00 00:00:00'
                      created_at: '2025-12-10T11:59:57.000000Z'
                      updated_at: '2025-12-10T11:59:57.000000Z'
                      model:
                        id: 8
                        name: 'Zeus hand v1'
                        type: leg
                        orientation: right
                        active: 1
                        created_at: '2025-12-10T11:59:57.000000Z'
                        updated_at: '2025-12-10T11:59:57.000000Z'
                      amputee:
                        id: 35
                        mrn: JH3FTE9Q1765367997
                        name: 'Margarett Parker II'
                        email: 1765367997thomas19@example.org
                        language: en
                        phone: 936-402-8606
                        phone_country: KZ
                        phone_verified_at: null
                        address1: '69297 Adams Lock'
                        address2: 'Lake Elwinside, VT 87850-5951'
                        postal_code: '19358'
                        city: 'Dicki, Hamill and Boehm'
                        clinic_name: Porterstad
                        clinic_location: "71796 Wilson Inlet\nConnellyshire, RI 30759"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T11:59:57.000000Z'
                        updated_at: '2025-12-10T11:59:57.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 5
                        serial: cd21d58f-9788-361f-87b8-86ef6108be01
                        bluetooth_id: 792c2aeb-3a82-3595-bb77-31e72bc97b94
                        company_id: null
                        model_id: 7
                        amputee_id: 34
                        clinician_id: null
                        firmware_version_id: null
                        pcb_version_id: null
                        reverse_magnets: 0
                        is_electrode: 0
                        active: 1
                        last_activity_at: '0000-00-00 00:00:00'
                        created_at: '2025-12-10T11:59:57.000000Z'
                        updated_at: '2025-12-10T11:59:57.000000Z'
                        model:
                          id: 7
                          name: 'Zeus hand v1'
                          type: leg
                          orientation: right
                          active: 1
                          created_at: '2025-12-10T11:59:57.000000Z'
                          updated_at: '2025-12-10T11:59:57.000000Z'
                        amputee:
                          id: 34
                          mrn: 9KKZ8TDU1765367997
                          name: 'Emiliano Brakus'
                          email: 1765367997buster23@example.com
                          language: en
                          phone: 1-559-918-2074
                          phone_country: YT
                          phone_verified_at: null
                          address1: '193 Florian Key Apt. 342'
                          address2: 'New Garnett, FL 61970-6614'
                          postal_code: '27360'
                          city: Lynch-Gleichner
                          clinic_name: 'North Yvette'
                          clinic_location: "420 Lakin Mission\nNorth Jared, ME 74246-0358"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T11:59:57.000000Z'
                          updated_at: '2025-12-10T11:59:57.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                      -
                        id: 6
                        serial: 00b3f9ba-3c41-377a-9124-8163111e8417
                        bluetooth_id: 1fd5b810-f2b6-3210-ae4d-ffe260776e2b
                        company_id: null
                        model_id: 8
                        amputee_id: 35
                        clinician_id: null
                        firmware_version_id: null
                        pcb_version_id: null
                        reverse_magnets: 0
                        is_electrode: 0
                        active: 1
                        last_activity_at: '0000-00-00 00:00:00'
                        created_at: '2025-12-10T11:59:57.000000Z'
                        updated_at: '2025-12-10T11:59:57.000000Z'
                        model:
                          id: 8
                          name: 'Zeus hand v1'
                          type: leg
                          orientation: right
                          active: 1
                          created_at: '2025-12-10T11:59:57.000000Z'
                          updated_at: '2025-12-10T11:59:57.000000Z'
                        amputee:
                          id: 35
                          mrn: JH3FTE9Q1765367997
                          name: 'Margarett Parker II'
                          email: 1765367997thomas19@example.org
                          language: en
                          phone: 936-402-8606
                          phone_country: KZ
                          phone_verified_at: null
                          address1: '69297 Adams Lock'
                          address2: 'Lake Elwinside, VT 87850-5951'
                          postal_code: '19358'
                          city: 'Dicki, Hamill and Boehm'
                          clinic_name: Porterstad
                          clinic_location: "71796 Wilson Inlet\nConnellyshire, RI 30759"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T11:59:57.000000Z'
                          updated_at: '2025-12-10T11:59:57.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 5
                        serial:
                          type: string
                          example: cd21d58f-9788-361f-87b8-86ef6108be01
                        bluetooth_id:
                          type: string
                          example: 792c2aeb-3a82-3595-bb77-31e72bc97b94
                        company_id:
                          type: string
                          example: null
                        model_id:
                          type: integer
                          example: 7
                        amputee_id:
                          type: integer
                          example: 34
                        clinician_id:
                          type: string
                          example: null
                        firmware_version_id:
                          type: string
                          example: null
                        pcb_version_id:
                          type: string
                          example: null
                        reverse_magnets:
                          type: integer
                          example: 0
                        is_electrode:
                          type: integer
                          example: 0
                        active:
                          type: integer
                          example: 1
                        last_activity_at:
                          type: string
                          example: '0000-00-00 00:00:00'
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:57.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:57.000000Z'
                        model:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 7
                            name:
                              type: string
                              example: 'Zeus hand v1'
                            type:
                              type: string
                              example: leg
                            orientation:
                              type: string
                              example: right
                            active:
                              type: integer
                              example: 1
                            created_at:
                              type: string
                              example: '2025-12-10T11:59:57.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T11:59:57.000000Z'
                        amputee:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 34
                            mrn:
                              type: string
                              example: 9KKZ8TDU1765367997
                            name:
                              type: string
                              example: 'Emiliano Brakus'
                            email:
                              type: string
                              example: 1765367997buster23@example.com
                            language:
                              type: string
                              example: en
                            phone:
                              type: string
                              example: 1-559-918-2074
                            phone_country:
                              type: string
                              example: YT
                            phone_verified_at:
                              type: string
                              example: null
                            address1:
                              type: string
                              example: '193 Florian Key Apt. 342'
                            address2:
                              type: string
                              example: 'New Garnett, FL 61970-6614'
                            postal_code:
                              type: string
                              example: '27360'
                            city:
                              type: string
                              example: Lynch-Gleichner
                            clinic_name:
                              type: string
                              example: 'North Yvette'
                            clinic_location:
                              type: string
                              example: "420 Lakin Mission\nNorth Jared, ME 74246-0358"
                            image:
                              type: string
                              example: null
                            mfa_enabled:
                              type: integer
                              example: 0
                            mfa_method:
                              type: string
                              example: null
                            mfa_verified_to:
                              type: string
                              example: null
                            location_id:
                              type: string
                              example: null
                            created_by:
                              type: string
                              example: null
                            active:
                              type: integer
                              example: 1
                            notifications_timezone:
                              type: string
                              example: null
                            notifications_at:
                              type: string
                              example: null
                            created_at:
                              type: string
                              example: '2025-12-10T11:59:57.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T11:59:57.000000Z'
                            invitation_status:
                              type: string
                              example: null
                            acadle_invitation_status:
                              type: string
                              example: null
                            roles:
                              type: array
                              example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list devices'
                  code: 'DEVICES:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list devices'
                  code:
                    type: string
                    example: 'DEVICES:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - Devices
  '/api/device/{id}':
    get:
      summary: 'Get device information'
      operationId: getDeviceInformation
      description: ''
      parameters:
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>model</code>, <code>amputee</code>, <code>firmwareVersion</code>, <code>pcbVersion</code>, <code>clinicians</code>, <code>joinedElectrodes</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>model</code>, <code>amputee</code>, <code>firmwareVersion</code>, <code>pcbVersion</code>, <code>clinicians</code>, <code>joinedElectrodes</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 7
                  serial: d89bf693-5b30-38e3-a00e-8aa8faae69b3
                  bluetooth_id: 79361b50-5900-336b-b5bf-06870dac064a
                  company_id: null
                  model_id: 9
                  amputee_id: 36
                  clinician_id: null
                  firmware_version_id: 1
                  pcb_version_id: 1
                  reverse_magnets: 0
                  is_electrode: 0
                  active: 1
                  last_activity_at: '0000-00-00 00:00:00'
                  created_at: '2025-12-10T11:59:57.000000Z'
                  updated_at: '2025-12-10T11:59:57.000000Z'
                  model:
                    id: 9
                    name: 'Zeus hand v1'
                    type: leg
                    orientation: right
                    active: 1
                    created_at: '2025-12-10T11:59:57.000000Z'
                    updated_at: '2025-12-10T11:59:57.000000Z'
                  amputee:
                    id: 36
                    mrn: ZA6BX0I81765367997
                    name: 'Prof. Carlee Weber Sr.'
                    email: 1765367997olarkin@example.com
                    language: en
                    phone: 281-841-9138
                    phone_country: RO
                    phone_verified_at: null
                    address1: '34989 Spinka Ports Suite 306'
                    address2: 'Isacmouth, WI 36201-5015'
                    postal_code: '39974'
                    city: Brown-Muller
                    clinic_name: 'Port Kirkshire'
                    clinic_location: "8412 Fannie Forge\nSouth Madalynbury, NM 59710-2035"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T11:59:57.000000Z'
                    updated_at: '2025-12-10T11:59:57.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  pcb_version:
                    id: 1
                    name: 5.5.70
                    model_id: null
                    hardware_id: ''
                    created_at: '2025-12-10T11:59:57.000000Z'
                    updated_at: '2025-12-10T11:59:57.000000Z'
                properties:
                  id:
                    type: integer
                    example: 7
                  serial:
                    type: string
                    example: d89bf693-5b30-38e3-a00e-8aa8faae69b3
                  bluetooth_id:
                    type: string
                    example: 79361b50-5900-336b-b5bf-06870dac064a
                  company_id:
                    type: string
                    example: null
                  model_id:
                    type: integer
                    example: 9
                  amputee_id:
                    type: integer
                    example: 36
                  clinician_id:
                    type: string
                    example: null
                  firmware_version_id:
                    type: integer
                    example: 1
                  pcb_version_id:
                    type: integer
                    example: 1
                  reverse_magnets:
                    type: integer
                    example: 0
                  is_electrode:
                    type: integer
                    example: 0
                  active:
                    type: integer
                    example: 1
                  last_activity_at:
                    type: string
                    example: '0000-00-00 00:00:00'
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
                  model:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 9
                      name:
                        type: string
                        example: 'Zeus hand v1'
                      type:
                        type: string
                        example: leg
                      orientation:
                        type: string
                        example: right
                      active:
                        type: integer
                        example: 1
                      created_at:
                        type: string
                        example: '2025-12-10T11:59:57.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T11:59:57.000000Z'
                  amputee:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 36
                      mrn:
                        type: string
                        example: ZA6BX0I81765367997
                      name:
                        type: string
                        example: 'Prof. Carlee Weber Sr.'
                      email:
                        type: string
                        example: 1765367997olarkin@example.com
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 281-841-9138
                      phone_country:
                        type: string
                        example: RO
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '34989 Spinka Ports Suite 306'
                      address2:
                        type: string
                        example: 'Isacmouth, WI 36201-5015'
                      postal_code:
                        type: string
                        example: '39974'
                      city:
                        type: string
                        example: Brown-Muller
                      clinic_name:
                        type: string
                        example: 'Port Kirkshire'
                      clinic_location:
                        type: string
                        example: "8412 Fannie Forge\nSouth Madalynbury, NM 59710-2035"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T11:59:57.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T11:59:57.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  pcb_version:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 5.5.70
                      model_id:
                        type: string
                        example: null
                      hardware_id:
                        type: string
                        example: ''
                      created_at:
                        type: string
                        example: '2025-12-10T11:59:57.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T11:59:57.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view device data'
                  code: 'DEVICES:GET:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view device data'
                  code:
                    type: string
                    example: 'DEVICES:GET:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'DEVICES:GET:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'DEVICES:GET:DEVICE_NOT_FOUND'
      tags:
        - Devices
    put:
      summary: 'Update device'
      operationId: updateDevice
      description: "Amputee of device can update only these fields:\n\t\t<code>serial</code>, <code>bluetooth_id</code>, <code>firmware_version_id</code>, <code>pcb_version_id</code>"
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 9
                  serial: 4edb5d26-667a-308d-8d29-f64965d169e2
                  bluetooth_id: 78ece136-e0de-3b45-8c14-89df52511328
                  company_id: null
                  model_id: null
                  amputee_id: null
                  clinician_id: null
                  firmware_version_id: null
                  pcb_version_id: null
                  reverse_magnets: 0
                  is_electrode: 0
                  active: 1
                  last_activity_at: '0000-00-00 00:00:00'
                  created_at: '2025-12-10T11:59:57.000000Z'
                  updated_at: '2025-12-10T11:59:57.000000Z'
                properties:
                  id:
                    type: integer
                    example: 9
                  serial:
                    type: string
                    example: 4edb5d26-667a-308d-8d29-f64965d169e2
                  bluetooth_id:
                    type: string
                    example: 78ece136-e0de-3b45-8c14-89df52511328
                  company_id:
                    type: string
                    example: null
                  model_id:
                    type: string
                    example: null
                  amputee_id:
                    type: string
                    example: null
                  clinician_id:
                    type: string
                    example: null
                  firmware_version_id:
                    type: string
                    example: null
                  pcb_version_id:
                    type: string
                    example: null
                  reverse_magnets:
                    type: integer
                    example: 0
                  is_electrode:
                    type: integer
                    example: 0
                  active:
                    type: integer
                    example: 1
                  last_activity_at:
                    type: string
                    example: '0000-00-00 00:00:00'
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to update device'
                      code: 'DEVICES:UPDATE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to update device'
                      code:
                        type: string
                        example: 'DEVICES:UPDATE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Firmware has no schema'
                    type: object
                    example:
                      message: 'Cannot update: firmware has no schema'
                      code: 'DEVICES:UPDATE:NO_FIRMWARE_SCHEMA'
                    properties:
                      message:
                        type: string
                        example: 'Cannot update: firmware has no schema'
                      code:
                        type: string
                        example: 'DEVICES:UPDATE:NO_FIRMWARE_SCHEMA'
                  -
                    description: ''
                    type: object
                    example:
                      message: 'Cannot update: no clinicians left for patient relation'
                      code: 'DEVICES:UPDATE:NO_CLINICIANS'
                    properties:
                      message:
                        type: string
                        example: 'Cannot update: no clinicians left for patient relation'
                      code:
                        type: string
                        example: 'DEVICES:UPDATE:NO_CLINICIANS'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'DEVICES:UPDATE:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'DEVICES:UPDATE:DEVICE_NOT_FOUND'
      tags:
        - Devices
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                serial:
                  type: string
                  description: 'Device serial number.'
                  example: S3R1AL-NUM83R
                bluetooth_id:
                  type: string
                  description: 'Device Bluetooth ID.'
                  example: BL0123456789
                model_id:
                  type: string
                  description: 'Device Model ID. The <code>id</code> of an existing record in the App\Models\DeviceModel table.'
                  example: 1
                amputee_id:
                  type: string
                  description: 'Device amputee ID. Pass <code>null</code> to remove assignment. The <code>id</code> of an existing record in the App\Models\User table.'
                  example: 1
                  nullable: true
                clinicians:
                  type: array
                  description: 'Clinician ID. The <code>id</code> of an existing record in the App\Models\User table.'
                  example:
                    - 2
                  items:
                    type: integer
                firmware_version_id:
                  type: string
                  description: 'Firmware Version ID. The <code>id</code> of an existing record in the App\Models\FirmwareVersion table.'
                  example: 1
                  nullable: true
                pcb_version_id:
                  type: string
                  description: 'PCB Version ID. The <code>id</code> of an existing record in the App\Models\PCBVersion table.'
                  example: 1
                  nullable: true
                reverse_magnets:
                  type: boolean
                  description: 'Device reverse magnets. Default: 0.'
                  example: false
                is_electrode:
                  type: boolean
                  description: '<strong>Super Admin only:</strong> Device is electrode. Default: 0.'
                  example: false
                active:
                  type: boolean
                  description: 'Device active status (0 - inactive, 1 - active).'
                  example: true
                last_activity_at:
                  type: string
                  description: 'Device last activity date. Update this value each time device connects to the mobile app. Always shift local datetime to UTC timezone. Must be a valid date in the format <code>Y-m-d H:i:s</code>.'
                  example: '2022-08-15 12:00:00'
    delete:
      summary: 'Delete device'
      operationId: deleteDevice
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device deleted'
                  code: 'DEVICES:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Device deleted'
                  code:
                    type: string
                    example: 'DEVICES:DELETE:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to delete device'
                  code: 'DEVICES:DELETE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to delete device'
                  code:
                    type: string
                    example: 'DEVICES:DELETE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'DEVICES:DELETE:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'DEVICES:DELETE:DEVICE_NOT_FOUND'
      tags:
        - Devices
    parameters:
      -
        in: path
        name: id
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/device:
    post:
      summary: 'Create new device'
      operationId: createNewDevice
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 8
                  serial: 4d923707-8c4d-3a93-8bba-8f321611a58c
                  bluetooth_id: 3338d2f0-4bde-3fdd-9d7d-1c8b1e6541a6
                  company_id: null
                  model_id: null
                  amputee_id: null
                  clinician_id: null
                  firmware_version_id: null
                  pcb_version_id: null
                  reverse_magnets: 0
                  is_electrode: 0
                  active: 1
                  last_activity_at: '0000-00-00 00:00:00'
                  created_at: '2025-12-10T11:59:57.000000Z'
                  updated_at: '2025-12-10T11:59:57.000000Z'
                properties:
                  id:
                    type: integer
                    example: 8
                  serial:
                    type: string
                    example: 4d923707-8c4d-3a93-8bba-8f321611a58c
                  bluetooth_id:
                    type: string
                    example: 3338d2f0-4bde-3fdd-9d7d-1c8b1e6541a6
                  company_id:
                    type: string
                    example: null
                  model_id:
                    type: string
                    example: null
                  amputee_id:
                    type: string
                    example: null
                  clinician_id:
                    type: string
                    example: null
                  firmware_version_id:
                    type: string
                    example: null
                  pcb_version_id:
                    type: string
                    example: null
                  reverse_magnets:
                    type: integer
                    example: 0
                  is_electrode:
                    type: integer
                    example: 0
                  active:
                    type: integer
                    example: 1
                  last_activity_at:
                    type: string
                    example: '0000-00-00 00:00:00'
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to create device'
                      code: 'DEVICES:CREATE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to create device'
                      code:
                        type: string
                        example: 'DEVICES:CREATE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Firmware has no schema'
                    type: object
                    example:
                      message: 'Cannot create: firmware has no schema'
                      code: 'DEVICES:CREATE:NO_FIRMWARE_SCHEMA'
                    properties:
                      message:
                        type: string
                        example: 'Cannot create: firmware has no schema'
                      code:
                        type: string
                        example: 'DEVICES:CREATE:NO_FIRMWARE_SCHEMA'
        500:
          description: 'Server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server error: device not created'
                  code: 'DEVICES:CREATE:SERVER_ERROR'
                properties:
                  message:
                    type: string
                    example: 'Server error: device not created'
                  code:
                    type: string
                    example: 'DEVICES:CREATE:SERVER_ERROR'
      tags:
        - Devices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serial:
                  type: string
                  description: 'Device serial number.'
                  example: S3R1AL-NUM83R
                bluetooth_id:
                  type: string
                  description: 'Device Bluetooth ID.'
                  example: BL0123456789
                model_id:
                  type: string
                  description: 'Device Model ID. The <code>id</code> of an existing record in the App\Models\DeviceModel table.'
                  example: 1
                amputee_id:
                  type: string
                  description: 'Device amputee ID. The <code>id</code> of an existing record in the App\Models\User table.'
                  example: 1
                  nullable: true
                clinicians:
                  type: array
                  description: 'Clinician ID. The <code>id</code> of an existing record in the App\Models\User table.'
                  example:
                    - 2
                  items:
                    type: integer
                firmware_version_id:
                  type: string
                  description: 'Firmware Version ID. The <code>id</code> of an existing record in the App\Models\FirmwareVersion table.'
                  example: 1
                  nullable: true
                pcb_version_id:
                  type: string
                  description: 'PCB Version ID. The <code>id</code> of an existing record in the App\Models\PCBVersion table.'
                  example: 1
                  nullable: true
                reverse_magnets:
                  type: boolean
                  description: 'Device reverse magnets. Default: 0.'
                  example: false
                is_electrode:
                  type: boolean
                  description: '<strong>Super Admin only:</strong> Device is electrode. Default: 0.'
                  example: false
                active:
                  type: boolean
                  description: 'Device active status (0 - inactive, 1 - active).'
                  example: true
                last_activity_at:
                  type: string
                  description: 'Device last activity date. Update this value each time device connects to the mobile app. Always shift local datetime to UTC timezone. Must be a valid date in the format <code>Y-m-d H:i:s</code>.'
                  example: '2022-08-15 12:00:00'
              required:
                - serial
                - bluetooth_id
                - model_id
  '/api/device/{id}/hash':
    get:
      summary: 'Get device hashes'
      operationId: getDeviceHashes
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  hash_global: '123456789012345'
                  hash_common_settings: '123456789012345'
                  hash_common_grips: '123456789012345'
                  hash_mode1: '123456789012345'
                  hash_mode2: '123456789012345'
                  hash_mode3: '123456789012345'
                properties:
                  hash_global:
                    type: string
                    example: '123456789012345'
                  hash_common_settings:
                    type: string
                    example: '123456789012345'
                  hash_common_grips:
                    type: string
                    example: '123456789012345'
                  hash_mode1:
                    type: string
                    example: '123456789012345'
                  hash_mode2:
                    type: string
                    example: '123456789012345'
                  hash_mode3:
                    type: string
                    example: '123456789012345'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to access device hashes'
                  code: 'DEVICES:GET_HASHES:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to access device hashes'
                  code:
                    type: string
                    example: 'DEVICES:GET_HASHES:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'DEVICES:GET_HASHES:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'DEVICES:GET_HASHES:DEVICE_NOT_FOUND'
      tags:
        - Devices
    post:
      summary: 'Update device hashes'
      operationId: updateDeviceHashes
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  hash_global: '123456789012345'
                  hash_common_settings: '123456789012345'
                  hash_common_grips: '123456789012345'
                  hash_mode1: '123456789012345'
                  hash_mode2: '123456789012345'
                  hash_mode3: '123456789012345'
                properties:
                  hash_global:
                    type: string
                    example: '123456789012345'
                  hash_common_settings:
                    type: string
                    example: '123456789012345'
                  hash_common_grips:
                    type: string
                    example: '123456789012345'
                  hash_mode1:
                    type: string
                    example: '123456789012345'
                  hash_mode2:
                    type: string
                    example: '123456789012345'
                  hash_mode3:
                    type: string
                    example: '123456789012345'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to access device hashes'
                  code: 'DEVICES:SET_HASHES:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to access device hashes'
                  code:
                    type: string
                    example: 'DEVICES:SET_HASHES:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'DEVICES:SET_HASHES:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'DEVICES:SET_HASHES:DEVICE_NOT_FOUND'
      tags:
        - Devices
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                hash_global:
                  type: string
                  description: 'Global hash.'
                  example: '123456789012345'
                hash_common_settings:
                  type: string
                  description: 'Common settings hash.'
                  example: '123456789012345'
                hash_common_grips:
                  type: string
                  description: 'Common grips hash.'
                  example: '123456789012345'
                hash_mode1:
                  type: string
                  description: 'Mode 1 hash.'
                  example: '123456789012345'
                hash_mode2:
                  type: string
                  description: 'Mode 2 hash.'
                  example: '123456789012345'
                hash_mode3:
                  type: string
                  description: 'Mode 3 hash.'
                  example: '123456789012345'
    parameters:
      -
        in: path
        name: id
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/{id}/detach':
    post:
      summary: 'Detach device'
      operationId: detachDevice
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device detached'
                  code: 'DEVICES:DETACH:DETACHED'
                properties:
                  message:
                    type: string
                    example: 'Device detached'
                  code:
                    type: string
                    example: 'DEVICES:DETACH:DETACHED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to detach device'
                  code: 'DEVICES:DETACH:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to detach device'
                  code:
                    type: string
                    example: 'DEVICES:DETACH:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'DEVICES:DETACH:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'DEVICES:DETACH:DEVICE_NOT_FOUND'
      tags:
        - Devices
    parameters:
      -
        in: path
        name: id
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/add/{serial}':
    post:
      summary: 'Add device'
      operationId: addDevice
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 10
                  serial: 1a75c393-5ec2-37e1-9561-c012f00f0e17
                  bluetooth_id: 6b85a1cb-cad2-3bb8-9af1-98082b6b8469
                  company_id: null
                  model_id: null
                  amputee_id: null
                  clinician_id: null
                  firmware_version_id: null
                  pcb_version_id: null
                  reverse_magnets: 0
                  is_electrode: 0
                  active: 1
                  last_activity_at: '0000-00-00 00:00:00'
                  created_at: '2025-12-10T11:59:57.000000Z'
                  updated_at: '2025-12-10T11:59:57.000000Z'
                properties:
                  id:
                    type: integer
                    example: 10
                  serial:
                    type: string
                    example: 1a75c393-5ec2-37e1-9561-c012f00f0e17
                  bluetooth_id:
                    type: string
                    example: 6b85a1cb-cad2-3bb8-9af1-98082b6b8469
                  company_id:
                    type: string
                    example: null
                  model_id:
                    type: string
                    example: null
                  amputee_id:
                    type: string
                    example: null
                  clinician_id:
                    type: string
                    example: null
                  firmware_version_id:
                    type: string
                    example: null
                  pcb_version_id:
                    type: string
                    example: null
                  reverse_magnets:
                    type: integer
                    example: 0
                  is_electrode:
                    type: integer
                    example: 0
                  active:
                    type: integer
                    example: 1
                  last_activity_at:
                    type: string
                    example: '0000-00-00 00:00:00'
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to assign devices with code'
                      code: 'DEVICES:ASSIGN:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to assign devices with code'
                      code:
                        type: string
                        example: 'DEVICES:ASSIGN:INSUFFICIENT_PERMISSION'
                  -
                    description: 'User reached the temporary limit of attached devices'
                    type: object
                    example:
                      message: 'Reached the limit of assigned devices'
                      code: 'DEVICES:ASSIGN:LIMIT_REACHED'
                    properties:
                      message:
                        type: string
                        example: 'Reached the limit of assigned devices'
                      code:
                        type: string
                        example: 'DEVICES:ASSIGN:LIMIT_REACHED'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'DEVICES:ASSIGN:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'DEVICES:ASSIGN:DEVICE_NOT_FOUND'
      tags:
        - Devices
    parameters:
      -
        in: path
        name: serial
        description: 'Device serial number or bluetooth ID.'
        example: S3R1AL-NUM83R
        required: true
        schema:
          type: string
  '/api/device/connect/{id}':
    post:
      summary: 'Connect device'
      operationId: connectDevice
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device connected'
                  code: 'DEVICES:CONNECT:CONNECTED'
                properties:
                  message:
                    type: string
                    example: 'Device connected'
                  code:
                    type: string
                    example: 'DEVICES:CONNECT:CONNECTED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view device data'
                  code: 'DEVICES:CONNECT:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view device data'
                  code:
                    type: string
                    example: 'DEVICES:CONNECT:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'DEVICES:CONNECT:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'DEVICES:CONNECT:DEVICE_NOT_FOUND'
      tags:
        - Devices
    parameters:
      -
        in: path
        name: id
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/disconnect/{id}':
    post:
      summary: 'Disconnect device'
      operationId: disconnectDevice
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device disconnected'
                  code: 'DEVICES:DISCONNECT:DISCONNECTED'
                properties:
                  message:
                    type: string
                    example: 'Device disconnected'
                  code:
                    type: string
                    example: 'DEVICES:DISCONNECT:DISCONNECTED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view device data'
                  code: 'DEVICES:DISCONNECT:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view device data'
                  code:
                    type: string
                    example: 'DEVICES:DISCONNECT:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'DEVICES:DISCONNECT:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'DEVICES:DISCONNECT:DEVICE_NOT_FOUND'
      tags:
        - Devices
    parameters:
      -
        in: path
        name: id
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/device/join/{deviceId}/{electrodeId}':
    post:
      summary: 'Join devices'
      operationId: joinDevices
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 11
                  serial: 437f302d-b42e-3d7c-b88e-495b948985a5
                  bluetooth_id: 27ad6a6f-0d82-3262-8f1a-f8bf2a5624f3
                  company_id: null
                  model_id: null
                  amputee_id: null
                  clinician_id: null
                  firmware_version_id: null
                  pcb_version_id: null
                  reverse_magnets: 0
                  is_electrode: 0
                  active: 1
                  last_activity_at: '0000-00-00 00:00:00'
                  created_at: '2025-12-10T11:59:57.000000Z'
                  updated_at: '2025-12-10T11:59:57.000000Z'
                  joined_electrodes:
                    -
                      id: 12
                      serial: fd3b9b15-3a7e-37c5-b194-4a502817d026
                      bluetooth_id: 9d0131ba-4d45-315e-936c-d142d5b3f2af
                      company_id: null
                      model_id: null
                      amputee_id: null
                      clinician_id: null
                      firmware_version_id: null
                      pcb_version_id: null
                      reverse_magnets: 0
                      is_electrode: 0
                      active: 1
                      last_activity_at: '0000-00-00 00:00:00'
                      created_at: '2025-12-10T11:59:57.000000Z'
                      updated_at: '2025-12-10T11:59:57.000000Z'
                      pivot:
                        device_id: 11
                        electrode_id: 12
                        created_at: '2025-12-10T11:59:57.000000Z'
                        updated_at: '2025-12-10T11:59:57.000000Z'
                properties:
                  id:
                    type: integer
                    example: 11
                  serial:
                    type: string
                    example: 437f302d-b42e-3d7c-b88e-495b948985a5
                  bluetooth_id:
                    type: string
                    example: 27ad6a6f-0d82-3262-8f1a-f8bf2a5624f3
                  company_id:
                    type: string
                    example: null
                  model_id:
                    type: string
                    example: null
                  amputee_id:
                    type: string
                    example: null
                  clinician_id:
                    type: string
                    example: null
                  firmware_version_id:
                    type: string
                    example: null
                  pcb_version_id:
                    type: string
                    example: null
                  reverse_magnets:
                    type: integer
                    example: 0
                  is_electrode:
                    type: integer
                    example: 0
                  active:
                    type: integer
                    example: 1
                  last_activity_at:
                    type: string
                    example: '0000-00-00 00:00:00'
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:57.000000Z'
                  joined_electrodes:
                    type: array
                    example:
                      -
                        id: 12
                        serial: fd3b9b15-3a7e-37c5-b194-4a502817d026
                        bluetooth_id: 9d0131ba-4d45-315e-936c-d142d5b3f2af
                        company_id: null
                        model_id: null
                        amputee_id: null
                        clinician_id: null
                        firmware_version_id: null
                        pcb_version_id: null
                        reverse_magnets: 0
                        is_electrode: 0
                        active: 1
                        last_activity_at: '0000-00-00 00:00:00'
                        created_at: '2025-12-10T11:59:57.000000Z'
                        updated_at: '2025-12-10T11:59:57.000000Z'
                        pivot:
                          device_id: 11
                          electrode_id: 12
                          created_at: '2025-12-10T11:59:57.000000Z'
                          updated_at: '2025-12-10T11:59:57.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 12
                        serial:
                          type: string
                          example: fd3b9b15-3a7e-37c5-b194-4a502817d026
                        bluetooth_id:
                          type: string
                          example: 9d0131ba-4d45-315e-936c-d142d5b3f2af
                        company_id:
                          type: string
                          example: null
                        model_id:
                          type: string
                          example: null
                        amputee_id:
                          type: string
                          example: null
                        clinician_id:
                          type: string
                          example: null
                        firmware_version_id:
                          type: string
                          example: null
                        pcb_version_id:
                          type: string
                          example: null
                        reverse_magnets:
                          type: integer
                          example: 0
                        is_electrode:
                          type: integer
                          example: 0
                        active:
                          type: integer
                          example: 1
                        last_activity_at:
                          type: string
                          example: '0000-00-00 00:00:00'
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:57.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:57.000000Z'
                        pivot:
                          type: object
                          properties:
                            device_id:
                              type: integer
                              example: 11
                            electrode_id:
                              type: integer
                              example: 12
                            created_at:
                              type: string
                              example: '2025-12-10T11:59:57.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T11:59:57.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to join devices'
                      code: 'DEVICES:JOIN:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to join devices'
                      code:
                        type: string
                        example: 'DEVICES:JOIN:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Devices already joined'
                    type: object
                    example:
                      message: 'Device and electrode already joined'
                      code: 'DEVICES:JOIN:ALREADY_JOINED'
                    properties:
                      message:
                        type: string
                        example: 'Device and electrode already joined'
                      code:
                        type: string
                        example: 'DEVICES:JOIN:ALREADY_JOINED'
                  -
                    description: 'Server error'
                    type: object
                    example:
                      message: 'Server error'
                      code: 'DEVICES:JOIN:SERVER_ERROR'
                    properties:
                      message:
                        type: string
                        example: 'Server error'
                      code:
                        type: string
                        example: 'DEVICES:JOIN:SERVER_ERROR'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device not found'
                    type: object
                    example:
                      message: 'Device not found'
                      code: 'DEVICES:JOIN:DEVICE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device not found'
                      code:
                        type: string
                        example: 'DEVICES:JOIN:DEVICE_NOT_FOUND'
                  -
                    description: 'Device 1 cannot be an electrode'
                    type: object
                    example:
                      message: 'Device 1 cannot be an electrode'
                      code: 'DEVICES:JOIN:INCORRECT_DEVICE1_TYPE'
                    properties:
                      message:
                        type: string
                        example: 'Device 1 cannot be an electrode'
                      code:
                        type: string
                        example: 'DEVICES:JOIN:INCORRECT_DEVICE1_TYPE'
                  -
                    description: 'Device 2 must be an electrode'
                    type: object
                    example:
                      message: 'Device 1 must be an electrode'
                      code: 'DEVICES:JOIN:INCORRECT_DEVICE2_TYPE'
                    properties:
                      message:
                        type: string
                        example: 'Device 1 must be an electrode'
                      code:
                        type: string
                        example: 'DEVICES:JOIN:INCORRECT_DEVICE2_TYPE'
      tags:
        - Devices
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID (hand).'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: electrodeId
        description: 'Device ID (electrode).'
        example: 2
        required: true
        schema:
          type: integer
  '/api/device/unjoin/{deviceId}/{electrodeId}':
    post:
      summary: 'Detach joined devices'
      operationId: detachJoinedDevices
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Devices unjoined'
                  code: 'DEVICES:UNJOIN:UNJOINED'
                properties:
                  message:
                    type: string
                    example: 'Devices unjoined'
                  code:
                    type: string
                    example: 'DEVICES:UNJOIN:UNJOINED'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to join devices'
                      code: 'DEVICES:UNJOIN:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to join devices'
                      code:
                        type: string
                        example: 'DEVICES:UNJOIN:INSUFFICIENT_PERMISSION'
                  -
                    description: OK
                    type: object
                    example:
                      message: 'Devices are not joined'
                      code: 'DEVICES:UNJOIN:NOT_JOINED'
                    properties:
                      message:
                        type: string
                        example: 'Devices are not joined'
                      code:
                        type: string
                        example: 'DEVICES:UNJOIN:NOT_JOINED'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'DEVICES:UNJOIN:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'DEVICES:UNJOIN:DEVICE_NOT_FOUND'
      tags:
        - Devices
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: electrodeId
        description: 'Electrode ID.'
        example: 2
        required: true
        schema:
          type: integer
  '/api/device/{id}/dummy-patient':
    post:
      summary: 'Create demo patient'
      operationId: createDemoPatient
      description: ''
      parameters: []
      responses:
        201:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  email: SERIAL@gmail.com
                  password: Demo@123
                properties:
                  email:
                    type: string
                    example: SERIAL@gmail.com
                  password:
                    type: string
                    example: Demo@123
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to create dummy patient'
                      code: 'DEVICES:DUMMY_PATIENT:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to create dummy patient'
                      code:
                        type: string
                        example: 'DEVICES:DUMMY_PATIENT:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Device already has a patient'
                    type: object
                    example:
                      message: 'Device already has a patient'
                      code: 'DEVICES:DUMMY_PATIENT:PATIENT_EXISTS'
                    properties:
                      message:
                        type: string
                        example: 'Device already has a patient'
                      code:
                        type: string
                        example: 'DEVICES:DUMMY_PATIENT:PATIENT_EXISTS'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'DEVICES:DUMMY_PATIENT:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'DEVICES:DUMMY_PATIENT:DEVICE_NOT_FOUND'
        500:
          description: 'Server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server error: dummy patient not created'
                  code: 'DEVICES:DUMMY_PATIENT:SERVER_ERROR'
                properties:
                  message:
                    type: string
                    example: 'Server error: dummy patient not created'
                  code:
                    type: string
                    example: 'DEVICES:DUMMY_PATIENT:SERVER_ERROR'
      tags:
        - Devices
    parameters:
      -
        in: path
        name: id
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/documents:
    get:
      summary: 'List documents'
      operationId: listDocuments
      description: ''
      parameters:
        -
          in: query
          name: type
          description: 'Filter documents by type.'
          example: web
          required: false
          schema:
            type: string
            description: 'Filter documents by type.'
            example: web
            enum:
              - web
              - mobile
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      name: 'Plumber OR Pipefitter OR Steamfitter'
                      type: web
                      created_at: '2025-12-10T12:00:15.000000Z'
                      updated_at: '2025-12-10T12:00:15.000000Z'
                    -
                      id: 2
                      name: 'Logging Tractor Operator'
                      type: mobile
                      created_at: '2025-12-10T12:00:15.000000Z'
                      updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        name: 'Plumber OR Pipefitter OR Steamfitter'
                        type: web
                        created_at: '2025-12-10T12:00:15.000000Z'
                        updated_at: '2025-12-10T12:00:15.000000Z'
                      -
                        id: 2
                        name: 'Logging Tractor Operator'
                        type: mobile
                        created_at: '2025-12-10T12:00:15.000000Z'
                        updated_at: '2025-12-10T12:00:15.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Plumber OR Pipefitter OR Steamfitter'
                        type:
                          type: string
                          example: web
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:15.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage documents'
                  code: 'DOCUMENTS:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage documents'
                  code:
                    type: string
                    example: 'DOCUMENTS:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - Documents
    post:
      summary: 'Create document'
      operationId: createDocument
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  name: 'Technical Director'
                  type: web
                  created_at: '2025-12-10T12:00:15.000000Z'
                  updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  name:
                    type: string
                    example: 'Technical Director'
                  type:
                    type: string
                    example: web
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage documents'
                  code: 'DOCUMENTS:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage documents'
                  code:
                    type: string
                    example: 'DOCUMENTS:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - Documents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Document name.'
                  example: 'Privacy Policy'
                type:
                  type: string
                  description: 'Document destination.'
                  example: web
                  enum:
                    - web
                    - mobile
              required:
                - name
                - type
  '/api/documents/{documentId}':
    delete:
      summary: 'Delete document'
      operationId: deleteDocument
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Document deleted'
                  code: 'DOCUMENTS:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Document deleted'
                  code:
                    type: string
                    example: 'DOCUMENTS:DELETE:DELETED'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to manage documents'
                      code: 'DOCUMENTS:DELETE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to manage documents'
                      code:
                        type: string
                        example: 'DOCUMENTS:DELETE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Document has existing versions'
                    type: object
                    example:
                      message: 'Cannot delete: document has existing versions (1)'
                      code: 'DOCUMENTS:DELETE:HAS_VERSIONS'
                    properties:
                      message:
                        type: string
                        example: 'Cannot delete: document has existing versions (1)'
                      code:
                        type: string
                        example: 'DOCUMENTS:DELETE:HAS_VERSIONS'
        404:
          description: 'Document not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Document not found'
                  code: 'DOCUMENTS:DELETE:DOCUMENT_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Document not found'
                  code:
                    type: string
                    example: 'DOCUMENTS:DELETE:DOCUMENT_NOT_FOUND'
      tags:
        - Documents
    parameters:
      -
        in: path
        name: documentId
        description: 'Document ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/documents/{documentId}/versions':
    get:
      summary: 'List document versions'
      operationId: listDocumentVersions
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    document_id:
                      type: string
                      example: null
                    index:
                      type: integer
                      example: 898
                    file:
                      type: string
                      example: 'https://boyer.biz/vel-sint-libero-eos-eligendi-cumque-vero.html'
                    created_at:
                      type: string
                      example: '2025-12-10T12:00:15.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T12:00:15.000000Z'
                example:
                  -
                    id: 1
                    document_id: null
                    index: 898
                    file: 'https://boyer.biz/vel-sint-libero-eos-eligendi-cumque-vero.html'
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
                  -
                    id: 2
                    document_id: null
                    index: 8737261
                    file: 'http://maggio.com/illo-quia-aperiam-pariatur-minus-voluptas-iste-maxime'
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage documents'
                  code: 'DOCUMENTS:LIST_VERSIONS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage documents'
                  code:
                    type: string
                    example: 'DOCUMENTS:LIST_VERSIONS:INSUFFICIENT_PERMISSION'
        404:
          description: 'Document not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Document not found'
                  code: 'DOCUMENTS:LIST_VERSIONS:DOCUMENT_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Document not found'
                  code:
                    type: string
                    example: 'DOCUMENTS:LIST_VERSIONS:DOCUMENT_NOT_FOUND'
      tags:
        - Documents
    post:
      summary: 'Create document version'
      operationId: createDocumentVersion
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  document_id: null
                  index: 863234
                  file: 'http://www.jacobi.org/'
                  created_at: '2025-12-10T12:00:15.000000Z'
                  updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  document_id:
                    type: string
                    example: null
                  index:
                    type: integer
                    example: 863234
                  file:
                    type: string
                    example: 'http://www.jacobi.org/'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage documents'
                  code: 'DOCUMENTS:CREATE_VERSION:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage documents'
                  code:
                    type: string
                    example: 'DOCUMENTS:CREATE_VERSION:INSUFFICIENT_PERMISSION'
        404:
          description: 'Document not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Document not found'
                  code: 'DOCUMENTS:CREATE_VERSION:DOCUMENT_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Document not found'
                  code:
                    type: string
                    example: 'DOCUMENTS:CREATE_VERSION:DOCUMENT_NOT_FOUND'
      tags:
        - Documents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  description: 'URL to document file. Must be a valid URL.'
                  example: 'https://www.aetherbiomedical.com/privacy-policy'
              required:
                - file
    parameters:
      -
        in: path
        name: documentId
        description: 'Document ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/documents/{documentId}/versions/{versionId}':
    delete:
      summary: 'Delete document version'
      operationId: deleteDocumentVersion
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Document version deleted'
                  code: 'DOCUMENTS:DELETE_VERSION:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Document version deleted'
                  code:
                    type: string
                    example: 'DOCUMENTS:DELETE_VERSION:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage documents'
                  code: 'DOCUMENTS:DELETE_VERSION:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage documents'
                  code:
                    type: string
                    example: 'DOCUMENTS:DELETE_VERSION:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Document not found'
                    type: object
                    example:
                      message: 'Document not found'
                      code: 'DOCUMENTS:DELETE_VERSION:DOCUMENT_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Document not found'
                      code:
                        type: string
                        example: 'DOCUMENTS:DELETE_VERSION:DOCUMENT_NOT_FOUND'
                  -
                    description: 'Document version not found'
                    type: object
                    example:
                      message: 'Document version not found'
                      code: 'DOCUMENTS:DELETE_VERSION:VERSION_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Document version not found'
                      code:
                        type: string
                        example: 'DOCUMENTS:DELETE_VERSION:VERSION_NOT_FOUND'
      tags:
        - Documents
    parameters:
      -
        in: path
        name: documentId
        description: 'Document ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: versionId
        description: 'DocumentVersion ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/documents/status:
    get:
      summary: 'Get documents status'
      operationId: getDocumentsStatus
      description: "Any document on the list has to be accepted. Use <code>POST /documents/accept</code> endpoint to mark them as accepted once user agrees to that.\n\t\tEmpty list means that user is up-to-date with all required documents and nothing has to be accepted."
      parameters:
        -
          in: query
          name: type
          description: 'Filter documents by type.'
          example: web
          required: false
          schema:
            type: string
            description: 'Filter documents by type.'
            example: web
            enum:
              - web
              - mobile
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  documents: []
                  texts:
                    title: 'Changes to the Privacy Policy'
                    description: 'Due to the addition of a new data processing entity, please familiarize yourself with and accept the new privacy policy'
                    checkbox: 'I declare that I have read the content of the Privacy Policy and the Terms and Conditions and accept their provisions. I understand that acceptance is a condition for using the application.'
                properties:
                  documents:
                    type: array
                    example: []
                  texts:
                    type: object
                    properties:
                      title:
                        type: string
                        example: 'Changes to the Privacy Policy'
                      description:
                        type: string
                        example: 'Due to the addition of a new data processing entity, please familiarize yourself with and accept the new privacy policy'
                      checkbox:
                        type: string
                        example: 'I declare that I have read the content of the Privacy Policy and the Terms and Conditions and accept their provisions. I understand that acceptance is a condition for using the application.'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view documents status'
                  code: 'DOCUMENTS:STATUS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view documents status'
                  code:
                    type: string
                    example: 'DOCUMENTS:STATUS:INSUFFICIENT_PERMISSION'
      tags:
        - Documents
  /api/documents/accept:
    post:
      summary: 'Accept documents'
      operationId: acceptDocuments
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Accepted 1 document(s)'
                  code: 'DOCUMENTS:ACCEPT:ACCEPTED'
                properties:
                  message:
                    type: string
                    example: 'Accepted 1 document(s)'
                  code:
                    type: string
                    example: 'DOCUMENTS:ACCEPT:ACCEPTED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update documents status'
                  code: 'DOCUMENTS:ACCEPT:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update documents status'
                  code:
                    type: string
                    example: 'DOCUMENTS:ACCEPT:INSUFFICIENT_PERMISSION'
      tags:
        - Documents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                documents:
                  type: array
                  description: 'Document Version ID. The <code>id</code> of an existing record in the App\Models\DocumentVersion table.'
                  example:
                    - 1
                  items:
                    type: integer
              required:
                - documents
  '/api/feedback/{token}/check':
    post:
      summary: 'Check feedback token'
      operationId: checkFeedbackToken
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  valid: true
                properties:
                  valid:
                    type: boolean
                    example: true
      tags:
        - Feedback
      security: []
    parameters:
      -
        in: path
        name: token
        description: 'Authentication token'
        example: 4KJ2YLM0MA64Y6D6FUY2OFY690IICO1OJ2DHR6T68IZNI528H3SKUFJMY0C5DHOA
        required: true
        schema:
          type: string
  '/api/feedback/{token}':
    post:
      summary: 'Send feedback with token'
      operationId: sendFeedbackWithToken
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  user_id: 6
                  type: on_demand
                  trigger: clinician_invite
                  platform: web
                  rate: 5
                  description: 'Nobis excepturi eum necessitatibus omnis aut praesentium tenetur.'
                  skipped: 1
                  created_at: '2025-12-10T11:59:54.000000Z'
                  updated_at: '2025-12-10T11:59:54.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  user_id:
                    type: integer
                    example: 6
                  type:
                    type: string
                    example: on_demand
                  trigger:
                    type: string
                    example: clinician_invite
                  platform:
                    type: string
                    example: web
                  rate:
                    type: integer
                    example: 5
                  description:
                    type: string
                    example: 'Nobis excepturi eum necessitatibus omnis aut praesentium tenetur.'
                  skipped:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:54.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:54.000000Z'
        403:
          description: 'Invalid token'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Invalid token'
                  code: 'FEEDBACK:SEND_WITH_TOKEN:INVALID_TOKEN'
                properties:
                  message:
                    type: string
                    example: 'Invalid token'
                  code:
                    type: string
                    example: 'FEEDBACK:SEND_WITH_TOKEN:INVALID_TOKEN'
      tags:
        - Feedback
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                rate:
                  type: integer
                  description: "User's rating. MINIMUM:NUMBER:0 MAXIMUM:NUMBER:5."
                  example: 5
                description:
                  type: string
                  description: "User's description."
                  example: 'That was amazing!'
                skipped:
                  type: boolean
                  description: 'Feedback skipped by the user.'
                  example: false
      security: []
    parameters:
      -
        in: path
        name: token
        description: 'Authentication token'
        example: 4KJ2YLM0MA64Y6D6FUY2OFY690IICO1OJ2DHR6T68IZNI528H3SKUFJMY0C5DHOA
        required: true
        schema:
          type: string
  /api/feedback/status:
    get:
      summary: 'Get feedback status'
      operationId: getFeedbackStatus
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  remote_session: true
                  firmware_update: true
                  local_session: true
                  async_session: true
                  patient_create: false
                  clinician_invite: true
                properties:
                  remote_session:
                    type: boolean
                    example: true
                  firmware_update:
                    type: boolean
                    example: true
                  local_session:
                    type: boolean
                    example: true
                  async_session:
                    type: boolean
                    example: true
                  patient_create:
                    type: boolean
                    example: false
                  clinician_invite:
                    type: boolean
                    example: true
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to check feedback status'
                  code: 'FEEDBACK:STATUS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to check feedback status'
                  code:
                    type: string
                    example: 'FEEDBACK:STATUS:INSUFFICIENT_PERMISSION'
      tags:
        - Feedback
  /api/feedback:
    post:
      summary: 'Send feedback'
      operationId: sendFeedback
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 2
                  user_id: 306
                  type: contextual
                  trigger: async_session
                  platform: mobile
                  rate: 1
                  description: 'Qui fugiat non consequatur maiores iusto non dolores.'
                  skipped: 0
                  created_at: '2025-12-10T12:00:21.000000Z'
                  updated_at: '2025-12-10T12:00:21.000000Z'
                properties:
                  id:
                    type: integer
                    example: 2
                  user_id:
                    type: integer
                    example: 306
                  type:
                    type: string
                    example: contextual
                  trigger:
                    type: string
                    example: async_session
                  platform:
                    type: string
                    example: mobile
                  rate:
                    type: integer
                    example: 1
                  description:
                    type: string
                    example: 'Qui fugiat non consequatur maiores iusto non dolores.'
                  skipped:
                    type: integer
                    example: 0
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:21.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:21.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to send feedback'
                  code: 'FEEDBACK:SEND:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to send feedback'
                  code:
                    type: string
                    example: 'FEEDBACK:SEND:INSUFFICIENT_PERMISSION'
      tags:
        - Feedback
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: 'Type of feedback.'
                  example: contextual
                  enum:
                    - contextual
                    - on_demand
                    - periodic
                trigger:
                  type: string
                  description: 'Feedback trigger.'
                  example: remote_session
                  enum:
                    - remote_session
                    - local_session
                    - async_session
                    - patient_create
                    - clinician_invite
                    - firmware_update
                    - new_config
                    - grip_change
                platform:
                  type: string
                  description: 'Feedback platform.'
                  example: web
                  enum:
                    - web
                    - mobile
                rate:
                  type: integer
                  description: "User's rating. MINIMUM:NUMBER:0 MAXIMUM:NUMBER:5."
                  example: 5
                description:
                  type: string
                  description: "User's description."
                  example: 'That was amazing!'
                skipped:
                  type: boolean
                  description: 'Feedback skipped by the user.'
                  example: false
              required:
                - type
                - platform
    get:
      summary: 'List feedback'
      operationId: listFeedback
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 25
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 3
                      user_id: 307
                      type: periodic
                      trigger: patient_create
                      platform: mobile
                      rate: 2
                      description: 'Nostrum dolores officiis illum nesciunt id itaque aut voluptas.'
                      skipped: 1
                      created_at: '2025-12-10T12:00:21.000000Z'
                      updated_at: '2025-12-10T12:00:21.000000Z'
                    -
                      id: 4
                      user_id: 308
                      type: periodic
                      trigger: remote_session
                      platform: mobile
                      rate: 3
                      description: 'Impedit voluptatem earum velit adipisci ducimus atque.'
                      skipped: 0
                      created_at: '2025-12-10T12:00:21.000000Z'
                      updated_at: '2025-12-10T12:00:21.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 25
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 3
                        user_id: 307
                        type: periodic
                        trigger: patient_create
                        platform: mobile
                        rate: 2
                        description: 'Nostrum dolores officiis illum nesciunt id itaque aut voluptas.'
                        skipped: 1
                        created_at: '2025-12-10T12:00:21.000000Z'
                        updated_at: '2025-12-10T12:00:21.000000Z'
                      -
                        id: 4
                        user_id: 308
                        type: periodic
                        trigger: remote_session
                        platform: mobile
                        rate: 3
                        description: 'Impedit voluptatem earum velit adipisci ducimus atque.'
                        skipped: 0
                        created_at: '2025-12-10T12:00:21.000000Z'
                        updated_at: '2025-12-10T12:00:21.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 3
                        user_id:
                          type: integer
                          example: 307
                        type:
                          type: string
                          example: periodic
                        trigger:
                          type: string
                          example: patient_create
                        platform:
                          type: string
                          example: mobile
                        rate:
                          type: integer
                          example: 2
                        description:
                          type: string
                          example: 'Nostrum dolores officiis illum nesciunt id itaque aut voluptas.'
                        skipped:
                          type: integer
                          example: 1
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:21.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:21.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list feedback'
                  code: 'FEEDBACK:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list feedback'
                  code:
                    type: string
                    example: 'FEEDBACK:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - Feedback
  /api/feedback/csv:
    get:
      summary: 'Export feedback to CSV'
      operationId: exportFeedbackToCSV
      description: ''
      parameters: []
      responses:
        200:
          description: 'CSV file'
          content:
            application/json:
              schema:
                type: object
                example:
                  file: 'https://staging-us-east-2-aether-biomedical-s3-us-bucket.s3.us-east-2.amazonaws.com/feedback/feedback-1759228216.csv'
                  expires: '2025-09-30 10:40:00'
                properties:
                  file:
                    type: string
                    example: 'https://staging-us-east-2-aether-biomedical-s3-us-bucket.s3.us-east-2.amazonaws.com/feedback/feedback-1759228216.csv'
                  expires:
                    type: string
                    example: '2025-09-30 10:40:00'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to export feedback'
                  code: 'FEEDBACK:EXPORT_CSV:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to export feedback'
                  code:
                    type: string
                    example: 'FEEDBACK:EXPORT_CSV:INSUFFICIENT_PERMISSION'
      tags:
        - Feedback
  /api/feedback/cooldowns:
    get:
      summary: 'Get feedback cooldowns'
      operationId: getFeedbackCooldowns
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  remote_session: 1
                  local_session: 1
                  async_session: 1
                  patient_create: 1
                  clinician_invite: 1
                  firmware_update: 1
                  new_config: 1
                  grip_change: 1
                properties:
                  remote_session:
                    type: integer
                    example: 1
                  local_session:
                    type: integer
                    example: 1
                  async_session:
                    type: integer
                    example: 1
                  patient_create:
                    type: integer
                    example: 1
                  clinician_invite:
                    type: integer
                    example: 1
                  firmware_update:
                    type: integer
                    example: 1
                  new_config:
                    type: integer
                    example: 1
                  grip_change:
                    type: integer
                    example: 1
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage feedback cooldowns'
                  code: 'FEEDBACK:GET_COOLDOWNS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage feedback cooldowns'
                  code:
                    type: string
                    example: 'FEEDBACK:GET_COOLDOWNS:INSUFFICIENT_PERMISSION'
      tags:
        - Feedback
    put:
      summary: 'Update feedback cooldowns'
      operationId: updateFeedbackCooldowns
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  remote_session: 1
                  local_session: 1
                  async_session: 1
                  patient_create: 1
                  clinician_invite: 1
                  firmware_update: 1
                  new_config: 1
                  grip_change: 1
                properties:
                  remote_session:
                    type: integer
                    example: 1
                  local_session:
                    type: integer
                    example: 1
                  async_session:
                    type: integer
                    example: 1
                  patient_create:
                    type: integer
                    example: 1
                  clinician_invite:
                    type: integer
                    example: 1
                  firmware_update:
                    type: integer
                    example: 1
                  new_config:
                    type: integer
                    example: 1
                  grip_change:
                    type: integer
                    example: 1
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage feedback cooldowns'
                  code: 'FEEDBACK:UPDATE_COOLDOWNS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage feedback cooldowns'
                  code:
                    type: string
                    example: 'FEEDBACK:UPDATE_COOLDOWNS:INSUFFICIENT_PERMISSION'
      tags:
        - Feedback
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                remote_session:
                  type: integer
                  description: 'Cooldown for remote session trigger. MINIMUM:NUMBER:1.'
                  example: 1
                local_session:
                  type: integer
                  description: 'Cooldown for local session trigger. MINIMUM:NUMBER:1.'
                  example: 1
                async_session:
                  type: integer
                  description: 'Cooldown for async session trigger. MINIMUM:NUMBER:1.'
                  example: 1
                patient_create:
                  type: integer
                  description: 'Cooldown for patient create trigger. MINIMUM:NUMBER:1.'
                  example: 1
                clinician_invite:
                  type: integer
                  description: 'Cooldown for clinician invite trigger. MINIMUM:NUMBER:1.'
                  example: 1
                firmware_update:
                  type: integer
                  description: 'Cooldown for firmware update trigger. MINIMUM:NUMBER:1.'
                  example: 1
                new_config:
                  type: integer
                  description: 'Cooldown for new config trigger. MINIMUM:NUMBER:1.'
                  example: 1
                grip_change:
                  type: integer
                  description: 'Cooldown for grip change trigger. MINIMUM:NUMBER:1.'
                  example: 1
  /api/timezones:
    get:
      summary: 'Get supported timezones list'
      operationId: getSupportedTimezonesList
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                example:
                  - Africa/Abidjan
                  - Africa/Accra
                  - Africa/Addis_Ababa
                  - Africa/Algiers
                  - Africa/Asmara
                  - Africa/Bamako
                  - Africa/Bangui
                  - Africa/Banjul
                  - Africa/Bissau
                  - Africa/Blantyre
                  - Africa/Brazzaville
                  - Africa/Bujumbura
                  - Africa/Cairo
                  - Africa/Casablanca
                  - Africa/Ceuta
                  - Africa/Conakry
                  - Africa/Dakar
                  - Africa/Dar_es_Salaam
                  - Africa/Djibouti
                  - Africa/Douala
                  - Africa/El_Aaiun
                  - Africa/Freetown
                  - Africa/Gaborone
                  - Africa/Harare
                  - Africa/Johannesburg
                  - Africa/Juba
                  - Africa/Kampala
                  - Africa/Khartoum
                  - Africa/Kigali
                  - Africa/Kinshasa
                  - Africa/Lagos
                  - Africa/Libreville
                  - Africa/Lome
                  - Africa/Luanda
                  - Africa/Lubumbashi
                  - Africa/Lusaka
                  - Africa/Malabo
                  - Africa/Maputo
                  - Africa/Maseru
                  - Africa/Mbabane
                  - Africa/Mogadishu
                  - Africa/Monrovia
                  - Africa/Nairobi
                  - Africa/Ndjamena
                  - Africa/Niamey
                  - Africa/Nouakchott
                  - Africa/Ouagadougou
                  - Africa/Porto-Novo
                  - Africa/Sao_Tome
                  - Africa/Tripoli
                  - Africa/Tunis
                  - Africa/Windhoek
                  - America/Adak
                  - America/Anchorage
                  - America/Anguilla
                  - America/Antigua
                  - America/Araguaina
                  - America/Argentina/Buenos_Aires
                  - America/Argentina/Catamarca
                  - America/Argentina/Cordoba
                  - America/Argentina/Jujuy
                  - America/Argentina/La_Rioja
                  - America/Argentina/Mendoza
                  - America/Argentina/Rio_Gallegos
                  - America/Argentina/Salta
                  - America/Argentina/San_Juan
                  - America/Argentina/San_Luis
                  - America/Argentina/Tucuman
                  - America/Argentina/Ushuaia
                  - America/Aruba
                  - America/Asuncion
                  - America/Atikokan
                  - America/Bahia
                  - America/Bahia_Banderas
                  - America/Barbados
                  - America/Belem
                  - America/Belize
                  - America/Blanc-Sablon
                  - America/Boa_Vista
                  - America/Bogota
                  - America/Boise
                  - America/Cambridge_Bay
                  - America/Campo_Grande
                  - America/Cancun
                  - America/Caracas
                  - America/Cayenne
                  - America/Cayman
                  - America/Chicago
                  - America/Chihuahua
                  - America/Costa_Rica
                  - America/Creston
                  - America/Cuiaba
                  - America/Curacao
                  - America/Danmarkshavn
                  - America/Dawson
                  - America/Dawson_Creek
                  - America/Denver
                  - America/Detroit
                  - America/Dominica
                  - America/Edmonton
                  - America/Eirunepe
                  - America/El_Salvador
                  - America/Fort_Nelson
                  - America/Fortaleza
                  - America/Glace_Bay
                  - America/Goose_Bay
                  - America/Grand_Turk
                  - America/Grenada
                  - America/Guadeloupe
                  - America/Guatemala
                  - America/Guayaquil
                  - America/Guyana
                  - America/Halifax
                  - America/Havana
                  - America/Hermosillo
                  - America/Indiana/Indianapolis
                  - America/Indiana/Knox
                  - America/Indiana/Marengo
                  - America/Indiana/Petersburg
                  - America/Indiana/Tell_City
                  - America/Indiana/Vevay
                  - America/Indiana/Vincennes
                  - America/Indiana/Winamac
                  - America/Inuvik
                  - America/Iqaluit
                  - America/Jamaica
                  - America/Juneau
                  - America/Kentucky/Louisville
                  - America/Kentucky/Monticello
                  - America/Kralendijk
                  - America/La_Paz
                  - America/Lima
                  - America/Los_Angeles
                  - America/Lower_Princes
                  - America/Maceio
                  - America/Managua
                  - America/Manaus
                  - America/Marigot
                  - America/Martinique
                  - America/Matamoros
                  - America/Mazatlan
                  - America/Menominee
                  - America/Merida
                  - America/Metlakatla
                  - America/Mexico_City
                  - America/Miquelon
                  - America/Moncton
                  - America/Monterrey
                  - America/Montevideo
                  - America/Montserrat
                  - America/Nassau
                  - America/New_York
                  - America/Nipigon
                  - America/Nome
                  - America/Noronha
                  - America/North_Dakota/Beulah
                  - America/North_Dakota/Center
                  - America/North_Dakota/New_Salem
                  - America/Nuuk
                  - America/Ojinaga
                  - America/Panama
                  - America/Pangnirtung
                  - America/Paramaribo
                  - America/Phoenix
                  - America/Port-au-Prince
                  - America/Port_of_Spain
                  - America/Porto_Velho
                  - America/Puerto_Rico
                  - America/Punta_Arenas
                  - America/Rainy_River
                  - America/Rankin_Inlet
                  - America/Recife
                  - America/Regina
                  - America/Resolute
                  - America/Rio_Branco
                  - America/Santarem
                  - America/Santiago
                  - America/Santo_Domingo
                  - America/Sao_Paulo
                  - America/Scoresbysund
                  - America/Sitka
                  - America/St_Barthelemy
                  - America/St_Johns
                  - America/St_Kitts
                  - America/St_Lucia
                  - America/St_Thomas
                  - America/St_Vincent
                  - America/Swift_Current
                  - America/Tegucigalpa
                  - America/Thule
                  - America/Thunder_Bay
                  - America/Tijuana
                  - America/Toronto
                  - America/Tortola
                  - America/Vancouver
                  - America/Whitehorse
                  - America/Winnipeg
                  - America/Yakutat
                  - America/Yellowknife
                  - Antarctica/Casey
                  - Antarctica/Davis
                  - Antarctica/DumontDUrville
                  - Antarctica/Macquarie
                  - Antarctica/Mawson
                  - Antarctica/McMurdo
                  - Antarctica/Palmer
                  - Antarctica/Rothera
                  - Antarctica/Syowa
                  - Antarctica/Troll
                  - Antarctica/Vostok
                  - Arctic/Longyearbyen
                  - Asia/Aden
                  - Asia/Almaty
                  - Asia/Amman
                  - Asia/Anadyr
                  - Asia/Aqtau
                  - Asia/Aqtobe
                  - Asia/Ashgabat
                  - Asia/Atyrau
                  - Asia/Baghdad
                  - Asia/Bahrain
                  - Asia/Baku
                  - Asia/Bangkok
                  - Asia/Barnaul
                  - Asia/Beirut
                  - Asia/Bishkek
                  - Asia/Brunei
                  - Asia/Chita
                  - Asia/Choibalsan
                  - Asia/Colombo
                  - Asia/Damascus
                  - Asia/Dhaka
                  - Asia/Dili
                  - Asia/Dubai
                  - Asia/Dushanbe
                  - Asia/Famagusta
                  - Asia/Gaza
                  - Asia/Hebron
                  - Asia/Ho_Chi_Minh
                  - Asia/Hong_Kong
                  - Asia/Hovd
                  - Asia/Irkutsk
                  - Asia/Jakarta
                  - Asia/Jayapura
                  - Asia/Jerusalem
                  - Asia/Kabul
                  - Asia/Kamchatka
                  - Asia/Karachi
                  - Asia/Kathmandu
                  - Asia/Khandyga
                  - Asia/Kolkata
                  - Asia/Krasnoyarsk
                  - Asia/Kuala_Lumpur
                  - Asia/Kuching
                  - Asia/Kuwait
                  - Asia/Macau
                  - Asia/Magadan
                  - Asia/Makassar
                  - Asia/Manila
                  - Asia/Muscat
                  - Asia/Nicosia
                  - Asia/Novokuznetsk
                  - Asia/Novosibirsk
                  - Asia/Omsk
                  - Asia/Oral
                  - Asia/Phnom_Penh
                  - Asia/Pontianak
                  - Asia/Pyongyang
                  - Asia/Qatar
                  - Asia/Qostanay
                  - Asia/Qyzylorda
                  - Asia/Riyadh
                  - Asia/Sakhalin
                  - Asia/Samarkand
                  - Asia/Seoul
                  - Asia/Shanghai
                  - Asia/Singapore
                  - Asia/Srednekolymsk
                  - Asia/Taipei
                  - Asia/Tashkent
                  - Asia/Tbilisi
                  - Asia/Tehran
                  - Asia/Thimphu
                  - Asia/Tokyo
                  - Asia/Tomsk
                  - Asia/Ulaanbaatar
                  - Asia/Urumqi
                  - Asia/Ust-Nera
                  - Asia/Vientiane
                  - Asia/Vladivostok
                  - Asia/Yakutsk
                  - Asia/Yangon
                  - Asia/Yekaterinburg
                  - Asia/Yerevan
                  - Atlantic/Azores
                  - Atlantic/Bermuda
                  - Atlantic/Canary
                  - Atlantic/Cape_Verde
                  - Atlantic/Faroe
                  - Atlantic/Madeira
                  - Atlantic/Reykjavik
                  - Atlantic/South_Georgia
                  - Atlantic/St_Helena
                  - Atlantic/Stanley
                  - Australia/Adelaide
                  - Australia/Brisbane
                  - Australia/Broken_Hill
                  - Australia/Darwin
                  - Australia/Eucla
                  - Australia/Hobart
                  - Australia/Lindeman
                  - Australia/Lord_Howe
                  - Australia/Melbourne
                  - Australia/Perth
                  - Australia/Sydney
                  - Europe/Amsterdam
                  - Europe/Andorra
                  - Europe/Astrakhan
                  - Europe/Athens
                  - Europe/Belgrade
                  - Europe/Berlin
                  - Europe/Bratislava
                  - Europe/Brussels
                  - Europe/Bucharest
                  - Europe/Budapest
                  - Europe/Busingen
                  - Europe/Chisinau
                  - Europe/Copenhagen
                  - Europe/Dublin
                  - Europe/Gibraltar
                  - Europe/Guernsey
                  - Europe/Helsinki
                  - Europe/Isle_of_Man
                  - Europe/Istanbul
                  - Europe/Jersey
                  - Europe/Kaliningrad
                  - Europe/Kiev
                  - Europe/Kirov
                  - Europe/Lisbon
                  - Europe/Ljubljana
                  - Europe/London
                  - Europe/Luxembourg
                  - Europe/Madrid
                  - Europe/Malta
                  - Europe/Mariehamn
                  - Europe/Minsk
                  - Europe/Monaco
                  - Europe/Moscow
                  - Europe/Oslo
                  - Europe/Paris
                  - Europe/Podgorica
                  - Europe/Prague
                  - Europe/Riga
                  - Europe/Rome
                  - Europe/Samara
                  - Europe/San_Marino
                  - Europe/Sarajevo
                  - Europe/Saratov
                  - Europe/Simferopol
                  - Europe/Skopje
                  - Europe/Sofia
                  - Europe/Stockholm
                  - Europe/Tallinn
                  - Europe/Tirane
                  - Europe/Ulyanovsk
                  - Europe/Uzhgorod
                  - Europe/Vaduz
                  - Europe/Vatican
                  - Europe/Vienna
                  - Europe/Vilnius
                  - Europe/Volgograd
                  - Europe/Warsaw
                  - Europe/Zagreb
                  - Europe/Zaporozhye
                  - Europe/Zurich
                  - Indian/Antananarivo
                  - Indian/Chagos
                  - Indian/Christmas
                  - Indian/Cocos
                  - Indian/Comoro
                  - Indian/Kerguelen
                  - Indian/Mahe
                  - Indian/Maldives
                  - Indian/Mauritius
                  - Indian/Mayotte
                  - Indian/Reunion
                  - Pacific/Apia
                  - Pacific/Auckland
                  - Pacific/Bougainville
                  - Pacific/Chatham
                  - Pacific/Chuuk
                  - Pacific/Easter
                  - Pacific/Efate
                  - Pacific/Fakaofo
                  - Pacific/Fiji
                  - Pacific/Funafuti
                  - Pacific/Galapagos
                  - Pacific/Gambier
                  - Pacific/Guadalcanal
                  - Pacific/Guam
                  - Pacific/Honolulu
                  - Pacific/Kanton
                  - Pacific/Kiritimati
                  - Pacific/Kosrae
                  - Pacific/Kwajalein
                  - Pacific/Majuro
                  - Pacific/Marquesas
                  - Pacific/Midway
                  - Pacific/Nauru
                  - Pacific/Niue
                  - Pacific/Norfolk
                  - Pacific/Noumea
                  - Pacific/Pago_Pago
                  - Pacific/Palau
                  - Pacific/Pitcairn
                  - Pacific/Pohnpei
                  - Pacific/Port_Moresby
                  - Pacific/Rarotonga
                  - Pacific/Saipan
                  - Pacific/Tahiti
                  - Pacific/Tarawa
                  - Pacific/Tongatapu
                  - Pacific/Wake
                  - Pacific/Wallis
                  - UTC
      tags:
        - GeoData
      security: []
  /api/grips:
    get:
      summary: 'List grips'
      operationId: listGrips
      description: ''
      parameters:
        -
          in: query
          name: model
          description: "Device Model ID. Use this parameter to receive the correct grip images in the <code>image</code> field.\n\t\tWhen not present, all images will be listed in <code>images</code> array."
          example: 1
          required: false
          schema:
            type: integer
            description: "Device Model ID. Use this parameter to receive the correct grip images in the <code>image</code> field.\n\t\tWhen not present, all images will be listed in <code>images</code> array."
            example: 1
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    number:
                      type: integer
                      example: 5425
                    name:
                      type: string
                      example: 'nostrum grip'
                    description:
                      type: string
                      example: null
                    opposed:
                      type: integer
                      example: 0
                    created_at:
                      type: string
                      example: '2025-12-10T12:00:16.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T12:00:16.000000Z'
                example:
                  -
                    id: 1
                    number: 5425
                    name: 'nostrum grip'
                    description: null
                    opposed: 0
                    created_at: '2025-12-10T12:00:16.000000Z'
                    updated_at: '2025-12-10T12:00:16.000000Z'
                  -
                    id: 2
                    number: 8705
                    name: 'et grip'
                    description: null
                    opposed: 0
                    created_at: '2025-12-10T12:00:16.000000Z'
                    updated_at: '2025-12-10T12:00:16.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view grips'
                  code: 'GOALS:LIST_GRIPS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view grips'
                  code:
                    type: string
                    example: 'GOALS:LIST_GRIPS:INSUFFICIENT_PERMISSION'
      tags:
        - Goals
  /api/exercises:
    get:
      summary: 'List exercises'
      operationId: listExercises
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      name: 'exercises.Ashleigh Plains'
                      description: 'exercises.Omnis magnam et sit voluptas consequatur sint aperiam.'
                      icon: 😅
                      created_at: '2025-12-10T12:00:16.000000Z'
                      updated_at: '2025-12-10T12:00:16.000000Z'
                    -
                      id: 2
                      name: 'exercises.Daniella Ranch'
                      description: 'exercises.Fuga vitae aut voluptatibus.'
                      icon: 😠
                      created_at: '2025-12-10T12:00:16.000000Z'
                      updated_at: '2025-12-10T12:00:16.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        name: 'exercises.Ashleigh Plains'
                        description: 'exercises.Omnis magnam et sit voluptas consequatur sint aperiam.'
                        icon: 😅
                        created_at: '2025-12-10T12:00:16.000000Z'
                        updated_at: '2025-12-10T12:00:16.000000Z'
                      -
                        id: 2
                        name: 'exercises.Daniella Ranch'
                        description: 'exercises.Fuga vitae aut voluptatibus.'
                        icon: 😠
                        created_at: '2025-12-10T12:00:16.000000Z'
                        updated_at: '2025-12-10T12:00:16.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'exercises.Ashleigh Plains'
                        description:
                          type: string
                          example: 'exercises.Omnis magnam et sit voluptas consequatur sint aperiam.'
                        icon:
                          type: string
                          example: 😅
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:16.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:16.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view exercises'
                  code: 'GOALS:LIST_EXERCISES:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view exercises'
                  code:
                    type: string
                    example: 'GOALS:LIST_EXERCISES:INSUFFICIENT_PERMISSION'
      tags:
        - Goals
    post:
      summary: 'Create exercise'
      operationId: createExercise
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  name: 'exercises.Bergstrom Ports'
                  description: 'exercises.Velit qui dolorem voluptatem sed fugiat.'
                  icon: 😭
                  created_at: '2025-12-10T12:00:16.000000Z'
                  updated_at: '2025-12-10T12:00:16.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  name:
                    type: string
                    example: 'exercises.Bergstrom Ports'
                  description:
                    type: string
                    example: 'exercises.Velit qui dolorem voluptatem sed fugiat.'
                  icon:
                    type: string
                    example: 😭
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:16.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:16.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage exercises'
                  code: 'GOALS:CREATE_EXERCISE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage exercises'
                  code:
                    type: string
                    example: 'GOALS:CREATE_EXERCISE:INSUFFICIENT_PERMISSION'
      tags:
        - Goals
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Exercise name.'
                  example: 'Water plants'
                description:
                  type: string
                  description: 'Exercise description.'
                  example: 'Use Tripod Close Grip and water your plants'
                icon:
                  type: string
                  description: 'Emoji icon.'
                  example: 🪴
              required:
                - name
                - description
                - icon
  '/api/exercises/{exerciseId}':
    put:
      summary: 'Update exercise'
      operationId: updateExercise
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  name: 'exercises.Oma Center'
                  description: 'exercises.Quis voluptatem illo libero sed ipsa quidem.'
                  icon: 😜
                  created_at: '2025-12-10T12:00:16.000000Z'
                  updated_at: '2025-12-10T12:00:16.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  name:
                    type: string
                    example: 'exercises.Oma Center'
                  description:
                    type: string
                    example: 'exercises.Quis voluptatem illo libero sed ipsa quidem.'
                  icon:
                    type: string
                    example: 😜
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:16.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:16.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage exercises'
                  code: 'GOALS:UPDATE_EXERCISE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage exercises'
                  code:
                    type: string
                    example: 'GOALS:UPDATE_EXERCISE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Exercise not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Exercise not found'
                  code: 'GOALS:UPDATE_EXERCISE:EXERCISE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Exercise not found'
                  code:
                    type: string
                    example: 'GOALS:UPDATE_EXERCISE:EXERCISE_NOT_FOUND'
      tags:
        - Goals
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Exercise name.'
                  example: 'Water plants'
                description:
                  type: string
                  description: 'Exercise description.'
                  example: 'Use Tripod Close Grip and water your plants'
                icon:
                  type: string
                  description: 'Emoji icon.'
                  example: 🪴
    delete:
      summary: 'Delete exercise'
      operationId: deleteExercise
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Exercise deleted'
                  code: 'GOALS:DELETE_EXERCISE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Exercise deleted'
                  code:
                    type: string
                    example: 'GOALS:DELETE_EXERCISE:DELETED'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to manage exercises'
                      code: 'GOALS:DELETE_EXERCISE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to manage exercises'
                      code:
                        type: string
                        example: 'GOALS:DELETE_EXERCISE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Exercise is used in goals'
                    type: object
                    example:
                      message: 'Cannot delete: exercise is used in goals (1)'
                      code: 'GOALS:DELETE_EXERCISE:HAS_GOALS'
                    properties:
                      message:
                        type: string
                        example: 'Cannot delete: exercise is used in goals (1)'
                      code:
                        type: string
                        example: 'GOALS:DELETE_EXERCISE:HAS_GOALS'
        404:
          description: 'Exercise not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Exercise not found'
                  code: 'GOALS:DELETE_EXERCISE:EXERCISE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Exercise not found'
                  code:
                    type: string
                    example: 'GOALS:DELETE_EXERCISE:EXERCISE_NOT_FOUND'
      tags:
        - Goals
    parameters:
      -
        in: path
        name: exerciseId
        description: 'Exercise ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/user/{userId}/goals':
    get:
      summary: 'List user goals'
      operationId: listUserGoals
      description: ''
      parameters:
        -
          in: query
          name: active
          description: 'Goal active status.'
          example: 1
          required: false
          schema:
            type: boolean
            description: 'Goal active status.'
            example: 1
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>start_date</code>). Default: start_date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>start_date</code>). Default: start_date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      amputee_id: 258
                      clinician_id: 259
                      start_date: '2020-08-15'
                      end_date: '1974-05-18'
                      active: 0
                      created_at: '2025-12-10T12:00:16.000000Z'
                      updated_at: '2025-12-10T12:00:16.000000Z'
                    -
                      id: 2
                      amputee_id: 260
                      clinician_id: 261
                      start_date: '2006-11-23'
                      end_date: '1982-09-11'
                      active: 1
                      created_at: '2025-12-10T12:00:16.000000Z'
                      updated_at: '2025-12-10T12:00:16.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        amputee_id: 258
                        clinician_id: 259
                        start_date: '2020-08-15'
                        end_date: '1974-05-18'
                        active: 0
                        created_at: '2025-12-10T12:00:16.000000Z'
                        updated_at: '2025-12-10T12:00:16.000000Z'
                      -
                        id: 2
                        amputee_id: 260
                        clinician_id: 261
                        start_date: '2006-11-23'
                        end_date: '1982-09-11'
                        active: 1
                        created_at: '2025-12-10T12:00:16.000000Z'
                        updated_at: '2025-12-10T12:00:16.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        amputee_id:
                          type: integer
                          example: 258
                        clinician_id:
                          type: integer
                          example: 259
                        start_date:
                          type: string
                          example: '2020-08-15'
                        end_date:
                          type: string
                          example: '1974-05-18'
                        active:
                          type: integer
                          example: 0
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:16.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:16.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view user goals'
                  code: 'GOALS:LIST_GOALS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view user goals'
                  code:
                    type: string
                    example: 'GOALS:LIST_GOALS:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'GOALS:LIST_GOALS:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'GOALS:LIST_GOALS:USER_NOT_FOUND'
      tags:
        - Goals
    post:
      summary: 'Create user goal'
      operationId: createUserGoal
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  amputee_id: 262
                  clinician_id: 263
                  start_date: '1979-04-26'
                  end_date: '1985-05-02'
                  active: 0
                  created_at: '2025-12-10T12:00:17.000000Z'
                  updated_at: '2025-12-10T12:00:17.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  amputee_id:
                    type: integer
                    example: 262
                  clinician_id:
                    type: integer
                    example: 263
                  start_date:
                    type: string
                    example: '1979-04-26'
                  end_date:
                    type: string
                    example: '1985-05-02'
                  active:
                    type: integer
                    example: 0
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:17.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:17.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage user goals'
                  code: 'GOALS:CREATE_GOAL:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage user goals'
                  code:
                    type: string
                    example: 'GOALS:CREATE_GOAL:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'GOALS:CREATE_GOAL:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'GOALS:CREATE_GOAL:USER_NOT_FOUND'
      tags:
        - Goals
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                start_date:
                  type: string
                  description: 'Start date of the goal tracking. MUST_BE_DATE Must be a valid date in the format <code>Y-m-d</code>. MUST_BE_AFTER_OR_EQUAL:<code>today</code>.'
                  example: '2023-05-12'
                end_date:
                  type: string
                  description: 'End date of goal tracking. MUST_BE_DATE Must be a valid date in the format <code>Y-m-d</code>. MUST_BE_AFTER:<code>start_date</code>.'
                  example: '2023-05-15'
                active:
                  type: boolean
                  description: 'Status of goal activity.'
                  example: true
              required:
                - start_date
                - end_date
    parameters:
      -
        in: path
        name: userId
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/user/{userId}/goals/{goalId}':
    put:
      summary: 'Update user goal'
      operationId: updateUserGoal
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  amputee_id: 264
                  clinician_id: 265
                  start_date: '1993-11-07'
                  end_date: '2023-09-15'
                  active: 0
                  created_at: '2025-12-10T12:00:17.000000Z'
                  updated_at: '2025-12-10T12:00:17.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  amputee_id:
                    type: integer
                    example: 264
                  clinician_id:
                    type: integer
                    example: 265
                  start_date:
                    type: string
                    example: '1993-11-07'
                  end_date:
                    type: string
                    example: '2023-09-15'
                  active:
                    type: integer
                    example: 0
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:17.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:17.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to manage user goals'
                      code: 'GOALS:UPDATE_GOAL:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to manage user goals'
                      code:
                        type: string
                        example: 'GOALS:UPDATE_GOAL:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Cannot activate ongoing goal'
                    type: object
                    example:
                      message: 'Cannot activate ongoing goal'
                      code: 'GOALS:UPDATE_GOAL:GOAL_IS_ONGOING'
                    properties:
                      message:
                        type: string
                        example: 'Cannot activate ongoing goal'
                      code:
                        type: string
                        example: 'GOALS:UPDATE_GOAL:GOAL_IS_ONGOING'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'User not found'
                    type: object
                    example:
                      message: 'User not found'
                      code: 'GOALS:UPDATE_GOAL:USER_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'User not found'
                      code:
                        type: string
                        example: 'GOALS:UPDATE_GOAL:USER_NOT_FOUND'
                  -
                    description: 'Goal not found'
                    type: object
                    example:
                      message: 'Goal not found'
                      code: 'GOALS:UPDATE_GOAL:GOAL_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Goal not found'
                      code:
                        type: string
                        example: 'GOALS:UPDATE_GOAL:GOAL_NOT_FOUND'
      tags:
        - Goals
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                start_date:
                  type: string
                  description: 'Start date of the goal tracking. MUST_BE_DATE Must be a valid date in the format <code>Y-m-d</code>. MUST_BE_AFTER_OR_EQUAL:<code>today</code>.'
                  example: '2023-05-12'
                end_date:
                  type: string
                  description: 'End date of goal tracking. MUST_BE_DATE Must be a valid date in the format <code>Y-m-d</code>. MUST_BE_AFTER:<code>start_date</code>.'
                  example: '2023-05-15'
                active:
                  type: boolean
                  description: 'Status of goal activity.'
                  example: true
    delete:
      summary: 'Delete user goal'
      operationId: deleteUserGoal
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Goal deleted'
                  code: 'GOALS:DELETE_GOAL:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Goal deleted'
                  code:
                    type: string
                    example: 'GOALS:DELETE_GOAL:DELETED'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to manage user goals'
                      code: 'GOALS:DELETE_GOAL:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to manage user goals'
                      code:
                        type: string
                        example: 'GOALS:DELETE_GOAL:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Cannot delete ongoing goal'
                    type: object
                    example:
                      message: 'Cannot delete active ongoing goal'
                      code: 'GOALS:DELETE_GOAL:GOAL_IS_ONGOING'
                    properties:
                      message:
                        type: string
                        example: 'Cannot delete active ongoing goal'
                      code:
                        type: string
                        example: 'GOALS:DELETE_GOAL:GOAL_IS_ONGOING'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'User not found'
                    type: object
                    example:
                      message: 'User not found'
                      code: 'GOALS:DELETE_GOAL:USER_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'User not found'
                      code:
                        type: string
                        example: 'GOALS:DELETE_GOAL:USER_NOT_FOUND'
                  -
                    description: 'Goal not found'
                    type: object
                    example:
                      message: 'Goal not found'
                      code: 'GOALS:DELETE_GOAL:GOAL_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Goal not found'
                      code:
                        type: string
                        example: 'GOALS:DELETE_GOAL:GOAL_NOT_FOUND'
      tags:
        - Goals
    parameters:
      -
        in: path
        name: userId
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: goalId
        description: 'Goal ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/user/{userId}/goals/{goalId}/conditions':
    get:
      summary: 'List user goal conditions'
      operationId: listUserGoalConditions
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      goal_id: 5
                      type: grip
                      grip_id: 3
                      grips_frequency: a
                      grips_count: 983
                      switches_frequency: a
                      switches_count: 992
                      exercise_id: 5
                      exercise_frequency: w
                      exercise_count: 4
                      created_at: '2025-12-10T12:00:17.000000Z'
                      updated_at: '2025-12-10T12:00:17.000000Z'
                    -
                      id: 2
                      goal_id: 6
                      type: grip
                      grip_id: 4
                      grips_frequency: d
                      grips_count: 997
                      switches_frequency: w
                      switches_count: 797
                      exercise_id: 6
                      exercise_frequency: d
                      exercise_count: 6
                      created_at: '2025-12-10T12:00:17.000000Z'
                      updated_at: '2025-12-10T12:00:17.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        goal_id: 5
                        type: grip
                        grip_id: 3
                        grips_frequency: a
                        grips_count: 983
                        switches_frequency: a
                        switches_count: 992
                        exercise_id: 5
                        exercise_frequency: w
                        exercise_count: 4
                        created_at: '2025-12-10T12:00:17.000000Z'
                        updated_at: '2025-12-10T12:00:17.000000Z'
                      -
                        id: 2
                        goal_id: 6
                        type: grip
                        grip_id: 4
                        grips_frequency: d
                        grips_count: 997
                        switches_frequency: w
                        switches_count: 797
                        exercise_id: 6
                        exercise_frequency: d
                        exercise_count: 6
                        created_at: '2025-12-10T12:00:17.000000Z'
                        updated_at: '2025-12-10T12:00:17.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        goal_id:
                          type: integer
                          example: 5
                        type:
                          type: string
                          example: grip
                        grip_id:
                          type: integer
                          example: 3
                        grips_frequency:
                          type: string
                          example: a
                        grips_count:
                          type: integer
                          example: 983
                        switches_frequency:
                          type: string
                          example: a
                        switches_count:
                          type: integer
                          example: 992
                        exercise_id:
                          type: integer
                          example: 5
                        exercise_frequency:
                          type: string
                          example: w
                        exercise_count:
                          type: integer
                          example: 4
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:17.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:17.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view user goals'
                  code: 'GOALS:LIST_CONDITIONS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view user goals'
                  code:
                    type: string
                    example: 'GOALS:LIST_CONDITIONS:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'User not found'
                    type: object
                    example:
                      message: 'User not found'
                      code: 'GOALS:LIST_CONDITIONS:USER_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'User not found'
                      code:
                        type: string
                        example: 'GOALS:LIST_CONDITIONS:USER_NOT_FOUND'
                  -
                    description: 'Goal not found'
                    type: object
                    example:
                      message: 'Goal not found'
                      code: 'GOALS:LIST_CONDITIONS:GOAL_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Goal not found'
                      code:
                        type: string
                        example: 'GOALS:LIST_CONDITIONS:GOAL_NOT_FOUND'
      tags:
        - Goals
    post:
      summary: 'Create user goal condition'
      operationId: createUserGoalCondition
      description: "<div><p>Each goal condition could be one of type: <code>grip</code>, <code>switch</code> or <code>exercise</code>.</p>\n\t\t<p>If goal condition is type of <code>grip</code>, fill only <code>grip_id</code> (optional), <code>grips_frequency</code> and <code>grips_count</code>.<br />\n\t\tIf <code>grip_id</code> is null or missing, patient can perform any grip to fulfill objective.</p>\n\t\t<p>If goal condition is type of <code>switch</code>, fill only <code>switches_frequency</code> and <code>switches_count</code>.</p>\n\t\t<p>If goal condition is type of <code>exercise</code>, fill only <code>exercise_id</code>, <code>exercise_frequency</code> and <code>exercise_count</code>.</p>\n\t\t<br />\n\t\t<p>Restrictions:</p>\n\t\t<ul>\n\t\t\t<li>you can add one grip-any condition (<code>grip_id=null</code>, any grip is counted)\n\t\t\tand many grip-specific conditions (for example: grip 1 - 100 times and grip 2 - 50 times),</li>\n\t\t\t<li>all grips conditions must have same frequency (<code>grips_frequency</code> field),</li>\n\t\t\t<li>sum of grip-specific conditions (<code>grips_count</code> field) cannot be greater than grip-any condition for same goal</li>\n\t\t\t<li>you can add only one switch condition for same goal,</li>\n\t\t\t<li>you can add multiple exercise conditions, but each exercise can be used only once.</li>\n\t\t</ul></div>"
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  goal_id: 7
                  type: exercise
                  grip_id: 5
                  grips_frequency: d
                  grips_count: 822
                  switches_frequency: d
                  switches_count: 256
                  exercise_id: 7
                  exercise_frequency: m
                  exercise_count: 2
                  created_at: '2025-12-10T12:00:17.000000Z'
                  updated_at: '2025-12-10T12:00:17.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  goal_id:
                    type: integer
                    example: 7
                  type:
                    type: string
                    example: exercise
                  grip_id:
                    type: integer
                    example: 5
                  grips_frequency:
                    type: string
                    example: d
                  grips_count:
                    type: integer
                    example: 822
                  switches_frequency:
                    type: string
                    example: d
                  switches_count:
                    type: integer
                    example: 256
                  exercise_id:
                    type: integer
                    example: 7
                  exercise_frequency:
                    type: string
                    example: m
                  exercise_count:
                    type: integer
                    example: 2
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:17.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:17.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to manage user goals'
                      code: 'GOALS:CREATE_CONDITION:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to manage user goals'
                      code:
                        type: string
                        example: 'GOALS:CREATE_CONDITION:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Cannot create condition: all grip conditions have to be same frequency'
                    type: object
                    example:
                      message: 'Cannot create condition: all grip conditions have to be same frequency'
                      code: 'GOALS:CREATE_CONDITION:INVALID_FREQUENCY'
                    properties:
                      message:
                        type: string
                        example: 'Cannot create condition: all grip conditions have to be same frequency'
                      code:
                        type: string
                        example: 'GOALS:CREATE_CONDITION:INVALID_FREQUENCY'
                  -
                    description: 'Cannot create condition: grip-any condition for this goal already exist'
                    type: object
                    example:
                      message: 'Cannot create condition: grip-any condition for this goal already exist'
                      code: 'GOALS:CREATE_CONDITION:GRIP_ANY_ALREADY_EXISTS'
                    properties:
                      message:
                        type: string
                        example: 'Cannot create condition: grip-any condition for this goal already exist'
                      code:
                        type: string
                        example: 'GOALS:CREATE_CONDITION:GRIP_ANY_ALREADY_EXISTS'
                  -
                    description: 'Cannot create condition: condition with this grip already exist'
                    type: object
                    example:
                      message: 'Cannot create condition: condition with this grip already exist'
                      code: 'GOALS:CREATE_CONDITION:GRIP_CONDITION_ALREADY_EXISTS'
                    properties:
                      message:
                        type: string
                        example: 'Cannot create condition: condition with this grip already exist'
                      code:
                        type: string
                        example: 'GOALS:CREATE_CONDITION:GRIP_CONDITION_ALREADY_EXISTS'
                  -
                    description: 'Cannot create condition: grip-any value cannot be lower than sum of grip-specific conditions'
                    type: object
                    example:
                      message: 'Cannot create condition: grip-any value cannot be lower than sum of grip-specific conditions'
                      code: 'GOALS:CREATE_CONDITION:GRIP_ANY_LOWER_THAN_GRIPS_SUM'
                    properties:
                      message:
                        type: string
                        example: 'Cannot create condition: grip-any value cannot be lower than sum of grip-specific conditions'
                      code:
                        type: string
                        example: 'GOALS:CREATE_CONDITION:GRIP_ANY_LOWER_THAN_GRIPS_SUM'
                  -
                    description: 'Cannot create condition: sum of grip-specific conditions cannot be greater than value of grip-any condition'
                    type: object
                    example:
                      message: 'Cannot create condition: sum of grip-specific conditions cannot be greater than value of grip-any condition'
                      code: 'GOALS:CREATE_CONDITION:GRIPS_SUM_GREATER_THAN_GRIP_ANY'
                    properties:
                      message:
                        type: string
                        example: 'Cannot create condition: sum of grip-specific conditions cannot be greater than value of grip-any condition'
                      code:
                        type: string
                        example: 'GOALS:CREATE_CONDITION:GRIPS_SUM_GREATER_THAN_GRIP_ANY'
                  -
                    description: 'Cannot create condition: switch condition for this goal already exist'
                    type: object
                    example:
                      message: 'Cannot create condition: switch condition for this goal already exist'
                      code: 'GOALS:CREATE_CONDITION:SWITCH_CONDITION_ALREADY_EXISTS'
                    properties:
                      message:
                        type: string
                        example: 'Cannot create condition: switch condition for this goal already exist'
                      code:
                        type: string
                        example: 'GOALS:CREATE_CONDITION:SWITCH_CONDITION_ALREADY_EXISTS'
                  -
                    description: 'Cannot create condition: condition with this exercise already exist'
                    type: object
                    example:
                      message: 'Cannot create condition: condition with this exercise already exist'
                      code: 'GOALS:CREATE_CONDITION:EXERCISE_CONDITION_ALREADY_EXISTS'
                    properties:
                      message:
                        type: string
                        example: 'Cannot create condition: condition with this exercise already exist'
                      code:
                        type: string
                        example: 'GOALS:CREATE_CONDITION:EXERCISE_CONDITION_ALREADY_EXISTS'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'User not found'
                    type: object
                    example:
                      message: 'User not found'
                      code: 'GOALS:CREATE_CONDITION:USER_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'User not found'
                      code:
                        type: string
                        example: 'GOALS:CREATE_CONDITION:USER_NOT_FOUND'
                  -
                    description: 'Goal not found'
                    type: object
                    example:
                      message: 'Goal not found'
                      code: 'GOALS:CREATE_CONDITION:GOAL_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Goal not found'
                      code:
                        type: string
                        example: 'GOALS:CREATE_CONDITION:GOAL_NOT_FOUND'
      tags:
        - Goals
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: 'Goal condition type.'
                  example: grip
                  enum:
                    - grip
                    - switch
                    - exercise
                grip_id:
                  type: integer
                  description: 'Grip number required for condition. Pass <code>null</code> to allow any grip. The <code>id</code> of an existing record in the App\Models\Grip table.'
                  example: 1
                  nullable: true
                grips_frequency:
                  type: string
                  description: 'Grips frequency unit. <code>d</code> - daily, <code>w</code> - weekly, <code>m</code> - monthly, <code>a</code> - all time (within goal). This field is required when <code>type</code> is <code>grip</code>.'
                  example: d
                  enum:
                    - d
                    - w
                    - m
                    - a
                grips_count:
                  type: integer
                  description: 'Required number of grips per frequency unit. This field is required when <code>type</code> is <code>grip</code>. MINIMUM:NUMBER:1.'
                  example: 100
                switches_frequency:
                  type: string
                  description: 'Switches frequency unit. <code>d</code> - daily, <code>w</code> - weekly, <code>m</code> - monthly, <code>a</code> - all time (within goal). This field is required when <code>type</code> is <code>switch</code>.'
                  example: d
                  enum:
                    - d
                    - w
                    - m
                    - a
                switches_count:
                  type: integer
                  description: 'Required number of switches per frequency unit. This field is required when <code>type</code> is <code>switch</code>. MINIMUM:NUMBER:1.'
                  example: 100
                exercise_id:
                  type: integer
                  description: 'Exercise ID. This field is required when <code>type</code> is <code>exercise</code>. The <code>id</code> of an existing record in the App\Models\Exercise table.'
                  example: 1
                exercise_frequency:
                  type: string
                  description: 'Exercise frequency unit. <code>d</code> - daily, <code>w</code> - weekly, <code>m</code> - monthly. This field is required when <code>type</code> is <code>exercise</code>.'
                  example: d
                  enum:
                    - d
                    - w
                    - m
                exercise_count:
                  type: integer
                  description: 'Required number of performed exercises per frequency unit. This field is required when <code>type</code> is <code>exercise</code>. MINIMUM:NUMBER:1.'
                  example: 5
              required:
                - type
    parameters:
      -
        in: path
        name: userId
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: goalId
        description: 'Goal ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/user/{userId}/goals/{goalId}/conditions/{conditionId}':
    delete:
      summary: 'Delete user goal condition'
      operationId: deleteUserGoalCondition
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Goal condition deleted'
                  code: 'GOALS:DELETE_CONDITION:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Goal condition deleted'
                  code:
                    type: string
                    example: 'GOALS:DELETE_CONDITION:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage user goals'
                  code: 'GOALS:DELETE_CONDITION:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage user goals'
                  code:
                    type: string
                    example: 'GOALS:DELETE_CONDITION:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'User not found'
                    type: object
                    example:
                      message: 'User not found'
                      code: 'GOALS:DELETE_CONDITION:USER_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'User not found'
                      code:
                        type: string
                        example: 'GOALS:DELETE_CONDITION:USER_NOT_FOUND'
                  -
                    description: 'Goal not found'
                    type: object
                    example:
                      message: 'Goal not found'
                      code: 'GOALS:DELETE_CONDITION:GOAL_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Goal not found'
                      code:
                        type: string
                        example: 'GOALS:DELETE_CONDITION:GOAL_NOT_FOUND'
      tags:
        - Goals
    parameters:
      -
        in: path
        name: userId
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: goalId
        description: 'Goal ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: conditionId
        description: 'Goal condition ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/goals/{goalId}/progress':
    get:
      summary: 'Get user goal progress'
      operationId: getUserGoalProgress
      description: "<div>Data is grouped into three parts:\n\t\t<ul>\n\t\t\t<li><code>grips</code> - data about grips progress,</li>\n\t\t\t<li><code>switches</code> - data about switches progress,</li>\n\t\t\t<li><code>exercises</code> - data about exercises progress and attempts made.</li>\n\t\t</ul>\n\n\t\tFor grips and switches there is summary, which is divided into 4 parts:\n\t\t<ul>\n\t\t\t<li><code>overall</code> - summary of whole goal time-frame,</li>\n\t\t\t<li><code>period</code> - summary of given period, according to frequency\n\t\t\t(for example: if frequency of conditions is \"weekly\", these data is summary of current's week).</li>\n\t\t\t<li><code>today</code> - summary of today's, used mainly to send daily summary notifications,</li>\n\t\t\t<li><code>conditions</code> - goal conditions with progress for each one.</li>\n\t\t</ul>\n\n\t\tThere are also extra fields inside the summary parts:\n\t\t<ul>\n\t\t\t<li><code>type</code> for grips overall summary, which points which conditions were used to calculate the summary.\n\t\t\tIf grip-any condition exists, it has priority over grip-specific conditions, otherwise summary contains sum of all\n\t\t\tgrip-specific conditions,</li>\n\t\t\t<li><code>frequency</code>, <code>frequency_from</code> and <code>frequency_to</code> for period summary for both\n\t\t\tgrips and switches, which describe time-frame of frequency and period,</li>\n\t\t\t<li><code>done</code> for today's summary for both grips and switches, indicates if today's goal is reached\n\t\t\t(it's calculated only for conditions of frequency \"daily\").</li>\n\t\t</ul></div>"
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  grips:
                    meta:
                      overall:
                        from: '2023-09-01 00:00:00'
                        to: '2023-08-30 23:59:59'
                      period:
                        from: '2023-09-15 23:59:59'
                        to: '2023-09-21 23:59:59'
                        frequency: w
                    summary:
                      type: grips-specific
                      progress: 222
                      goal: 2535
                    progress:
                      -
                        grip:
                          id: 1
                          number: 0
                          name: 'Rest Opposition'
                          description: null
                          created_at: '2023-08-30T12:20:00.000000Z'
                          updated_at: '2023-08-30T12:20:00.000000Z'
                        overall:
                          progress: 125
                          goal: 200
                        period:
                          progress: 22
                          goal: 50
                      -
                        grip:
                          id: 2
                          number: 1
                          name: Power
                          description: null
                          created_at: '2023-05-18T11:24:11.000000Z'
                          updated_at: '2023-05-18T11:24:11.000000Z'
                        overall:
                          progress: 90
                          goal: 150
                        period:
                          progress: 10
                          goal: 30
                      -
                        grip: null
                        overall:
                          progress: 78
                          goal: 1250
                        period:
                          progress: 17
                          goal: 240
                    today:
                      performed: 0
                      goal: 0
                      done: true
                  switches:
                    overall:
                      performed: 55
                      goal: 300
                    period:
                      performed: 25
                      goal: 30
                      frequency: d
                      frequency_from: '2023-09-20 00:00:00'
                      frequency_to: '2023-09-20 23:59:59'
                    today:
                      performed: 25
                      goal: 30
                      done: false
                    condition:
                      type: switch
                      switches_frequency: d
                      switches_count: 30
                  exercises:
                    performed: 1
                    goal: 3
                    done: false
                    conditions:
                      -
                        type: exercise
                        exercise_id: 1
                        exercise_frequency: d
                        exercise_count: 3
                        attempts:
                          -
                            date_from: '2023-06-06'
                            date_to: '2023-06-12'
                            count_done: 1
                            count_not_done: 1
                          -
                            date_from: '2023-06-13'
                            date_to: '2023-06-19'
                            count_done: 0
                            count_not_done: 0
                          -
                            date_from: '2023-06-20'
                            date_to: '2023-06-26'
                            count_done: 0
                            count_not_done: 0
                          -
                            date_from: '2023-06-27'
                            date_to: '2023-07-03'
                            count_done: 0
                            count_not_done: 0
                        exercise:
                          id: 1
                          name: 'Water plants'
                          description: 'Use Tripod Grip and water your plants'
                          icon: 🪴
                          created_at: '2023-05-19T10:25:37.000000Z'
                          updated_at: '2023-05-19T10:25:37.000000Z'
                properties:
                  grips:
                    type: object
                    properties:
                      meta:
                        type: object
                        properties:
                          overall:
                            type: object
                            properties:
                              from:
                                type: string
                                example: '2023-09-01 00:00:00'
                              to:
                                type: string
                                example: '2023-08-30 23:59:59'
                          period:
                            type: object
                            properties:
                              from:
                                type: string
                                example: '2023-09-15 23:59:59'
                              to:
                                type: string
                                example: '2023-09-21 23:59:59'
                              frequency:
                                type: string
                                example: w
                      summary:
                        type: object
                        properties:
                          type:
                            type: string
                            example: grips-specific
                          progress:
                            type: integer
                            example: 222
                          goal:
                            type: integer
                            example: 2535
                      progress:
                        type: array
                        example:
                          -
                            grip:
                              id: 1
                              number: 0
                              name: 'Rest Opposition'
                              description: null
                              created_at: '2023-08-30T12:20:00.000000Z'
                              updated_at: '2023-08-30T12:20:00.000000Z'
                            overall:
                              progress: 125
                              goal: 200
                            period:
                              progress: 22
                              goal: 50
                          -
                            grip:
                              id: 2
                              number: 1
                              name: Power
                              description: null
                              created_at: '2023-05-18T11:24:11.000000Z'
                              updated_at: '2023-05-18T11:24:11.000000Z'
                            overall:
                              progress: 90
                              goal: 150
                            period:
                              progress: 10
                              goal: 30
                          -
                            grip: null
                            overall:
                              progress: 78
                              goal: 1250
                            period:
                              progress: 17
                              goal: 240
                        items:
                          type: object
                          properties:
                            grip:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                number:
                                  type: integer
                                  example: 0
                                name:
                                  type: string
                                  example: 'Rest Opposition'
                                description:
                                  type: string
                                  example: null
                                created_at:
                                  type: string
                                  example: '2023-08-30T12:20:00.000000Z'
                                updated_at:
                                  type: string
                                  example: '2023-08-30T12:20:00.000000Z'
                            overall:
                              type: object
                              properties:
                                progress:
                                  type: integer
                                  example: 125
                                goal:
                                  type: integer
                                  example: 200
                            period:
                              type: object
                              properties:
                                progress:
                                  type: integer
                                  example: 22
                                goal:
                                  type: integer
                                  example: 50
                      today:
                        type: object
                        properties:
                          performed:
                            type: integer
                            example: 0
                          goal:
                            type: integer
                            example: 0
                          done:
                            type: boolean
                            example: true
                  switches:
                    type: object
                    properties:
                      overall:
                        type: object
                        properties:
                          performed:
                            type: integer
                            example: 55
                          goal:
                            type: integer
                            example: 300
                      period:
                        type: object
                        properties:
                          performed:
                            type: integer
                            example: 25
                          goal:
                            type: integer
                            example: 30
                          frequency:
                            type: string
                            example: d
                          frequency_from:
                            type: string
                            example: '2023-09-20 00:00:00'
                          frequency_to:
                            type: string
                            example: '2023-09-20 23:59:59'
                      today:
                        type: object
                        properties:
                          performed:
                            type: integer
                            example: 25
                          goal:
                            type: integer
                            example: 30
                          done:
                            type: boolean
                            example: false
                      condition:
                        type: object
                        properties:
                          type:
                            type: string
                            example: switch
                          switches_frequency:
                            type: string
                            example: d
                          switches_count:
                            type: integer
                            example: 30
                  exercises:
                    type: object
                    properties:
                      performed:
                        type: integer
                        example: 1
                      goal:
                        type: integer
                        example: 3
                      done:
                        type: boolean
                        example: false
                      conditions:
                        type: array
                        example:
                          -
                            type: exercise
                            exercise_id: 1
                            exercise_frequency: d
                            exercise_count: 3
                            attempts:
                              -
                                date_from: '2023-06-06'
                                date_to: '2023-06-12'
                                count_done: 1
                                count_not_done: 1
                              -
                                date_from: '2023-06-13'
                                date_to: '2023-06-19'
                                count_done: 0
                                count_not_done: 0
                              -
                                date_from: '2023-06-20'
                                date_to: '2023-06-26'
                                count_done: 0
                                count_not_done: 0
                              -
                                date_from: '2023-06-27'
                                date_to: '2023-07-03'
                                count_done: 0
                                count_not_done: 0
                            exercise:
                              id: 1
                              name: 'Water plants'
                              description: 'Use Tripod Grip and water your plants'
                              icon: 🪴
                              created_at: '2023-05-19T10:25:37.000000Z'
                              updated_at: '2023-05-19T10:25:37.000000Z'
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              example: exercise
                            exercise_id:
                              type: integer
                              example: 1
                            exercise_frequency:
                              type: string
                              example: d
                            exercise_count:
                              type: integer
                              example: 3
                            attempts:
                              type: array
                              example:
                                -
                                  date_from: '2023-06-06'
                                  date_to: '2023-06-12'
                                  count_done: 1
                                  count_not_done: 1
                                -
                                  date_from: '2023-06-13'
                                  date_to: '2023-06-19'
                                  count_done: 0
                                  count_not_done: 0
                                -
                                  date_from: '2023-06-20'
                                  date_to: '2023-06-26'
                                  count_done: 0
                                  count_not_done: 0
                                -
                                  date_from: '2023-06-27'
                                  date_to: '2023-07-03'
                                  count_done: 0
                                  count_not_done: 0
                              items:
                                type: object
                                properties:
                                  date_from:
                                    type: string
                                    example: '2023-06-06'
                                  date_to:
                                    type: string
                                    example: '2023-06-12'
                                  count_done:
                                    type: integer
                                    example: 1
                                  count_not_done:
                                    type: integer
                                    example: 1
                            exercise:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type: string
                                  example: 'Water plants'
                                description:
                                  type: string
                                  example: 'Use Tripod Grip and water your plants'
                                icon:
                                  type: string
                                  example: 🪴
                                created_at:
                                  type: string
                                  example: '2023-05-19T10:25:37.000000Z'
                                updated_at:
                                  type: string
                                  example: '2023-05-19T10:25:37.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view goal progress'
                  code: 'GOALS:GET_PROGRESS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view goal progress'
                  code:
                    type: string
                    example: 'GOALS:GET_PROGRESS:INSUFFICIENT_PERMISSION'
        404:
          description: 'Goal not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Goal not found'
                  code: 'GOALS:GET_PROGRESS:GOAL_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Goal not found'
                  code:
                    type: string
                    example: 'GOALS:GET_PROGRESS:GOAL_NOT_FOUND'
      tags:
        - Goals
    post:
      summary: 'Update user goal progress'
      operationId: updateUserGoalProgress
      description: 'Use this endpoint to update goal progress as patient. Add exercise attempts and mark them as done or not done.'
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  user_id: 272
                  goal_id: 8
                  type: exercise
                  grip_id: null
                  grips: 563
                  switches: 467
                  exercise_id: 8
                  exercise_done: 1
                  created_at: '2025-12-10T12:00:18.000000Z'
                  updated_at: '2025-12-10T12:00:18.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  user_id:
                    type: integer
                    example: 272
                  goal_id:
                    type: integer
                    example: 8
                  type:
                    type: string
                    example: exercise
                  grip_id:
                    type: string
                    example: null
                  grips:
                    type: integer
                    example: 563
                  switches:
                    type: integer
                    example: 467
                  exercise_id:
                    type: integer
                    example: 8
                  exercise_done:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:18.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:18.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update goal progress'
                  code: 'GOALS:UPDATE_PROGRESS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update goal progress'
                  code:
                    type: string
                    example: 'GOALS:UPDATE_PROGRESS:INSUFFICIENT_PERMISSION'
        404:
          description: 'Goal not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Goal not found'
                  code: 'GOALS:UPDATE_PROGRESS:GOAL_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Goal not found'
                  code:
                    type: string
                    example: 'GOALS:UPDATE_PROGRESS:GOAL_NOT_FOUND'
        422:
          description: 'User timezone not set'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User timezone not set'
                  code: 'GOALS:UPDATE_PROGRESS:NO_TIMEZONE'
                properties:
                  message:
                    type: string
                    example: 'User timezone not set'
                  code:
                    type: string
                    example: 'GOALS:UPDATE_PROGRESS:NO_TIMEZONE'
      tags:
        - Goals
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                exercise_id:
                  type: integer
                  description: 'Exercise ID. The <code>id</code> of an existing record in the App\Models\Exercise table.'
                  example: 1
                exercise_done:
                  type: boolean
                  description: 'Status of exercise attempt.'
                  example: true
              required:
                - exercise_id
    parameters:
      -
        in: path
        name: goalId
        description: 'Goal ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/invite/accept:
    post:
      summary: 'Accept clinician invitation'
      operationId: acceptClinicianInvitation
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  mrn: L71BRRPB1765367993
                  name: 'Fernando Fritsch'
                  email: 1765367993schimmel.esmeralda@example.net
                  language: en
                  phone: 1-240-679-4497
                  phone_country: AL
                  phone_verified_at: null
                  address1: '780 Nelson Fords'
                  address2: 'Vilmashire, CT 38115'
                  postal_code: 50399-4741
                  city: 'West Inc'
                  clinic_name: 'North Bonnie'
                  clinic_location: "516 Hyatt Ramp Suite 543\nLeonardoland, IA 56068"
                  image: null
                  mfa_enabled: 0
                  mfa_method: null
                  mfa_verified_to: null
                  location_id: null
                  created_by: null
                  active: 1
                  notifications_timezone: null
                  notifications_at: null
                  created_at: '2025-12-10T11:59:53.000000Z'
                  updated_at: '2025-12-10T11:59:53.000000Z'
                  invitation_status: accepted
                  acadle_invitation_status: null
                  roles:
                    -
                      id: 4
                      name: ClinicianSupport
                properties:
                  id:
                    type: integer
                    example: 4
                  mrn:
                    type: string
                    example: L71BRRPB1765367993
                  name:
                    type: string
                    example: 'Fernando Fritsch'
                  email:
                    type: string
                    example: 1765367993schimmel.esmeralda@example.net
                  language:
                    type: string
                    example: en
                  phone:
                    type: string
                    example: 1-240-679-4497
                  phone_country:
                    type: string
                    example: AL
                  phone_verified_at:
                    type: string
                    example: null
                  address1:
                    type: string
                    example: '780 Nelson Fords'
                  address2:
                    type: string
                    example: 'Vilmashire, CT 38115'
                  postal_code:
                    type: string
                    example: 50399-4741
                  city:
                    type: string
                    example: 'West Inc'
                  clinic_name:
                    type: string
                    example: 'North Bonnie'
                  clinic_location:
                    type: string
                    example: "516 Hyatt Ramp Suite 543\nLeonardoland, IA 56068"
                  image:
                    type: string
                    example: null
                  mfa_enabled:
                    type: integer
                    example: 0
                  mfa_method:
                    type: string
                    example: null
                  mfa_verified_to:
                    type: string
                    example: null
                  location_id:
                    type: string
                    example: null
                  created_by:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  notifications_timezone:
                    type: string
                    example: null
                  notifications_at:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:53.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:53.000000Z'
                  invitation_status:
                    type: string
                    example: accepted
                  acadle_invitation_status:
                    type: string
                    example: null
                  roles:
                    type: array
                    example:
                      -
                        id: 4
                        name: ClinicianSupport
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 4
                        name:
                          type: string
                          example: ClinicianSupport
        403:
          description: 'Invitation expired'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Invitation expired'
                  code: 'INVITATIONS:ACCEPT:INVITATION_EXPIRED'
                properties:
                  message:
                    type: string
                    example: 'Invitation expired'
                  code:
                    type: string
                    example: 'INVITATIONS:ACCEPT:INVITATION_EXPIRED'
        404:
          description: 'Invitation not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Invitation not found'
                  code: 'INVITATIONS:ACCEPT:INVITATION_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Invitation not found'
                  code:
                    type: string
                    example: 'INVITATIONS:ACCEPT:INVITATION_NOT_FOUND'
        500:
          description: 'Server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server error: invitation not accepted'
                  code: 'INVITATIONS:ACCEPT:SERVER_ERROR'
                properties:
                  message:
                    type: string
                    example: 'Server error: invitation not accepted'
                  code:
                    type: string
                    example: 'INVITATIONS:ACCEPT:SERVER_ERROR'
      tags:
        - Invitations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: 'Invitation token sent by e-mail. SIZE:STRING_LENGTH:24.'
                  example: ABC123DEF456GHI789JKL0
                email:
                  type: string
                  description: 'User e-mail. MUST_BE_EMAIL The <code>email</code> of an existing record in the App\Models\User table.'
                  example: example@domain.com
                password:
                  type: string
                  description: 'User password.'
                  example: Test123!
                language:
                  type: string
                  description: 'User language.'
                  example: en
                name:
                  type: string
                  description: 'User name.'
                  example: 'Tom Smith'
                clinic_name:
                  type: string
                  description: 'Clinic name.'
                  example: 'My clinic Ltd'
                clinic_location:
                  type: string
                  description: 'Clinic location.'
                  example: 'Example St 1/345 New York, NY'
                address1:
                  type: string
                  description: 'User address line 1.'
                  example: '7229 Rose Village'
                address2:
                  type: string
                  description: 'User address line 2.'
                  example: 'Reymundoberg, OR 29983-1310'
                mfa_enabled:
                  type: boolean
                  description: 'MFA enabled.'
                  example: true
                mfa_method:
                  type: string
                  description: 'MFA method.'
                  example: email
                  enum:
                    - email
                    - sms
              required:
                - token
                - email
                - password
                - language
                - name
      security: []
  /api/invite/acadle/accept:
    post:
      summary: 'Accept Acadle invitation'
      operationId: acceptAcadleInvitation
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 5
                  mrn: POLJ5NEA1765367993
                  name: 'Buster Macejkovic'
                  email: 1765367993haven45@example.net
                  language: en
                  phone: 641.949.5099
                  phone_country: SR
                  phone_verified_at: null
                  address1: '279 Zachariah Square Apt. 144'
                  address2: 'Briannefurt, MT 10812'
                  postal_code: '36128'
                  city: 'Swift Inc'
                  clinic_name: Hollyberg
                  clinic_location: "3291 Pfannerstill Coves\nSchultzport, SD 86244"
                  image: null
                  mfa_enabled: 0
                  mfa_method: null
                  mfa_verified_to: null
                  location_id: null
                  created_by: null
                  active: 1
                  notifications_timezone: null
                  notifications_at: null
                  created_at: '2025-12-10T11:59:54.000000Z'
                  updated_at: '2025-12-10T11:59:54.000000Z'
                  invitation_status: accepted
                  acadle_invitation_status: null
                  roles:
                    -
                      id: 2
                      name: ClinicAdmin
                properties:
                  id:
                    type: integer
                    example: 5
                  mrn:
                    type: string
                    example: POLJ5NEA1765367993
                  name:
                    type: string
                    example: 'Buster Macejkovic'
                  email:
                    type: string
                    example: 1765367993haven45@example.net
                  language:
                    type: string
                    example: en
                  phone:
                    type: string
                    example: 641.949.5099
                  phone_country:
                    type: string
                    example: SR
                  phone_verified_at:
                    type: string
                    example: null
                  address1:
                    type: string
                    example: '279 Zachariah Square Apt. 144'
                  address2:
                    type: string
                    example: 'Briannefurt, MT 10812'
                  postal_code:
                    type: string
                    example: '36128'
                  city:
                    type: string
                    example: 'Swift Inc'
                  clinic_name:
                    type: string
                    example: Hollyberg
                  clinic_location:
                    type: string
                    example: "3291 Pfannerstill Coves\nSchultzport, SD 86244"
                  image:
                    type: string
                    example: null
                  mfa_enabled:
                    type: integer
                    example: 0
                  mfa_method:
                    type: string
                    example: null
                  mfa_verified_to:
                    type: string
                    example: null
                  location_id:
                    type: string
                    example: null
                  created_by:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  notifications_timezone:
                    type: string
                    example: null
                  notifications_at:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:54.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:54.000000Z'
                  invitation_status:
                    type: string
                    example: accepted
                  acadle_invitation_status:
                    type: string
                    example: null
                  roles:
                    type: array
                    example:
                      -
                        id: 2
                        name: ClinicAdmin
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2
                        name:
                          type: string
                          example: ClinicAdmin
        403:
          description: 'Invitation expired'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Invitation expired'
                  code: 'INVITATIONS_ACADLE:ACCEPT:INVITATION_EXPIRED'
                properties:
                  message:
                    type: string
                    example: 'Invitation expired'
                  code:
                    type: string
                    example: 'INVITATIONS_ACADLE:ACCEPT:INVITATION_EXPIRED'
        404:
          description: 'Invitation not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Invitation not found'
                  code: 'INVITATIONS_ACADLE:ACCEPT:INVITATION_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Invitation not found'
                  code:
                    type: string
                    example: 'INVITATIONS_ACADLE:ACCEPT:INVITATION_NOT_FOUND'
        500:
          description: 'Server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server error: invitation not accepted'
                  code: 'INVITATIONS_ACADLE:ACCEPT:SERVER_ERROR'
                properties:
                  message:
                    type: string
                    example: 'Server error: invitation not accepted'
                  code:
                    type: string
                    example: 'INVITATIONS_ACADLE:ACCEPT:SERVER_ERROR'
      tags:
        - Invitations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: 'Invitation token. SIZE:STRING_LENGTH:24.'
                  example: a1b2c3d4e5f6g7h8i9j0k1l2m3
                email:
                  type: string
                  description: 'Email address of the Acadle user. MUST_BE_EMAIL The <code>email</code> of an existing record in the App\Models\User table.'
                  example: user@example.com
                password:
                  type: string
                  description: 'User password.'
                  example: securePassword123
                phone:
                  type: string
                  description: 'User phone number.'
                  example: 1-757-674-2135
                phone_country:
                  type: string
                  description: "Phone number's country (2 characters). SIZE:STRING_LENGTH:2."
                  example: US
                name:
                  type: string
                  description: 'User name.'
                  example: 'John Doe'
                language:
                  type: string
                  description: 'User preferred language.'
                  example: en
              required:
                - token
                - email
                - password
                - phone
                - phone_country
                - name
                - language
  /api/invite/users:
    get:
      summary: 'List users for invitations'
      operationId: listUsersForInvitations
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>clinicians</code>, <code>patients</code>, <code>devices</code>, <code>devicesAsClinician</code>, <code>roles</code>, <code>permissions</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>clinicians</code>, <code>patients</code>, <code>devices</code>, <code>devicesAsClinician</code>, <code>roles</code>, <code>permissions</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 15
                      mrn: FRFU2V7Z1765367995
                      name: 'Oleta Schaefer'
                      email: 1765367995kelly.franecki@example.com
                      language: en
                      phone: 973-927-4022
                      phone_country: MC
                      phone_verified_at: null
                      address1: '493 Carmine Street Apt. 959'
                      address2: 'East Lourdes, WY 81218-3527'
                      postal_code: '85384'
                      city: 'Braun Ltd'
                      clinic_name: Fishershire
                      clinic_location: "20066 Pollich Pike Apt. 676\nNew Carroll, KS 85501-1645"
                      image: null
                      mfa_enabled: 0
                      mfa_method: null
                      mfa_verified_to: null
                      location_id: null
                      created_by: null
                      active: 1
                      notifications_timezone: null
                      notifications_at: null
                      created_at: '2025-12-10T11:59:55.000000Z'
                      updated_at: '2025-12-10T11:59:55.000000Z'
                      invitation_status: accepted
                      acadle_invitation_status: null
                      roles:
                        -
                          id: 4
                          name: ClinicianSupport
                    -
                      id: 16
                      mrn: 327UELPP1765367995
                      name: 'Weston Corwin'
                      email: 1765367995milo39@example.org
                      language: en
                      phone: 1-937-463-9468
                      phone_country: ID
                      phone_verified_at: null
                      address1: '273 Lakin Neck'
                      address2: 'Gerardmouth, CA 67084-8694'
                      postal_code: 66640-4407
                      city: Kilback-Schultz
                      clinic_name: Rebeccaborough
                      clinic_location: "55185 Dach Trail\nNew Zackary, MT 54500-4399"
                      image: null
                      mfa_enabled: 0
                      mfa_method: null
                      mfa_verified_to: null
                      location_id: null
                      created_by: null
                      active: 1
                      notifications_timezone: null
                      notifications_at: null
                      created_at: '2025-12-10T11:59:55.000000Z'
                      updated_at: '2025-12-10T11:59:55.000000Z'
                      invitation_status: accepted
                      acadle_invitation_status: null
                      roles:
                        -
                          id: 2
                          name: ClinicAdmin
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 15
                        mrn: FRFU2V7Z1765367995
                        name: 'Oleta Schaefer'
                        email: 1765367995kelly.franecki@example.com
                        language: en
                        phone: 973-927-4022
                        phone_country: MC
                        phone_verified_at: null
                        address1: '493 Carmine Street Apt. 959'
                        address2: 'East Lourdes, WY 81218-3527'
                        postal_code: '85384'
                        city: 'Braun Ltd'
                        clinic_name: Fishershire
                        clinic_location: "20066 Pollich Pike Apt. 676\nNew Carroll, KS 85501-1645"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T11:59:55.000000Z'
                        updated_at: '2025-12-10T11:59:55.000000Z'
                        invitation_status: accepted
                        acadle_invitation_status: null
                        roles:
                          -
                            id: 4
                            name: ClinicianSupport
                      -
                        id: 16
                        mrn: 327UELPP1765367995
                        name: 'Weston Corwin'
                        email: 1765367995milo39@example.org
                        language: en
                        phone: 1-937-463-9468
                        phone_country: ID
                        phone_verified_at: null
                        address1: '273 Lakin Neck'
                        address2: 'Gerardmouth, CA 67084-8694'
                        postal_code: 66640-4407
                        city: Kilback-Schultz
                        clinic_name: Rebeccaborough
                        clinic_location: "55185 Dach Trail\nNew Zackary, MT 54500-4399"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T11:59:55.000000Z'
                        updated_at: '2025-12-10T11:59:55.000000Z'
                        invitation_status: accepted
                        acadle_invitation_status: null
                        roles:
                          -
                            id: 2
                            name: ClinicAdmin
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 15
                        mrn:
                          type: string
                          example: FRFU2V7Z1765367995
                        name:
                          type: string
                          example: 'Oleta Schaefer'
                        email:
                          type: string
                          example: 1765367995kelly.franecki@example.com
                        language:
                          type: string
                          example: en
                        phone:
                          type: string
                          example: 973-927-4022
                        phone_country:
                          type: string
                          example: MC
                        phone_verified_at:
                          type: string
                          example: null
                        address1:
                          type: string
                          example: '493 Carmine Street Apt. 959'
                        address2:
                          type: string
                          example: 'East Lourdes, WY 81218-3527'
                        postal_code:
                          type: string
                          example: '85384'
                        city:
                          type: string
                          example: 'Braun Ltd'
                        clinic_name:
                          type: string
                          example: Fishershire
                        clinic_location:
                          type: string
                          example: "20066 Pollich Pike Apt. 676\nNew Carroll, KS 85501-1645"
                        image:
                          type: string
                          example: null
                        mfa_enabled:
                          type: integer
                          example: 0
                        mfa_method:
                          type: string
                          example: null
                        mfa_verified_to:
                          type: string
                          example: null
                        location_id:
                          type: string
                          example: null
                        created_by:
                          type: string
                          example: null
                        active:
                          type: integer
                          example: 1
                        notifications_timezone:
                          type: string
                          example: null
                        notifications_at:
                          type: string
                          example: null
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:55.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:55.000000Z'
                        invitation_status:
                          type: string
                          example: accepted
                        acadle_invitation_status:
                          type: string
                          example: null
                        roles:
                          type: array
                          example:
                            -
                              id: 4
                              name: ClinicianSupport
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 4
                              name:
                                type: string
                                example: ClinicianSupport
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list users for invitations'
                  code: 'INVITATIONS:USERS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list users for invitations'
                  code:
                    type: string
                    example: 'INVITATIONS:USERS:INSUFFICIENT_PERMISSION'
      tags:
        - Invitations
  /api/invite:
    post:
      summary: 'Create clinician invitations'
      operationId: createClinicianInvitations
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 10
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 17
                      mrn: 3EKNA0AS1765367995
                      name: 'Dewitt Towne'
                      email: 1765367995ernestine78@example.com
                      language: en
                      phone: 619.563.5263
                      phone_country: BD
                      phone_verified_at: null
                      address1: '8041 Keely Point Apt. 566'
                      address2: 'Goyetteville, MI 65207-5518'
                      postal_code: 05038-3414
                      city: 'Jakubowski, Daugherty and Jerde'
                      clinic_name: Lavadamouth
                      clinic_location: "97079 Batz Road Apt. 955\nSouth Vito, MS 84571"
                      image: null
                      mfa_enabled: 0
                      mfa_method: null
                      mfa_verified_to: null
                      location_id: null
                      created_by: null
                      active: 1
                      notifications_timezone: null
                      notifications_at: null
                      created_at: '2025-12-10T11:59:55.000000Z'
                      updated_at: '2025-12-10T11:59:55.000000Z'
                      invitation_status: null
                      acadle_invitation_status: null
                      invitations:
                        -
                          id: 1
                          user_id: 18
                          invited_user_id: 17
                          type: clinician
                          training_confirmed: 0
                          created_at: '2025-12-10T11:59:55.000000Z'
                          updated_at: '2025-12-10T11:59:55.000000Z'
                      roles:
                        -
                          id: 5
                          name: Amputee
                    -
                      id: 20
                      mrn: 8I38ZYGR1765367995
                      name: 'Jay Zboncak Jr.'
                      email: 1765367995kirstin.spencer@example.com
                      language: en
                      phone: +1-757-874-7840
                      phone_country: PG
                      phone_verified_at: null
                      address1: '931 Bosco Circles'
                      address2: 'Josiehaven, WY 92457'
                      postal_code: '17980'
                      city: 'Lakin, Zulauf and Quitzon'
                      clinic_name: Gudrunport
                      clinic_location: "52455 Stoltenberg Station\nConsidineton, TX 32598"
                      image: null
                      mfa_enabled: 0
                      mfa_method: null
                      mfa_verified_to: null
                      location_id: null
                      created_by: null
                      active: 1
                      notifications_timezone: null
                      notifications_at: null
                      created_at: '2025-12-10T11:59:56.000000Z'
                      updated_at: '2025-12-10T11:59:56.000000Z'
                      invitation_status: accepted
                      acadle_invitation_status: null
                      invitations:
                        -
                          id: 2
                          user_id: 21
                          invited_user_id: 20
                          type: clinician
                          training_confirmed: 0
                          created_at: '2025-12-10T11:59:56.000000Z'
                          updated_at: '2025-12-10T11:59:56.000000Z'
                      roles:
                        -
                          id: 2
                          name: ClinicAdmin
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 10
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 17
                        mrn: 3EKNA0AS1765367995
                        name: 'Dewitt Towne'
                        email: 1765367995ernestine78@example.com
                        language: en
                        phone: 619.563.5263
                        phone_country: BD
                        phone_verified_at: null
                        address1: '8041 Keely Point Apt. 566'
                        address2: 'Goyetteville, MI 65207-5518'
                        postal_code: 05038-3414
                        city: 'Jakubowski, Daugherty and Jerde'
                        clinic_name: Lavadamouth
                        clinic_location: "97079 Batz Road Apt. 955\nSouth Vito, MS 84571"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T11:59:55.000000Z'
                        updated_at: '2025-12-10T11:59:55.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        invitations:
                          -
                            id: 1
                            user_id: 18
                            invited_user_id: 17
                            type: clinician
                            training_confirmed: 0
                            created_at: '2025-12-10T11:59:55.000000Z'
                            updated_at: '2025-12-10T11:59:55.000000Z'
                        roles:
                          -
                            id: 5
                            name: Amputee
                      -
                        id: 20
                        mrn: 8I38ZYGR1765367995
                        name: 'Jay Zboncak Jr.'
                        email: 1765367995kirstin.spencer@example.com
                        language: en
                        phone: +1-757-874-7840
                        phone_country: PG
                        phone_verified_at: null
                        address1: '931 Bosco Circles'
                        address2: 'Josiehaven, WY 92457'
                        postal_code: '17980'
                        city: 'Lakin, Zulauf and Quitzon'
                        clinic_name: Gudrunport
                        clinic_location: "52455 Stoltenberg Station\nConsidineton, TX 32598"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T11:59:56.000000Z'
                        updated_at: '2025-12-10T11:59:56.000000Z'
                        invitation_status: accepted
                        acadle_invitation_status: null
                        invitations:
                          -
                            id: 2
                            user_id: 21
                            invited_user_id: 20
                            type: clinician
                            training_confirmed: 0
                            created_at: '2025-12-10T11:59:56.000000Z'
                            updated_at: '2025-12-10T11:59:56.000000Z'
                        roles:
                          -
                            id: 2
                            name: ClinicAdmin
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 17
                        mrn:
                          type: string
                          example: 3EKNA0AS1765367995
                        name:
                          type: string
                          example: 'Dewitt Towne'
                        email:
                          type: string
                          example: 1765367995ernestine78@example.com
                        language:
                          type: string
                          example: en
                        phone:
                          type: string
                          example: 619.563.5263
                        phone_country:
                          type: string
                          example: BD
                        phone_verified_at:
                          type: string
                          example: null
                        address1:
                          type: string
                          example: '8041 Keely Point Apt. 566'
                        address2:
                          type: string
                          example: 'Goyetteville, MI 65207-5518'
                        postal_code:
                          type: string
                          example: 05038-3414
                        city:
                          type: string
                          example: 'Jakubowski, Daugherty and Jerde'
                        clinic_name:
                          type: string
                          example: Lavadamouth
                        clinic_location:
                          type: string
                          example: "97079 Batz Road Apt. 955\nSouth Vito, MS 84571"
                        image:
                          type: string
                          example: null
                        mfa_enabled:
                          type: integer
                          example: 0
                        mfa_method:
                          type: string
                          example: null
                        mfa_verified_to:
                          type: string
                          example: null
                        location_id:
                          type: string
                          example: null
                        created_by:
                          type: string
                          example: null
                        active:
                          type: integer
                          example: 1
                        notifications_timezone:
                          type: string
                          example: null
                        notifications_at:
                          type: string
                          example: null
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:55.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:55.000000Z'
                        invitation_status:
                          type: string
                          example: null
                        acadle_invitation_status:
                          type: string
                          example: null
                        invitations:
                          type: array
                          example:
                            -
                              id: 1
                              user_id: 18
                              invited_user_id: 17
                              type: clinician
                              training_confirmed: 0
                              created_at: '2025-12-10T11:59:55.000000Z'
                              updated_at: '2025-12-10T11:59:55.000000Z'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              user_id:
                                type: integer
                                example: 18
                              invited_user_id:
                                type: integer
                                example: 17
                              type:
                                type: string
                                example: clinician
                              training_confirmed:
                                type: integer
                                example: 0
                              created_at:
                                type: string
                                example: '2025-12-10T11:59:55.000000Z'
                              updated_at:
                                type: string
                                example: '2025-12-10T11:59:55.000000Z'
                        roles:
                          type: array
                          example:
                            -
                              id: 5
                              name: Amputee
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 5
                              name:
                                type: string
                                example: Amputee
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to create invitations'
                      code: 'INVITATIONS:CREATE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to create invitations'
                      code:
                        type: string
                        example: 'INVITATIONS:CREATE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'No access to given patient'
                    type: object
                    example:
                      message: 'No access to given patient'
                      code: 'INVITATIONS:CREATE:NO_ACCESS_TO_PATIENT'
                    properties:
                      message:
                        type: string
                        example: 'No access to given patient'
                      code:
                        type: string
                        example: 'INVITATIONS:CREATE:NO_ACCESS_TO_PATIENT'
      tags:
        - Invitations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                patient_id:
                  type: string
                  description: 'Patient user ID. The <code>id</code> of an existing record in the App\Models\User table.'
                  example: 1
                invitations:
                  type: array
                  description: 'List of invitations (maximum entries: 10, array of objects).'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      user_id:
                        type: integer
                        description: 'Invited user ID. Use only for existing users. Don''t use together with <code>user_email</code>. This field is required when <code>invitations.*.user_email</code> is not present. The <code>id</code> of an existing record in the App\Models\User table.'
                        example: 1
                      user_email:
                        type: string
                        description: "Invited user e-mail. Use only for non-existing users. Don't use together with <code>user_id</code>. This field is required when <code>invitations.*.user_id</code> is not present. MUST_BE_EMAIL."
                        example: newuser@domain.com
                      role:
                        type: string
                        description: 'Invited user role. Use only for non-existing users. This field is required when <code>invitations.*.user_id</code> is not present.'
                        example: Clinician
                        enum:
                          - ClinicAdmin
                          - Clinician
                          - ClinicianSupport
                      training_confirmed:
                        type: boolean
                        description: 'Confirmation that invited user was properly trained to use ADP. Must be accepted.'
                        example: true
                      permissions:
                        type: array
                        description: 'List of permissions to assign to the user (use that for ClinicianSupport role).'
                        example:
                          - velit
                        items:
                          type: string
                      'permissions[]':
                        type: string
                        description: 'Permission name.'
                        example: non
                    required:
                      - training_confirmed
              required:
                - patient_id
                - invitations
  '/api/invite/{userId}/resend':
    post:
      summary: 'Resend invitation'
      operationId: resendInvitation
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 23
                  mrn: 2QFFRQJ41765367996
                  name: 'Abigayle Runte'
                  email: 1765367996kovacek.lenna@example.net
                  language: en
                  phone: '+12693882710'
                  phone_country: FR
                  phone_verified_at: null
                  address1: '5178 Rippin Camp'
                  address2: 'Buckridgeshire, MD 32721-0977'
                  postal_code: 47276-9985
                  city: 'Botsford LLC'
                  clinic_name: 'West Emerson'
                  clinic_location: "17087 Conn Cliffs Suite 198\nO'Reillyport, TN 37105-9597"
                  image: null
                  mfa_enabled: 0
                  mfa_method: null
                  mfa_verified_to: null
                  location_id: null
                  created_by: null
                  active: 1
                  notifications_timezone: null
                  notifications_at: null
                  created_at: '2025-12-10T11:59:56.000000Z'
                  updated_at: '2025-12-10T11:59:56.000000Z'
                  invitation_status: null
                  acadle_invitation_status: null
                  invitations:
                    -
                      id: 3
                      user_id: 24
                      invited_user_id: 23
                      type: clinician
                      training_confirmed: 1
                      created_at: '2025-12-10T11:59:56.000000Z'
                      updated_at: '2025-12-10T11:59:56.000000Z'
                  roles:
                    -
                      id: 1
                      name: SuperAdmin
                properties:
                  id:
                    type: integer
                    example: 23
                  mrn:
                    type: string
                    example: 2QFFRQJ41765367996
                  name:
                    type: string
                    example: 'Abigayle Runte'
                  email:
                    type: string
                    example: 1765367996kovacek.lenna@example.net
                  language:
                    type: string
                    example: en
                  phone:
                    type: string
                    example: '+12693882710'
                  phone_country:
                    type: string
                    example: FR
                  phone_verified_at:
                    type: string
                    example: null
                  address1:
                    type: string
                    example: '5178 Rippin Camp'
                  address2:
                    type: string
                    example: 'Buckridgeshire, MD 32721-0977'
                  postal_code:
                    type: string
                    example: 47276-9985
                  city:
                    type: string
                    example: 'Botsford LLC'
                  clinic_name:
                    type: string
                    example: 'West Emerson'
                  clinic_location:
                    type: string
                    example: "17087 Conn Cliffs Suite 198\nO'Reillyport, TN 37105-9597"
                  image:
                    type: string
                    example: null
                  mfa_enabled:
                    type: integer
                    example: 0
                  mfa_method:
                    type: string
                    example: null
                  mfa_verified_to:
                    type: string
                    example: null
                  location_id:
                    type: string
                    example: null
                  created_by:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  notifications_timezone:
                    type: string
                    example: null
                  notifications_at:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:56.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:56.000000Z'
                  invitation_status:
                    type: string
                    example: null
                  acadle_invitation_status:
                    type: string
                    example: null
                  invitations:
                    type: array
                    example:
                      -
                        id: 3
                        user_id: 24
                        invited_user_id: 23
                        type: clinician
                        training_confirmed: 1
                        created_at: '2025-12-10T11:59:56.000000Z'
                        updated_at: '2025-12-10T11:59:56.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 3
                        user_id:
                          type: integer
                          example: 24
                        invited_user_id:
                          type: integer
                          example: 23
                        type:
                          type: string
                          example: clinician
                        training_confirmed:
                          type: integer
                          example: 1
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:56.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:56.000000Z'
                  roles:
                    type: array
                    example:
                      -
                        id: 1
                        name: SuperAdmin
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: SuperAdmin
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to resend invitations'
                      code: 'INVITATIONS:RESEND:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to resend invitations'
                      code:
                        type: string
                        example: 'INVITATIONS:RESEND:INSUFFICIENT_PERMISSION'
                  -
                    description: 'User not found'
                    type: object
                    example:
                      message: 'User not found'
                      code: 'INVITATIONS:RESEND:USER_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'User not found'
                      code:
                        type: string
                        example: 'INVITATIONS:RESEND:USER_NOT_FOUND'
                  -
                    description: 'Invitation already accepted'
                    type: object
                    example:
                      message: 'Invitation already accepted'
                      code: 'INVITATIONS:RESEND:INVITATION_ALREADY_ACCEPTED'
                    properties:
                      message:
                        type: string
                        example: 'Invitation already accepted'
                      code:
                        type: string
                        example: 'INVITATIONS:RESEND:INVITATION_ALREADY_ACCEPTED'
      tags:
        - Invitations
    parameters:
      -
        in: path
        name: userId
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/invite/acadle/users:
    get:
      summary: 'List all users invited to Acadle'
      operationId: listAllUsersInvitedToAcadle
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Filter users by searching in: user name, user email, contact name, contact surname, contact email, CPO number.'
          example: john
          required: false
          schema:
            type: string
            description: 'Filter users by searching in: user name, user email, contact name, contact surname, contact email, CPO number.'
            example: john
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>roles</code>, <code>acadleSurvey</code>, <code>latestAcadleSurvey</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>roles</code>, <code>acadleSurvey</code>, <code>latestAcadleSurvey</code>).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>survey_completion_date</code>). Default: survey_completion_date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>survey_completion_date</code>). Default: survey_completion_date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 26
                      mrn: YQE7QJLG1765367996
                      name: 'Waino Bruen'
                      email: 1765367996wferry@example.org
                      language: en
                      phone: '(385) 204-1842'
                      phone_country: AO
                      phone_verified_at: null
                      address1: '4328 Lueilwitz Pike Apt. 876'
                      address2: 'Lake Samirshire, MT 57817-9625'
                      postal_code: '91611'
                      city: 'Nienow, Ernser and Windler'
                      clinic_name: Elmoretown
                      clinic_location: "5775 Savion Green\nMargarettafort, AZ 79246-5127"
                      image: null
                      mfa_enabled: 0
                      mfa_method: null
                      mfa_verified_to: null
                      location_id: null
                      created_by: null
                      active: 1
                      notifications_timezone: null
                      notifications_at: null
                      created_at: '2025-12-10T11:59:56.000000Z'
                      updated_at: '2025-12-10T11:59:56.000000Z'
                      invitation_status: null
                      acadle_invitation_status: null
                      roles:
                        -
                          id: 5
                          name: Amputee
                    -
                      id: 27
                      mrn: HRBVQN821765367996
                      name: 'Mikel Bernhard'
                      email: 1765367996syble.douglas@example.net
                      language: en
                      phone: 281-705-6774
                      phone_country: JE
                      phone_verified_at: null
                      address1: '24824 Emery Heights'
                      address2: 'North Alysachester, TN 18093'
                      postal_code: '66071'
                      city: "Wuckert, O'Reilly and Hessel"
                      clinic_name: 'North Magnusborough'
                      clinic_location: "31261 Nitzsche Pines Suite 292\nNorth Diamond, FL 04239-6045"
                      image: null
                      mfa_enabled: 0
                      mfa_method: null
                      mfa_verified_to: null
                      location_id: null
                      created_by: null
                      active: 1
                      notifications_timezone: null
                      notifications_at: null
                      created_at: '2025-12-10T11:59:56.000000Z'
                      updated_at: '2025-12-10T11:59:56.000000Z'
                      invitation_status: null
                      acadle_invitation_status: accepted
                      roles:
                        -
                          id: 6
                          name: AcadleUser
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 26
                        mrn: YQE7QJLG1765367996
                        name: 'Waino Bruen'
                        email: 1765367996wferry@example.org
                        language: en
                        phone: '(385) 204-1842'
                        phone_country: AO
                        phone_verified_at: null
                        address1: '4328 Lueilwitz Pike Apt. 876'
                        address2: 'Lake Samirshire, MT 57817-9625'
                        postal_code: '91611'
                        city: 'Nienow, Ernser and Windler'
                        clinic_name: Elmoretown
                        clinic_location: "5775 Savion Green\nMargarettafort, AZ 79246-5127"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T11:59:56.000000Z'
                        updated_at: '2025-12-10T11:59:56.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles:
                          -
                            id: 5
                            name: Amputee
                      -
                        id: 27
                        mrn: HRBVQN821765367996
                        name: 'Mikel Bernhard'
                        email: 1765367996syble.douglas@example.net
                        language: en
                        phone: 281-705-6774
                        phone_country: JE
                        phone_verified_at: null
                        address1: '24824 Emery Heights'
                        address2: 'North Alysachester, TN 18093'
                        postal_code: '66071'
                        city: "Wuckert, O'Reilly and Hessel"
                        clinic_name: 'North Magnusborough'
                        clinic_location: "31261 Nitzsche Pines Suite 292\nNorth Diamond, FL 04239-6045"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T11:59:56.000000Z'
                        updated_at: '2025-12-10T11:59:56.000000Z'
                        invitation_status: null
                        acadle_invitation_status: accepted
                        roles:
                          -
                            id: 6
                            name: AcadleUser
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 26
                        mrn:
                          type: string
                          example: YQE7QJLG1765367996
                        name:
                          type: string
                          example: 'Waino Bruen'
                        email:
                          type: string
                          example: 1765367996wferry@example.org
                        language:
                          type: string
                          example: en
                        phone:
                          type: string
                          example: '(385) 204-1842'
                        phone_country:
                          type: string
                          example: AO
                        phone_verified_at:
                          type: string
                          example: null
                        address1:
                          type: string
                          example: '4328 Lueilwitz Pike Apt. 876'
                        address2:
                          type: string
                          example: 'Lake Samirshire, MT 57817-9625'
                        postal_code:
                          type: string
                          example: '91611'
                        city:
                          type: string
                          example: 'Nienow, Ernser and Windler'
                        clinic_name:
                          type: string
                          example: Elmoretown
                        clinic_location:
                          type: string
                          example: "5775 Savion Green\nMargarettafort, AZ 79246-5127"
                        image:
                          type: string
                          example: null
                        mfa_enabled:
                          type: integer
                          example: 0
                        mfa_method:
                          type: string
                          example: null
                        mfa_verified_to:
                          type: string
                          example: null
                        location_id:
                          type: string
                          example: null
                        created_by:
                          type: string
                          example: null
                        active:
                          type: integer
                          example: 1
                        notifications_timezone:
                          type: string
                          example: null
                        notifications_at:
                          type: string
                          example: null
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:56.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:56.000000Z'
                        invitation_status:
                          type: string
                          example: null
                        acadle_invitation_status:
                          type: string
                          example: null
                        roles:
                          type: array
                          example:
                            -
                              id: 5
                              name: Amputee
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 5
                              name:
                                type: string
                                example: Amputee
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list users for invitations'
                  code: 'INVITATIONS_ACADLE:USERS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list users for invitations'
                  code:
                    type: string
                    example: 'INVITATIONS_ACADLE:USERS:INSUFFICIENT_PERMISSION'
      tags:
        - Invitations
  /api/invite/acadle:
    post:
      summary: 'Create Acadle invitation'
      operationId: createAcadleInvitation
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 28
                  mrn: YIL1QMXI1765367996
                  name: 'Katlynn Koelpin'
                  email: 1765367996ona.bins@example.com
                  language: en
                  phone: 828.443.1838
                  phone_country: CC
                  phone_verified_at: null
                  address1: '516 Ledner Lights'
                  address2: 'Beattyberg, GA 96542-4752'
                  postal_code: '97250'
                  city: 'Will Inc'
                  clinic_name: Mertzside
                  clinic_location: "481 Kelly Unions\nSchmidtstad, MN 13360"
                  image: null
                  mfa_enabled: 0
                  mfa_method: null
                  mfa_verified_to: null
                  location_id: null
                  created_by: null
                  active: 1
                  notifications_timezone: null
                  notifications_at: null
                  created_at: '2025-12-10T11:59:56.000000Z'
                  updated_at: '2025-12-10T11:59:56.000000Z'
                  invitation_status: null
                  acadle_invitation_status: accepted
                  invitations:
                    -
                      id: 4
                      user_id: 29
                      invited_user_id: 28
                      type: clinician
                      training_confirmed: 1
                      created_at: '2025-12-10T11:59:56.000000Z'
                      updated_at: '2025-12-10T11:59:56.000000Z'
                  roles:
                    -
                      id: 6
                      name: AcadleUser
                properties:
                  id:
                    type: integer
                    example: 28
                  mrn:
                    type: string
                    example: YIL1QMXI1765367996
                  name:
                    type: string
                    example: 'Katlynn Koelpin'
                  email:
                    type: string
                    example: 1765367996ona.bins@example.com
                  language:
                    type: string
                    example: en
                  phone:
                    type: string
                    example: 828.443.1838
                  phone_country:
                    type: string
                    example: CC
                  phone_verified_at:
                    type: string
                    example: null
                  address1:
                    type: string
                    example: '516 Ledner Lights'
                  address2:
                    type: string
                    example: 'Beattyberg, GA 96542-4752'
                  postal_code:
                    type: string
                    example: '97250'
                  city:
                    type: string
                    example: 'Will Inc'
                  clinic_name:
                    type: string
                    example: Mertzside
                  clinic_location:
                    type: string
                    example: "481 Kelly Unions\nSchmidtstad, MN 13360"
                  image:
                    type: string
                    example: null
                  mfa_enabled:
                    type: integer
                    example: 0
                  mfa_method:
                    type: string
                    example: null
                  mfa_verified_to:
                    type: string
                    example: null
                  location_id:
                    type: string
                    example: null
                  created_by:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  notifications_timezone:
                    type: string
                    example: null
                  notifications_at:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:56.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:56.000000Z'
                  invitation_status:
                    type: string
                    example: null
                  acadle_invitation_status:
                    type: string
                    example: accepted
                  invitations:
                    type: array
                    example:
                      -
                        id: 4
                        user_id: 29
                        invited_user_id: 28
                        type: clinician
                        training_confirmed: 1
                        created_at: '2025-12-10T11:59:56.000000Z'
                        updated_at: '2025-12-10T11:59:56.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 4
                        user_id:
                          type: integer
                          example: 29
                        invited_user_id:
                          type: integer
                          example: 28
                        type:
                          type: string
                          example: clinician
                        training_confirmed:
                          type: integer
                          example: 1
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:56.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:56.000000Z'
                  roles:
                    type: array
                    example:
                      -
                        id: 6
                        name: AcadleUser
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 6
                        name:
                          type: string
                          example: AcadleUser
        400:
          description: 'User already exists'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User with this email already exists in the system'
                  code: 'INVITATIONS_ACADLE:CREATE:USER_ALREADY_EXISTS'
                properties:
                  message:
                    type: string
                    example: 'User with this email already exists in the system'
                  code:
                    type: string
                    example: 'INVITATIONS_ACADLE:CREATE:USER_ALREADY_EXISTS'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to create invitations'
                  code: 'INVITATIONS_ACADLE:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to create invitations'
                  code:
                    type: string
                    example: 'INVITATIONS_ACADLE:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - Invitations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'Email address of the Acadle user.'
                  example: carissa.marks@example.org
              required:
                - email
  '/api/invite/acadle/{userId}/resend':
    post:
      summary: 'Resend Acadle invitation'
      operationId: resendAcadleInvitation
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 31
                  mrn: CMX80YHU1765367996
                  name: 'Prof. Leonel Stark MD'
                  email: 1765367996vallie91@example.org
                  language: en
                  phone: +1.442.482.9299
                  phone_country: MR
                  phone_verified_at: null
                  address1: '156 Adelbert Mission'
                  address2: 'West Martaburgh, IL 86507-8998'
                  postal_code: '98392'
                  city: "O'Connell, Sporer and Nitzsche"
                  clinic_name: 'North Rebaport'
                  clinic_location: "780 Logan Knoll Suite 546\nPfefferberg, RI 88701"
                  image: null
                  mfa_enabled: 0
                  mfa_method: null
                  mfa_verified_to: null
                  location_id: null
                  created_by: null
                  active: 1
                  notifications_timezone: null
                  notifications_at: null
                  created_at: '2025-12-10T11:59:56.000000Z'
                  updated_at: '2025-12-10T11:59:56.000000Z'
                  invitation_status: accepted
                  acadle_invitation_status: null
                  invitations:
                    -
                      id: 5
                      user_id: 32
                      invited_user_id: 31
                      type: clinician
                      training_confirmed: 0
                      created_at: '2025-12-10T11:59:57.000000Z'
                      updated_at: '2025-12-10T11:59:57.000000Z'
                  roles:
                    -
                      id: 3
                      name: Clinician
                properties:
                  id:
                    type: integer
                    example: 31
                  mrn:
                    type: string
                    example: CMX80YHU1765367996
                  name:
                    type: string
                    example: 'Prof. Leonel Stark MD'
                  email:
                    type: string
                    example: 1765367996vallie91@example.org
                  language:
                    type: string
                    example: en
                  phone:
                    type: string
                    example: +1.442.482.9299
                  phone_country:
                    type: string
                    example: MR
                  phone_verified_at:
                    type: string
                    example: null
                  address1:
                    type: string
                    example: '156 Adelbert Mission'
                  address2:
                    type: string
                    example: 'West Martaburgh, IL 86507-8998'
                  postal_code:
                    type: string
                    example: '98392'
                  city:
                    type: string
                    example: "O'Connell, Sporer and Nitzsche"
                  clinic_name:
                    type: string
                    example: 'North Rebaport'
                  clinic_location:
                    type: string
                    example: "780 Logan Knoll Suite 546\nPfefferberg, RI 88701"
                  image:
                    type: string
                    example: null
                  mfa_enabled:
                    type: integer
                    example: 0
                  mfa_method:
                    type: string
                    example: null
                  mfa_verified_to:
                    type: string
                    example: null
                  location_id:
                    type: string
                    example: null
                  created_by:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  notifications_timezone:
                    type: string
                    example: null
                  notifications_at:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:56.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:56.000000Z'
                  invitation_status:
                    type: string
                    example: accepted
                  acadle_invitation_status:
                    type: string
                    example: null
                  invitations:
                    type: array
                    example:
                      -
                        id: 5
                        user_id: 32
                        invited_user_id: 31
                        type: clinician
                        training_confirmed: 0
                        created_at: '2025-12-10T11:59:57.000000Z'
                        updated_at: '2025-12-10T11:59:57.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 5
                        user_id:
                          type: integer
                          example: 32
                        invited_user_id:
                          type: integer
                          example: 31
                        type:
                          type: string
                          example: clinician
                        training_confirmed:
                          type: integer
                          example: 0
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:57.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:57.000000Z'
                  roles:
                    type: array
                    example:
                      -
                        id: 3
                        name: Clinician
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 3
                        name:
                          type: string
                          example: Clinician
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to resend invitations'
                      code: 'INVITATIONS_ACADLE:RESEND:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to resend invitations'
                      code:
                        type: string
                        example: 'INVITATIONS_ACADLE:RESEND:INSUFFICIENT_PERMISSION'
                  -
                    description: 'User not found'
                    type: object
                    example:
                      message: 'User not found'
                      code: 'INVITATIONS_ACADLE:RESEND:USER_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'User not found'
                      code:
                        type: string
                        example: 'INVITATIONS_ACADLE:RESEND:USER_NOT_FOUND'
                  -
                    description: 'Invitation already accepted'
                    type: object
                    example:
                      message: 'Invitation already accepted'
                      code: 'INVITATIONS_ACADLE:RESEND:INVITATION_ALREADY_ACCEPTED'
                    properties:
                      message:
                        type: string
                        example: 'Invitation already accepted'
                      code:
                        type: string
                        example: 'INVITATIONS_ACADLE:RESEND:INVITATION_ALREADY_ACCEPTED'
      tags:
        - Invitations
    parameters:
      -
        in: path
        name: userId
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/invite/tokens/{userId}':
    get:
      summary: 'Admin access to invitation tokens'
      operationId: adminAccessToInvitationTokens
      description: '<strong>Requires <code>admin.invitations_tokens_access</code> permission.</strong><br />Fetches only non-accepted and non-expired invitations.'
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    user_id:
                      type: integer
                      example: 1
                    invited_user_id:
                      type: integer
                      example: 2
                    token:
                      type: string
                      example: I0V25NUVMHC0F8RRF1YEY5BT
                    training_confirmed:
                      type: integer
                      example: 1
                    created_at:
                      type: string
                      example: '2025-05-12T12:00:00.000000Z'
                    updated_at:
                      type: string
                      example: '2025-05-12T12:00:00.000000Z'
                example:
                  -
                    id: 1
                    user_id: 1
                    invited_user_id: 2
                    token: I0V25NUVMHC0F8RRF1YEY5BT
                    training_confirmed: 1
                    created_at: '2025-05-12T12:00:00.000000Z'
                    updated_at: '2025-05-12T12:00:00.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to get invitation tokens'
                  code: 'INVITATIONS:ADMIN_TOKENS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to get invitation tokens'
                  code:
                    type: string
                    example: 'INVITATIONS:ADMIN_TOKENS:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'INVITATIONS:ADMIN_TOKENS:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'INVITATIONS:ADMIN_TOKENS:USER_NOT_FOUND'
      tags:
        - Invitations
    parameters:
      -
        in: path
        name: userId
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/logs:
    get:
      summary: 'Get events log'
      operationId: getEventsLog
      description: "user - user account that performed the action<br />\n\t\telement - element model that has been affected by the action"
      parameters:
        -
          in: query
          name: search
          description: "Filter logs by related element data:\n\t\t<ul>\n\t\t\t<li>for users: search by <code>name</code> or <code>email</code></li>\n\t\t\t<li>for devices: search by <code>serial</code> or <code>bluetooth_id</code></li>\n\t\t\t<li>for P2P sessions: search by <code>amputee_uuid</code> or <code>clinician_uuid</code></li>\n\t\t</ul>"
          example: Test
          required: false
          schema:
            type: string
            description: "Filter logs by related element data:\n\t\t<ul>\n\t\t\t<li>for users: search by <code>name</code> or <code>email</code></li>\n\t\t\t<li>for devices: search by <code>serial</code> or <code>bluetooth_id</code></li>\n\t\t\t<li>for P2P sessions: search by <code>amputee_uuid</code> or <code>clinician_uuid</code></li>\n\t\t</ul>"
            example: Test
        -
          in: query
          name: ip
          description: 'Filter logs by IP address.'
          example: 200.200.100.5
          required: false
          schema:
            type: string
            description: 'Filter logs by IP address.'
            example: 200.200.100.5
        -
          in: query
          name: user
          description: 'Filter logs by user.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter logs by user.'
            example: 1
        -
          in: query
          name: type
          description: 'Filter logs by event type (available: <code>user</code>, <code>device</code>, <code>p2p_session</code>.'
          example: user
          required: false
          schema:
            type: string
            description: 'Filter logs by event type (available: <code>user</code>, <code>device</code>, <code>p2p_session</code>.'
            example: user
        -
          in: query
          name: date_from
          description: 'Filter logs from date (timestamp).'
          example: 1642003200
          required: false
          schema:
            type: integer
            description: 'Filter logs from date (timestamp).'
            example: 1642003200
        -
          in: query
          name: date_to
          description: 'Filter logs to date (timestamp).'
          example: 1642003200
          required: false
          schema:
            type: integer
            description: 'Filter logs to date (timestamp).'
            example: 1642003200
        -
          in: query
          name: include_sessions
          description: 'Login and logout events are filtered out by default. Set this parameter to 1 to include these events.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Login and logout events are filtered out by default. Set this parameter to 1 to include these events.'
            example: 1
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>type</code>, <code>username</code>, <code>ip_address</code>, <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>type</code>, <code>username</code>, <code>ip_address</code>, <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      user_id: 277
                      event_name: event_factory
                      element_type: App\Models\User
                      element_id: 276
                      comments: ''
                      ip_address: 58.10.81.135
                      created_at: '1986-10-13T22:15:26.000000Z'
                      updated_at: '2025-12-10T12:00:18.000000Z'
                      user:
                        id: 277
                        mrn: NTXSHIF81765368018
                        name: 'Jedediah Flatley PhD'
                        email: 1765368018kenyatta71@example.com
                        language: en
                        phone: '(828) 690-1957'
                        phone_country: BI
                        phone_verified_at: null
                        address1: '587 Little Roads'
                        address2: 'West Keaganport, UT 20573-2433'
                        postal_code: '93800'
                        city: "O'Hara, Pollich and Welch"
                        clinic_name: 'Lake Shany'
                        clinic_location: "7188 Veronica Spring\nNorth Carmellaberg, RI 83125"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:18.000000Z'
                        updated_at: '2025-12-10T12:00:18.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                      element:
                        id: 276
                        mrn: 34H8DBP91765368018
                        name: 'Amina Abbott IV'
                        email: 1765368018bdietrich@example.com
                        language: en
                        phone: 364.700.7149
                        phone_country: RE
                        phone_verified_at: null
                        address1: '59059 Lang Wells'
                        address2: 'Lake Judge, MO 96818'
                        postal_code: 97490-9402
                        city: 'McCullough and Sons'
                        clinic_name: Haagmouth
                        clinic_location: "37187 Caleb Knoll\nFraneckifort, OK 15987-0464"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:18.000000Z'
                        updated_at: '2025-12-10T12:00:18.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                    -
                      id: 2
                      user_id: 280
                      event_name: event_factory
                      element_type: App\Models\User
                      element_id: 279
                      comments: ''
                      ip_address: 154.169.142.195
                      created_at: '1977-01-01T22:00:27.000000Z'
                      updated_at: '2025-12-10T12:00:18.000000Z'
                      user:
                        id: 280
                        mrn: 88WG9A4G1765368018
                        name: 'Dr. Enrico Volkman'
                        email: 1765368018kohler.edison@example.net
                        language: en
                        phone: 480-723-0074
                        phone_country: AM
                        phone_verified_at: null
                        address1: '183 Bernadette Plains Apt. 565'
                        address2: 'Clotildechester, MD 16320-0169'
                        postal_code: 71068-4363
                        city: 'Lockman, Weber and Lakin'
                        clinic_name: 'New Murphymouth'
                        clinic_location: "7126 Elbert Mews Suite 966\nBruenchester, IA 17870-3393"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:18.000000Z'
                        updated_at: '2025-12-10T12:00:18.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                      element:
                        id: 279
                        mrn: JD6RXO7S1765368018
                        name: 'Liana Cartwright'
                        email: 1765368018elna47@example.net
                        language: en
                        phone: 904-650-9450
                        phone_country: PY
                        phone_verified_at: null
                        address1: '563 Linwood Drive'
                        address2: 'South Kamerontown, ID 83704'
                        postal_code: '67932'
                        city: Veum-Jakubowski
                        clinic_name: 'Lake Mervin'
                        clinic_location: "34696 Maryse Plaza\nLake Eleonore, AR 25417"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:18.000000Z'
                        updated_at: '2025-12-10T12:00:18.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        user_id: 277
                        event_name: event_factory
                        element_type: App\Models\User
                        element_id: 276
                        comments: ''
                        ip_address: 58.10.81.135
                        created_at: '1986-10-13T22:15:26.000000Z'
                        updated_at: '2025-12-10T12:00:18.000000Z'
                        user:
                          id: 277
                          mrn: NTXSHIF81765368018
                          name: 'Jedediah Flatley PhD'
                          email: 1765368018kenyatta71@example.com
                          language: en
                          phone: '(828) 690-1957'
                          phone_country: BI
                          phone_verified_at: null
                          address1: '587 Little Roads'
                          address2: 'West Keaganport, UT 20573-2433'
                          postal_code: '93800'
                          city: "O'Hara, Pollich and Welch"
                          clinic_name: 'Lake Shany'
                          clinic_location: "7188 Veronica Spring\nNorth Carmellaberg, RI 83125"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:18.000000Z'
                          updated_at: '2025-12-10T12:00:18.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                        element:
                          id: 276
                          mrn: 34H8DBP91765368018
                          name: 'Amina Abbott IV'
                          email: 1765368018bdietrich@example.com
                          language: en
                          phone: 364.700.7149
                          phone_country: RE
                          phone_verified_at: null
                          address1: '59059 Lang Wells'
                          address2: 'Lake Judge, MO 96818'
                          postal_code: 97490-9402
                          city: 'McCullough and Sons'
                          clinic_name: Haagmouth
                          clinic_location: "37187 Caleb Knoll\nFraneckifort, OK 15987-0464"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:18.000000Z'
                          updated_at: '2025-12-10T12:00:18.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                      -
                        id: 2
                        user_id: 280
                        event_name: event_factory
                        element_type: App\Models\User
                        element_id: 279
                        comments: ''
                        ip_address: 154.169.142.195
                        created_at: '1977-01-01T22:00:27.000000Z'
                        updated_at: '2025-12-10T12:00:18.000000Z'
                        user:
                          id: 280
                          mrn: 88WG9A4G1765368018
                          name: 'Dr. Enrico Volkman'
                          email: 1765368018kohler.edison@example.net
                          language: en
                          phone: 480-723-0074
                          phone_country: AM
                          phone_verified_at: null
                          address1: '183 Bernadette Plains Apt. 565'
                          address2: 'Clotildechester, MD 16320-0169'
                          postal_code: 71068-4363
                          city: 'Lockman, Weber and Lakin'
                          clinic_name: 'New Murphymouth'
                          clinic_location: "7126 Elbert Mews Suite 966\nBruenchester, IA 17870-3393"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:18.000000Z'
                          updated_at: '2025-12-10T12:00:18.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                        element:
                          id: 279
                          mrn: JD6RXO7S1765368018
                          name: 'Liana Cartwright'
                          email: 1765368018elna47@example.net
                          language: en
                          phone: 904-650-9450
                          phone_country: PY
                          phone_verified_at: null
                          address1: '563 Linwood Drive'
                          address2: 'South Kamerontown, ID 83704'
                          postal_code: '67932'
                          city: Veum-Jakubowski
                          clinic_name: 'Lake Mervin'
                          clinic_location: "34696 Maryse Plaza\nLake Eleonore, AR 25417"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:18.000000Z'
                          updated_at: '2025-12-10T12:00:18.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        user_id:
                          type: integer
                          example: 277
                        event_name:
                          type: string
                          example: event_factory
                        element_type:
                          type: string
                          example: App\Models\User
                        element_id:
                          type: integer
                          example: 276
                        comments:
                          type: string
                          example: ''
                        ip_address:
                          type: string
                          example: 58.10.81.135
                        created_at:
                          type: string
                          example: '1986-10-13T22:15:26.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:18.000000Z'
                        user:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 277
                            mrn:
                              type: string
                              example: NTXSHIF81765368018
                            name:
                              type: string
                              example: 'Jedediah Flatley PhD'
                            email:
                              type: string
                              example: 1765368018kenyatta71@example.com
                            language:
                              type: string
                              example: en
                            phone:
                              type: string
                              example: '(828) 690-1957'
                            phone_country:
                              type: string
                              example: BI
                            phone_verified_at:
                              type: string
                              example: null
                            address1:
                              type: string
                              example: '587 Little Roads'
                            address2:
                              type: string
                              example: 'West Keaganport, UT 20573-2433'
                            postal_code:
                              type: string
                              example: '93800'
                            city:
                              type: string
                              example: "O'Hara, Pollich and Welch"
                            clinic_name:
                              type: string
                              example: 'Lake Shany'
                            clinic_location:
                              type: string
                              example: "7188 Veronica Spring\nNorth Carmellaberg, RI 83125"
                            image:
                              type: string
                              example: null
                            mfa_enabled:
                              type: integer
                              example: 0
                            mfa_method:
                              type: string
                              example: null
                            mfa_verified_to:
                              type: string
                              example: null
                            location_id:
                              type: string
                              example: null
                            created_by:
                              type: string
                              example: null
                            active:
                              type: integer
                              example: 1
                            notifications_timezone:
                              type: string
                              example: null
                            notifications_at:
                              type: string
                              example: null
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:18.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:18.000000Z'
                            invitation_status:
                              type: string
                              example: null
                            acadle_invitation_status:
                              type: string
                              example: null
                            roles:
                              type: array
                              example: []
                        element:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 276
                            mrn:
                              type: string
                              example: 34H8DBP91765368018
                            name:
                              type: string
                              example: 'Amina Abbott IV'
                            email:
                              type: string
                              example: 1765368018bdietrich@example.com
                            language:
                              type: string
                              example: en
                            phone:
                              type: string
                              example: 364.700.7149
                            phone_country:
                              type: string
                              example: RE
                            phone_verified_at:
                              type: string
                              example: null
                            address1:
                              type: string
                              example: '59059 Lang Wells'
                            address2:
                              type: string
                              example: 'Lake Judge, MO 96818'
                            postal_code:
                              type: string
                              example: 97490-9402
                            city:
                              type: string
                              example: 'McCullough and Sons'
                            clinic_name:
                              type: string
                              example: Haagmouth
                            clinic_location:
                              type: string
                              example: "37187 Caleb Knoll\nFraneckifort, OK 15987-0464"
                            image:
                              type: string
                              example: null
                            mfa_enabled:
                              type: integer
                              example: 0
                            mfa_method:
                              type: string
                              example: null
                            mfa_verified_to:
                              type: string
                              example: null
                            location_id:
                              type: string
                              example: null
                            created_by:
                              type: string
                              example: null
                            active:
                              type: integer
                              example: 1
                            notifications_timezone:
                              type: string
                              example: null
                            notifications_at:
                              type: string
                              example: null
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:18.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:18.000000Z'
                            invitation_status:
                              type: string
                              example: null
                            acadle_invitation_status:
                              type: string
                              example: null
                            roles:
                              type: array
                              example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to access event logs'
                  code: 'EVENT_LOGS:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to access event logs'
                  code:
                    type: string
                    example: 'EVENT_LOGS:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - Logs
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                date_from:
                  type: string
                  description: ''
                  example: null
                date_to:
                  type: string
                  description: ''
                  example: null
  /api/messages:
    get:
      summary: 'Get user messages list'
      operationId: getUserMessagesList
      description: ''
      parameters:
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      user_id: null
                      message_id: 1
                      is_read: 0
                      is_archived: 0
                      is_deleted: 0
                      message:
                        id: 1
                        sender_id: null
                        title: 'Autem soluta velit iure asperiores dolorem quisquam.'
                        content: 'Dolores quibusdam ut quod quas molestias iste et.'
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                        sender: null
                    -
                      id: 2
                      user_id: null
                      message_id: 2
                      is_read: 0
                      is_archived: 0
                      is_deleted: 0
                      message:
                        id: 2
                        sender_id: null
                        title: 'Quam modi accusamus doloribus possimus vel qui.'
                        content: 'Asperiores nesciunt ducimus culpa rerum aspernatur et.'
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                        sender: null
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        user_id: null
                        message_id: 1
                        is_read: 0
                        is_archived: 0
                        is_deleted: 0
                        message:
                          id: 1
                          sender_id: null
                          title: 'Autem soluta velit iure asperiores dolorem quisquam.'
                          content: 'Dolores quibusdam ut quod quas molestias iste et.'
                          created_at: '2025-12-10T12:00:06.000000Z'
                          updated_at: '2025-12-10T12:00:06.000000Z'
                          sender: null
                      -
                        id: 2
                        user_id: null
                        message_id: 2
                        is_read: 0
                        is_archived: 0
                        is_deleted: 0
                        message:
                          id: 2
                          sender_id: null
                          title: 'Quam modi accusamus doloribus possimus vel qui.'
                          content: 'Asperiores nesciunt ducimus culpa rerum aspernatur et.'
                          created_at: '2025-12-10T12:00:06.000000Z'
                          updated_at: '2025-12-10T12:00:06.000000Z'
                          sender: null
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        user_id:
                          type: string
                          example: null
                        message_id:
                          type: integer
                          example: 1
                        is_read:
                          type: integer
                          example: 0
                        is_archived:
                          type: integer
                          example: 0
                        is_deleted:
                          type: integer
                          example: 0
                        message:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            sender_id:
                              type: string
                              example: null
                            title:
                              type: string
                              example: 'Autem soluta velit iure asperiores dolorem quisquam.'
                            content:
                              type: string
                              example: 'Dolores quibusdam ut quod quas molestias iste et.'
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:06.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:06.000000Z'
                            sender:
                              type: string
                              example: null
      tags:
        - Messages
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  type: string
                  description: 'Filter results by message status (available: <code>archived</code>, <code>all</code>). Defaults to non-archived only.'
                  example: all
  /api/message:
    post:
      summary: 'Send message to multiple users'
      operationId: sendMessageToMultipleUsers
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Messages sent'
                  count: 3
                  code: 'MESSAGES:SEND:SENT'
                properties:
                  message:
                    type: string
                    example: 'Messages sent'
                  count:
                    type: integer
                    example: 3
                  code:
                    type: string
                    example: 'MESSAGES:SEND:SENT'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to send messages'
                  code: 'MESSAGES:SEND:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to send messages'
                  code:
                    type: string
                    example: 'MESSAGES:SEND:INSUFFICIENT_PERMISSION'
      tags:
        - Messages
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'Message title. MINIMUM:STRING_LENGTH:3.'
                  example: 'Reminder about your vaccination'
                content:
                  type: string
                  description: 'Message content text.'
                  example: 'Lorem ipsum dolor sit amet'
                roles:
                  type: string
                  description: 'Filter recipients with given role (comma-separated).'
                  example: 'Clinician,Amputee'
              required:
                - title
  '/api/message/{id}/read':
    post:
      summary: 'Mark message as read'
      operationId: markMessageAsRead
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  user_id: 143
                  message_id: 3
                  is_read: 0
                  is_archived: 0
                  is_deleted: 0
                properties:
                  id:
                    type: integer
                    example: 3
                  user_id:
                    type: integer
                    example: 143
                  message_id:
                    type: integer
                    example: 3
                  is_read:
                    type: integer
                    example: 0
                  is_archived:
                    type: integer
                    example: 0
                  is_deleted:
                    type: integer
                    example: 0
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to mark this message as read'
                  code: 'MESSAGES:READ:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to mark this message as read'
                  code:
                    type: string
                    example: 'MESSAGES:READ:INSUFFICIENT_PERMISSION'
        404:
          description: 'Message not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Message not found'
                  code: 'MESSAGES:READ:MESSAGE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Message not found'
                  code:
                    type: string
                    example: 'MESSAGES:READ:MESSAGE_NOT_FOUND'
      tags:
        - Messages
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                state:
                  type: boolean
                  description: 'Explicit read state. Default: 1 (true).'
                  example: true
    parameters:
      -
        in: path
        name: id
        description: 'User Message ID (id from messages list; do not confuse with message_id).'
        example: 1
        required: true
        schema:
          type: integer
  '/api/message/{id}/archive':
    post:
      summary: 'Mark message as archived'
      operationId: markMessageAsArchived
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  user_id: 144
                  message_id: 4
                  is_read: 0
                  is_archived: 0
                  is_deleted: 0
                properties:
                  id:
                    type: integer
                    example: 4
                  user_id:
                    type: integer
                    example: 144
                  message_id:
                    type: integer
                    example: 4
                  is_read:
                    type: integer
                    example: 0
                  is_archived:
                    type: integer
                    example: 0
                  is_deleted:
                    type: integer
                    example: 0
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to mark this message as archived'
                  code: 'MESSAGES:ARCHIVE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to mark this message as archived'
                  code:
                    type: string
                    example: 'MESSAGES:ARCHIVE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Message not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Message not found'
                  code: 'MESSAGES:ARCHIVE:MESSAGE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Message not found'
                  code:
                    type: string
                    example: 'MESSAGES:ARCHIVE:MESSAGE_NOT_FOUND'
      tags:
        - Messages
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                state:
                  type: boolean
                  description: 'Explicit archived state. Default: 1 (true).'
                  example: true
    parameters:
      -
        in: path
        name: id
        description: 'User Message ID (id from messages list; do not confuse with message_id).'
        example: 1
        required: true
        schema:
          type: integer
  /api/messages-and-tickets:
    get:
      summary: 'List of messages and tickets'
      operationId: listOfMessagesAndTickets
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 2
                  items:
                    -
                      type: UserMessage
                      date: '2024-11-02T10:00:00.000000Z'
                      item:
                        id: 1
                        user_id: 1
                        message_id: 1
                        is_read: 0
                        is_archived: 0
                        is_deleted: 0
                        message:
                          id: 1
                          sender_id: 1
                          title: 'Message title'
                          content: 'Message content'
                          created_at: '2024-11-02T10:00:00.000000Z'
                          updated_at: '2024-11-02T10:00:00.000000Z'
                          sender:
                            id: 1
                            mrn: MRN
                            name: 'User name'
                            email: user@domain.com
                            language: en
                            phone: ''
                            phone_verified_at: null
                            address1: ''
                            address2: ''
                            postal_code: ''
                            city: ''
                            clinic_name: 'Test Company'
                            clinic_location: 'Test Company Location'
                            image: null
                            mfa_enabled: 0
                            mfa_method: email
                            mfa_verified_to: null
                            created_by: null
                            active: 1
                            notifications_timezone: Europe/Warsaw
                            notifications_at: '08:00:00'
                            created_at: '2024-09-01T15:00:00.000000Z'
                            updated_at: '2024-10-10T10:30:00.000000Z'
                            invitation_status: accepted
                            roles:
                              -
                                id: 3
                                name: Clinician
                                guard_name: web
                                created_at: '2024-01-01T12:00:00.000000Z'
                                updated_at: '2024-01-01T12:00:00.000000Z'
                                pivot:
                                  model_id: 1
                                  role_id: 3
                                  model_type: App\Models\User
                    -
                      type: SupportTicket
                      date: '2024-11-01T15:15:00.000000Z'
                      item:
                        id: 1
                        sender_id: 1
                        recipient_id: 999
                        device_id: null
                        meeting_date: '2024-11-10T15:00:00.000000Z'
                        meeting_type: none
                        contact_email: null
                        status: new
                        created_at: '2024-11-01T15:15:00.000000Z'
                        updated_at: '2024-11-01T15:15:00.000000Z'
                        sender:
                          id: 1
                          mrn: MRN
                          name: 'User name'
                          email: user@domain.com
                          language: en
                          phone: ''
                          phone_verified_at: null
                          address1: ''
                          address2: ''
                          postal_code: ''
                          city: ''
                          clinic_name: 'Test Company'
                          clinic_location: 'Test Company Location'
                          image: null
                          mfa_enabled: 0
                          mfa_method: email
                          mfa_verified_to: null
                          created_by: null
                          active: 1
                          notifications_timezone: Europe/Warsaw
                          notifications_at: '08:00:00'
                          created_at: '2024-09-01T15:00:00.000000Z'
                          updated_at: '2024-10-10T10:30:00.000000Z'
                          invitation_status: accepted
                          roles:
                            -
                              id: 3
                              name: Clinician
                              guard_name: web
                              created_at: '2024-01-01T12:00:00.000000Z'
                              updated_at: '2024-01-01T12:00:00.000000Z'
                              pivot:
                                model_id: 1
                                role_id: 3
                                model_type: App\Models\User
                        recipient:
                          id: 2
                          mrn: MRN2
                          name: Patient
                          email: patient4@domain.com
                          language: en
                          phone: ''
                          phone_verified_at: null
                          address1: ''
                          address2: ''
                          postal_code: ''
                          city: ''
                          clinic_name: null
                          clinic_location: null
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          created_by: 1
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2024-10-01T15:00:00.000000Z'
                          updated_at: '2024-10-10T10:30:00.000000Z'
                          invitation_status: null
                          roles:
                            -
                              id: 5
                              name: Amputee
                              guard_name: web
                              created_at: '2024-01-01T12:00:00.000000Z'
                              updated_at: '2024-01-01T12:00:00.000000Z'
                              pivot:
                                model_id: 2
                                role_id: 5
                                model_type: App\Models\User
                        device: null
                        messages:
                          -
                            id: 1
                            ticket_id: 1
                            sender_id: 1
                            title: 'Communication channel'
                            content: 'Welcome to the digital platform. Please use this channel for communicating with your clinician.'
                            is_read: false
                            created_at: '2024-11-01T15:15:00.000000Z'
                            updated_at: '2024-11-01T15:15:00.000000Z'
                            attachments: []
                            sender:
                              id: 1
                              mrn: MRN
                              name: 'User name'
                              email: user@domain.com
                              language: en
                              phone: ''
                              phone_verified_at: null
                              address1: ''
                              address2: ''
                              postal_code: ''
                              city: ''
                              clinic_name: 'Test Company'
                              clinic_location: 'Test Company Location'
                              image: null
                              mfa_enabled: 0
                              mfa_method: email
                              mfa_verified_to: null
                              created_by: null
                              active: 1
                              notifications_timezone: Europe/Warsaw
                              notifications_at: '08:00:00'
                              created_at: '2024-09-01T15:00:00.000000Z'
                              updated_at: '2024-10-10T10:30:00.000000Z'
                              invitation_status: accepted
                              roles:
                                -
                                  id: 3
                                  name: Clinician
                                  guard_name: web
                                  created_at: '2024-01-01T12:00:00.000000Z'
                                  updated_at: '2024-01-01T12:00:00.000000Z'
                                  pivot:
                                    model_id: 1
                                    role_id: 3
                                    model_type: App\Models\User
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 2
                  items:
                    type: array
                    example:
                      -
                        type: UserMessage
                        date: '2024-11-02T10:00:00.000000Z'
                        item:
                          id: 1
                          user_id: 1
                          message_id: 1
                          is_read: 0
                          is_archived: 0
                          is_deleted: 0
                          message:
                            id: 1
                            sender_id: 1
                            title: 'Message title'
                            content: 'Message content'
                            created_at: '2024-11-02T10:00:00.000000Z'
                            updated_at: '2024-11-02T10:00:00.000000Z'
                            sender:
                              id: 1
                              mrn: MRN
                              name: 'User name'
                              email: user@domain.com
                              language: en
                              phone: ''
                              phone_verified_at: null
                              address1: ''
                              address2: ''
                              postal_code: ''
                              city: ''
                              clinic_name: 'Test Company'
                              clinic_location: 'Test Company Location'
                              image: null
                              mfa_enabled: 0
                              mfa_method: email
                              mfa_verified_to: null
                              created_by: null
                              active: 1
                              notifications_timezone: Europe/Warsaw
                              notifications_at: '08:00:00'
                              created_at: '2024-09-01T15:00:00.000000Z'
                              updated_at: '2024-10-10T10:30:00.000000Z'
                              invitation_status: accepted
                              roles:
                                -
                                  id: 3
                                  name: Clinician
                                  guard_name: web
                                  created_at: '2024-01-01T12:00:00.000000Z'
                                  updated_at: '2024-01-01T12:00:00.000000Z'
                                  pivot:
                                    model_id: 1
                                    role_id: 3
                                    model_type: App\Models\User
                      -
                        type: SupportTicket
                        date: '2024-11-01T15:15:00.000000Z'
                        item:
                          id: 1
                          sender_id: 1
                          recipient_id: 999
                          device_id: null
                          meeting_date: '2024-11-10T15:00:00.000000Z'
                          meeting_type: none
                          contact_email: null
                          status: new
                          created_at: '2024-11-01T15:15:00.000000Z'
                          updated_at: '2024-11-01T15:15:00.000000Z'
                          sender:
                            id: 1
                            mrn: MRN
                            name: 'User name'
                            email: user@domain.com
                            language: en
                            phone: ''
                            phone_verified_at: null
                            address1: ''
                            address2: ''
                            postal_code: ''
                            city: ''
                            clinic_name: 'Test Company'
                            clinic_location: 'Test Company Location'
                            image: null
                            mfa_enabled: 0
                            mfa_method: email
                            mfa_verified_to: null
                            created_by: null
                            active: 1
                            notifications_timezone: Europe/Warsaw
                            notifications_at: '08:00:00'
                            created_at: '2024-09-01T15:00:00.000000Z'
                            updated_at: '2024-10-10T10:30:00.000000Z'
                            invitation_status: accepted
                            roles:
                              -
                                id: 3
                                name: Clinician
                                guard_name: web
                                created_at: '2024-01-01T12:00:00.000000Z'
                                updated_at: '2024-01-01T12:00:00.000000Z'
                                pivot:
                                  model_id: 1
                                  role_id: 3
                                  model_type: App\Models\User
                          recipient:
                            id: 2
                            mrn: MRN2
                            name: Patient
                            email: patient4@domain.com
                            language: en
                            phone: ''
                            phone_verified_at: null
                            address1: ''
                            address2: ''
                            postal_code: ''
                            city: ''
                            clinic_name: null
                            clinic_location: null
                            image: null
                            mfa_enabled: 0
                            mfa_method: null
                            mfa_verified_to: null
                            created_by: 1
                            active: 1
                            notifications_timezone: null
                            notifications_at: null
                            created_at: '2024-10-01T15:00:00.000000Z'
                            updated_at: '2024-10-10T10:30:00.000000Z'
                            invitation_status: null
                            roles:
                              -
                                id: 5
                                name: Amputee
                                guard_name: web
                                created_at: '2024-01-01T12:00:00.000000Z'
                                updated_at: '2024-01-01T12:00:00.000000Z'
                                pivot:
                                  model_id: 2
                                  role_id: 5
                                  model_type: App\Models\User
                          device: null
                          messages:
                            -
                              id: 1
                              ticket_id: 1
                              sender_id: 1
                              title: 'Communication channel'
                              content: 'Welcome to the digital platform. Please use this channel for communicating with your clinician.'
                              is_read: false
                              created_at: '2024-11-01T15:15:00.000000Z'
                              updated_at: '2024-11-01T15:15:00.000000Z'
                              attachments: []
                              sender:
                                id: 1
                                mrn: MRN
                                name: 'User name'
                                email: user@domain.com
                                language: en
                                phone: ''
                                phone_verified_at: null
                                address1: ''
                                address2: ''
                                postal_code: ''
                                city: ''
                                clinic_name: 'Test Company'
                                clinic_location: 'Test Company Location'
                                image: null
                                mfa_enabled: 0
                                mfa_method: email
                                mfa_verified_to: null
                                created_by: null
                                active: 1
                                notifications_timezone: Europe/Warsaw
                                notifications_at: '08:00:00'
                                created_at: '2024-09-01T15:00:00.000000Z'
                                updated_at: '2024-10-10T10:30:00.000000Z'
                                invitation_status: accepted
                                roles:
                                  -
                                    id: 3
                                    name: Clinician
                                    guard_name: web
                                    created_at: '2024-01-01T12:00:00.000000Z'
                                    updated_at: '2024-01-01T12:00:00.000000Z'
                                    pivot:
                                      model_id: 1
                                      role_id: 3
                                      model_type: App\Models\User
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          example: UserMessage
                        date:
                          type: string
                          example: '2024-11-02T10:00:00.000000Z'
                        item:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            user_id:
                              type: integer
                              example: 1
                            message_id:
                              type: integer
                              example: 1
                            is_read:
                              type: integer
                              example: 0
                            is_archived:
                              type: integer
                              example: 0
                            is_deleted:
                              type: integer
                              example: 0
                            message:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                sender_id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: 'Message title'
                                content:
                                  type: string
                                  example: 'Message content'
                                created_at:
                                  type: string
                                  example: '2024-11-02T10:00:00.000000Z'
                                updated_at:
                                  type: string
                                  example: '2024-11-02T10:00:00.000000Z'
                                sender:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    mrn:
                                      type: string
                                      example: MRN
                                    name:
                                      type: string
                                      example: 'User name'
                                    email:
                                      type: string
                                      example: user@domain.com
                                    language:
                                      type: string
                                      example: en
                                    phone:
                                      type: string
                                      example: ''
                                    phone_verified_at:
                                      type: string
                                      example: null
                                    address1:
                                      type: string
                                      example: ''
                                    address2:
                                      type: string
                                      example: ''
                                    postal_code:
                                      type: string
                                      example: ''
                                    city:
                                      type: string
                                      example: ''
                                    clinic_name:
                                      type: string
                                      example: 'Test Company'
                                    clinic_location:
                                      type: string
                                      example: 'Test Company Location'
                                    image:
                                      type: string
                                      example: null
                                    mfa_enabled:
                                      type: integer
                                      example: 0
                                    mfa_method:
                                      type: string
                                      example: email
                                    mfa_verified_to:
                                      type: string
                                      example: null
                                    created_by:
                                      type: string
                                      example: null
                                    active:
                                      type: integer
                                      example: 1
                                    notifications_timezone:
                                      type: string
                                      example: Europe/Warsaw
                                    notifications_at:
                                      type: string
                                      example: '08:00:00'
                                    created_at:
                                      type: string
                                      example: '2024-09-01T15:00:00.000000Z'
                                    updated_at:
                                      type: string
                                      example: '2024-10-10T10:30:00.000000Z'
                                    invitation_status:
                                      type: string
                                      example: accepted
                                    roles:
                                      type: array
                                      example: [{ id: 3, name: Clinician, guard_name: web, created_at: '2024-01-01T12:00:00.000000Z', updated_at: '2024-01-01T12:00:00.000000Z', pivot: { model_id: 1, role_id: 3, model_type: App\Models\User } }]
                                      items: { type: object, properties: { id: { type: integer, example: 3 }, name: { type: string, example: Clinician }, guard_name: { type: string, example: web }, created_at: { type: string, example: '2024-01-01T12:00:00.000000Z' }, updated_at: { type: string, example: '2024-01-01T12:00:00.000000Z' }, pivot: { type: object, properties: { model_id: { type: integer, example: 1 }, role_id: { type: integer, example: 3 }, model_type: { type: string, example: App\Models\User } } } } }
      tags:
        - Messages
  /api/mobile-logs:
    post:
      summary: 'Store log'
      operationId: storeLog
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  user_id: 281
                  device_id: 133
                  file: /tmp/fakeryrL7h5
                  date_start: '1978-10-16 22:47:29'
                  date_end: '2025-10-20 13:22:24'
                  created_at: '2025-12-10T12:00:18.000000Z'
                  updated_at: '2025-12-10T12:00:18.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  user_id:
                    type: integer
                    example: 281
                  device_id:
                    type: integer
                    example: 133
                  file:
                    type: string
                    example: /tmp/fakeryrL7h5
                  date_start:
                    type: string
                    example: '1978-10-16 22:47:29'
                  date_end:
                    type: string
                    example: '2025-10-20 13:22:24'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:18.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:18.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to write mobile logs'
                  code: 'MOBILE_LOGS:STORE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to write mobile logs'
                  code:
                    type: string
                    example: 'MOBILE_LOGS:STORE:INSUFFICIENT_PERMISSION'
      tags:
        - 'Mobile logs'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                device_id:
                  type: string
                  description: 'Device ID. The <code>id</code> of an existing record in the App\Models\Device table.'
                  example: 1
                file:
                  type: string
                  format: binary
                  description: 'Log file. Must be a file. MAXIMUM:FILE_KB:102400.'
                date_start:
                  type: string
                  description: 'Log start date. MUST_BE_DATE Must be a valid date in the format <code>Y-m-d H:i:s</code>.'
                  example: '1977-01-21 05:41:19'
                date_end:
                  type: string
                  description: 'Log end date. MUST_BE_DATE Must be a valid date in the format <code>Y-m-d H:i:s</code>. MUST_BE_AFTER:<code>date_start</code>.'
                  example: '1971-10-08 21:34:28'
                encrypt_key:
                  type: string
                  description: 'Encryption key.'
                  example: molestiae
                encrypt_iv:
                  type: string
                  description: 'Encryption IV (Initialization Vector).'
                  example: enim
              required:
                - file
                - date_start
                - date_end
                - encrypt_key
                - encrypt_iv
    get:
      summary: 'Get logs'
      operationId: getLogs
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>device</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>device</code>).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 2
                      user_id: 282
                      device_id: 134
                      file: /tmp/fakerSEC4xC
                      date_start: '1989-08-29 00:27:49'
                      date_end: '2017-04-30 23:50:53'
                      created_at: '2025-12-10T12:00:18.000000Z'
                      updated_at: '2025-12-10T12:00:18.000000Z'
                    -
                      id: 3
                      user_id: 283
                      device_id: 135
                      file: /tmp/fakerkEWNFs
                      date_start: '2017-11-10 07:15:28'
                      date_end: '1994-03-18 06:09:13'
                      created_at: '2025-12-10T12:00:18.000000Z'
                      updated_at: '2025-12-10T12:00:18.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 2
                        user_id: 282
                        device_id: 134
                        file: /tmp/fakerSEC4xC
                        date_start: '1989-08-29 00:27:49'
                        date_end: '2017-04-30 23:50:53'
                        created_at: '2025-12-10T12:00:18.000000Z'
                        updated_at: '2025-12-10T12:00:18.000000Z'
                      -
                        id: 3
                        user_id: 283
                        device_id: 135
                        file: /tmp/fakerkEWNFs
                        date_start: '2017-11-10 07:15:28'
                        date_end: '1994-03-18 06:09:13'
                        created_at: '2025-12-10T12:00:18.000000Z'
                        updated_at: '2025-12-10T12:00:18.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2
                        user_id:
                          type: integer
                          example: 282
                        device_id:
                          type: integer
                          example: 134
                        file:
                          type: string
                          example: /tmp/fakerSEC4xC
                        date_start:
                          type: string
                          example: '1989-08-29 00:27:49'
                        date_end:
                          type: string
                          example: '2017-04-30 23:50:53'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:18.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:18.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view mobile logs'
                  code: 'MOBILE_LOGS:GET:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view mobile logs'
                  code:
                    type: string
                    example: 'MOBILE_LOGS:GET:INSUFFICIENT_PERMISSION'
      tags:
        - 'Mobile logs'
  '/api/mobile-logs/user/{userId}':
    get:
      summary: 'Get logs by user'
      operationId: getLogsByUser
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>device</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>device</code>).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 4
                      user_id: 284
                      device_id: 136
                      file: /tmp/faker1CrUNk
                      date_start: '2021-01-20 19:48:06'
                      date_end: '2000-11-10 19:46:15'
                      created_at: '2025-12-10T12:00:18.000000Z'
                      updated_at: '2025-12-10T12:00:18.000000Z'
                    -
                      id: 5
                      user_id: 285
                      device_id: 137
                      file: /tmp/fakeriT8XJN
                      date_start: '1995-08-24 23:40:28'
                      date_end: '2007-12-09 23:03:22'
                      created_at: '2025-12-10T12:00:19.000000Z'
                      updated_at: '2025-12-10T12:00:19.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 4
                        user_id: 284
                        device_id: 136
                        file: /tmp/faker1CrUNk
                        date_start: '2021-01-20 19:48:06'
                        date_end: '2000-11-10 19:46:15'
                        created_at: '2025-12-10T12:00:18.000000Z'
                        updated_at: '2025-12-10T12:00:18.000000Z'
                      -
                        id: 5
                        user_id: 285
                        device_id: 137
                        file: /tmp/fakeriT8XJN
                        date_start: '1995-08-24 23:40:28'
                        date_end: '2007-12-09 23:03:22'
                        created_at: '2025-12-10T12:00:19.000000Z'
                        updated_at: '2025-12-10T12:00:19.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 4
                        user_id:
                          type: integer
                          example: 284
                        device_id:
                          type: integer
                          example: 136
                        file:
                          type: string
                          example: /tmp/faker1CrUNk
                        date_start:
                          type: string
                          example: '2021-01-20 19:48:06'
                        date_end:
                          type: string
                          example: '2000-11-10 19:46:15'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:18.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:18.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view mobile logs'
                  code: 'MOBILE_LOGS:GET_BY_USER:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view mobile logs'
                  code:
                    type: string
                    example: 'MOBILE_LOGS:GET_BY_USER:INSUFFICIENT_PERMISSION'
      tags:
        - 'Mobile logs'
    parameters:
      -
        in: path
        name: userId
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/mobile-logs/device/{deviceId}':
    get:
      summary: 'Get logs by device'
      operationId: getLogsByDevice
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 6
                      user_id: 286
                      device_id: 138
                      file: /tmp/fakerdVUV4l
                      date_start: '2003-07-23 14:30:28'
                      date_end: '2000-06-24 22:06:19'
                      created_at: '2025-12-10T12:00:19.000000Z'
                      updated_at: '2025-12-10T12:00:19.000000Z'
                    -
                      id: 7
                      user_id: 287
                      device_id: 139
                      file: /tmp/fakerhCXHRK
                      date_start: '2015-07-21 23:05:28'
                      date_end: '1972-07-26 08:07:49'
                      created_at: '2025-12-10T12:00:19.000000Z'
                      updated_at: '2025-12-10T12:00:19.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 6
                        user_id: 286
                        device_id: 138
                        file: /tmp/fakerdVUV4l
                        date_start: '2003-07-23 14:30:28'
                        date_end: '2000-06-24 22:06:19'
                        created_at: '2025-12-10T12:00:19.000000Z'
                        updated_at: '2025-12-10T12:00:19.000000Z'
                      -
                        id: 7
                        user_id: 287
                        device_id: 139
                        file: /tmp/fakerhCXHRK
                        date_start: '2015-07-21 23:05:28'
                        date_end: '1972-07-26 08:07:49'
                        created_at: '2025-12-10T12:00:19.000000Z'
                        updated_at: '2025-12-10T12:00:19.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 6
                        user_id:
                          type: integer
                          example: 286
                        device_id:
                          type: integer
                          example: 138
                        file:
                          type: string
                          example: /tmp/fakerdVUV4l
                        date_start:
                          type: string
                          example: '2003-07-23 14:30:28'
                        date_end:
                          type: string
                          example: '2000-06-24 22:06:19'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:19.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:19.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view mobile logs'
                  code: 'MOBILE_LOGS:GET_BY_DEVICE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view mobile logs'
                  code:
                    type: string
                    example: 'MOBILE_LOGS:GET_BY_DEVICE:INSUFFICIENT_PERMISSION'
      tags:
        - 'Mobile logs'
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/p2p/{clinicianId}/{amputeeId}':
    get:
      summary: 'Get active session data'
      operationId: getActiveSessionData
      description: 'Returns P2P sessions with status "waiting_for_decision" or "in_progress".'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  amputee_id: null
                  device_id: null
                  clinician_id: null
                  amputee_uuid: 9cc29063-5058-3869-b67f-9e2b271981aa
                  clinician_uuid: 9c68e52f-a57f-3456-a088-5e735ad55bc6
                  token: GBX0W79F57JZH5ZDN6M9I0W9E5BSMN0W5QR916OQ3HD2MB6YIS8MJPPAQGY3INNQ
                  status: waiting_for_decision
                  created_at: '2025-12-10T12:00:04.000000Z'
                  updated_at: '2025-12-10T12:00:04.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  amputee_id:
                    type: string
                    example: null
                  device_id:
                    type: string
                    example: null
                  clinician_id:
                    type: string
                    example: null
                  amputee_uuid:
                    type: string
                    example: 9cc29063-5058-3869-b67f-9e2b271981aa
                  clinician_uuid:
                    type: string
                    example: 9c68e52f-a57f-3456-a088-5e735ad55bc6
                  token:
                    type: string
                    example: GBX0W79F57JZH5ZDN6M9I0W9E5BSMN0W5QR916OQ3HD2MB6YIS8MJPPAQGY3INNQ
                  status:
                    type: string
                    example: waiting_for_decision
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:04.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:04.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view active P2P session'
                  code: 'P2P_SESSIONS:GET_ACTIVE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view active P2P session'
                  code:
                    type: string
                    example: 'P2P_SESSIONS:GET_ACTIVE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Session not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'P2P session not found'
                  code: 'P2P_SESSIONS:GET_ACTIVE:SESSION_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'P2P session not found'
                  code:
                    type: string
                    example: 'P2P_SESSIONS:GET_ACTIVE:SESSION_NOT_FOUND'
      tags:
        - 'P2P Sessions'
    parameters:
      -
        in: path
        name: clinicianId
        description: 'User clinician ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: amputeeId
        description: 'User amputee entry ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/p2p/{id}':
    get:
      summary: 'Get session data'
      operationId: getSessionData
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 2
                  amputee_id: null
                  device_id: null
                  clinician_id: null
                  amputee_uuid: b3334cd5-9ca0-34ee-8871-dab1d0471c50
                  clinician_uuid: a89a06e8-9f30-307d-bbea-e1a57c678e7c
                  token: H98IF46LXBNOXPW9397CUVHZDYPTQ1RBN2AFTI67AN0FPM8HD2GP98U85KC2CTHY
                  status: waiting_for_decision
                  created_at: '2025-12-10T12:00:04.000000Z'
                  updated_at: '2025-12-10T12:00:04.000000Z'
                properties:
                  id:
                    type: integer
                    example: 2
                  amputee_id:
                    type: string
                    example: null
                  device_id:
                    type: string
                    example: null
                  clinician_id:
                    type: string
                    example: null
                  amputee_uuid:
                    type: string
                    example: b3334cd5-9ca0-34ee-8871-dab1d0471c50
                  clinician_uuid:
                    type: string
                    example: a89a06e8-9f30-307d-bbea-e1a57c678e7c
                  token:
                    type: string
                    example: H98IF46LXBNOXPW9397CUVHZDYPTQ1RBN2AFTI67AN0FPM8HD2GP98U85KC2CTHY
                  status:
                    type: string
                    example: waiting_for_decision
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:04.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:04.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view P2P session'
                  code: 'P2P_SESSIONS:GET:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view P2P session'
                  code:
                    type: string
                    example: 'P2P_SESSIONS:GET:INSUFFICIENT_PERMISSION'
        404:
          description: 'Session not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'P2P session not found'
                  code: 'P2P_SESSIONS:GET:SESSION_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'P2P session not found'
                  code:
                    type: string
                    example: 'P2P_SESSIONS:GET:SESSION_NOT_FOUND'
      tags:
        - 'P2P Sessions'
    parameters:
      -
        in: path
        name: id
        description: 'P2P session ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/p2p/create:
    post:
      summary: 'Create new P2P session'
      operationId: createNewP2PSession
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  amputee_id: 118
                  device_id: null
                  clinician_id: 119
                  amputee_uuid: 87e2130b-a746-30bc-bca9-d765210334f1
                  clinician_uuid: 0355e321-f363-302e-83e1-3769b2539e14
                  token: RITU4LSMTVEKPWKO4GFGG4X6TWBH5RJ08CHK5VJM8CDMW9ZEO34HIZOJ4N0WI50G
                  status: waiting_for_decision
                  created_at: '2025-12-10T12:00:04.000000Z'
                  updated_at: '2025-12-10T12:00:04.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  amputee_id:
                    type: integer
                    example: 118
                  device_id:
                    type: string
                    example: null
                  clinician_id:
                    type: integer
                    example: 119
                  amputee_uuid:
                    type: string
                    example: 87e2130b-a746-30bc-bca9-d765210334f1
                  clinician_uuid:
                    type: string
                    example: 0355e321-f363-302e-83e1-3769b2539e14
                  token:
                    type: string
                    example: RITU4LSMTVEKPWKO4GFGG4X6TWBH5RJ08CHK5VJM8CDMW9ZEO34HIZOJ4N0WI50G
                  status:
                    type: string
                    example: waiting_for_decision
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:04.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:04.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to create P2P session'
                      code: 'P2P_SESSIONS:CREATE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to create P2P session'
                      code:
                        type: string
                        example: 'P2P_SESSIONS:CREATE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Device not assigned to patient'
                    type: object
                    example:
                      message: 'Device is not assigned to the patient'
                      code: 'P2P_SESSIONS:CREATE:DEVICE_NOT_ASSIGNED'
                    properties:
                      message:
                        type: string
                        example: 'Device is not assigned to the patient'
                      code:
                        type: string
                        example: 'P2P_SESSIONS:CREATE:DEVICE_NOT_ASSIGNED'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'P2P_SESSIONS:CREATE:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'P2P_SESSIONS:CREATE:USER_NOT_FOUND'
      tags:
        - 'P2P Sessions'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                amputee_id:
                  type: string
                  description: 'Amputee ID. The <code>id</code> of an existing record in the App\Models\User table.'
                  example: 2
                device_id:
                  type: string
                  description: 'Device ID. The <code>id</code> of an existing record in the App\Models\Device table.'
                  example: 5
                amputee_uuid:
                  type: string
                  description: "Amputee's UUID generated by integration platform."
                  example: ff697758-4658-3e49-a7af-2303cb550bd7
                clinician_uuid:
                  type: string
                  description: "Clinician's UUID generated by integration platform."
                  example: 72aec5bf-7137-34a6-a1e9-ae961977a2fe
              required:
                - amputee_id
                - device_id
                - amputee_uuid
                - clinician_uuid
  '/api/p2p/{id}/update':
    post:
      summary: 'Update P2P session'
      operationId: updateP2PSession
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  amputee_id: null
                  device_id: null
                  clinician_id: null
                  amputee_uuid: 2421798c-8b31-3ec8-8a1b-480725671875
                  clinician_uuid: 98f227db-adf8-3072-82e7-ba4ce096729e
                  token: I46EDWLSTRAKNNI4FJ8IETP96CRIG1S6M313XUDK1AOGR5AKECA4VSIXMXJU0YTL
                  status: waiting_for_decision
                  created_at: '2025-12-10T12:00:04.000000Z'
                  updated_at: '2025-12-10T12:00:04.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  amputee_id:
                    type: string
                    example: null
                  device_id:
                    type: string
                    example: null
                  clinician_id:
                    type: string
                    example: null
                  amputee_uuid:
                    type: string
                    example: 2421798c-8b31-3ec8-8a1b-480725671875
                  clinician_uuid:
                    type: string
                    example: 98f227db-adf8-3072-82e7-ba4ce096729e
                  token:
                    type: string
                    example: I46EDWLSTRAKNNI4FJ8IETP96CRIG1S6M313XUDK1AOGR5AKECA4VSIXMXJU0YTL
                  status:
                    type: string
                    example: waiting_for_decision
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:04.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:04.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update P2P session'
                  code: 'P2P_SESSIONS:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update P2P session'
                  code:
                    type: string
                    example: 'P2P_SESSIONS:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Session not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'P2P session not found'
                  code: 'P2P_SESSIONS:UPDATE:SESSION_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'P2P session not found'
                  code:
                    type: string
                    example: 'P2P_SESSIONS:UPDATE:SESSION_NOT_FOUND'
      tags:
        - 'P2P Sessions'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  description: 'Session status.'
                  example: closed
                  enum:
                    - waiting_for_decision
                    - in_progress
                    - closed
              required:
                - status
    parameters:
      -
        in: path
        name: id
        description: 'P2P session ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/product/features:
    get:
      summary: 'List product features'
      operationId: listProductFeatures
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: olive
                    slug:
                      type: string
                      example: sit-explicabo-atque-eos-velit
                    created_at:
                      type: string
                      example: '2025-12-10T12:00:14.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T12:00:14.000000Z'
                example:
                  -
                    id: 1
                    name: olive
                    slug: sit-explicabo-atque-eos-velit
                    created_at: '2025-12-10T12:00:14.000000Z'
                    updated_at: '2025-12-10T12:00:14.000000Z'
                  -
                    id: 2
                    name: purple
                    slug: quae-nesciunt-nulla-officia
                    created_at: '2025-12-10T12:00:14.000000Z'
                    updated_at: '2025-12-10T12:00:14.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view product features and toggles'
                  code: 'PRODUCT_FEATURES:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view product features and toggles'
                  code:
                    type: string
                    example: 'PRODUCT_FEATURES:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - 'Product features and toggles'
    post:
      summary: 'Create product feature'
      operationId: createProductFeature
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  name: gray
                  slug: cupiditate-quod-ad-sed-molestias-eum-laborum
                  created_at: '2025-12-10T12:00:14.000000Z'
                  updated_at: '2025-12-10T12:00:14.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  name:
                    type: string
                    example: gray
                  slug:
                    type: string
                    example: cupiditate-quod-ad-sed-molestias-eum-laborum
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:14.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:14.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage product features and toggles'
                  code: 'PRODUCT_FEATURES:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage product features and toggles'
                  code:
                    type: string
                    example: 'PRODUCT_FEATURES:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - 'Product features and toggles'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of product feature.'
                  example: 'Remote config'
                slug:
                  type: string
                  description: 'Simplified name of product feature without spaces (e.g. remote_config for Remote config name).'
                  example: remote_config
              required:
                - name
                - slug
  '/api/product/features/{id}':
    put:
      summary: 'Update product feature'
      operationId: updateProductFeature
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  name: teal
                  slug: fuga-vel-voluptates-et-qui-quia-iusto-dignissimos-ratione
                  created_at: '2025-12-10T12:00:14.000000Z'
                  updated_at: '2025-12-10T12:00:14.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  name:
                    type: string
                    example: teal
                  slug:
                    type: string
                    example: fuga-vel-voluptates-et-qui-quia-iusto-dignissimos-ratione
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:14.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:14.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage product features and toggles'
                  code: 'PRODUCT_FEATURES:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage product features and toggles'
                  code:
                    type: string
                    example: 'PRODUCT_FEATURES:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Product feature not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Product feature not found'
                  code: 'PRODUCT_FEATURES:UPDATE:FEATURE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Product feature not found'
                  code:
                    type: string
                    example: 'PRODUCT_FEATURES:UPDATE:FEATURE_NOT_FOUND'
      tags:
        - 'Product features and toggles'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of product feature.'
                  example: 'Remote config'
                slug:
                  type: string
                  description: 'Simplified name of product feature without spaces (e.g. remote_config for Remote config name).'
                  example: remote_config
    delete:
      summary: 'Delete product feature'
      operationId: deleteProductFeature
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Product feature deleted'
                  code: 'PRODUCT_FEATURES:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Product feature deleted'
                  code:
                    type: string
                    example: 'PRODUCT_FEATURES:DELETE:DELETED'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to manage product features and toggles'
                      code: 'PRODUCT_FEATURES:DELETE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to manage product features and toggles'
                      code:
                        type: string
                        example: 'PRODUCT_FEATURES:DELETE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Product feature belongs to compatibility entries'
                    type: object
                    example:
                      message: 'Cannot delete: product feature belongs to existing compatibility entries (1)'
                      code: 'PRODUCT_FEATURES:DELETE:HAS_COMPATIBILITY_ENTRIES'
                    properties:
                      message:
                        type: string
                        example: 'Cannot delete: product feature belongs to existing compatibility entries (1)'
                      code:
                        type: string
                        example: 'PRODUCT_FEATURES:DELETE:HAS_COMPATIBILITY_ENTRIES'
        404:
          description: 'Product feature not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Product feature not found'
                  code: 'PRODUCT_FEATURES:DELETE:FEATURE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Product feature not found'
                  code:
                    type: string
                    example: 'PRODUCT_FEATURES:DELETE:FEATURE_NOT_FOUND'
      tags:
        - 'Product features and toggles'
    parameters:
      -
        in: path
        name: id
        description: 'Product Feature ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/product/toggles:
    get:
      summary: 'List product toggles'
      operationId: listProductToggles
      description: "This endpoint returns list of global toggles.\n\t\tFor some users there could exist user toggle which overrides these settings."
      parameters:
        -
          in: query
          name: global
          description: 'Pass value <code>1</code> to fetch list of global toggles without user overrides'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Pass value <code>1</code> to fetch list of global toggles without user overrides'
            example: 1
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: maroon
                    slug:
                      type: string
                      example: pariatur-tempora-et-quaerat-sunt-voluptas-sit-omnis-a
                    enabled:
                      type: integer
                      example: 0
                    created_at:
                      type: string
                      example: '2025-12-10T12:00:14.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T12:00:14.000000Z'
                example:
                  -
                    id: 1
                    name: maroon
                    slug: pariatur-tempora-et-quaerat-sunt-voluptas-sit-omnis-a
                    enabled: 0
                    created_at: '2025-12-10T12:00:14.000000Z'
                    updated_at: '2025-12-10T12:00:14.000000Z'
                  -
                    id: 2
                    name: white
                    slug: tempora-maxime-nam-eum-neque
                    enabled: 0
                    created_at: '2025-12-10T12:00:14.000000Z'
                    updated_at: '2025-12-10T12:00:14.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view product features and toggles'
                  code: 'PRODUCT_TOGGLES:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view product features and toggles'
                  code:
                    type: string
                    example: 'PRODUCT_TOGGLES:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - 'Product features and toggles'
    post:
      summary: 'Create product toggle'
      operationId: createProductToggle
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  name: olive
                  slug: vel-quaerat-voluptas-id-dolores-officia-odio
                  enabled: 0
                  created_at: '2025-12-10T12:00:14.000000Z'
                  updated_at: '2025-12-10T12:00:14.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  name:
                    type: string
                    example: olive
                  slug:
                    type: string
                    example: vel-quaerat-voluptas-id-dolores-officia-odio
                  enabled:
                    type: integer
                    example: 0
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:14.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:14.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage product features and toggles'
                  code: 'PRODUCT_TOGGLES:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage product features and toggles'
                  code:
                    type: string
                    example: 'PRODUCT_TOGGLES:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - 'Product features and toggles'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of product toggle.'
                  example: 'Remote config'
                slug:
                  type: string
                  description: 'Simplified name of product toggle without spaces (e.g. remote_config for Remote config name).'
                  example: remote_config
                enabled:
                  type: boolean
                  description: 'Is toggle enabled on this environment?.'
                  example: true
              required:
                - name
                - slug
                - enabled
  '/api/product/toggles/{id}':
    put:
      summary: 'Update product toggle'
      operationId: updateProductToggle
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  name: aqua
                  slug: facere-sed-placeat-voluptatibus-nostrum-adipisci
                  enabled: 1
                  created_at: '2025-12-10T12:00:14.000000Z'
                  updated_at: '2025-12-10T12:00:14.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  name:
                    type: string
                    example: aqua
                  slug:
                    type: string
                    example: facere-sed-placeat-voluptatibus-nostrum-adipisci
                  enabled:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:14.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:14.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage product features and toggles'
                  code: 'PRODUCT_TOGGLES:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage product features and toggles'
                  code:
                    type: string
                    example: 'PRODUCT_TOGGLES:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Product toggle not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Product toggle not found'
                  code: 'PRODUCT_TOGGLES:UPDATE:TOGGLE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Product toggle not found'
                  code:
                    type: string
                    example: 'PRODUCT_TOGGLES:UPDATE:TOGGLE_NOT_FOUND'
      tags:
        - 'Product features and toggles'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of product toggle.'
                  example: 'Remote config'
                slug:
                  type: string
                  description: 'Simplified name of product toggle without spaces (e.g. remote_config for Remote config name).'
                  example: remote_config
                enabled:
                  type: boolean
                  description: 'Is toggle enabled on this environment?.'
                  example: true
    delete:
      summary: 'Delete product toggle'
      operationId: deleteProductToggle
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Product toggle deleted'
                  code: 'PRODUCT_TOGGLES:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Product toggle deleted'
                  code:
                    type: string
                    example: 'PRODUCT_TOGGLES:DELETE:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage product features and toggles'
                  code: 'PRODUCT_TOGGLES:DELETE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage product features and toggles'
                  code:
                    type: string
                    example: 'PRODUCT_TOGGLES:DELETE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Product toggle not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Product toggle not found'
                  code: 'PRODUCT_TOGGLES:DELETE:TOGGLE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Product toggle not found'
                  code:
                    type: string
                    example: 'PRODUCT_TOGGLES:DELETE:TOGGLE_NOT_FOUND'
      tags:
        - 'Product features and toggles'
    parameters:
      -
        in: path
        name: id
        description: 'Product Toggle ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/product/faq:
    get:
      summary: 'List product FAQ'
      operationId: listProductFAQ
      description: 'This endpoint returns list of product FAQ.'
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      question: 'Cupiditate voluptatem in ullam veritatis repudiandae. Molestiae omnis deleniti ducimus vitae dicta iusto. Placeat eos id quis eaque eligendi ad. Aut aliquam pariatur cumque delectus.'
                      answer: 'Incidunt voluptatem placeat eligendi dignissimos voluptatibus fugiat. At eum perferendis ut et corporis adipisci neque. Et maiores ut est quia.'
                      created_at: '2025-12-10T12:00:14.000000Z'
                      updated_at: '2025-12-10T12:00:14.000000Z'
                    -
                      id: 2
                      question: 'Error labore iure repudiandae modi nisi. Consequatur illum perferendis alias earum eos ab. Nihil enim tempore officiis aut sed est ut officiis.'
                      answer: 'In dolorum voluptatem sit quo atque. Cum dolorem consequuntur voluptatem optio. Eius sint praesentium sed minima velit. Rem excepturi impedit consequatur molestiae.'
                      created_at: '2025-12-10T12:00:14.000000Z'
                      updated_at: '2025-12-10T12:00:14.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        question: 'Cupiditate voluptatem in ullam veritatis repudiandae. Molestiae omnis deleniti ducimus vitae dicta iusto. Placeat eos id quis eaque eligendi ad. Aut aliquam pariatur cumque delectus.'
                        answer: 'Incidunt voluptatem placeat eligendi dignissimos voluptatibus fugiat. At eum perferendis ut et corporis adipisci neque. Et maiores ut est quia.'
                        created_at: '2025-12-10T12:00:14.000000Z'
                        updated_at: '2025-12-10T12:00:14.000000Z'
                      -
                        id: 2
                        question: 'Error labore iure repudiandae modi nisi. Consequatur illum perferendis alias earum eos ab. Nihil enim tempore officiis aut sed est ut officiis.'
                        answer: 'In dolorum voluptatem sit quo atque. Cum dolorem consequuntur voluptatem optio. Eius sint praesentium sed minima velit. Rem excepturi impedit consequatur molestiae.'
                        created_at: '2025-12-10T12:00:14.000000Z'
                        updated_at: '2025-12-10T12:00:14.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        question:
                          type: string
                          example: 'Cupiditate voluptatem in ullam veritatis repudiandae. Molestiae omnis deleniti ducimus vitae dicta iusto. Placeat eos id quis eaque eligendi ad. Aut aliquam pariatur cumque delectus.'
                        answer:
                          type: string
                          example: 'Incidunt voluptatem placeat eligendi dignissimos voluptatibus fugiat. At eum perferendis ut et corporis adipisci neque. Et maiores ut est quia.'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:14.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:14.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view product features and toggles'
                  code: 'FAQ:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view product features and toggles'
                  code:
                    type: string
                    example: 'FAQ:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - 'Product features and toggles'
  '/api/user/{userId}/toggles':
    get:
      summary: 'List user toggles'
      operationId: listUserToggles
      description: 'This endpoint returns list of user toggles with their global toggles.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    toggle_id:
                      type: integer
                      example: 6
                    user_id:
                      type: integer
                      example: 251
                    enabled:
                      type: integer
                      example: 1
                    created_at:
                      type: string
                      example: '2025-12-10T12:00:14.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T12:00:14.000000Z'
                    toggle:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 6
                        name:
                          type: string
                          example: blue
                        slug:
                          type: string
                          example: enim-maiores-sit-aperiam-harum-labore-aspernatur
                        enabled:
                          type: integer
                          example: 1
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:14.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:14.000000Z'
                example:
                  -
                    id: 1
                    toggle_id: 6
                    user_id: 251
                    enabled: 1
                    created_at: '2025-12-10T12:00:14.000000Z'
                    updated_at: '2025-12-10T12:00:14.000000Z'
                    toggle:
                      id: 6
                      name: blue
                      slug: enim-maiores-sit-aperiam-harum-labore-aspernatur
                      enabled: 1
                      created_at: '2025-12-10T12:00:14.000000Z'
                      updated_at: '2025-12-10T12:00:14.000000Z'
                  -
                    id: 2
                    toggle_id: 8
                    user_id: 252
                    enabled: 1
                    created_at: '2025-12-10T12:00:14.000000Z'
                    updated_at: '2025-12-10T12:00:14.000000Z'
                    toggle:
                      id: 8
                      name: black
                      slug: rerum-quis-qui-iusto
                      enabled: 1
                      created_at: '2025-12-10T12:00:14.000000Z'
                      updated_at: '2025-12-10T12:00:14.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view product features and toggles'
                  code: 'USER_TOGGLES:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view product features and toggles'
                  code:
                    type: string
                    example: 'USER_TOGGLES:LIST:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'USER_TOGGLES:LIST:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'USER_TOGGLES:LIST:USER_NOT_FOUND'
      tags:
        - 'Product features and toggles'
    post:
      summary: 'Create user toggle'
      operationId: createUserToggle
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  toggle_id: 9
                  user_id: 253
                  enabled: 0
                  created_at: '2025-12-10T12:00:14.000000Z'
                  updated_at: '2025-12-10T12:00:14.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  toggle_id:
                    type: integer
                    example: 9
                  user_id:
                    type: integer
                    example: 253
                  enabled:
                    type: integer
                    example: 0
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:14.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:14.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage product features and toggles'
                  code: 'USER_TOGGLES:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage product features and toggles'
                  code:
                    type: string
                    example: 'USER_TOGGLES:CREATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'USER_TOGGLES:CREATE:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'USER_TOGGLES:CREATE:USER_NOT_FOUND'
      tags:
        - 'Product features and toggles'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                toggle_id:
                  type: integer
                  description: 'Product toggle ID. The <code>id</code> of an existing record in the App\Models\ProductToggle table.'
                  example: 1
                enabled:
                  type: boolean
                  description: 'Is user toggle enabled on this environment?.'
                  example: true
              required:
                - toggle_id
                - enabled
    parameters:
      -
        in: path
        name: userId
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/user/{userId}/toggles/{toggleId}':
    put:
      summary: 'Update user toggle'
      operationId: updateUserToggle
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  toggle_id: 10
                  user_id: 254
                  enabled: 1
                  created_at: '2025-12-10T12:00:14.000000Z'
                  updated_at: '2025-12-10T12:00:14.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  toggle_id:
                    type: integer
                    example: 10
                  user_id:
                    type: integer
                    example: 254
                  enabled:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:14.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:14.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage product features and toggles'
                  code: 'USER_TOGGLES:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage product features and toggles'
                  code:
                    type: string
                    example: 'USER_TOGGLES:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'User not found'
                    type: object
                    example:
                      message: 'User not found'
                      code: 'USER_TOGGLES:UPDATE:USER_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'User not found'
                      code:
                        type: string
                        example: 'USER_TOGGLES:UPDATE:USER_NOT_FOUND'
                  -
                    description: 'User toggle not found'
                    type: object
                    example:
                      message: 'User toggle not found'
                      code: 'USER_TOGGLES:UPDATE:TOGGLE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'User toggle not found'
                      code:
                        type: string
                        example: 'USER_TOGGLES:UPDATE:TOGGLE_NOT_FOUND'
      tags:
        - 'Product features and toggles'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
                  description: 'Is user toggle enabled on this environment?.'
                  example: true
    delete:
      summary: 'Delete user toggle'
      operationId: deleteUserToggle
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User toggle deleted'
                  code: 'USER_TOGGLES:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'User toggle deleted'
                  code:
                    type: string
                    example: 'USER_TOGGLES:DELETE:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage product features and toggles'
                  code: 'USER_TOGGLES:DELETE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage product features and toggles'
                  code:
                    type: string
                    example: 'USER_TOGGLES:DELETE:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'User not found'
                    type: object
                    example:
                      message: 'User not found'
                      code: 'USER_TOGGLES:DELETE:USER_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'User not found'
                      code:
                        type: string
                        example: 'USER_TOGGLES:DELETE:USER_NOT_FOUND'
                  -
                    description: 'User toggle not found'
                    type: object
                    example:
                      message: 'User toggle not found'
                      code: 'USER_TOGGLES:DELETE:TOGGLE_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'User toggle not found'
                      code:
                        type: string
                        example: 'USER_TOGGLES:DELETE:TOGGLE_NOT_FOUND'
      tags:
        - 'Product features and toggles'
    parameters:
      -
        in: path
        name: userId
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: toggleId
        description: 'User Toggle ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/releases:
    get:
      summary: 'List releases'
      operationId: listReleases
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      version_type: App\Models\SoftwareVersion
                      version_id: 14
                      description: 'Harum esse nesciunt odio occaecati voluptas atque eveniet. Maiores non delectus aut. Et et qui incidunt quia. Et dicta fuga odio voluptatem voluptas non quaerat.'
                      created_at: '2025-12-10T12:00:15.000000Z'
                      updated_at: '2025-12-10T12:00:15.000000Z'
                      version:
                        id: 14
                        name: 2.52.29
                        created_at: '2025-12-10T12:00:15.000000Z'
                        updated_at: '2025-12-10T12:00:15.000000Z'
                    -
                      id: 2
                      version_type: App\Models\SoftwareVersion
                      version_id: 15
                      description: 'Dignissimos neque sit voluptatem sint in laboriosam consequuntur ut. Alias pariatur repellat inventore corrupti quidem. Consectetur velit odit impedit voluptas.'
                      created_at: '2025-12-10T12:00:15.000000Z'
                      updated_at: '2025-12-10T12:00:15.000000Z'
                      version:
                        id: 15
                        name: 5.40.67
                        created_at: '2025-12-10T12:00:15.000000Z'
                        updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        version_type: App\Models\SoftwareVersion
                        version_id: 14
                        description: 'Harum esse nesciunt odio occaecati voluptas atque eveniet. Maiores non delectus aut. Et et qui incidunt quia. Et dicta fuga odio voluptatem voluptas non quaerat.'
                        created_at: '2025-12-10T12:00:15.000000Z'
                        updated_at: '2025-12-10T12:00:15.000000Z'
                        version:
                          id: 14
                          name: 2.52.29
                          created_at: '2025-12-10T12:00:15.000000Z'
                          updated_at: '2025-12-10T12:00:15.000000Z'
                      -
                        id: 2
                        version_type: App\Models\SoftwareVersion
                        version_id: 15
                        description: 'Dignissimos neque sit voluptatem sint in laboriosam consequuntur ut. Alias pariatur repellat inventore corrupti quidem. Consectetur velit odit impedit voluptas.'
                        created_at: '2025-12-10T12:00:15.000000Z'
                        updated_at: '2025-12-10T12:00:15.000000Z'
                        version:
                          id: 15
                          name: 5.40.67
                          created_at: '2025-12-10T12:00:15.000000Z'
                          updated_at: '2025-12-10T12:00:15.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        version_type:
                          type: string
                          example: App\Models\SoftwareVersion
                        version_id:
                          type: integer
                          example: 14
                        description:
                          type: string
                          example: 'Harum esse nesciunt odio occaecati voluptas atque eveniet. Maiores non delectus aut. Et et qui incidunt quia. Et dicta fuga odio voluptatem voluptas non quaerat.'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:15.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:15.000000Z'
                        version:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 14
                            name:
                              type: string
                              example: 2.52.29
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:15.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list releases'
                  code: 'RELEASES:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list releases'
                  code:
                    type: string
                    example: 'RELEASES:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - Releases
    post:
      summary: 'Create release'
      operationId: createRelease
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  version_type: App\Models\SoftwareVersion
                  version_id: 17
                  description: 'Adipisci itaque nemo delectus iure dolorum. Ullam dolores sed eveniet quo mollitia.'
                  created_at: '2025-12-10T12:00:15.000000Z'
                  updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  version_type:
                    type: string
                    example: App\Models\SoftwareVersion
                  version_id:
                    type: integer
                    example: 17
                  description:
                    type: string
                    example: 'Adipisci itaque nemo delectus iure dolorum. Ullam dolores sed eveniet quo mollitia.'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to create release'
                  code: 'RELEASES:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to create release'
                  code:
                    type: string
                    example: 'RELEASES:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - Releases
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                version_type:
                  type: string
                  description: 'Version type.'
                  example: SoftwareVersion
                  enum:
                    - DeviceModel
                    - SoftwareVersion
                    - FirmwareVersion
                    - PCBVersion
                version_id:
                  type: integer
                  description: 'Version ID.'
                  example: 1
                description:
                  type: string
                  description: 'Release description.'
                  example: 'This version fixes minor bugs.'
              required:
                - version_type
                - version_id
  '/api/releases/{id}':
    get:
      summary: 'Get release'
      operationId: getRelease
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  version_type: App\Models\SoftwareVersion
                  version_id: 16
                  description: 'Nobis sit dolores vero tenetur. Veritatis aliquam molestiae ducimus libero. Sit voluptatem libero blanditiis facilis aut. Alias id veniam sit eligendi nihil.'
                  created_at: '2025-12-10T12:00:15.000000Z'
                  updated_at: '2025-12-10T12:00:15.000000Z'
                  version:
                    id: 16
                    name: 6.57.73
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  version_type:
                    type: string
                    example: App\Models\SoftwareVersion
                  version_id:
                    type: integer
                    example: 16
                  description:
                    type: string
                    example: 'Nobis sit dolores vero tenetur. Veritatis aliquam molestiae ducimus libero. Sit voluptatem libero blanditiis facilis aut. Alias id veniam sit eligendi nihil.'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  version:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 16
                      name:
                        type: string
                        example: 6.57.73
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:15.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view release'
                  code: 'RELEASES:GET:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view release'
                  code:
                    type: string
                    example: 'RELEASES:GET:INSUFFICIENT_PERMISSION'
        404:
          description: 'Release not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Release not found'
                  code: 'RELEASES:GET:RELEASE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Release not found'
                  code:
                    type: string
                    example: 'RELEASES:GET:RELEASE_NOT_FOUND'
      tags:
        - Releases
    put:
      summary: 'Update release'
      operationId: updateRelease
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 5
                  version_type: App\Models\SoftwareVersion
                  version_id: 18
                  description: 'Sapiente consequatur qui quo est. Consequatur dolorum repellat ullam autem ipsam ea. Non delectus ratione laudantium. Vel neque aut nulla quae. Qui nihil molestiae rem et quia officiis quia.'
                  created_at: '2025-12-10T12:00:15.000000Z'
                  updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  id:
                    type: integer
                    example: 5
                  version_type:
                    type: string
                    example: App\Models\SoftwareVersion
                  version_id:
                    type: integer
                    example: 18
                  description:
                    type: string
                    example: 'Sapiente consequatur qui quo est. Consequatur dolorum repellat ullam autem ipsam ea. Non delectus ratione laudantium. Vel neque aut nulla quae. Qui nihil molestiae rem et quia officiis quia.'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update release'
                  code: 'RELEASES:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update release'
                  code:
                    type: string
                    example: 'RELEASES:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Release not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Release not found'
                  code: 'RELEASES:UPDATE:RELEASE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Release not found'
                  code:
                    type: string
                    example: 'RELEASES:UPDATE:RELEASE_NOT_FOUND'
      tags:
        - Releases
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                version_type:
                  type: string
                  description: 'Version type.'
                  example: SoftwareVersion
                  enum:
                    - DeviceModel
                    - SoftwareVersion
                    - FirmwareVersion
                    - PCBVersion
                version_id:
                  type: integer
                  description: 'Version ID.'
                  example: 1
                description:
                  type: string
                  description: 'Release description.'
                  example: 'This version fixes minor bugs.'
    delete:
      summary: 'Delete release'
      operationId: deleteRelease
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Version deleted'
                  code: 'RELEASES:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Version deleted'
                  code:
                    type: string
                    example: 'RELEASES:DELETE:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to delete release'
                  code: 'RELEASES:DELETE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to delete release'
                  code:
                    type: string
                    example: 'RELEASES:DELETE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Release not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Release not found'
                  code: 'RELEASES:DELETE:RELEASE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Release not found'
                  code:
                    type: string
                    example: 'RELEASES:DELETE:RELEASE_NOT_FOUND'
      tags:
        - Releases
    parameters:
      -
        in: path
        name: id
        description: 'Release ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/search:
    get:
      summary: Search
      operationId: search
      description: "<div>Searches in:\n\t\t<ul>\n\t\t\t<li>users (by name and email)</li>\n\t\t\t<li>devices (by serial number)</li>\n\t\t</ul>\n\t\t<p>Returned collection contains entries of type <code>User</code> or <code>Device</code>.</p>\n\t\t<p>If the device has a patient assigned, this patient is included in the results as an entry of type User.\n\t\tIf the device has no patient, the device is included in the results.</p>\n\t\t<p>Users included in the results, but not found directly have \"devices\" relation filled in with the devices that match the search query.</p></div>"
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      type: User
                      item:
                        id: 1
                        mrn: MRN
                        name: 'User name'
                        email: user@domain.com
                        language: en
                        phone: ''
                        phone_verified_at: null
                        address1: ''
                        address2: ''
                        postal_code: ''
                        city: ''
                        clinic_name: 'Test Company'
                        clinic_location: 'Test Company Location'
                        image: null
                        mfa_enabled: 0
                        mfa_method: email
                        mfa_verified_to: null
                        created_by: null
                        active: 1
                        notifications_timezone: Europe/Warsaw
                        notifications_at: '08:00:00'
                        created_at: '2024-09-01T15:00:00.000000Z'
                        updated_at: '2024-10-10T10:30:00.000000Z'
                        invitation_status: accepted
                        pivot:
                          assigned_user_id: 2
                          user_id: 1
                        devices: []
                        roles:
                          -
                            id: 5
                            name: Amputee
                            guard_name: web
                            created_at: '2024-01-01T12:00:00.000000Z'
                            updated_at: '2024-01-01T12:00:00.000000Z'
                            pivot:
                              model_id: 1
                              role_id: 5
                              model_type: App\Models\User
                    -
                      type: Device
                      item:
                        id: 1
                        serial: SERIAL-NUMBER
                        bluetooth_id: BLUETOOTH_ID
                        model_id: 1
                        amputee_id: 1
                        firmware_version_id: 1
                        pcb_version_id: 1
                        active: 1
                        last_activity_at: '2024-11-11 12:00:00'
                        created_at: '2024-08-30T15:00:00.000000Z'
                        updated_at: '2024-09-01T16:00:00.000000Z'
                        pivot:
                          user_id: 2
                          device_id: 1
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        type: User
                        item:
                          id: 1
                          mrn: MRN
                          name: 'User name'
                          email: user@domain.com
                          language: en
                          phone: ''
                          phone_verified_at: null
                          address1: ''
                          address2: ''
                          postal_code: ''
                          city: ''
                          clinic_name: 'Test Company'
                          clinic_location: 'Test Company Location'
                          image: null
                          mfa_enabled: 0
                          mfa_method: email
                          mfa_verified_to: null
                          created_by: null
                          active: 1
                          notifications_timezone: Europe/Warsaw
                          notifications_at: '08:00:00'
                          created_at: '2024-09-01T15:00:00.000000Z'
                          updated_at: '2024-10-10T10:30:00.000000Z'
                          invitation_status: accepted
                          pivot:
                            assigned_user_id: 2
                            user_id: 1
                          devices: []
                          roles:
                            -
                              id: 5
                              name: Amputee
                              guard_name: web
                              created_at: '2024-01-01T12:00:00.000000Z'
                              updated_at: '2024-01-01T12:00:00.000000Z'
                              pivot:
                                model_id: 1
                                role_id: 5
                                model_type: App\Models\User
                      -
                        type: Device
                        item:
                          id: 1
                          serial: SERIAL-NUMBER
                          bluetooth_id: BLUETOOTH_ID
                          model_id: 1
                          amputee_id: 1
                          firmware_version_id: 1
                          pcb_version_id: 1
                          active: 1
                          last_activity_at: '2024-11-11 12:00:00'
                          created_at: '2024-08-30T15:00:00.000000Z'
                          updated_at: '2024-09-01T16:00:00.000000Z'
                          pivot:
                            user_id: 2
                            device_id: 1
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          example: User
                        item:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            mrn:
                              type: string
                              example: MRN
                            name:
                              type: string
                              example: 'User name'
                            email:
                              type: string
                              example: user@domain.com
                            language:
                              type: string
                              example: en
                            phone:
                              type: string
                              example: ''
                            phone_verified_at:
                              type: string
                              example: null
                            address1:
                              type: string
                              example: ''
                            address2:
                              type: string
                              example: ''
                            postal_code:
                              type: string
                              example: ''
                            city:
                              type: string
                              example: ''
                            clinic_name:
                              type: string
                              example: 'Test Company'
                            clinic_location:
                              type: string
                              example: 'Test Company Location'
                            image:
                              type: string
                              example: null
                            mfa_enabled:
                              type: integer
                              example: 0
                            mfa_method:
                              type: string
                              example: email
                            mfa_verified_to:
                              type: string
                              example: null
                            created_by:
                              type: string
                              example: null
                            active:
                              type: integer
                              example: 1
                            notifications_timezone:
                              type: string
                              example: Europe/Warsaw
                            notifications_at:
                              type: string
                              example: '08:00:00'
                            created_at:
                              type: string
                              example: '2024-09-01T15:00:00.000000Z'
                            updated_at:
                              type: string
                              example: '2024-10-10T10:30:00.000000Z'
                            invitation_status:
                              type: string
                              example: accepted
                            pivot:
                              type: object
                              properties:
                                assigned_user_id:
                                  type: integer
                                  example: 2
                                user_id:
                                  type: integer
                                  example: 1
                            devices:
                              type: array
                              example: []
                            roles:
                              type: array
                              example:
                                -
                                  id: 5
                                  name: Amputee
                                  guard_name: web
                                  created_at: '2024-01-01T12:00:00.000000Z'
                                  updated_at: '2024-01-01T12:00:00.000000Z'
                                  pivot:
                                    model_id: 1
                                    role_id: 5
                                    model_type: App\Models\User
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 5
                                  name:
                                    type: string
                                    example: Amputee
                                  guard_name:
                                    type: string
                                    example: web
                                  created_at:
                                    type: string
                                    example: '2024-01-01T12:00:00.000000Z'
                                  updated_at:
                                    type: string
                                    example: '2024-01-01T12:00:00.000000Z'
                                  pivot:
                                    type: object
                                    properties:
                                      model_id: { type: integer, example: 1 }
                                      role_id: { type: integer, example: 5 }
                                      model_type: { type: string, example: App\Models\User }
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to search'
                  code: 'SEARCH:SEARCH:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to search'
                  code:
                    type: string
                    example: 'SEARCH:SEARCH:INSUFFICIENT_PERMISSION'
      tags:
        - Search
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: 'Search query. MINIMUM:STRING_LENGTH:3.'
                  example: Tom
              required:
                - query
  /api/servicing/parts:
    get:
      summary: 'List of parts'
      operationId: listOfParts
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      device_model: null
                      name: Visa
                      created_at: '2025-12-10T12:00:05.000000Z'
                      updated_at: '2025-12-10T12:00:05.000000Z'
                    -
                      id: 2
                      device_model: null
                      name: Visa
                      created_at: '2025-12-10T12:00:05.000000Z'
                      updated_at: '2025-12-10T12:00:05.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        device_model: null
                        name: Visa
                        created_at: '2025-12-10T12:00:05.000000Z'
                        updated_at: '2025-12-10T12:00:05.000000Z'
                      -
                        id: 2
                        device_model: null
                        name: Visa
                        created_at: '2025-12-10T12:00:05.000000Z'
                        updated_at: '2025-12-10T12:00:05.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        device_model:
                          type: string
                          example: null
                        name:
                          type: string
                          example: Visa
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:05.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:05.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list service parts'
                  code: 'SERVICING:LIST_PARTS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list service parts'
                  code:
                    type: string
                    example: 'SERVICING:LIST_PARTS:INSUFFICIENT_PERMISSION'
      tags:
        - Servicing
  /api/servicing/repair:
    post:
      summary: 'Report service repair'
      operationId: reportServiceRepair
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  user_id: 136
                  device_id: 114
                  created_at: '2025-12-10T12:00:06.000000Z'
                  updated_at: '2025-12-10T12:00:06.000000Z'
                  parts:
                    -
                      id: 1
                      repair_id: 1
                      part_id: 3
                      reason: 'Voluptatem et asperiores deleniti. Qui iste dolores ea. Voluptatem nisi autem distinctio atque enim. Maxime veritatis sequi adipisci enim libero ab. Exercitationem ad ex ipsam at quis eum.'
                      created_at: '2025-12-10T12:00:06.000000Z'
                      updated_at: '2025-12-10T12:00:06.000000Z'
                      part:
                        id: 3
                        device_model: null
                        name: Visa
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                    -
                      id: 2
                      repair_id: 1
                      part_id: 4
                      reason: 'Autem aperiam quidem mollitia aliquam voluptate eligendi. Molestias in voluptas rem aut consequatur doloribus id. Facere velit et in. Incidunt ut et molestias fugiat temporibus ut ullam sunt.'
                      created_at: '2025-12-10T12:00:06.000000Z'
                      updated_at: '2025-12-10T12:00:06.000000Z'
                      part:
                        id: 4
                        device_model: null
                        name: Visa
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                    -
                      id: 3
                      repair_id: 1
                      part_id: 5
                      reason: 'Labore blanditiis necessitatibus quaerat magnam provident odit beatae aut. Cupiditate dolorem omnis est doloribus. Sunt ut quasi consequatur ipsa ut.'
                      created_at: '2025-12-10T12:00:06.000000Z'
                      updated_at: '2025-12-10T12:00:06.000000Z'
                      part:
                        id: 5
                        device_model: null
                        name: 'Visa Retired'
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                  attachments:
                    -
                      id: 1
                      repair_id: 1
                      file: /tmp/fakerD6mVRs
                      created_at: '2025-12-10T12:00:06.000000Z'
                      updated_at: '2025-12-10T12:00:06.000000Z'
                    -
                      id: 2
                      repair_id: 1
                      file: /tmp/faker0Rv694
                      created_at: '2025-12-10T12:00:06.000000Z'
                      updated_at: '2025-12-10T12:00:06.000000Z'
                    -
                      id: 3
                      repair_id: 1
                      file: /tmp/fakeriyiclE
                      created_at: '2025-12-10T12:00:06.000000Z'
                      updated_at: '2025-12-10T12:00:06.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  user_id:
                    type: integer
                    example: 136
                  device_id:
                    type: integer
                    example: 114
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:06.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:06.000000Z'
                  parts:
                    type: array
                    example:
                      -
                        id: 1
                        repair_id: 1
                        part_id: 3
                        reason: 'Voluptatem et asperiores deleniti. Qui iste dolores ea. Voluptatem nisi autem distinctio atque enim. Maxime veritatis sequi adipisci enim libero ab. Exercitationem ad ex ipsam at quis eum.'
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                        part:
                          id: 3
                          device_model: null
                          name: Visa
                          created_at: '2025-12-10T12:00:06.000000Z'
                          updated_at: '2025-12-10T12:00:06.000000Z'
                      -
                        id: 2
                        repair_id: 1
                        part_id: 4
                        reason: 'Autem aperiam quidem mollitia aliquam voluptate eligendi. Molestias in voluptas rem aut consequatur doloribus id. Facere velit et in. Incidunt ut et molestias fugiat temporibus ut ullam sunt.'
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                        part:
                          id: 4
                          device_model: null
                          name: Visa
                          created_at: '2025-12-10T12:00:06.000000Z'
                          updated_at: '2025-12-10T12:00:06.000000Z'
                      -
                        id: 3
                        repair_id: 1
                        part_id: 5
                        reason: 'Labore blanditiis necessitatibus quaerat magnam provident odit beatae aut. Cupiditate dolorem omnis est doloribus. Sunt ut quasi consequatur ipsa ut.'
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                        part:
                          id: 5
                          device_model: null
                          name: 'Visa Retired'
                          created_at: '2025-12-10T12:00:06.000000Z'
                          updated_at: '2025-12-10T12:00:06.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        repair_id:
                          type: integer
                          example: 1
                        part_id:
                          type: integer
                          example: 3
                        reason:
                          type: string
                          example: 'Voluptatem et asperiores deleniti. Qui iste dolores ea. Voluptatem nisi autem distinctio atque enim. Maxime veritatis sequi adipisci enim libero ab. Exercitationem ad ex ipsam at quis eum.'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:06.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:06.000000Z'
                        part:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 3
                            device_model:
                              type: string
                              example: null
                            name:
                              type: string
                              example: Visa
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:06.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:06.000000Z'
                  attachments:
                    type: array
                    example:
                      -
                        id: 1
                        repair_id: 1
                        file: /tmp/fakerD6mVRs
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                      -
                        id: 2
                        repair_id: 1
                        file: /tmp/faker0Rv694
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                      -
                        id: 3
                        repair_id: 1
                        file: /tmp/fakeriyiclE
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        repair_id:
                          type: integer
                          example: 1
                        file:
                          type: string
                          example: /tmp/fakerD6mVRs
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:06.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:06.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to report service repair'
                  code: 'SERVICING:REPORT_REPAIR:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to report service repair'
                  code:
                    type: string
                    example: 'SERVICING:REPORT_REPAIR:INSUFFICIENT_PERMISSION'
      tags:
        - Servicing
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                user_id:
                  type: integer
                  description: 'User ID.'
                  example: 1
                device_id:
                  type: integer
                  description: 'Device ID.'
                  example: 1
                files:
                  type: array
                  description: 'Array of attachment files.'
                  items:
                    type: string
                    format: binary
                parts:
                  type: array
                  description: 'Array of replaced parts.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      part_id:
                        type: integer
                        description: 'Service part ID.'
                        example: 1
                      reason:
                        type: string
                        description: 'Reason of part replacement.'
                        example: 'Mechanical issue'
              required:
                - user_id
                - device_id
  /api/settings/app-version:
    get:
      summary: 'Get app version'
      operationId: getAppVersion
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  version: 1.6.0
                properties:
                  version:
                    type: string
                    example: 1.6.0
      tags:
        - Settings
    post:
      summary: 'Update app version'
      operationId: updateAppVersion
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  version: 1.6.0
                properties:
                  version:
                    type: string
                    example: 1.6.0
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update settings'
                  code: 'SETTINGS:UPDATE_APP_VERSION:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update settings'
                  code:
                    type: string
                    example: 'SETTINGS:UPDATE_APP_VERSION:INSUFFICIENT_PERMISSION'
      tags:
        - Settings
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                version:
                  type: string
                  description: 'App version.'
                  example: 1.6.0
  /api/settings/silent-push:
    get:
      summary: 'Get silent push timeout'
      operationId: getSilentPushTimeout
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  timeout: '15'
                properties:
                  timeout:
                    type: string
                    example: '15'
      tags:
        - Settings
    post:
      summary: 'Update silent push timeout'
      operationId: updateSilentPushTimeout
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  timeout: '15'
                properties:
                  timeout:
                    type: string
                    example: '15'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update settings'
                  code: 'SETTINGS:UPDATE_SILENT_PUSH:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update settings'
                  code:
                    type: string
                    example: 'SETTINGS:UPDATE_SILENT_PUSH:INSUFFICIENT_PERMISSION'
      tags:
        - Settings
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                timeout:
                  type: integer
                  description: 'Silent push timeout in minutes. Minimum value is <code>1</code> minute (<code>15</code> for production environment), maximum is <code>60</code> minutes. MINIMUM:NUMBER:1 MAXIMUM:NUMBER:60.'
                  example: 15
  /api/settings/languages:
    get:
      summary: 'Get available languages'
      operationId: getAvailableLanguages
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  languages:
                    - de
                    - en
                    - es
                    - it
                    - pl
                    - ru
                    - uk
                properties:
                  languages:
                    type: array
                    example:
                      - de
                      - en
                      - es
                      - it
                      - pl
                      - ru
                      - uk
                    items:
                      type: string
      tags:
        - Settings
  /api/mobile/versions:
    get:
      summary: 'Get mobile stores versions'
      operationId: getMobileStoresVersions
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  ios: '1.0'
                  android: '1.0'
                properties:
                  ios:
                    type: string
                    example: '1.0'
                  android:
                    type: string
                    example: '1.0'
      tags:
        - Settings
    post:
      summary: 'Update mobile stores versions'
      operationId: updateMobileStoresVersions
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  ios: '1.0'
                  android: '1.0'
                properties:
                  ios:
                    type: string
                    example: '1.0'
                  android:
                    type: string
                    example: '1.0'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update settings'
                  code: 'SETTINGS:UPDATE_MOBILE_STORES_VERSION:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update settings'
                  code:
                    type: string
                    example: 'SETTINGS:UPDATE_MOBILE_STORES_VERSION:INSUFFICIENT_PERMISSION'
      tags:
        - Settings
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                ios:
                  type: string
                  description: 'Apple AppStore current version.'
                  example: '1.1'
                android:
                  type: string
                  description: 'Google Play current version.'
                  example: '1.1'
  /api/tickets:
    get:
      summary: 'Get tickets list'
      operationId: getTicketsList
      description: "Possible extend options:\n\t\t<ul>\n\t\t\t<li>sender - the user who created ticket</li>\n\t\t\t<li>recipient - the user who was ticket recipient</li>\n\t\t\t<li>device - the device assigned to ticket</li>\n\t\t\t<li>messages - message allocated to ticket</li>\n\t\t\t<li>messages.attachments - list of attachments assigned to message and ticket</li>\n\t\t\t<li>messages.sender - the user who wrote the message</li>\n\t\t</ul>"
      parameters:
        -
          in: query
          name: status
          description: 'Filter tickets by status (available: <code>new</code>, <code>in_progress</code>, <code>closed</code>, <code>reopened</code>.'
          example: new
          required: false
          schema:
            type: string
            description: 'Filter tickets by status (available: <code>new</code>, <code>in_progress</code>, <code>closed</code>, <code>reopened</code>.'
            example: new
        -
          in: query
          name: sender
          description: 'Filter tickets by sender.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter tickets by sender.'
            example: 1
        -
          in: query
          name: recipient
          description: 'Filter tickets by recipient.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter tickets by recipient.'
            example: 1
        -
          in: query
          name: device
          description: 'Filter tickets by device.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter tickets by device.'
            example: 1
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>sender</code>, <code>recipient</code>, <code>device</code>, <code>messages</code>, <code>messages.attachments</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>sender</code>, <code>recipient</code>, <code>device</code>, <code>messages</code>, <code>messages.attachments</code>).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>sender_name</code>, <code>recipient_name</code>, <code>date</code>, <code>last_message</code>). Default: last_message, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>sender_name</code>, <code>recipient_name</code>, <code>date</code>, <code>last_message</code>). Default: last_message, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 27
                      sender_id: 145
                      recipient_id: 146
                      device_id: 121
                      meeting_date: '2025-12-10 12:00:06'
                      meeting_type: online_meeting
                      contact_email: hbotsford@hotmail.com
                      status: new
                      created_at: '2025-12-10T12:00:06.000000Z'
                      updated_at: '2025-12-10T12:00:06.000000Z'
                      sender:
                        id: 145
                        mrn: 16M85PM81765368006
                        name: 'Mr. Delbert Wolff IV'
                        email: 1765368006rudolph64@example.org
                        language: en
                        phone: 985.420.0929
                        phone_country: MU
                        phone_verified_at: null
                        address1: '303 Margie Skyway Apt. 971'
                        address2: 'North Alessiaport, AK 71654'
                        postal_code: 10760-4770
                        city: 'Kuhlman, Mosciski and Wunsch'
                        clinic_name: Krischester
                        clinic_location: "2991 Schimmel Turnpike\nRomagueramouth, ND 54212"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                      recipient:
                        id: 146
                        mrn: H0JKXC7B1765368006
                        name: 'Korey Connelly'
                        email: 1765368006itzel08@example.org
                        language: en
                        phone: '+15097083405'
                        phone_country: TT
                        phone_verified_at: null
                        address1: '988 Hoeger Loaf'
                        address2: 'Lake Sibyl, MI 63796'
                        postal_code: '47238'
                        city: "Gibson-D'Amore"
                        clinic_name: Gibsonbury
                        clinic_location: "243 Michel Plaza Suite 569\nOkunevaside, MT 73473-0837"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                      device:
                        id: 121
                        serial: 3007850e-43ba-3e58-9534-0c1f8ea25ea2
                        bluetooth_id: 248934cf-b1f8-3470-a946-303d6653f55c
                        company_id: null
                        model_id: null
                        amputee_id: null
                        clinician_id: null
                        firmware_version_id: null
                        pcb_version_id: null
                        reverse_magnets: 0
                        is_electrode: 0
                        active: 1
                        last_activity_at: '0000-00-00 00:00:00'
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                      messages:
                        -
                          id: 15
                          ticket_id: 27
                          sender_id: 147
                          title: Prof.
                          content: 'Culpa ipsam officia sed iure eos ducimus.'
                          is_read: false
                          created_at: '2025-12-10T12:00:07.000000Z'
                          updated_at: '2025-12-10T12:00:07.000000Z'
                    -
                      id: 35
                      sender_id: 159
                      recipient_id: 160
                      device_id: 122
                      meeting_date: '2025-12-10 12:00:07'
                      meeting_type: online_meeting
                      contact_email: kacey.lemke@orn.com
                      status: new
                      created_at: '2025-12-10T12:00:07.000000Z'
                      updated_at: '2025-12-10T12:00:07.000000Z'
                      sender:
                        id: 159
                        mrn: OCNAWGO11765368007
                        name: 'Dr. Catharine Hayes V'
                        email: 1765368007francesco64@example.com
                        language: en
                        phone: 1-323-907-9184
                        phone_country: GI
                        phone_verified_at: null
                        address1: '144 Josefina Brooks Suite 748'
                        address2: 'Port Deshawnmouth, NH 47539-6188'
                        postal_code: '77303'
                        city: Hettinger-Brekke
                        clinic_name: 'South Caesarmouth'
                        clinic_location: "2979 Thompson Ridge\nWest Arjunville, MA 73660"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:07.000000Z'
                        updated_at: '2025-12-10T12:00:07.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                      recipient:
                        id: 160
                        mrn: 0VU0MV191765368007
                        name: 'Ezra Bayer'
                        email: 1765368007mccullough.viva@example.net
                        language: en
                        phone: 1-848-544-0972
                        phone_country: BW
                        phone_verified_at: null
                        address1: '2502 Amparo Drive'
                        address2: 'Langoshberg, IA 83409-7837'
                        postal_code: '43736'
                        city: Hettinger-McLaughlin
                        clinic_name: Creminstad
                        clinic_location: "7085 Huels Falls Apt. 930\nWest Aric, AZ 05207"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T12:00:07.000000Z'
                        updated_at: '2025-12-10T12:00:07.000000Z'
                        invitation_status: null
                        acadle_invitation_status: null
                        roles: []
                      device:
                        id: 122
                        serial: 6d16ce3e-5783-3528-aba1-fd0382549f16
                        bluetooth_id: 2147254b-a634-34fc-8b88-2d3c7ffa5067
                        company_id: null
                        model_id: null
                        amputee_id: null
                        clinician_id: null
                        firmware_version_id: null
                        pcb_version_id: null
                        reverse_magnets: 0
                        is_electrode: 0
                        active: 1
                        last_activity_at: '0000-00-00 00:00:00'
                        created_at: '2025-12-10T12:00:07.000000Z'
                        updated_at: '2025-12-10T12:00:07.000000Z'
                      messages:
                        -
                          id: 19
                          ticket_id: 35
                          sender_id: 161
                          title: Prof.
                          content: 'Et deserunt nihil aut est assumenda.'
                          is_read: false
                          created_at: '2025-12-10T12:00:08.000000Z'
                          updated_at: '2025-12-10T12:00:08.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 27
                        sender_id: 145
                        recipient_id: 146
                        device_id: 121
                        meeting_date: '2025-12-10 12:00:06'
                        meeting_type: online_meeting
                        contact_email: hbotsford@hotmail.com
                        status: new
                        created_at: '2025-12-10T12:00:06.000000Z'
                        updated_at: '2025-12-10T12:00:06.000000Z'
                        sender:
                          id: 145
                          mrn: 16M85PM81765368006
                          name: 'Mr. Delbert Wolff IV'
                          email: 1765368006rudolph64@example.org
                          language: en
                          phone: 985.420.0929
                          phone_country: MU
                          phone_verified_at: null
                          address1: '303 Margie Skyway Apt. 971'
                          address2: 'North Alessiaport, AK 71654'
                          postal_code: 10760-4770
                          city: 'Kuhlman, Mosciski and Wunsch'
                          clinic_name: Krischester
                          clinic_location: "2991 Schimmel Turnpike\nRomagueramouth, ND 54212"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:06.000000Z'
                          updated_at: '2025-12-10T12:00:06.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                        recipient:
                          id: 146
                          mrn: H0JKXC7B1765368006
                          name: 'Korey Connelly'
                          email: 1765368006itzel08@example.org
                          language: en
                          phone: '+15097083405'
                          phone_country: TT
                          phone_verified_at: null
                          address1: '988 Hoeger Loaf'
                          address2: 'Lake Sibyl, MI 63796'
                          postal_code: '47238'
                          city: "Gibson-D'Amore"
                          clinic_name: Gibsonbury
                          clinic_location: "243 Michel Plaza Suite 569\nOkunevaside, MT 73473-0837"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:06.000000Z'
                          updated_at: '2025-12-10T12:00:06.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                        device:
                          id: 121
                          serial: 3007850e-43ba-3e58-9534-0c1f8ea25ea2
                          bluetooth_id: 248934cf-b1f8-3470-a946-303d6653f55c
                          company_id: null
                          model_id: null
                          amputee_id: null
                          clinician_id: null
                          firmware_version_id: null
                          pcb_version_id: null
                          reverse_magnets: 0
                          is_electrode: 0
                          active: 1
                          last_activity_at: '0000-00-00 00:00:00'
                          created_at: '2025-12-10T12:00:06.000000Z'
                          updated_at: '2025-12-10T12:00:06.000000Z'
                        messages:
                          -
                            id: 15
                            ticket_id: 27
                            sender_id: 147
                            title: Prof.
                            content: 'Culpa ipsam officia sed iure eos ducimus.'
                            is_read: false
                            created_at: '2025-12-10T12:00:07.000000Z'
                            updated_at: '2025-12-10T12:00:07.000000Z'
                      -
                        id: 35
                        sender_id: 159
                        recipient_id: 160
                        device_id: 122
                        meeting_date: '2025-12-10 12:00:07'
                        meeting_type: online_meeting
                        contact_email: kacey.lemke@orn.com
                        status: new
                        created_at: '2025-12-10T12:00:07.000000Z'
                        updated_at: '2025-12-10T12:00:07.000000Z'
                        sender:
                          id: 159
                          mrn: OCNAWGO11765368007
                          name: 'Dr. Catharine Hayes V'
                          email: 1765368007francesco64@example.com
                          language: en
                          phone: 1-323-907-9184
                          phone_country: GI
                          phone_verified_at: null
                          address1: '144 Josefina Brooks Suite 748'
                          address2: 'Port Deshawnmouth, NH 47539-6188'
                          postal_code: '77303'
                          city: Hettinger-Brekke
                          clinic_name: 'South Caesarmouth'
                          clinic_location: "2979 Thompson Ridge\nWest Arjunville, MA 73660"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:07.000000Z'
                          updated_at: '2025-12-10T12:00:07.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                        recipient:
                          id: 160
                          mrn: 0VU0MV191765368007
                          name: 'Ezra Bayer'
                          email: 1765368007mccullough.viva@example.net
                          language: en
                          phone: 1-848-544-0972
                          phone_country: BW
                          phone_verified_at: null
                          address1: '2502 Amparo Drive'
                          address2: 'Langoshberg, IA 83409-7837'
                          postal_code: '43736'
                          city: Hettinger-McLaughlin
                          clinic_name: Creminstad
                          clinic_location: "7085 Huels Falls Apt. 930\nWest Aric, AZ 05207"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T12:00:07.000000Z'
                          updated_at: '2025-12-10T12:00:07.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          roles: []
                        device:
                          id: 122
                          serial: 6d16ce3e-5783-3528-aba1-fd0382549f16
                          bluetooth_id: 2147254b-a634-34fc-8b88-2d3c7ffa5067
                          company_id: null
                          model_id: null
                          amputee_id: null
                          clinician_id: null
                          firmware_version_id: null
                          pcb_version_id: null
                          reverse_magnets: 0
                          is_electrode: 0
                          active: 1
                          last_activity_at: '0000-00-00 00:00:00'
                          created_at: '2025-12-10T12:00:07.000000Z'
                          updated_at: '2025-12-10T12:00:07.000000Z'
                        messages:
                          -
                            id: 19
                            ticket_id: 35
                            sender_id: 161
                            title: Prof.
                            content: 'Et deserunt nihil aut est assumenda.'
                            is_read: false
                            created_at: '2025-12-10T12:00:08.000000Z'
                            updated_at: '2025-12-10T12:00:08.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 27
                        sender_id:
                          type: integer
                          example: 145
                        recipient_id:
                          type: integer
                          example: 146
                        device_id:
                          type: integer
                          example: 121
                        meeting_date:
                          type: string
                          example: '2025-12-10 12:00:06'
                        meeting_type:
                          type: string
                          example: online_meeting
                        contact_email:
                          type: string
                          example: hbotsford@hotmail.com
                        status:
                          type: string
                          example: new
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:06.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:06.000000Z'
                        sender:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 145
                            mrn:
                              type: string
                              example: 16M85PM81765368006
                            name:
                              type: string
                              example: 'Mr. Delbert Wolff IV'
                            email:
                              type: string
                              example: 1765368006rudolph64@example.org
                            language:
                              type: string
                              example: en
                            phone:
                              type: string
                              example: 985.420.0929
                            phone_country:
                              type: string
                              example: MU
                            phone_verified_at:
                              type: string
                              example: null
                            address1:
                              type: string
                              example: '303 Margie Skyway Apt. 971'
                            address2:
                              type: string
                              example: 'North Alessiaport, AK 71654'
                            postal_code:
                              type: string
                              example: 10760-4770
                            city:
                              type: string
                              example: 'Kuhlman, Mosciski and Wunsch'
                            clinic_name:
                              type: string
                              example: Krischester
                            clinic_location:
                              type: string
                              example: "2991 Schimmel Turnpike\nRomagueramouth, ND 54212"
                            image:
                              type: string
                              example: null
                            mfa_enabled:
                              type: integer
                              example: 0
                            mfa_method:
                              type: string
                              example: null
                            mfa_verified_to:
                              type: string
                              example: null
                            location_id:
                              type: string
                              example: null
                            created_by:
                              type: string
                              example: null
                            active:
                              type: integer
                              example: 1
                            notifications_timezone:
                              type: string
                              example: null
                            notifications_at:
                              type: string
                              example: null
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:06.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:06.000000Z'
                            invitation_status:
                              type: string
                              example: null
                            acadle_invitation_status:
                              type: string
                              example: null
                            roles:
                              type: array
                              example: []
                        recipient:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 146
                            mrn:
                              type: string
                              example: H0JKXC7B1765368006
                            name:
                              type: string
                              example: 'Korey Connelly'
                            email:
                              type: string
                              example: 1765368006itzel08@example.org
                            language:
                              type: string
                              example: en
                            phone:
                              type: string
                              example: '+15097083405'
                            phone_country:
                              type: string
                              example: TT
                            phone_verified_at:
                              type: string
                              example: null
                            address1:
                              type: string
                              example: '988 Hoeger Loaf'
                            address2:
                              type: string
                              example: 'Lake Sibyl, MI 63796'
                            postal_code:
                              type: string
                              example: '47238'
                            city:
                              type: string
                              example: "Gibson-D'Amore"
                            clinic_name:
                              type: string
                              example: Gibsonbury
                            clinic_location:
                              type: string
                              example: "243 Michel Plaza Suite 569\nOkunevaside, MT 73473-0837"
                            image:
                              type: string
                              example: null
                            mfa_enabled:
                              type: integer
                              example: 0
                            mfa_method:
                              type: string
                              example: null
                            mfa_verified_to:
                              type: string
                              example: null
                            location_id:
                              type: string
                              example: null
                            created_by:
                              type: string
                              example: null
                            active:
                              type: integer
                              example: 1
                            notifications_timezone:
                              type: string
                              example: null
                            notifications_at:
                              type: string
                              example: null
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:06.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:06.000000Z'
                            invitation_status:
                              type: string
                              example: null
                            acadle_invitation_status:
                              type: string
                              example: null
                            roles:
                              type: array
                              example: []
                        device:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 121
                            serial:
                              type: string
                              example: 3007850e-43ba-3e58-9534-0c1f8ea25ea2
                            bluetooth_id:
                              type: string
                              example: 248934cf-b1f8-3470-a946-303d6653f55c
                            company_id:
                              type: string
                              example: null
                            model_id:
                              type: string
                              example: null
                            amputee_id:
                              type: string
                              example: null
                            clinician_id:
                              type: string
                              example: null
                            firmware_version_id:
                              type: string
                              example: null
                            pcb_version_id:
                              type: string
                              example: null
                            reverse_magnets:
                              type: integer
                              example: 0
                            is_electrode:
                              type: integer
                              example: 0
                            active:
                              type: integer
                              example: 1
                            last_activity_at:
                              type: string
                              example: '0000-00-00 00:00:00'
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:06.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:06.000000Z'
                        messages:
                          type: array
                          example:
                            -
                              id: 15
                              ticket_id: 27
                              sender_id: 147
                              title: Prof.
                              content: 'Culpa ipsam officia sed iure eos ducimus.'
                              is_read: false
                              created_at: '2025-12-10T12:00:07.000000Z'
                              updated_at: '2025-12-10T12:00:07.000000Z'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 15
                              ticket_id:
                                type: integer
                                example: 27
                              sender_id:
                                type: integer
                                example: 147
                              title:
                                type: string
                                example: Prof.
                              content:
                                type: string
                                example: 'Culpa ipsam officia sed iure eos ducimus.'
                              is_read:
                                type: boolean
                                example: false
                              created_at:
                                type: string
                                example: '2025-12-10T12:00:07.000000Z'
                              updated_at:
                                type: string
                                example: '2025-12-10T12:00:07.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list support tickets'
                  code: 'TICKETS:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list support tickets'
                  code:
                    type: string
                    example: 'TICKETS:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - 'Support Ticket'
    post:
      summary: 'Create new support ticket'
      operationId: createNewSupportTicket
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 53
                  sender_id: 191
                  recipient_id: 192
                  device_id: 124
                  meeting_date: '2025-12-10 12:00:10'
                  meeting_type: online_meeting
                  contact_email: vincent.windler@trantow.com
                  status: new
                  created_at: '2025-12-10T12:00:10.000000Z'
                  updated_at: '2025-12-10T12:00:10.000000Z'
                  sender:
                    id: 191
                    mrn: I2T0UMDS1765368009
                    name: 'Carolina Barrows'
                    email: 1765368009donnie72@example.net
                    language: en
                    phone: 252-680-9391
                    phone_country: KP
                    phone_verified_at: null
                    address1: '81608 Schroeder Walk'
                    address2: 'Lake Miaview, KY 52404'
                    postal_code: 89025-9121
                    city: Schuppe-Goyette
                    clinic_name: Champlinmouth
                    clinic_location: "358 Paxton Extension Apt. 094\nNew Jerod, GA 80408"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:10.000000Z'
                    updated_at: '2025-12-10T12:00:10.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  recipient:
                    id: 192
                    mrn: B9C2XC3Q1765368010
                    name: 'Hans Thiel'
                    email: 1765368010zrice@example.com
                    language: en
                    phone: 1-715-840-5736
                    phone_country: HU
                    phone_verified_at: null
                    address1: '4995 Reilly Ridges Apt. 609'
                    address2: 'Ortizborough, WY 84851'
                    postal_code: '21081'
                    city: 'Leffler Group'
                    clinic_name: Ismaelside
                    clinic_location: "7132 Nikolaus Station\nStokesville, WY 39916"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:10.000000Z'
                    updated_at: '2025-12-10T12:00:10.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  device:
                    id: 124
                    serial: a1315139-8964-3736-9d0a-f02c80bdf10f
                    bluetooth_id: 9e4fb898-c297-37fc-a0e1-02927e96e415
                    company_id: null
                    model_id: null
                    amputee_id: null
                    clinician_id: null
                    firmware_version_id: null
                    pcb_version_id: null
                    reverse_magnets: 0
                    is_electrode: 0
                    active: 1
                    last_activity_at: '0000-00-00 00:00:00'
                    created_at: '2025-12-10T12:00:10.000000Z'
                    updated_at: '2025-12-10T12:00:10.000000Z'
                  messages:
                    -
                      id: 27
                      ticket_id: 53
                      sender_id: 193
                      title: Mrs.
                      content: 'Quia sit omnis qui consequuntur blanditiis ipsum.'
                      is_read: false
                      created_at: '2025-12-10T12:00:10.000000Z'
                      updated_at: '2025-12-10T12:00:10.000000Z'
                properties:
                  id:
                    type: integer
                    example: 53
                  sender_id:
                    type: integer
                    example: 191
                  recipient_id:
                    type: integer
                    example: 192
                  device_id:
                    type: integer
                    example: 124
                  meeting_date:
                    type: string
                    example: '2025-12-10 12:00:10'
                  meeting_type:
                    type: string
                    example: online_meeting
                  contact_email:
                    type: string
                    example: vincent.windler@trantow.com
                  status:
                    type: string
                    example: new
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:10.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:10.000000Z'
                  sender:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 191
                      mrn:
                        type: string
                        example: I2T0UMDS1765368009
                      name:
                        type: string
                        example: 'Carolina Barrows'
                      email:
                        type: string
                        example: 1765368009donnie72@example.net
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 252-680-9391
                      phone_country:
                        type: string
                        example: KP
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '81608 Schroeder Walk'
                      address2:
                        type: string
                        example: 'Lake Miaview, KY 52404'
                      postal_code:
                        type: string
                        example: 89025-9121
                      city:
                        type: string
                        example: Schuppe-Goyette
                      clinic_name:
                        type: string
                        example: Champlinmouth
                      clinic_location:
                        type: string
                        example: "358 Paxton Extension Apt. 094\nNew Jerod, GA 80408"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:10.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:10.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  recipient:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 192
                      mrn:
                        type: string
                        example: B9C2XC3Q1765368010
                      name:
                        type: string
                        example: 'Hans Thiel'
                      email:
                        type: string
                        example: 1765368010zrice@example.com
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 1-715-840-5736
                      phone_country:
                        type: string
                        example: HU
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '4995 Reilly Ridges Apt. 609'
                      address2:
                        type: string
                        example: 'Ortizborough, WY 84851'
                      postal_code:
                        type: string
                        example: '21081'
                      city:
                        type: string
                        example: 'Leffler Group'
                      clinic_name:
                        type: string
                        example: Ismaelside
                      clinic_location:
                        type: string
                        example: "7132 Nikolaus Station\nStokesville, WY 39916"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:10.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:10.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  device:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 124
                      serial:
                        type: string
                        example: a1315139-8964-3736-9d0a-f02c80bdf10f
                      bluetooth_id:
                        type: string
                        example: 9e4fb898-c297-37fc-a0e1-02927e96e415
                      company_id:
                        type: string
                        example: null
                      model_id:
                        type: string
                        example: null
                      amputee_id:
                        type: string
                        example: null
                      clinician_id:
                        type: string
                        example: null
                      firmware_version_id:
                        type: string
                        example: null
                      pcb_version_id:
                        type: string
                        example: null
                      reverse_magnets:
                        type: integer
                        example: 0
                      is_electrode:
                        type: integer
                        example: 0
                      active:
                        type: integer
                        example: 1
                      last_activity_at:
                        type: string
                        example: '0000-00-00 00:00:00'
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:10.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:10.000000Z'
                  messages:
                    type: array
                    example:
                      -
                        id: 27
                        ticket_id: 53
                        sender_id: 193
                        title: Mrs.
                        content: 'Quia sit omnis qui consequuntur blanditiis ipsum.'
                        is_read: false
                        created_at: '2025-12-10T12:00:10.000000Z'
                        updated_at: '2025-12-10T12:00:10.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 27
                        ticket_id:
                          type: integer
                          example: 53
                        sender_id:
                          type: integer
                          example: 193
                        title:
                          type: string
                          example: Mrs.
                        content:
                          type: string
                          example: 'Quia sit omnis qui consequuntur blanditiis ipsum.'
                        is_read:
                          type: boolean
                          example: false
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:10.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:10.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to create support ticket'
                  code: 'TICKETS:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to create support ticket'
                  code:
                    type: string
                    example: 'TICKETS:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - 'Support Ticket'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                recipient:
                  type: integer
                  description: 'User the support ticket is assigned to. For Amputee role main clinician will be automatically assigned instead. The <code>id</code> of an existing record in the App\Models\User table.'
                  example: 1
                device:
                  type: integer
                  description: 'Device the support ticket is assigned to. The <code>id</code> of an existing record in the App\Models\Device table.'
                  example: 1
                  nullable: true
                meeting_type:
                  type: string
                  description: 'Type of support meeting.'
                  example: online_meeting
                  enum:
                    - online_meeting
                    - phone_call
                    - personally
                    - none
                meeting_date:
                  type: string
                  description: 'Date of support meeting. MUST_BE_DATE.'
                  example: 2025-12-10T12:00:09.991331+00:00
                contact_email:
                  type: string
                  description: 'Email address for later contact. MUST_BE_EMAIL.'
                  example: volkman.harmony@bergstrom.com
                message:
                  type: object
                  description: ''
                  example: []
                  properties:
                    content:
                      type: string
                      description: 'Content of message.'
                      example: 'Quas ratione sit aut sapiente.'
                    title:
                      type: string
                      description: 'Message title.'
                      example: 'Assumenda dolorem aut earum.'
                    attachments:
                      type: array
                      description: 'Must be a file.'
                      items:
                        type: string
                        format: binary
              required:
                - recipient
                - meeting_type
                - meeting_date
  /api/tickets/status:
    get:
      summary: 'Get tickets status'
      operationId: getTicketsStatus
      description: 'Counts tickets by their status'
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  unread: 1
                properties:
                  unread:
                    type: integer
                    example: 1
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list support tickets'
                  code: 'TICKETS:STATUS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list support tickets'
                  code:
                    type: string
                    example: 'TICKETS:STATUS:INSUFFICIENT_PERMISSION'
      tags:
        - 'Support Ticket'
  '/api/ticket/{id}':
    get:
      summary: 'Get support ticket'
      operationId: getSupportTicket
      description: 'Returns single support ticket in the response.'
      parameters:
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>sender</code>, <code>recipient</code>, <code>device</code>, <code>messages</code>, <code>messages.attachments</code>, <code>messages.sender</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>sender</code>, <code>recipient</code>, <code>device</code>, <code>messages</code>, <code>messages.attachments</code>, <code>messages.sender</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 43
                  sender_id: 173
                  recipient_id: 174
                  device_id: 123
                  meeting_date: '2025-12-10 12:00:08'
                  meeting_type: online_meeting
                  contact_email: andreanne58@okuneva.com
                  status: new
                  created_at: '2025-12-10T12:00:08.000000Z'
                  updated_at: '2025-12-10T12:00:08.000000Z'
                  sender:
                    id: 173
                    mrn: 64DR7QJW1765368008
                    name: 'Dr. Selmer Reilly I'
                    email: 1765368008jrau@example.com
                    language: en
                    phone: 1-757-726-4192
                    phone_country: MG
                    phone_verified_at: null
                    address1: '927 Anderson Meadow'
                    address2: 'Earleneshire, FL 34468-4857'
                    postal_code: '29585'
                    city: 'Abbott PLC'
                    clinic_name: Larkinview
                    clinic_location: "765 Mertz Point Suite 695\nAltenwerthshire, MT 62393-0568"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:08.000000Z'
                    updated_at: '2025-12-10T12:00:08.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  recipient:
                    id: 174
                    mrn: ECRARKW81765368008
                    name: 'Dr. Patrick Jacobson'
                    email: 1765368008vincenza72@example.org
                    language: en
                    phone: +1-310-438-3273
                    phone_country: MU
                    phone_verified_at: null
                    address1: '1403 Percy Walk'
                    address2: 'Mossieborough, MO 63615-7680'
                    postal_code: '57500'
                    city: 'Hahn, Mills and Gutkowski'
                    clinic_name: Gleasonborough
                    clinic_location: "15066 Jacky Burgs Apt. 114\nJerdeview, MD 35352-9098"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:08.000000Z'
                    updated_at: '2025-12-10T12:00:08.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  device:
                    id: 123
                    serial: 5dbb9935-ee66-3531-850c-c6d48e49a677
                    bluetooth_id: 8cb2bf7f-2983-3a79-8c5f-73be058369e6
                    company_id: null
                    model_id: null
                    amputee_id: null
                    clinician_id: null
                    firmware_version_id: null
                    pcb_version_id: null
                    reverse_magnets: 0
                    is_electrode: 0
                    active: 1
                    last_activity_at: '0000-00-00 00:00:00'
                    created_at: '2025-12-10T12:00:08.000000Z'
                    updated_at: '2025-12-10T12:00:08.000000Z'
                  messages:
                    -
                      id: 23
                      ticket_id: 43
                      sender_id: 175
                      title: Prof.
                      content: 'Autem expedita quia dolores aut dolor odit.'
                      is_read: false
                      created_at: '2025-12-10T12:00:09.000000Z'
                      updated_at: '2025-12-10T12:00:09.000000Z'
                properties:
                  id:
                    type: integer
                    example: 43
                  sender_id:
                    type: integer
                    example: 173
                  recipient_id:
                    type: integer
                    example: 174
                  device_id:
                    type: integer
                    example: 123
                  meeting_date:
                    type: string
                    example: '2025-12-10 12:00:08'
                  meeting_type:
                    type: string
                    example: online_meeting
                  contact_email:
                    type: string
                    example: andreanne58@okuneva.com
                  status:
                    type: string
                    example: new
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:08.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:08.000000Z'
                  sender:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 173
                      mrn:
                        type: string
                        example: 64DR7QJW1765368008
                      name:
                        type: string
                        example: 'Dr. Selmer Reilly I'
                      email:
                        type: string
                        example: 1765368008jrau@example.com
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 1-757-726-4192
                      phone_country:
                        type: string
                        example: MG
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '927 Anderson Meadow'
                      address2:
                        type: string
                        example: 'Earleneshire, FL 34468-4857'
                      postal_code:
                        type: string
                        example: '29585'
                      city:
                        type: string
                        example: 'Abbott PLC'
                      clinic_name:
                        type: string
                        example: Larkinview
                      clinic_location:
                        type: string
                        example: "765 Mertz Point Suite 695\nAltenwerthshire, MT 62393-0568"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:08.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:08.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  recipient:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 174
                      mrn:
                        type: string
                        example: ECRARKW81765368008
                      name:
                        type: string
                        example: 'Dr. Patrick Jacobson'
                      email:
                        type: string
                        example: 1765368008vincenza72@example.org
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: +1-310-438-3273
                      phone_country:
                        type: string
                        example: MU
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '1403 Percy Walk'
                      address2:
                        type: string
                        example: 'Mossieborough, MO 63615-7680'
                      postal_code:
                        type: string
                        example: '57500'
                      city:
                        type: string
                        example: 'Hahn, Mills and Gutkowski'
                      clinic_name:
                        type: string
                        example: Gleasonborough
                      clinic_location:
                        type: string
                        example: "15066 Jacky Burgs Apt. 114\nJerdeview, MD 35352-9098"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:08.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:08.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  device:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      serial:
                        type: string
                        example: 5dbb9935-ee66-3531-850c-c6d48e49a677
                      bluetooth_id:
                        type: string
                        example: 8cb2bf7f-2983-3a79-8c5f-73be058369e6
                      company_id:
                        type: string
                        example: null
                      model_id:
                        type: string
                        example: null
                      amputee_id:
                        type: string
                        example: null
                      clinician_id:
                        type: string
                        example: null
                      firmware_version_id:
                        type: string
                        example: null
                      pcb_version_id:
                        type: string
                        example: null
                      reverse_magnets:
                        type: integer
                        example: 0
                      is_electrode:
                        type: integer
                        example: 0
                      active:
                        type: integer
                        example: 1
                      last_activity_at:
                        type: string
                        example: '0000-00-00 00:00:00'
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:08.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:08.000000Z'
                  messages:
                    type: array
                    example:
                      -
                        id: 23
                        ticket_id: 43
                        sender_id: 175
                        title: Prof.
                        content: 'Autem expedita quia dolores aut dolor odit.'
                        is_read: false
                        created_at: '2025-12-10T12:00:09.000000Z'
                        updated_at: '2025-12-10T12:00:09.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 23
                        ticket_id:
                          type: integer
                          example: 43
                        sender_id:
                          type: integer
                          example: 175
                        title:
                          type: string
                          example: Prof.
                        content:
                          type: string
                          example: 'Autem expedita quia dolores aut dolor odit.'
                        is_read:
                          type: boolean
                          example: false
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:09.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:09.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view support ticket'
                  code: 'TICKETS:GET:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view support ticket'
                  code:
                    type: string
                    example: 'TICKETS:GET:INSUFFICIENT_PERMISSION'
        404:
          description: 'Support ticket not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Support ticket not found'
                  code: 'TICKETS:GET:TICKET_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Support ticket not found'
                  code:
                    type: string
                    example: 'TICKETS:GET:TICKET_NOT_FOUND'
      tags:
        - 'Support Ticket'
    parameters:
      -
        in: path
        name: id
        description: 'Support ticket ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/ticket/{id}/history':
    get:
      summary: 'Get support ticket history'
      operationId: getSupportTicketHistory
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      ticket_id: 51
                      author_id: 188
                      action: enim
                      reason: 'Voluptas necessitatibus numquam cupiditate.'
                      created_at: '2025-12-10T12:00:09.000000Z'
                      updated_at: '2025-12-10T12:00:09.000000Z'
                    -
                      id: 2
                      ticket_id: 52
                      author_id: 190
                      action: tempore
                      reason: 'Quasi illum eius dolorem et praesentium.'
                      created_at: '2025-12-10T12:00:09.000000Z'
                      updated_at: '2025-12-10T12:00:09.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        ticket_id: 51
                        author_id: 188
                        action: enim
                        reason: 'Voluptas necessitatibus numquam cupiditate.'
                        created_at: '2025-12-10T12:00:09.000000Z'
                        updated_at: '2025-12-10T12:00:09.000000Z'
                      -
                        id: 2
                        ticket_id: 52
                        author_id: 190
                        action: tempore
                        reason: 'Quasi illum eius dolorem et praesentium.'
                        created_at: '2025-12-10T12:00:09.000000Z'
                        updated_at: '2025-12-10T12:00:09.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        ticket_id:
                          type: integer
                          example: 51
                        author_id:
                          type: integer
                          example: 188
                        action:
                          type: string
                          example: enim
                        reason:
                          type: string
                          example: 'Voluptas necessitatibus numquam cupiditate.'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:09.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:09.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view support ticket'
                  code: 'TICKETS:HISTORY:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view support ticket'
                  code:
                    type: string
                    example: 'TICKETS:HISTORY:INSUFFICIENT_PERMISSION'
        404:
          description: 'Support ticket not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Support ticket not found'
                  code: 'TICKETS:HISTORY:TICKET_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Support ticket not found'
                  code:
                    type: string
                    example: 'TICKETS:HISTORY:TICKET_NOT_FOUND'
      tags:
        - 'Support Ticket'
    parameters:
      -
        in: path
        name: id
        description: 'Support ticket ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/tickets/available-filters:
    get:
      summary: 'Get support ticket available filters'
      operationId: getSupportTicketAvailableFilters
      description: ''
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  clinicians:
                    -
                      id: 95
                      mrn: null
                      name: Name
                      email: email
                      region: us
                      language: pl
                      phone: +48-555555555
                      phone_verified_at: null
                      address1: Address
                      address2: 'Address 2'
                      postal_code: ''
                      city: ''
                      clinic_name: Name
                      clinic_location: Name
                      image: 'https://aether-dev-bucket.s3.amazonaws.com/users/LDueuv1uG218G7owaiLAaWRkpaGxjB0jEFwzZsT1.png'
                      mfa_enabled: 0
                      mfa_method: sms
                      mfa_verified_to: null
                      location_id: 2
                      created_by: 1
                      active: 1
                      notifications_timezone: America/Adak
                      notifications_at: null
                      created_at: '2022-07-19T14:43:37.000000Z'
                      updated_at: '2024-09-27T05:52:51.000000Z'
                      invitation_status: expired
                      roles:
                        -
                          id: 2
                          name: Clinician
                          guard_name: web
                          created_at: '2022-03-21T17:15:47.000000Z'
                          updated_at: '2022-03-21T17:15:47.000000Z'
                          pivot:
                            model_id: 95
                            role_id: 2
                            model_type: App\Models\User
                properties:
                  clinicians:
                    type: array
                    example:
                      -
                        id: 95
                        mrn: null
                        name: Name
                        email: email
                        region: us
                        language: pl
                        phone: +48-555555555
                        phone_verified_at: null
                        address1: Address
                        address2: 'Address 2'
                        postal_code: ''
                        city: ''
                        clinic_name: Name
                        clinic_location: Name
                        image: 'https://aether-dev-bucket.s3.amazonaws.com/users/LDueuv1uG218G7owaiLAaWRkpaGxjB0jEFwzZsT1.png'
                        mfa_enabled: 0
                        mfa_method: sms
                        mfa_verified_to: null
                        location_id: 2
                        created_by: 1
                        active: 1
                        notifications_timezone: America/Adak
                        notifications_at: null
                        created_at: '2022-07-19T14:43:37.000000Z'
                        updated_at: '2024-09-27T05:52:51.000000Z'
                        invitation_status: expired
                        roles:
                          -
                            id: 2
                            name: Clinician
                            guard_name: web
                            created_at: '2022-03-21T17:15:47.000000Z'
                            updated_at: '2022-03-21T17:15:47.000000Z'
                            pivot:
                              model_id: 95
                              role_id: 2
                              model_type: App\Models\User
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 95
                        mrn:
                          type: string
                          example: null
                        name:
                          type: string
                          example: Name
                        email:
                          type: string
                          example: email
                        region:
                          type: string
                          example: us
                        language:
                          type: string
                          example: pl
                        phone:
                          type: string
                          example: +48-555555555
                        phone_verified_at:
                          type: string
                          example: null
                        address1:
                          type: string
                          example: Address
                        address2:
                          type: string
                          example: 'Address 2'
                        postal_code:
                          type: string
                          example: ''
                        city:
                          type: string
                          example: ''
                        clinic_name:
                          type: string
                          example: Name
                        clinic_location:
                          type: string
                          example: Name
                        image:
                          type: string
                          example: 'https://aether-dev-bucket.s3.amazonaws.com/users/LDueuv1uG218G7owaiLAaWRkpaGxjB0jEFwzZsT1.png'
                        mfa_enabled:
                          type: integer
                          example: 0
                        mfa_method:
                          type: string
                          example: sms
                        mfa_verified_to:
                          type: string
                          example: null
                        location_id:
                          type: integer
                          example: 2
                        created_by:
                          type: integer
                          example: 1
                        active:
                          type: integer
                          example: 1
                        notifications_timezone:
                          type: string
                          example: America/Adak
                        notifications_at:
                          type: string
                          example: null
                        created_at:
                          type: string
                          example: '2022-07-19T14:43:37.000000Z'
                        updated_at:
                          type: string
                          example: '2024-09-27T05:52:51.000000Z'
                        invitation_status:
                          type: string
                          example: expired
                        roles:
                          type: array
                          example:
                            -
                              id: 2
                              name: Clinician
                              guard_name: web
                              created_at: '2022-03-21T17:15:47.000000Z'
                              updated_at: '2022-03-21T17:15:47.000000Z'
                              pivot:
                                model_id: 95
                                role_id: 2
                                model_type: App\Models\User
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 2
                              name:
                                type: string
                                example: Clinician
                              guard_name:
                                type: string
                                example: web
                              created_at:
                                type: string
                                example: '2022-03-21T17:15:47.000000Z'
                              updated_at:
                                type: string
                                example: '2022-03-21T17:15:47.000000Z'
                              pivot:
                                type: object
                                properties:
                                  model_id:
                                    type: integer
                                    example: 95
                                  role_id:
                                    type: integer
                                    example: 2
                                  model_type:
                                    type: string
                                    example: App\Models\User
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to create support ticket'
                  code: 'TICKETS:AVAILABLE_FILTERS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to create support ticket'
                  code:
                    type: string
                    example: 'TICKETS:AVAILABLE_FILTERS:INSUFFICIENT_PERMISSION'
      tags:
        - 'Support Ticket'
  '/api/ticket/{id}/close':
    post:
      summary: 'Close support ticket'
      operationId: closeSupportTicket
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 61
                  sender_id: 205
                  recipient_id: 206
                  device_id: 125
                  meeting_date: '2025-12-10 12:00:11'
                  meeting_type: online_meeting
                  contact_email: sydney.dach@steuber.com
                  status: new
                  created_at: '2025-12-10T12:00:11.000000Z'
                  updated_at: '2025-12-10T12:00:11.000000Z'
                  sender:
                    id: 205
                    mrn: 0L7MFBEB1765368010
                    name: 'Dr. Alberta Dickinson'
                    email: 1765368010janis.lindgren@example.net
                    language: en
                    phone: +1-224-860-4607
                    phone_country: TT
                    phone_verified_at: null
                    address1: '589 Hills Tunnel Apt. 946'
                    address2: 'New Blake, CA 74965-0638'
                    postal_code: 88288-6542
                    city: Nicolas-Mayert
                    clinic_name: Zboncakberg
                    clinic_location: "2547 Nicolas Street Suite 396\nFeeneyshire, LA 82034"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:11.000000Z'
                    updated_at: '2025-12-10T12:00:11.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  recipient:
                    id: 206
                    mrn: 200WRUJW1765368011
                    name: 'Mr. Consuelo Gislason Sr.'
                    email: 1765368011gilda.borer@example.org
                    language: en
                    phone: 1-620-398-2051
                    phone_country: GP
                    phone_verified_at: null
                    address1: '104 Nikolaus Summit Apt. 744'
                    address2: 'North Lexieside, SC 50842-0672'
                    postal_code: '91644'
                    city: "O'Connell PLC"
                    clinic_name: 'Port Delilah'
                    clinic_location: "9956 Monte Manors\nNew Glendaville, WA 60737-7037"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:11.000000Z'
                    updated_at: '2025-12-10T12:00:11.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  device:
                    id: 125
                    serial: 8cece025-0aba-3f27-a02e-8e2dceba0515
                    bluetooth_id: bfc22e3b-06ce-3913-adea-3044960b1ad0
                    company_id: null
                    model_id: null
                    amputee_id: null
                    clinician_id: null
                    firmware_version_id: null
                    pcb_version_id: null
                    reverse_magnets: 0
                    is_electrode: 0
                    active: 1
                    last_activity_at: '0000-00-00 00:00:00'
                    created_at: '2025-12-10T12:00:11.000000Z'
                    updated_at: '2025-12-10T12:00:11.000000Z'
                  messages: []
                properties:
                  id:
                    type: integer
                    example: 61
                  sender_id:
                    type: integer
                    example: 205
                  recipient_id:
                    type: integer
                    example: 206
                  device_id:
                    type: integer
                    example: 125
                  meeting_date:
                    type: string
                    example: '2025-12-10 12:00:11'
                  meeting_type:
                    type: string
                    example: online_meeting
                  contact_email:
                    type: string
                    example: sydney.dach@steuber.com
                  status:
                    type: string
                    example: new
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:11.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:11.000000Z'
                  sender:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 205
                      mrn:
                        type: string
                        example: 0L7MFBEB1765368010
                      name:
                        type: string
                        example: 'Dr. Alberta Dickinson'
                      email:
                        type: string
                        example: 1765368010janis.lindgren@example.net
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: +1-224-860-4607
                      phone_country:
                        type: string
                        example: TT
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '589 Hills Tunnel Apt. 946'
                      address2:
                        type: string
                        example: 'New Blake, CA 74965-0638'
                      postal_code:
                        type: string
                        example: 88288-6542
                      city:
                        type: string
                        example: Nicolas-Mayert
                      clinic_name:
                        type: string
                        example: Zboncakberg
                      clinic_location:
                        type: string
                        example: "2547 Nicolas Street Suite 396\nFeeneyshire, LA 82034"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:11.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:11.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  recipient:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 206
                      mrn:
                        type: string
                        example: 200WRUJW1765368011
                      name:
                        type: string
                        example: 'Mr. Consuelo Gislason Sr.'
                      email:
                        type: string
                        example: 1765368011gilda.borer@example.org
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 1-620-398-2051
                      phone_country:
                        type: string
                        example: GP
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '104 Nikolaus Summit Apt. 744'
                      address2:
                        type: string
                        example: 'North Lexieside, SC 50842-0672'
                      postal_code:
                        type: string
                        example: '91644'
                      city:
                        type: string
                        example: "O'Connell PLC"
                      clinic_name:
                        type: string
                        example: 'Port Delilah'
                      clinic_location:
                        type: string
                        example: "9956 Monte Manors\nNew Glendaville, WA 60737-7037"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:11.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:11.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  device:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 125
                      serial:
                        type: string
                        example: 8cece025-0aba-3f27-a02e-8e2dceba0515
                      bluetooth_id:
                        type: string
                        example: bfc22e3b-06ce-3913-adea-3044960b1ad0
                      company_id:
                        type: string
                        example: null
                      model_id:
                        type: string
                        example: null
                      amputee_id:
                        type: string
                        example: null
                      clinician_id:
                        type: string
                        example: null
                      firmware_version_id:
                        type: string
                        example: null
                      pcb_version_id:
                        type: string
                        example: null
                      reverse_magnets:
                        type: integer
                        example: 0
                      is_electrode:
                        type: integer
                        example: 0
                      active:
                        type: integer
                        example: 1
                      last_activity_at:
                        type: string
                        example: '0000-00-00 00:00:00'
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:11.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:11.000000Z'
                  messages:
                    type: array
                    example: []
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to close support ticket'
                  code: 'TICKETS:CLOSE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to close support ticket'
                  code:
                    type: string
                    example: 'TICKETS:CLOSE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Support ticket not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Support ticket not found'
                  code: 'TICKETS:CLOSE:TICKET_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Support ticket not found'
                  code:
                    type: string
                    example: 'TICKETS:CLOSE:TICKET_NOT_FOUND'
      tags:
        - 'Support Ticket'
    parameters:
      -
        in: path
        name: id
        description: 'Support ticket ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/ticket/{id}/reopen':
    post:
      summary: 'Reopen support ticket'
      operationId: reopenSupportTicket
      description: "Patient (Amputee) role can reopen only non-config tickets.\n\t\tFor config tickets patients will get \"Insufficient permission\" response.\n\t\tFor patients role <code>reason</code> field is required."
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  ticket_id: 62
                  author_id: 208
                  action: molestiae
                  reason: 'Mollitia ut similique sunt quae itaque.'
                  created_at: '2025-12-10T12:00:11.000000Z'
                  updated_at: '2025-12-10T12:00:11.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  ticket_id:
                    type: integer
                    example: 62
                  author_id:
                    type: integer
                    example: 208
                  action:
                    type: string
                    example: molestiae
                  reason:
                    type: string
                    example: 'Mollitia ut similique sunt quae itaque.'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:11.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:11.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to reopen support ticket'
                  code: 'TICKETS:REOPEN:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to reopen support ticket'
                  code:
                    type: string
                    example: 'TICKETS:REOPEN:INSUFFICIENT_PERMISSION'
        404:
          description: 'Support ticket not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Support ticket not found'
                  code: 'TICKETS:REOPEN:TICKET_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Support ticket not found'
                  code:
                    type: string
                    example: 'TICKETS:REOPEN:TICKET_NOT_FOUND'
      tags:
        - 'Support Ticket'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: 'Reason for reopen action.'
                  example: 'Something is still not working'
    parameters:
      -
        in: path
        name: id
        description: 'Support ticket ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/ticket/{id}/messages':
    post:
      summary: 'Create new support ticket message'
      operationId: createNewSupportTicketMessage
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 63
                  sender_id: 209
                  recipient_id: 210
                  device_id: 126
                  meeting_date: '2025-12-10 12:00:11'
                  meeting_type: online_meeting
                  contact_email: shanie.funk@jones.com
                  status: new
                  created_at: '2025-12-10T12:00:11.000000Z'
                  updated_at: '2025-12-10T12:00:11.000000Z'
                  sender:
                    id: 209
                    mrn: KHGEWVVZ1765368011
                    name: 'Michael Prohaska PhD'
                    email: 1765368011jacobson.judah@example.com
                    language: en
                    phone: 1-757-751-4369
                    phone_country: RO
                    phone_verified_at: null
                    address1: '1723 Ernest Lane Suite 512'
                    address2: 'Loraineton, NC 54280-2922'
                    postal_code: '97823'
                    city: 'Mraz PLC'
                    clinic_name: 'South Isabel'
                    clinic_location: "166 Anderson Isle Apt. 725\nNew Katarina, NM 71424"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:11.000000Z'
                    updated_at: '2025-12-10T12:00:11.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  recipient:
                    id: 210
                    mrn: 78F9EPJ71765368011
                    name: 'Sigurd West II'
                    email: 1765368011jjohnson@example.net
                    language: en
                    phone: +1.606.337.0338
                    phone_country: GM
                    phone_verified_at: null
                    address1: '4802 Sanford Way Suite 894'
                    address2: 'South Antoinette, WI 06970-9671'
                    postal_code: '00768'
                    city: 'Jacobs, Batz and Weber'
                    clinic_name: 'East Deondre'
                    clinic_location: "6907 Kirlin Islands Suite 005\nLittlemouth, CT 19762-6048"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:11.000000Z'
                    updated_at: '2025-12-10T12:00:11.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  device:
                    id: 126
                    serial: e94a6297-0bab-363d-8059-2b3f19b0d667
                    bluetooth_id: f2995f14-e3b0-357c-9f9f-b96700d22c5a
                    company_id: null
                    model_id: null
                    amputee_id: null
                    clinician_id: null
                    firmware_version_id: null
                    pcb_version_id: null
                    reverse_magnets: 0
                    is_electrode: 0
                    active: 1
                    last_activity_at: '0000-00-00 00:00:00'
                    created_at: '2025-12-10T12:00:11.000000Z'
                    updated_at: '2025-12-10T12:00:11.000000Z'
                  messages:
                    -
                      id: 31
                      ticket_id: 63
                      sender_id: 211
                      title: Prof.
                      content: 'Sapiente et voluptatem delectus quod minima.'
                      is_read: false
                      created_at: '2025-12-10T12:00:11.000000Z'
                      updated_at: '2025-12-10T12:00:11.000000Z'
                properties:
                  id:
                    type: integer
                    example: 63
                  sender_id:
                    type: integer
                    example: 209
                  recipient_id:
                    type: integer
                    example: 210
                  device_id:
                    type: integer
                    example: 126
                  meeting_date:
                    type: string
                    example: '2025-12-10 12:00:11'
                  meeting_type:
                    type: string
                    example: online_meeting
                  contact_email:
                    type: string
                    example: shanie.funk@jones.com
                  status:
                    type: string
                    example: new
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:11.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:11.000000Z'
                  sender:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 209
                      mrn:
                        type: string
                        example: KHGEWVVZ1765368011
                      name:
                        type: string
                        example: 'Michael Prohaska PhD'
                      email:
                        type: string
                        example: 1765368011jacobson.judah@example.com
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 1-757-751-4369
                      phone_country:
                        type: string
                        example: RO
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '1723 Ernest Lane Suite 512'
                      address2:
                        type: string
                        example: 'Loraineton, NC 54280-2922'
                      postal_code:
                        type: string
                        example: '97823'
                      city:
                        type: string
                        example: 'Mraz PLC'
                      clinic_name:
                        type: string
                        example: 'South Isabel'
                      clinic_location:
                        type: string
                        example: "166 Anderson Isle Apt. 725\nNew Katarina, NM 71424"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:11.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:11.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  recipient:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 210
                      mrn:
                        type: string
                        example: 78F9EPJ71765368011
                      name:
                        type: string
                        example: 'Sigurd West II'
                      email:
                        type: string
                        example: 1765368011jjohnson@example.net
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: +1.606.337.0338
                      phone_country:
                        type: string
                        example: GM
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '4802 Sanford Way Suite 894'
                      address2:
                        type: string
                        example: 'South Antoinette, WI 06970-9671'
                      postal_code:
                        type: string
                        example: '00768'
                      city:
                        type: string
                        example: 'Jacobs, Batz and Weber'
                      clinic_name:
                        type: string
                        example: 'East Deondre'
                      clinic_location:
                        type: string
                        example: "6907 Kirlin Islands Suite 005\nLittlemouth, CT 19762-6048"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:11.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:11.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  device:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 126
                      serial:
                        type: string
                        example: e94a6297-0bab-363d-8059-2b3f19b0d667
                      bluetooth_id:
                        type: string
                        example: f2995f14-e3b0-357c-9f9f-b96700d22c5a
                      company_id:
                        type: string
                        example: null
                      model_id:
                        type: string
                        example: null
                      amputee_id:
                        type: string
                        example: null
                      clinician_id:
                        type: string
                        example: null
                      firmware_version_id:
                        type: string
                        example: null
                      pcb_version_id:
                        type: string
                        example: null
                      reverse_magnets:
                        type: integer
                        example: 0
                      is_electrode:
                        type: integer
                        example: 0
                      active:
                        type: integer
                        example: 1
                      last_activity_at:
                        type: string
                        example: '0000-00-00 00:00:00'
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:11.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:11.000000Z'
                  messages:
                    type: array
                    example:
                      -
                        id: 31
                        ticket_id: 63
                        sender_id: 211
                        title: Prof.
                        content: 'Sapiente et voluptatem delectus quod minima.'
                        is_read: false
                        created_at: '2025-12-10T12:00:11.000000Z'
                        updated_at: '2025-12-10T12:00:11.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 31
                        ticket_id:
                          type: integer
                          example: 63
                        sender_id:
                          type: integer
                          example: 211
                        title:
                          type: string
                          example: Prof.
                        content:
                          type: string
                          example: 'Sapiente et voluptatem delectus quod minima.'
                        is_read:
                          type: boolean
                          example: false
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:11.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:11.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to create support ticket'
                  code: 'TICKETS:CREATE_MESSAGE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to create support ticket'
                  code:
                    type: string
                    example: 'TICKETS:CREATE_MESSAGE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Support ticket not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Support ticket not found'
                  code: 'TICKETS:CREATE_MESSAGE:TICKET_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Support ticket not found'
                  code:
                    type: string
                    example: 'TICKETS:CREATE_MESSAGE:TICKET_NOT_FOUND'
      tags:
        - 'Support Ticket'
      requestBody:
        required: false
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'Message title.'
                  example: 'Neque repellendus nam.'
                content:
                  type: string
                  description: 'Content of message.'
                  example: 'At ad officia distinctio error sunt.'
                attachments:
                  type: array
                  description: 'Must be a file.'
                  items:
                    type: string
                    format: binary
    parameters:
      -
        in: path
        name: id
        description: 'Support ticket ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/ticket/{id}/read':
    post:
      summary: 'Mark all messages as read'
      operationId: markAllMessagesAsRead
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 71
                  sender_id: 223
                  recipient_id: 224
                  device_id: 127
                  meeting_date: '2025-12-10 12:00:12'
                  meeting_type: online_meeting
                  contact_email: wschoen@ratke.info
                  status: new
                  created_at: '2025-12-10T12:00:12.000000Z'
                  updated_at: '2025-12-10T12:00:12.000000Z'
                  sender:
                    id: 223
                    mrn: I8WH9PI61765368012
                    name: 'Dr. Rosemarie Wolff'
                    email: 1765368012misael32@example.com
                    language: en
                    phone: 1-435-635-1755
                    phone_country: MT
                    phone_verified_at: null
                    address1: '526 Sabrina Unions Apt. 631'
                    address2: 'Hahnhaven, MN 78417'
                    postal_code: 71836-2314
                    city: Turcotte-Cummings
                    clinic_name: 'North Devanteville'
                    clinic_location: "790 Ryley Isle\nLake Jovany, VT 25204-0901"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:12.000000Z'
                    updated_at: '2025-12-10T12:00:12.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  recipient:
                    id: 224
                    mrn: 1S699CZG1765368012
                    name: 'Clare Quigley'
                    email: 1765368012nicholaus.howell@example.net
                    language: en
                    phone: '(757) 313-6739'
                    phone_country: AZ
                    phone_verified_at: null
                    address1: '87268 Hertha Hollow Apt. 692'
                    address2: 'Lisaport, MD 17141-2657'
                    postal_code: 97099-9209
                    city: Kilback-Dietrich
                    clinic_name: Gastonport
                    clinic_location: "372 Mante Village\nNew Johnathon, WI 88061-9594"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:12.000000Z'
                    updated_at: '2025-12-10T12:00:12.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  device:
                    id: 127
                    serial: dc7395f3-948e-3d83-88b9-c7b2a2eaf77a
                    bluetooth_id: 2a97175c-58c5-3b96-a5fe-ce0fd3d4ea15
                    company_id: null
                    model_id: null
                    amputee_id: null
                    clinician_id: null
                    firmware_version_id: null
                    pcb_version_id: null
                    reverse_magnets: 0
                    is_electrode: 0
                    active: 1
                    last_activity_at: '0000-00-00 00:00:00'
                    created_at: '2025-12-10T12:00:12.000000Z'
                    updated_at: '2025-12-10T12:00:12.000000Z'
                  messages:
                    -
                      id: 35
                      ticket_id: 71
                      sender_id: 225
                      title: Mr.
                      content: 'Molestiae voluptatibus minus natus totam corporis voluptatem omnis.'
                      is_read: false
                      created_at: '2025-12-10T12:00:12.000000Z'
                      updated_at: '2025-12-10T12:00:12.000000Z'
                properties:
                  id:
                    type: integer
                    example: 71
                  sender_id:
                    type: integer
                    example: 223
                  recipient_id:
                    type: integer
                    example: 224
                  device_id:
                    type: integer
                    example: 127
                  meeting_date:
                    type: string
                    example: '2025-12-10 12:00:12'
                  meeting_type:
                    type: string
                    example: online_meeting
                  contact_email:
                    type: string
                    example: wschoen@ratke.info
                  status:
                    type: string
                    example: new
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:12.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:12.000000Z'
                  sender:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 223
                      mrn:
                        type: string
                        example: I8WH9PI61765368012
                      name:
                        type: string
                        example: 'Dr. Rosemarie Wolff'
                      email:
                        type: string
                        example: 1765368012misael32@example.com
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 1-435-635-1755
                      phone_country:
                        type: string
                        example: MT
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '526 Sabrina Unions Apt. 631'
                      address2:
                        type: string
                        example: 'Hahnhaven, MN 78417'
                      postal_code:
                        type: string
                        example: 71836-2314
                      city:
                        type: string
                        example: Turcotte-Cummings
                      clinic_name:
                        type: string
                        example: 'North Devanteville'
                      clinic_location:
                        type: string
                        example: "790 Ryley Isle\nLake Jovany, VT 25204-0901"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:12.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:12.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  recipient:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 224
                      mrn:
                        type: string
                        example: 1S699CZG1765368012
                      name:
                        type: string
                        example: 'Clare Quigley'
                      email:
                        type: string
                        example: 1765368012nicholaus.howell@example.net
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: '(757) 313-6739'
                      phone_country:
                        type: string
                        example: AZ
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '87268 Hertha Hollow Apt. 692'
                      address2:
                        type: string
                        example: 'Lisaport, MD 17141-2657'
                      postal_code:
                        type: string
                        example: 97099-9209
                      city:
                        type: string
                        example: Kilback-Dietrich
                      clinic_name:
                        type: string
                        example: Gastonport
                      clinic_location:
                        type: string
                        example: "372 Mante Village\nNew Johnathon, WI 88061-9594"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:12.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:12.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  device:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 127
                      serial:
                        type: string
                        example: dc7395f3-948e-3d83-88b9-c7b2a2eaf77a
                      bluetooth_id:
                        type: string
                        example: 2a97175c-58c5-3b96-a5fe-ce0fd3d4ea15
                      company_id:
                        type: string
                        example: null
                      model_id:
                        type: string
                        example: null
                      amputee_id:
                        type: string
                        example: null
                      clinician_id:
                        type: string
                        example: null
                      firmware_version_id:
                        type: string
                        example: null
                      pcb_version_id:
                        type: string
                        example: null
                      reverse_magnets:
                        type: integer
                        example: 0
                      is_electrode:
                        type: integer
                        example: 0
                      active:
                        type: integer
                        example: 1
                      last_activity_at:
                        type: string
                        example: '0000-00-00 00:00:00'
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:12.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:12.000000Z'
                  messages:
                    type: array
                    example:
                      -
                        id: 35
                        ticket_id: 71
                        sender_id: 225
                        title: Mr.
                        content: 'Molestiae voluptatibus minus natus totam corporis voluptatem omnis.'
                        is_read: false
                        created_at: '2025-12-10T12:00:12.000000Z'
                        updated_at: '2025-12-10T12:00:12.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 35
                        ticket_id:
                          type: integer
                          example: 71
                        sender_id:
                          type: integer
                          example: 225
                        title:
                          type: string
                          example: Mr.
                        content:
                          type: string
                          example: 'Molestiae voluptatibus minus natus totam corporis voluptatem omnis.'
                        is_read:
                          type: boolean
                          example: false
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:12.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:12.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to read message'
                  code: 'TICKETS:READ_ALL:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to read message'
                  code:
                    type: string
                    example: 'TICKETS:READ_ALL:INSUFFICIENT_PERMISSION'
        404:
          description: 'Support ticket not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Support ticket not found'
                  code: 'TICKETS:READ_ALL:TICKET_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Support ticket not found'
                  code:
                    type: string
                    example: 'TICKETS:READ_ALL:TICKET_NOT_FOUND'
      tags:
        - 'Support Ticket'
    parameters:
      -
        in: path
        name: id
        description: 'Support ticket ID (id from ticket list; do not confuse with messages.id).'
        example: 1
        required: true
        schema:
          type: integer
  '/api/ticket/{id}/read/{messageId}':
    post:
      summary: 'Mark single message as read'
      operationId: markSingleMessageAsRead
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 79
                  sender_id: 237
                  recipient_id: 238
                  device_id: 128
                  meeting_date: '2025-12-10 12:00:13'
                  meeting_type: online_meeting
                  contact_email: tierra.strosin@kovacek.com
                  status: new
                  created_at: '2025-12-10T12:00:13.000000Z'
                  updated_at: '2025-12-10T12:00:13.000000Z'
                  sender:
                    id: 237
                    mrn: G86DH9UW1765368013
                    name: 'Antonia Bailey'
                    email: 1765368013ashlynn22@example.net
                    language: en
                    phone: 862.480.3830
                    phone_country: NP
                    phone_verified_at: null
                    address1: '11976 Spencer Road Apt. 787'
                    address2: 'Travonland, TN 24374'
                    postal_code: '47090'
                    city: Jacobs-Schumm
                    clinic_name: 'Port Peyton'
                    clinic_location: "49916 Alice Glens\nSouth Keon, NE 03104-6313"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:13.000000Z'
                    updated_at: '2025-12-10T12:00:13.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  recipient:
                    id: 238
                    mrn: AVZV86CI1765368013
                    name: 'Carley Lubowitz V'
                    email: 1765368013jean55@example.org
                    language: en
                    phone: +1-743-994-2210
                    phone_country: JP
                    phone_verified_at: null
                    address1: '6212 Carolina Mall'
                    address2: 'West Sophia, CT 06217'
                    postal_code: 56554-7677
                    city: Kling-Olson
                    clinic_name: 'North Callieside'
                    clinic_location: "86909 Bogisich Pines\nNew Brooke, RI 62995"
                    image: null
                    mfa_enabled: 0
                    mfa_method: null
                    mfa_verified_to: null
                    location_id: null
                    created_by: null
                    active: 1
                    notifications_timezone: null
                    notifications_at: null
                    created_at: '2025-12-10T12:00:13.000000Z'
                    updated_at: '2025-12-10T12:00:13.000000Z'
                    invitation_status: null
                    acadle_invitation_status: null
                    roles: []
                  device:
                    id: 128
                    serial: d3e2266a-8dbc-3fec-bf10-f311f1f827da
                    bluetooth_id: db765878-7ed8-34ba-b684-0838d077d4a5
                    company_id: null
                    model_id: null
                    amputee_id: null
                    clinician_id: null
                    firmware_version_id: null
                    pcb_version_id: null
                    reverse_magnets: 0
                    is_electrode: 0
                    active: 1
                    last_activity_at: '0000-00-00 00:00:00'
                    created_at: '2025-12-10T12:00:13.000000Z'
                    updated_at: '2025-12-10T12:00:13.000000Z'
                  messages:
                    -
                      id: 39
                      ticket_id: 79
                      sender_id: 239
                      title: Prof.
                      content: 'Quis incidunt facere itaque molestias voluptatibus libero totam.'
                      is_read: false
                      created_at: '2025-12-10T12:00:13.000000Z'
                      updated_at: '2025-12-10T12:00:13.000000Z'
                properties:
                  id:
                    type: integer
                    example: 79
                  sender_id:
                    type: integer
                    example: 237
                  recipient_id:
                    type: integer
                    example: 238
                  device_id:
                    type: integer
                    example: 128
                  meeting_date:
                    type: string
                    example: '2025-12-10 12:00:13'
                  meeting_type:
                    type: string
                    example: online_meeting
                  contact_email:
                    type: string
                    example: tierra.strosin@kovacek.com
                  status:
                    type: string
                    example: new
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:13.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:13.000000Z'
                  sender:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 237
                      mrn:
                        type: string
                        example: G86DH9UW1765368013
                      name:
                        type: string
                        example: 'Antonia Bailey'
                      email:
                        type: string
                        example: 1765368013ashlynn22@example.net
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: 862.480.3830
                      phone_country:
                        type: string
                        example: NP
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '11976 Spencer Road Apt. 787'
                      address2:
                        type: string
                        example: 'Travonland, TN 24374'
                      postal_code:
                        type: string
                        example: '47090'
                      city:
                        type: string
                        example: Jacobs-Schumm
                      clinic_name:
                        type: string
                        example: 'Port Peyton'
                      clinic_location:
                        type: string
                        example: "49916 Alice Glens\nSouth Keon, NE 03104-6313"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:13.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:13.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  recipient:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 238
                      mrn:
                        type: string
                        example: AVZV86CI1765368013
                      name:
                        type: string
                        example: 'Carley Lubowitz V'
                      email:
                        type: string
                        example: 1765368013jean55@example.org
                      language:
                        type: string
                        example: en
                      phone:
                        type: string
                        example: +1-743-994-2210
                      phone_country:
                        type: string
                        example: JP
                      phone_verified_at:
                        type: string
                        example: null
                      address1:
                        type: string
                        example: '6212 Carolina Mall'
                      address2:
                        type: string
                        example: 'West Sophia, CT 06217'
                      postal_code:
                        type: string
                        example: 56554-7677
                      city:
                        type: string
                        example: Kling-Olson
                      clinic_name:
                        type: string
                        example: 'North Callieside'
                      clinic_location:
                        type: string
                        example: "86909 Bogisich Pines\nNew Brooke, RI 62995"
                      image:
                        type: string
                        example: null
                      mfa_enabled:
                        type: integer
                        example: 0
                      mfa_method:
                        type: string
                        example: null
                      mfa_verified_to:
                        type: string
                        example: null
                      location_id:
                        type: string
                        example: null
                      created_by:
                        type: string
                        example: null
                      active:
                        type: integer
                        example: 1
                      notifications_timezone:
                        type: string
                        example: null
                      notifications_at:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:13.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:13.000000Z'
                      invitation_status:
                        type: string
                        example: null
                      acadle_invitation_status:
                        type: string
                        example: null
                      roles:
                        type: array
                        example: []
                  device:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 128
                      serial:
                        type: string
                        example: d3e2266a-8dbc-3fec-bf10-f311f1f827da
                      bluetooth_id:
                        type: string
                        example: db765878-7ed8-34ba-b684-0838d077d4a5
                      company_id:
                        type: string
                        example: null
                      model_id:
                        type: string
                        example: null
                      amputee_id:
                        type: string
                        example: null
                      clinician_id:
                        type: string
                        example: null
                      firmware_version_id:
                        type: string
                        example: null
                      pcb_version_id:
                        type: string
                        example: null
                      reverse_magnets:
                        type: integer
                        example: 0
                      is_electrode:
                        type: integer
                        example: 0
                      active:
                        type: integer
                        example: 1
                      last_activity_at:
                        type: string
                        example: '0000-00-00 00:00:00'
                      created_at:
                        type: string
                        example: '2025-12-10T12:00:13.000000Z'
                      updated_at:
                        type: string
                        example: '2025-12-10T12:00:13.000000Z'
                  messages:
                    type: array
                    example:
                      -
                        id: 39
                        ticket_id: 79
                        sender_id: 239
                        title: Prof.
                        content: 'Quis incidunt facere itaque molestias voluptatibus libero totam.'
                        is_read: false
                        created_at: '2025-12-10T12:00:13.000000Z'
                        updated_at: '2025-12-10T12:00:13.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 39
                        ticket_id:
                          type: integer
                          example: 79
                        sender_id:
                          type: integer
                          example: 239
                        title:
                          type: string
                          example: Prof.
                        content:
                          type: string
                          example: 'Quis incidunt facere itaque molestias voluptatibus libero totam.'
                        is_read:
                          type: boolean
                          example: false
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:13.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:13.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to read message'
                  code: 'TICKETS:READ_MESSAGE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to read message'
                  code:
                    type: string
                    example: 'TICKETS:READ_MESSAGE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Message not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Message not found'
                  code: 'TICKETS:READ_MESSAGE:MESSAGE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Message not found'
                  code:
                    type: string
                    example: 'TICKETS:READ_MESSAGE:MESSAGE_NOT_FOUND'
      tags:
        - 'Support Ticket'
    parameters:
      -
        in: path
        name: id
        description: 'Support ticket ID (id from ticket list; do not confuse with messages.id).'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: messageId
        description: 'Message ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/tooltips:
    get:
      summary: 'List tooltips'
      operationId: listTooltips
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      name: 'Prof. Eleazar Doyle'
                      type: image
                      language: ho
                      file: '0'
                      created_by: 301
                      created_at: '2025-12-10T12:00:20.000000Z'
                      updated_at: '2025-12-10T12:00:20.000000Z'
                      deleted_at: null
                    -
                      id: 2
                      name: 'Delpha Torphy Sr.'
                      type: video
                      language: rn
                      file: '0'
                      created_by: 302
                      created_at: '2025-12-10T12:00:20.000000Z'
                      updated_at: '2025-12-10T12:00:20.000000Z'
                      deleted_at: null
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        name: 'Prof. Eleazar Doyle'
                        type: image
                        language: ho
                        file: '0'
                        created_by: 301
                        created_at: '2025-12-10T12:00:20.000000Z'
                        updated_at: '2025-12-10T12:00:20.000000Z'
                        deleted_at: null
                      -
                        id: 2
                        name: 'Delpha Torphy Sr.'
                        type: video
                        language: rn
                        file: '0'
                        created_by: 302
                        created_at: '2025-12-10T12:00:20.000000Z'
                        updated_at: '2025-12-10T12:00:20.000000Z'
                        deleted_at: null
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Prof. Eleazar Doyle'
                        type:
                          type: string
                          example: image
                        language:
                          type: string
                          example: ho
                        file:
                          type: string
                          example: '0'
                        created_by:
                          type: integer
                          example: 301
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:20.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:20.000000Z'
                        deleted_at:
                          type: string
                          example: null
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list tooltips'
                  code: 'TOOLTIPS:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list tooltips'
                  code:
                    type: string
                    example: 'TOOLTIPS:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - Tooltips
    post:
      summary: 'Create new tooltip'
      operationId: createNewTooltip
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 5
                  name: 'Ms. Allie Dach DDS'
                  type: image
                  language: da
                  file: '0'
                  created_by: 305
                  created_at: '2025-12-10T12:00:21.000000Z'
                  updated_at: '2025-12-10T12:00:21.000000Z'
                  deleted_at: null
                properties:
                  id:
                    type: integer
                    example: 5
                  name:
                    type: string
                    example: 'Ms. Allie Dach DDS'
                  type:
                    type: string
                    example: image
                  language:
                    type: string
                    example: da
                  file:
                    type: string
                    example: '0'
                  created_by:
                    type: integer
                    example: 305
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:21.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:21.000000Z'
                  deleted_at:
                    type: string
                    example: null
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage tooltips'
                  code: 'TOOLTIPS:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage tooltips'
                  code:
                    type: string
                    example: 'TOOLTIPS:CREATE:INSUFFICIENT_PERMISSION'
        500:
          description: 'Server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server error: tooltip not created'
                  code: 'TOOLTIPS:CREATE:SERVER_ERROR'
                properties:
                  message:
                    type: string
                    example: 'Server error: tooltip not created'
                  code:
                    type: string
                    example: 'TOOLTIPS:CREATE:SERVER_ERROR'
      tags:
        - Tooltips
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Tooltip name.'
                  example: 'Schmitt Mount'
                type:
                  type: string
                  description: 'Tooltip content type.'
                  example: image
                  enum:
                    - image
                    - video
                language:
                  type: string
                  description: 'Tooltip content language.'
                  example: wa
                file:
                  type: string
                  format: binary
                  description: 'Tooltip content file. Must have one of the following MIME types: <code>webp</code>, <code>png</code>, <code>jpg</code>, <code>jpeg</code>, <code>mp4</code>. Must be a file. MAXIMUM:FILE_KB:102400.'
              required:
                - name
                - type
                - language
                - file
  /api/tooltips/archive:
    get:
      summary: 'List archived tooltips'
      operationId: listArchivedTooltips
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 3
                      name: 'Mrs. Shaniya Reinger'
                      type: image
                      language: wo
                      file: '0'
                      created_by: 303
                      created_at: '2025-12-10T12:00:21.000000Z'
                      updated_at: '2025-12-10T12:00:21.000000Z'
                      deleted_at: null
                    -
                      id: 4
                      name: 'Lavonne Lehner'
                      type: image
                      language: lg
                      file: '0'
                      created_by: 304
                      created_at: '2025-12-10T12:00:21.000000Z'
                      updated_at: '2025-12-10T12:00:21.000000Z'
                      deleted_at: null
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 3
                        name: 'Mrs. Shaniya Reinger'
                        type: image
                        language: wo
                        file: '0'
                        created_by: 303
                        created_at: '2025-12-10T12:00:21.000000Z'
                        updated_at: '2025-12-10T12:00:21.000000Z'
                        deleted_at: null
                      -
                        id: 4
                        name: 'Lavonne Lehner'
                        type: image
                        language: lg
                        file: '0'
                        created_by: 304
                        created_at: '2025-12-10T12:00:21.000000Z'
                        updated_at: '2025-12-10T12:00:21.000000Z'
                        deleted_at: null
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 3
                        name:
                          type: string
                          example: 'Mrs. Shaniya Reinger'
                        type:
                          type: string
                          example: image
                        language:
                          type: string
                          example: wo
                        file:
                          type: string
                          example: '0'
                        created_by:
                          type: integer
                          example: 303
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:21.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:21.000000Z'
                        deleted_at:
                          type: string
                          example: null
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage tooltips'
                  code: 'TOOLTIPS:LIST_ARCHIVE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage tooltips'
                  code:
                    type: string
                    example: 'TOOLTIPS:LIST_ARCHIVE:INSUFFICIENT_PERMISSION'
      tags:
        - Tooltips
  '/api/tooltips/{id}/archive':
    post:
      summary: 'Archive tooltip'
      operationId: archiveTooltip
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Tooltip archived'
                  code: 'TOOLTIPS:ARCHIVE:ARCHIVED'
                properties:
                  message:
                    type: string
                    example: 'Tooltip archived'
                  code:
                    type: string
                    example: 'TOOLTIPS:ARCHIVE:ARCHIVED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage tooltips'
                  code: 'TOOLTIPS:ARCHIVE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage tooltips'
                  code:
                    type: string
                    example: 'TOOLTIPS:ARCHIVE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Tooltip not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Tooltip not found'
                  code: 'TOOLTIPS:ARCHIVE:TOOLTIP_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Tooltip not found'
                  code:
                    type: string
                    example: 'TOOLTIPS:ARCHIVE:TOOLTIP_NOT_FOUND'
      tags:
        - Tooltips
    parameters:
      -
        in: path
        name: id
        description: 'Tooltip ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/tooltips/{id}/restore':
    post:
      summary: 'Restore archived tooltip'
      operationId: restoreArchivedTooltip
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Tooltip restored'
                  code: 'TOOLTIPS:RESTORE:RESTORED'
                properties:
                  message:
                    type: string
                    example: 'Tooltip restored'
                  code:
                    type: string
                    example: 'TOOLTIPS:RESTORE:RESTORED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to manage tooltips'
                  code: 'TOOLTIPS:RESTORE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to manage tooltips'
                  code:
                    type: string
                    example: 'TOOLTIPS:RESTORE:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Tooltip not found'
                    type: object
                    example:
                      message: 'Tooltip not found'
                      code: 'TOOLTIPS:RESTORE:TOOLTIP_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Tooltip not found'
                      code:
                        type: string
                        example: 'TOOLTIPS:RESTORE:TOOLTIP_NOT_FOUND'
                  -
                    description: 'Tooltip is not archived'
                    type: object
                    example:
                      message: 'Tooltip is not archived'
                      code: 'TOOLTIPS:RESTORE:TOOLTIP_NOT_ARCHIVED'
                    properties:
                      message:
                        type: string
                        example: 'Tooltip is not archived'
                      code:
                        type: string
                        example: 'TOOLTIPS:RESTORE:TOOLTIP_NOT_ARCHIVED'
      tags:
        - Tooltips
    parameters:
      -
        in: path
        name: id
        description: 'Tooltip ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/trainings/start/{trainingId}':
    post:
      summary: 'Start user training'
      operationId: startUserTraining
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  user_id: 309
                  training_id: 1
                  created_at: '2025-12-10T12:00:21.000000Z'
                  updated_at: '2025-12-10T12:00:21.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  user_id:
                    type: integer
                    example: 309
                  training_id:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:21.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:21.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to manage user trainings'
                      code: 'TRAININGS:START:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to manage user trainings'
                      code:
                        type: string
                        example: 'TRAININGS:START:INSUFFICIENT_PERMISSION'
                  -
                    description: 'User training already started'
                    type: object
                    example:
                      message: 'Cannot start: training already started'
                      code: 'TRAININGS:START:ALREADY_STARTED'
                    properties:
                      message:
                        type: string
                        example: 'Cannot start: training already started'
                      code:
                        type: string
                        example: 'TRAININGS:START:ALREADY_STARTED'
        404:
          description: 'Training not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Training not found'
                  code: 'TRAININGS:START:TRAINING_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Training not found'
                  code:
                    type: string
                    example: 'TRAININGS:START:TRAINING_NOT_FOUND'
      tags:
        - Trainings
    parameters:
      -
        in: path
        name: trainingId
        description: 'Training ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/trainings/progress/{trainingId}':
    get:
      summary: 'Get training progress'
      operationId: getTrainingProgress
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 2
                  user_id: 310
                  training_id: 2
                  created_at: '2025-12-10T12:00:21.000000Z'
                  updated_at: '2025-12-10T12:00:21.000000Z'
                properties:
                  id:
                    type: integer
                    example: 2
                  user_id:
                    type: integer
                    example: 310
                  training_id:
                    type: integer
                    example: 2
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:21.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:21.000000Z'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to manage user trainings'
                      code: 'TRAININGS:PROGRESS:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to manage user trainings'
                      code:
                        type: string
                        example: 'TRAININGS:PROGRESS:INSUFFICIENT_PERMISSION'
                  -
                    description: 'User has no training started'
                    type: object
                    example:
                      message: 'User has no training started'
                      code: 'TRAININGS:PROGRESS:NO_USER_TRAINING'
                    properties:
                      message:
                        type: string
                        example: 'User has no training started'
                      code:
                        type: string
                        example: 'TRAININGS:PROGRESS:NO_USER_TRAINING'
        404:
          description: 'Training not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Training not found'
                  code: 'TRAININGS:PROGRESS:TRAINING_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Training not found'
                  code:
                    type: string
                    example: 'TRAININGS:PROGRESS:TRAINING_NOT_FOUND'
      tags:
        - Trainings
    parameters:
      -
        in: path
        name: trainingId
        description: 'Training ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/users:
    get:
      summary: 'Get users list'
      operationId: getUsersList
      description: "Possible extend options:\n\t\t<ul>\n\t\t\t<li>clinicians - users assigned to this user as clinicians (for Amputee role)</li>\n\t\t\t<li>patients - users assigned to this user as patients (for ClinicAdmin/Clinician/ClinicianSupport role)</li>\n\t\t\t<li>devices - products assigned to user (for Amputee role)</li>\n\t\t\t<li>devicesAsClinician - products assigned to user as clinician (for ClinicAdmin/Clinician/ClinicianSupport role)</li>\n\t\t\t<li>roles - user roles</li>\n\t\t\t<li>permissions - user permissions (for ClinicianSupport role)</li>\n\t\t</ul>"
      parameters:
        -
          in: query
          name: search
          description: 'Filter users by name. For SuperAdmin role it filters by UUID.'
          example: Tom
          required: false
          schema:
            type: string
            description: 'Filter users by name. For SuperAdmin role it filters by UUID.'
            example: Tom
        -
          in: query
          name: active
          description: 'Filter users by active status (available: 0 - only inactive, 1 - only active, -1 - all users). Default: 1.'
          example: -1
          required: false
          schema:
            type: integer
            description: 'Filter users by active status (available: 0 - only inactive, 1 - only active, -1 - all users). Default: 1.'
            example: -1
        -
          in: query
          name: clinician
          description: "Filter users by clinician.\n\t\tProvide single ID (<code>clinician=1</code>), array of IDs (<code>clinician[]=1&clinician[]=2</code>) or comma-separated list of IDs (<code>clinician=1,2</code>)."
          example:
            - 4
          required: false
          schema:
            type: array
            description: "Filter users by clinician.\n\t\tProvide single ID (<code>clinician=1</code>), array of IDs (<code>clinician[]=1&clinician[]=2</code>) or comma-separated list of IDs (<code>clinician=1,2</code>)."
            example:
              - 4
            items:
              type: integer
        -
          in: query
          name: roles
          description: 'Filter users by roles (comma-separated).'
          example: 'Clinician,Amputee'
          required: false
          schema:
            type: string
            description: 'Filter users by roles (comma-separated).'
            example: 'Clinician,Amputee'
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>clinicians</code>, <code>patients</code>, <code>devices</code>, <code>devicesAsClinician</code>, <code>roles</code>, <code>permissions</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>clinicians</code>, <code>patients</code>, <code>devices</code>, <code>devicesAsClinician</code>, <code>roles</code>, <code>permissions</code>).'
            example: null
        -
          in: query
          name: sortby
          description: 'Sort by field (available: <code>user_mrn</code>, <code>user_name</code>, <code>role_name</code>, <code>date</code>). Default: date, desc.'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort by field (available: <code>user_mrn</code>, <code>user_name</code>, <code>role_name</code>, <code>date</code>). Default: date, desc.'
            example: null
        -
          in: query
          name: sortdir
          description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Sort direction (available: <code>asc</code>, <code>desc</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 7
                      mrn: DIMY1Y7B1765367994
                      name: 'Austen Moore'
                      email: 1765367994houston67@example.net
                      language: en
                      phone: '+19035637760'
                      phone_country: FO
                      phone_verified_at: null
                      address1: '62832 Lorenzo Rue Suite 485'
                      address2: 'North Anjaliland, NJ 40528-9890'
                      postal_code: 72540-0921
                      city: Leannon-Feest
                      clinic_name: 'Lake Jadynbury'
                      clinic_location: "75479 Stroman Expressway Suite 663\nRolfsonchester, SD 17102-5019"
                      image: null
                      mfa_enabled: 0
                      mfa_method: null
                      mfa_verified_to: null
                      location_id: null
                      created_by: null
                      active: 1
                      notifications_timezone: null
                      notifications_at: null
                      created_at: '2025-12-10T11:59:54.000000Z'
                      updated_at: '2025-12-10T11:59:54.000000Z'
                      invitation_status: accepted
                      acadle_invitation_status: null
                      clinicians:
                        -
                          id: 8
                          mrn: F3W2G7E51765367994
                          name: 'Mr. Elvis Strosin'
                          email: 1765367994awunsch@example.org
                          language: en
                          phone: '(667) 345-8383'
                          phone_country: MR
                          phone_verified_at: null
                          address1: '5999 Malinda Course Suite 409'
                          address2: 'Lake Prestonport, WY 71871-5432'
                          postal_code: 19981-7744
                          city: Kilback-Luettgen
                          clinic_name: Abagailton
                          clinic_location: "2805 Cyril Harbors Apt. 152\nFadelbury, IL 78983"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T11:59:54.000000Z'
                          updated_at: '2025-12-10T11:59:54.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          pivot:
                            user_id: 7
                            assigned_user_id: 8
                          roles: []
                      devices:
                        -
                          id: 1
                          serial: 4349022b-c3c7-3094-a17f-84809382a0f6
                          bluetooth_id: abb3997d-fb26-3498-a011-b8dac171583b
                          company_id: null
                          model_id: null
                          amputee_id: 7
                          clinician_id: null
                          firmware_version_id: null
                          pcb_version_id: null
                          reverse_magnets: 0
                          is_electrode: 0
                          active: 1
                          last_activity_at: '0000-00-00 00:00:00'
                          created_at: '2025-12-10T11:59:54.000000Z'
                          updated_at: '2025-12-10T11:59:54.000000Z'
                      roles:
                        -
                          id: 4
                          name: ClinicianSupport
                    -
                      id: 9
                      mrn: T4NRORH11765367994
                      name: 'Kirsten Schuster'
                      email: 1765367994bdonnelly@example.org
                      language: en
                      phone: 910.309.5264
                      phone_country: MV
                      phone_verified_at: null
                      address1: '84591 Emelie Lights'
                      address2: 'Immanuelland, MS 33123'
                      postal_code: 02006-1272
                      city: 'Mosciski Group'
                      clinic_name: 'Port Jackychester'
                      clinic_location: "122 Arturo Club Apt. 026\nEast Damianshire, MT 54887-9155"
                      image: null
                      mfa_enabled: 0
                      mfa_method: null
                      mfa_verified_to: null
                      location_id: null
                      created_by: null
                      active: 1
                      notifications_timezone: null
                      notifications_at: null
                      created_at: '2025-12-10T11:59:54.000000Z'
                      updated_at: '2025-12-10T11:59:54.000000Z'
                      invitation_status: accepted
                      acadle_invitation_status: null
                      clinicians:
                        -
                          id: 10
                          mrn: 7UPEB9Q71765367994
                          name: 'Mack Daniel'
                          email: 1765367994fabian33@example.net
                          language: en
                          phone: 562.240.2246
                          phone_country: GR
                          phone_verified_at: null
                          address1: '1925 Tod Landing Apt. 216'
                          address2: 'North Benedictview, ND 89072-4775'
                          postal_code: 55986-2088
                          city: 'Gerhold PLC'
                          clinic_name: Buckstad
                          clinic_location: "565 Jacobson Oval Apt. 240\nSouth Emelialand, KY 58342-1167"
                          image: null
                          mfa_enabled: 0
                          mfa_method: null
                          mfa_verified_to: null
                          location_id: null
                          created_by: null
                          active: 1
                          notifications_timezone: null
                          notifications_at: null
                          created_at: '2025-12-10T11:59:54.000000Z'
                          updated_at: '2025-12-10T11:59:54.000000Z'
                          invitation_status: null
                          acadle_invitation_status: null
                          pivot:
                            user_id: 9
                            assigned_user_id: 10
                          roles: []
                      devices:
                        -
                          id: 2
                          serial: 73077de6-553a-34bc-ba1e-53e4a3ea80d9
                          bluetooth_id: 48013b9e-cb08-34dd-ad18-d68adffe5342
                          company_id: null
                          model_id: null
                          amputee_id: 9
                          clinician_id: null
                          firmware_version_id: null
                          pcb_version_id: null
                          reverse_magnets: 0
                          is_electrode: 0
                          active: 1
                          last_activity_at: '0000-00-00 00:00:00'
                          created_at: '2025-12-10T11:59:54.000000Z'
                          updated_at: '2025-12-10T11:59:54.000000Z'
                      roles:
                        -
                          id: 4
                          name: ClinicianSupport
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 7
                        mrn: DIMY1Y7B1765367994
                        name: 'Austen Moore'
                        email: 1765367994houston67@example.net
                        language: en
                        phone: '+19035637760'
                        phone_country: FO
                        phone_verified_at: null
                        address1: '62832 Lorenzo Rue Suite 485'
                        address2: 'North Anjaliland, NJ 40528-9890'
                        postal_code: 72540-0921
                        city: Leannon-Feest
                        clinic_name: 'Lake Jadynbury'
                        clinic_location: "75479 Stroman Expressway Suite 663\nRolfsonchester, SD 17102-5019"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T11:59:54.000000Z'
                        updated_at: '2025-12-10T11:59:54.000000Z'
                        invitation_status: accepted
                        acadle_invitation_status: null
                        clinicians:
                          -
                            id: 8
                            mrn: F3W2G7E51765367994
                            name: 'Mr. Elvis Strosin'
                            email: 1765367994awunsch@example.org
                            language: en
                            phone: '(667) 345-8383'
                            phone_country: MR
                            phone_verified_at: null
                            address1: '5999 Malinda Course Suite 409'
                            address2: 'Lake Prestonport, WY 71871-5432'
                            postal_code: 19981-7744
                            city: Kilback-Luettgen
                            clinic_name: Abagailton
                            clinic_location: "2805 Cyril Harbors Apt. 152\nFadelbury, IL 78983"
                            image: null
                            mfa_enabled: 0
                            mfa_method: null
                            mfa_verified_to: null
                            location_id: null
                            created_by: null
                            active: 1
                            notifications_timezone: null
                            notifications_at: null
                            created_at: '2025-12-10T11:59:54.000000Z'
                            updated_at: '2025-12-10T11:59:54.000000Z'
                            invitation_status: null
                            acadle_invitation_status: null
                            pivot:
                              user_id: 7
                              assigned_user_id: 8
                            roles: []
                        devices:
                          -
                            id: 1
                            serial: 4349022b-c3c7-3094-a17f-84809382a0f6
                            bluetooth_id: abb3997d-fb26-3498-a011-b8dac171583b
                            company_id: null
                            model_id: null
                            amputee_id: 7
                            clinician_id: null
                            firmware_version_id: null
                            pcb_version_id: null
                            reverse_magnets: 0
                            is_electrode: 0
                            active: 1
                            last_activity_at: '0000-00-00 00:00:00'
                            created_at: '2025-12-10T11:59:54.000000Z'
                            updated_at: '2025-12-10T11:59:54.000000Z'
                        roles:
                          -
                            id: 4
                            name: ClinicianSupport
                      -
                        id: 9
                        mrn: T4NRORH11765367994
                        name: 'Kirsten Schuster'
                        email: 1765367994bdonnelly@example.org
                        language: en
                        phone: 910.309.5264
                        phone_country: MV
                        phone_verified_at: null
                        address1: '84591 Emelie Lights'
                        address2: 'Immanuelland, MS 33123'
                        postal_code: 02006-1272
                        city: 'Mosciski Group'
                        clinic_name: 'Port Jackychester'
                        clinic_location: "122 Arturo Club Apt. 026\nEast Damianshire, MT 54887-9155"
                        image: null
                        mfa_enabled: 0
                        mfa_method: null
                        mfa_verified_to: null
                        location_id: null
                        created_by: null
                        active: 1
                        notifications_timezone: null
                        notifications_at: null
                        created_at: '2025-12-10T11:59:54.000000Z'
                        updated_at: '2025-12-10T11:59:54.000000Z'
                        invitation_status: accepted
                        acadle_invitation_status: null
                        clinicians:
                          -
                            id: 10
                            mrn: 7UPEB9Q71765367994
                            name: 'Mack Daniel'
                            email: 1765367994fabian33@example.net
                            language: en
                            phone: 562.240.2246
                            phone_country: GR
                            phone_verified_at: null
                            address1: '1925 Tod Landing Apt. 216'
                            address2: 'North Benedictview, ND 89072-4775'
                            postal_code: 55986-2088
                            city: 'Gerhold PLC'
                            clinic_name: Buckstad
                            clinic_location: "565 Jacobson Oval Apt. 240\nSouth Emelialand, KY 58342-1167"
                            image: null
                            mfa_enabled: 0
                            mfa_method: null
                            mfa_verified_to: null
                            location_id: null
                            created_by: null
                            active: 1
                            notifications_timezone: null
                            notifications_at: null
                            created_at: '2025-12-10T11:59:54.000000Z'
                            updated_at: '2025-12-10T11:59:54.000000Z'
                            invitation_status: null
                            acadle_invitation_status: null
                            pivot:
                              user_id: 9
                              assigned_user_id: 10
                            roles: []
                        devices:
                          -
                            id: 2
                            serial: 73077de6-553a-34bc-ba1e-53e4a3ea80d9
                            bluetooth_id: 48013b9e-cb08-34dd-ad18-d68adffe5342
                            company_id: null
                            model_id: null
                            amputee_id: 9
                            clinician_id: null
                            firmware_version_id: null
                            pcb_version_id: null
                            reverse_magnets: 0
                            is_electrode: 0
                            active: 1
                            last_activity_at: '0000-00-00 00:00:00'
                            created_at: '2025-12-10T11:59:54.000000Z'
                            updated_at: '2025-12-10T11:59:54.000000Z'
                        roles:
                          -
                            id: 4
                            name: ClinicianSupport
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 7
                        mrn:
                          type: string
                          example: DIMY1Y7B1765367994
                        name:
                          type: string
                          example: 'Austen Moore'
                        email:
                          type: string
                          example: 1765367994houston67@example.net
                        language:
                          type: string
                          example: en
                        phone:
                          type: string
                          example: '+19035637760'
                        phone_country:
                          type: string
                          example: FO
                        phone_verified_at:
                          type: string
                          example: null
                        address1:
                          type: string
                          example: '62832 Lorenzo Rue Suite 485'
                        address2:
                          type: string
                          example: 'North Anjaliland, NJ 40528-9890'
                        postal_code:
                          type: string
                          example: 72540-0921
                        city:
                          type: string
                          example: Leannon-Feest
                        clinic_name:
                          type: string
                          example: 'Lake Jadynbury'
                        clinic_location:
                          type: string
                          example: "75479 Stroman Expressway Suite 663\nRolfsonchester, SD 17102-5019"
                        image:
                          type: string
                          example: null
                        mfa_enabled:
                          type: integer
                          example: 0
                        mfa_method:
                          type: string
                          example: null
                        mfa_verified_to:
                          type: string
                          example: null
                        location_id:
                          type: string
                          example: null
                        created_by:
                          type: string
                          example: null
                        active:
                          type: integer
                          example: 1
                        notifications_timezone:
                          type: string
                          example: null
                        notifications_at:
                          type: string
                          example: null
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:54.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:54.000000Z'
                        invitation_status:
                          type: string
                          example: accepted
                        acadle_invitation_status:
                          type: string
                          example: null
                        clinicians:
                          type: array
                          example:
                            -
                              id: 8
                              mrn: F3W2G7E51765367994
                              name: 'Mr. Elvis Strosin'
                              email: 1765367994awunsch@example.org
                              language: en
                              phone: '(667) 345-8383'
                              phone_country: MR
                              phone_verified_at: null
                              address1: '5999 Malinda Course Suite 409'
                              address2: 'Lake Prestonport, WY 71871-5432'
                              postal_code: 19981-7744
                              city: Kilback-Luettgen
                              clinic_name: Abagailton
                              clinic_location: "2805 Cyril Harbors Apt. 152\nFadelbury, IL 78983"
                              image: null
                              mfa_enabled: 0
                              mfa_method: null
                              mfa_verified_to: null
                              location_id: null
                              created_by: null
                              active: 1
                              notifications_timezone: null
                              notifications_at: null
                              created_at: '2025-12-10T11:59:54.000000Z'
                              updated_at: '2025-12-10T11:59:54.000000Z'
                              invitation_status: null
                              acadle_invitation_status: null
                              pivot:
                                user_id: 7
                                assigned_user_id: 8
                              roles: []
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 8
                              mrn:
                                type: string
                                example: F3W2G7E51765367994
                              name:
                                type: string
                                example: 'Mr. Elvis Strosin'
                              email:
                                type: string
                                example: 1765367994awunsch@example.org
                              language:
                                type: string
                                example: en
                              phone:
                                type: string
                                example: '(667) 345-8383'
                              phone_country:
                                type: string
                                example: MR
                              phone_verified_at:
                                type: string
                                example: null
                              address1:
                                type: string
                                example: '5999 Malinda Course Suite 409'
                              address2:
                                type: string
                                example: 'Lake Prestonport, WY 71871-5432'
                              postal_code:
                                type: string
                                example: 19981-7744
                              city:
                                type: string
                                example: Kilback-Luettgen
                              clinic_name:
                                type: string
                                example: Abagailton
                              clinic_location:
                                type: string
                                example: "2805 Cyril Harbors Apt. 152\nFadelbury, IL 78983"
                              image:
                                type: string
                                example: null
                              mfa_enabled:
                                type: integer
                                example: 0
                              mfa_method:
                                type: string
                                example: null
                              mfa_verified_to:
                                type: string
                                example: null
                              location_id:
                                type: string
                                example: null
                              created_by:
                                type: string
                                example: null
                              active:
                                type: integer
                                example: 1
                              notifications_timezone:
                                type: string
                                example: null
                              notifications_at:
                                type: string
                                example: null
                              created_at:
                                type: string
                                example: '2025-12-10T11:59:54.000000Z'
                              updated_at:
                                type: string
                                example: '2025-12-10T11:59:54.000000Z'
                              invitation_status:
                                type: string
                                example: null
                              acadle_invitation_status:
                                type: string
                                example: null
                              pivot:
                                type: object
                                properties:
                                  user_id:
                                    type: integer
                                    example: 7
                                  assigned_user_id:
                                    type: integer
                                    example: 8
                              roles:
                                type: array
                                example: []
                        devices:
                          type: array
                          example:
                            -
                              id: 1
                              serial: 4349022b-c3c7-3094-a17f-84809382a0f6
                              bluetooth_id: abb3997d-fb26-3498-a011-b8dac171583b
                              company_id: null
                              model_id: null
                              amputee_id: 7
                              clinician_id: null
                              firmware_version_id: null
                              pcb_version_id: null
                              reverse_magnets: 0
                              is_electrode: 0
                              active: 1
                              last_activity_at: '0000-00-00 00:00:00'
                              created_at: '2025-12-10T11:59:54.000000Z'
                              updated_at: '2025-12-10T11:59:54.000000Z'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              serial:
                                type: string
                                example: 4349022b-c3c7-3094-a17f-84809382a0f6
                              bluetooth_id:
                                type: string
                                example: abb3997d-fb26-3498-a011-b8dac171583b
                              company_id:
                                type: string
                                example: null
                              model_id:
                                type: string
                                example: null
                              amputee_id:
                                type: integer
                                example: 7
                              clinician_id:
                                type: string
                                example: null
                              firmware_version_id:
                                type: string
                                example: null
                              pcb_version_id:
                                type: string
                                example: null
                              reverse_magnets:
                                type: integer
                                example: 0
                              is_electrode:
                                type: integer
                                example: 0
                              active:
                                type: integer
                                example: 1
                              last_activity_at:
                                type: string
                                example: '0000-00-00 00:00:00'
                              created_at:
                                type: string
                                example: '2025-12-10T11:59:54.000000Z'
                              updated_at:
                                type: string
                                example: '2025-12-10T11:59:54.000000Z'
                        roles:
                          type: array
                          example:
                            -
                              id: 4
                              name: ClinicianSupport
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 4
                              name:
                                type: string
                                example: ClinicianSupport
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view user list'
                  code: 'USERS:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view user list'
                  code:
                    type: string
                    example: 'USERS:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - Users
  /api/me:
    get:
      summary: 'Get current user data'
      operationId: getCurrentUserData
      description: ''
      parameters:
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>clinicians</code>, <code>patients</code>, <code>devices</code>, <code>devicesAsClinician</code>, <code>roles</code>, <code>permissions</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>clinicians</code>, <code>patients</code>, <code>devices</code>, <code>devicesAsClinician</code>, <code>roles</code>, <code>permissions</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 11
                  mrn: DKSEUSAU1765367994
                  name: 'Godfrey DuBuque'
                  email: 1765367994ruecker.chadrick@example.org
                  language: en
                  phone: 850.435.6535
                  phone_country: JE
                  phone_verified_at: null
                  address1: '61611 Ruecker Tunnel Apt. 830'
                  address2: 'Port Dolly, WY 19678-0868'
                  postal_code: '45701'
                  city: 'Zemlak Inc'
                  clinic_name: 'West Jesushaven'
                  clinic_location: "380 Mayer Branch Apt. 894\nNorth Dasia, SD 36257"
                  image: null
                  mfa_enabled: 0
                  mfa_method: null
                  mfa_verified_to: null
                  location_id: null
                  created_by: null
                  active: 1
                  notifications_timezone: null
                  notifications_at: null
                  created_at: '2025-12-10T11:59:55.000000Z'
                  updated_at: '2025-12-10T11:59:55.000000Z'
                  invitation_status: null
                  acadle_invitation_status: null
                  roles:
                    -
                      id: 1
                      name: SuperAdmin
                properties:
                  id:
                    type: integer
                    example: 11
                  mrn:
                    type: string
                    example: DKSEUSAU1765367994
                  name:
                    type: string
                    example: 'Godfrey DuBuque'
                  email:
                    type: string
                    example: 1765367994ruecker.chadrick@example.org
                  language:
                    type: string
                    example: en
                  phone:
                    type: string
                    example: 850.435.6535
                  phone_country:
                    type: string
                    example: JE
                  phone_verified_at:
                    type: string
                    example: null
                  address1:
                    type: string
                    example: '61611 Ruecker Tunnel Apt. 830'
                  address2:
                    type: string
                    example: 'Port Dolly, WY 19678-0868'
                  postal_code:
                    type: string
                    example: '45701'
                  city:
                    type: string
                    example: 'Zemlak Inc'
                  clinic_name:
                    type: string
                    example: 'West Jesushaven'
                  clinic_location:
                    type: string
                    example: "380 Mayer Branch Apt. 894\nNorth Dasia, SD 36257"
                  image:
                    type: string
                    example: null
                  mfa_enabled:
                    type: integer
                    example: 0
                  mfa_method:
                    type: string
                    example: null
                  mfa_verified_to:
                    type: string
                    example: null
                  location_id:
                    type: string
                    example: null
                  created_by:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  notifications_timezone:
                    type: string
                    example: null
                  notifications_at:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:55.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:55.000000Z'
                  invitation_status:
                    type: string
                    example: null
                  acadle_invitation_status:
                    type: string
                    example: null
                  roles:
                    type: array
                    example:
                      -
                        id: 1
                        name: SuperAdmin
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: SuperAdmin
      tags:
        - Users
  '/api/user/{id}':
    get:
      summary: 'Get other user data'
      operationId: getOtherUserData
      description: ''
      parameters:
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>clinicians</code>, <code>patients</code>, <code>devices</code>, <code>devicesAsClinician</code>, <code>roles</code>, <code>permissions</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>clinicians</code>, <code>patients</code>, <code>devices</code>, <code>devicesAsClinician</code>, <code>roles</code>, <code>permissions</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 12
                  mrn: JFW95OAG1765367995
                  name: 'Prof. Drake Abernathy'
                  email: 1765367995rwyman@example.org
                  language: en
                  phone: '+1 (520) 756-3825'
                  phone_country: VG
                  phone_verified_at: null
                  address1: '67253 Bogisich Via'
                  address2: 'Pacochaton, NJ 79287'
                  postal_code: '67335'
                  city: 'Swaniawski, Spinka and Kulas'
                  clinic_name: Gloriaview
                  clinic_location: "54765 Irwin Highway Suite 722\nPort Todtown, CT 28834-3899"
                  image: null
                  mfa_enabled: 0
                  mfa_method: null
                  mfa_verified_to: null
                  location_id: null
                  created_by: null
                  active: 1
                  notifications_timezone: null
                  notifications_at: null
                  created_at: '2025-12-10T11:59:55.000000Z'
                  updated_at: '2025-12-10T11:59:55.000000Z'
                  invitation_status: null
                  acadle_invitation_status: null
                  roles:
                    -
                      id: 1
                      name: SuperAdmin
                properties:
                  id:
                    type: integer
                    example: 12
                  mrn:
                    type: string
                    example: JFW95OAG1765367995
                  name:
                    type: string
                    example: 'Prof. Drake Abernathy'
                  email:
                    type: string
                    example: 1765367995rwyman@example.org
                  language:
                    type: string
                    example: en
                  phone:
                    type: string
                    example: '+1 (520) 756-3825'
                  phone_country:
                    type: string
                    example: VG
                  phone_verified_at:
                    type: string
                    example: null
                  address1:
                    type: string
                    example: '67253 Bogisich Via'
                  address2:
                    type: string
                    example: 'Pacochaton, NJ 79287'
                  postal_code:
                    type: string
                    example: '67335'
                  city:
                    type: string
                    example: 'Swaniawski, Spinka and Kulas'
                  clinic_name:
                    type: string
                    example: Gloriaview
                  clinic_location:
                    type: string
                    example: "54765 Irwin Highway Suite 722\nPort Todtown, CT 28834-3899"
                  image:
                    type: string
                    example: null
                  mfa_enabled:
                    type: integer
                    example: 0
                  mfa_method:
                    type: string
                    example: null
                  mfa_verified_to:
                    type: string
                    example: null
                  location_id:
                    type: string
                    example: null
                  created_by:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  notifications_timezone:
                    type: string
                    example: null
                  notifications_at:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:55.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:55.000000Z'
                  invitation_status:
                    type: string
                    example: null
                  acadle_invitation_status:
                    type: string
                    example: null
                  roles:
                    type: array
                    example:
                      -
                        id: 1
                        name: SuperAdmin
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: SuperAdmin
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view user data'
                  code: 'USERS:GET:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view user data'
                  code:
                    type: string
                    example: 'USERS:GET:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'USERS:GET:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'USERS:GET:USER_NOT_FOUND'
      tags:
        - Users
    put:
      summary: 'Update user account'
      operationId: updateUserAccount
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 14
                  mrn: U57IOJ1Y1765367995
                  name: 'Dominic Kihn'
                  email: 1765367995concepcion40@example.com
                  language: en
                  phone: '(445) 463-8200'
                  phone_country: BW
                  phone_verified_at: null
                  address1: '9602 Ashton Forest'
                  address2: 'Gleichnerbury, NE 48870-8114'
                  postal_code: '58107'
                  city: 'Casper Inc'
                  clinic_name: Rowenaberg
                  clinic_location: "8961 Schoen Mills Apt. 826\nLake Myamouth, IL 71751"
                  image: null
                  mfa_enabled: 0
                  mfa_method: null
                  mfa_verified_to: null
                  location_id: null
                  created_by: null
                  active: 1
                  notifications_timezone: null
                  notifications_at: null
                  created_at: '2025-12-10T11:59:55.000000Z'
                  updated_at: '2025-12-10T11:59:55.000000Z'
                  invitation_status: accepted
                  acadle_invitation_status: null
                  roles:
                    -
                      id: 2
                      name: ClinicAdmin
                properties:
                  id:
                    type: integer
                    example: 14
                  mrn:
                    type: string
                    example: U57IOJ1Y1765367995
                  name:
                    type: string
                    example: 'Dominic Kihn'
                  email:
                    type: string
                    example: 1765367995concepcion40@example.com
                  language:
                    type: string
                    example: en
                  phone:
                    type: string
                    example: '(445) 463-8200'
                  phone_country:
                    type: string
                    example: BW
                  phone_verified_at:
                    type: string
                    example: null
                  address1:
                    type: string
                    example: '9602 Ashton Forest'
                  address2:
                    type: string
                    example: 'Gleichnerbury, NE 48870-8114'
                  postal_code:
                    type: string
                    example: '58107'
                  city:
                    type: string
                    example: 'Casper Inc'
                  clinic_name:
                    type: string
                    example: Rowenaberg
                  clinic_location:
                    type: string
                    example: "8961 Schoen Mills Apt. 826\nLake Myamouth, IL 71751"
                  image:
                    type: string
                    example: null
                  mfa_enabled:
                    type: integer
                    example: 0
                  mfa_method:
                    type: string
                    example: null
                  mfa_verified_to:
                    type: string
                    example: null
                  location_id:
                    type: string
                    example: null
                  created_by:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  notifications_timezone:
                    type: string
                    example: null
                  notifications_at:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:55.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:55.000000Z'
                  invitation_status:
                    type: string
                    example: accepted
                  acadle_invitation_status:
                    type: string
                    example: null
                  roles:
                    type: array
                    example:
                      -
                        id: 2
                        name: ClinicAdmin
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2
                        name:
                          type: string
                          example: ClinicAdmin
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to update user data'
                      code: 'USERS:UPDATE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to update user data'
                      code:
                        type: string
                        example: 'USERS:UPDATE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Insufficient permission to assign role'
                    type: object
                    example:
                      message: 'Insufficient permission to assign this role as ClinicAdmin'
                      code: 'USERS:UPDATE:INSUFFICIENT_PERMISSION_ASSIGN_ROLE'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to assign this role as ClinicAdmin'
                      code:
                        type: string
                        example: 'USERS:UPDATE:INSUFFICIENT_PERMISSION_ASSIGN_ROLE'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'USERS:UPDATE:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'USERS:UPDATE:USER_NOT_FOUND'
      tags:
        - Users
      requestBody:
        required: false
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                mrn:
                  type: string
                  description: 'Medical Record Number.'
                  example: MRN12345678
                name:
                  type: string
                  description: 'User full name.'
                  example: 'Tom Smith'
                email:
                  type: string
                  description: 'User email. MUST_BE_EMAIL.'
                  example: test@example.com
                language:
                  type: string
                  description: 'User language.'
                  example: en
                address1:
                  type: string
                  description: 'Address line 1. MAXIMUM:STRING_LENGTH:100.'
                  example: '11975 Jennifer Street Suite 108'
                address2:
                  type: string
                  description: 'Address line 2. MAXIMUM:STRING_LENGTH:100.'
                  example: 'South Silas, NV 72497-4125'
                postal_code:
                  type: string
                  description: 'Postal code. MAXIMUM:STRING_LENGTH:100.'
                  example: '89927'
                city:
                  type: string
                  description: 'City. MAXIMUM:STRING_LENGTH:100.'
                  example: Bettemouth
                clinic_name:
                  type: string
                  description: 'Clinic name. MAXIMUM:STRING_LENGTH:100.'
                  example: Aether
                clinic_location:
                  type: string
                  description: 'Clinic location. MAXIMUM:STRING_LENGTH:100.'
                  example: '11975 Jennifer Street Suite 108'
                image:
                  type: string
                  format: binary
                  description: 'Attached user image. MUST_BE_IMAGE MAXIMUM:FILE_KB:5120.'
                image_delete:
                  type: boolean
                  description: 'Send this parameter instead of <code>image</code> to remove previously added image.'
                  example: true
                mfa_enabled:
                  type: boolean
                  description: '<strong>Super Admin only:</strong> MFA enabled.'
                  example: true
                mfa_method:
                  type: string
                  description: '<strong>Super Admin only:</strong> MFA method.'
                  example: email
                  enum:
                    - email
                    - sms
                active:
                  type: boolean
                  description: 'User active status (0 - inactive, 1 - active).'
                  example: true
                clinicians:
                  type: array
                  description: 'Clinician ID. The <code>id</code> of an existing record in the App\Models\User table.'
                  example:
                    - 2
                  items:
                    type: string
                notifications_timezone:
                  type: string
                  description: 'User notifications timezone.'
                  example: Europe/Warsaw
                notifications_at:
                  type: string
                  description: 'Time when notifications and reminders should be sent. Format: HH:MM. Set null to notify at default time. Must be a valid date in the format <code>H:i</code>.'
                  example: '8:00'
                role:
                  type: string
                  description: 'Role name.'
                  example: Amputee
                  enum:
                    - Amputee
                    - ClinicianSupport
                    - Clinician
                    - ClinicAdmin
                    - SuperAdmin
                    - AcadleUser
                permissions:
                  type: object
                  description: "List of permissions given to this user.\n\tFor now, it is used for <code>ClinicianSupport</code> role to give access to specific actions\n\t(for example <code>user.update</code> means that user can update users).\n\tYou can assign both predefined permissions (already checked by some endpoints) and custom permissions (check them on your own).\n\tYou can also use wildcards like user.* to give access to all actions for given scope."
                  example: null
                  properties: {  }
    delete:
      summary: 'Delete user account'
      operationId: deleteUserAccount
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User deleted'
                  code: 'USERS:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'User deleted'
                  code:
                    type: string
                    example: 'USERS:DELETE:DELETED'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to delete user'
                      code: 'USERS:DELETE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to delete user'
                      code:
                        type: string
                        example: 'USERS:DELETE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'User has existing patients or chat rooms'
                    type: object
                    example:
                      message: 'Cannot delete: user has existing patients or chat rooms (patients: 1, chat rooms: 0)'
                      code: 'USERS:DELETE:HAS_PATIENTS'
                    properties:
                      message:
                        type: string
                        example: 'Cannot delete: user has existing patients or chat rooms (patients: 1, chat rooms: 0)'
                      code:
                        type: string
                        example: 'USERS:DELETE:HAS_PATIENTS'
                  -
                    description: 'User has existing devices'
                    type: object
                    example:
                      message: 'Cannot delete: user has existing devices (as patient: 1, as clinician: 0)'
                      code: 'USERS:DELETE:HAS_DEVICES'
                    properties:
                      message:
                        type: string
                        example: 'Cannot delete: user has existing devices (as patient: 1, as clinician: 0)'
                      code:
                        type: string
                        example: 'USERS:DELETE:HAS_DEVICES'
                  -
                    description: 'User has open P2P sessions'
                    type: object
                    example:
                      message: 'Cannot delete: user has open P2P sessions (as patient: 0, as clinician: 1)'
                      code: 'USERS:DELETE:HAS_P2P_SESSIONS'
                    properties:
                      message:
                        type: string
                        example: 'Cannot delete: user has open P2P sessions (as patient: 0, as clinician: 1)'
                      code:
                        type: string
                        example: 'USERS:DELETE:HAS_P2P_SESSIONS'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'USERS:DELETE:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'USERS:DELETE:USER_NOT_FOUND'
        500:
          description: 'Server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server error: user not deleted'
                  code: 'USERS:DELETE:SERVER_ERROR'
                properties:
                  message:
                    type: string
                    example: 'Server error: user not deleted'
                  code:
                    type: string
                    example: 'USERS:DELETE:SERVER_ERROR'
      tags:
        - Users
    parameters:
      -
        in: path
        name: id
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/user:
    post:
      summary: 'Create new user account'
      operationId: createNewUserAccount
      description: "Predefined permissions:\n\t\t<ul>\n\t\t\t<li><code>user.view</code> - access to view users' data (GET /user/{id} endpoint)</li>\n\t\t\t<li><code>user.update</code> - access to update users' data (PUT /user/{id} and POST /user/{id}/phone endpoints)</li>\n\t\t\t<li><code>user.passwordChange</code> - access to change users' passwords (POST /user/{id}/password endpoint)</li>\n\t\t\t<li><code>user.devices</code> - access to list of users' devices (GET /user/{id}/devices endpoint)</li>\n\t\t\t<li><code>user.tickets.view</code> - access to listing and viewing tickets</li>\n\t\t\t<li><code>user.tickets.update</code> - access to updating tickets (marking messages as read)</li>\n\t\t\t<li><code>user.tickets.send</code> - access to sending messages in tickets</li>\n\t\t\t<li><code>user.tickets.close</code> - access to closing tickets</li>\n\t\t\t<li><code>user.goals</code> - access to view or manage users' goals</li>\n\t\t</ul>"
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 13
                  mrn: GWINAD7F1765367995
                  name: 'Mr. Brady Kozey'
                  email: 1765367995erwin.kuhn@example.net
                  language: en
                  phone: '+12394711407'
                  phone_country: SG
                  phone_verified_at: null
                  address1: '5494 Prosacco Ways'
                  address2: 'Lake Lillianberg, ID 58239-2657'
                  postal_code: '81798'
                  city: 'Hintz Inc'
                  clinic_name: 'West Vivien'
                  clinic_location: "17890 Deion Land\nNew Easter, SC 13062"
                  image: null
                  mfa_enabled: 0
                  mfa_method: null
                  mfa_verified_to: null
                  location_id: null
                  created_by: null
                  active: 1
                  notifications_timezone: null
                  notifications_at: null
                  created_at: '2025-12-10T11:59:55.000000Z'
                  updated_at: '2025-12-10T11:59:55.000000Z'
                  invitation_status: null
                  acadle_invitation_status: null
                  roles:
                    -
                      id: 5
                      name: Amputee
                properties:
                  id:
                    type: integer
                    example: 13
                  mrn:
                    type: string
                    example: GWINAD7F1765367995
                  name:
                    type: string
                    example: 'Mr. Brady Kozey'
                  email:
                    type: string
                    example: 1765367995erwin.kuhn@example.net
                  language:
                    type: string
                    example: en
                  phone:
                    type: string
                    example: '+12394711407'
                  phone_country:
                    type: string
                    example: SG
                  phone_verified_at:
                    type: string
                    example: null
                  address1:
                    type: string
                    example: '5494 Prosacco Ways'
                  address2:
                    type: string
                    example: 'Lake Lillianberg, ID 58239-2657'
                  postal_code:
                    type: string
                    example: '81798'
                  city:
                    type: string
                    example: 'Hintz Inc'
                  clinic_name:
                    type: string
                    example: 'West Vivien'
                  clinic_location:
                    type: string
                    example: "17890 Deion Land\nNew Easter, SC 13062"
                  image:
                    type: string
                    example: null
                  mfa_enabled:
                    type: integer
                    example: 0
                  mfa_method:
                    type: string
                    example: null
                  mfa_verified_to:
                    type: string
                    example: null
                  location_id:
                    type: string
                    example: null
                  created_by:
                    type: string
                    example: null
                  active:
                    type: integer
                    example: 1
                  notifications_timezone:
                    type: string
                    example: null
                  notifications_at:
                    type: string
                    example: null
                  created_at:
                    type: string
                    example: '2025-12-10T11:59:55.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T11:59:55.000000Z'
                  invitation_status:
                    type: string
                    example: null
                  acadle_invitation_status:
                    type: string
                    example: null
                  roles:
                    type: array
                    example:
                      -
                        id: 5
                        name: Amputee
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 5
                        name:
                          type: string
                          example: Amputee
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to create user with given role'
                      code: 'USERS:CREATE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to create user with given role'
                      code:
                        type: string
                        example: 'USERS:CREATE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'E-mail in use (in another region)'
                    type: object
                    example:
                      message: 'E-mail address already in use (in another region)'
                      code: 'USERS:CREATE:EMAIL_IN_USE'
                    properties:
                      message:
                        type: string
                        example: 'E-mail address already in use (in another region)'
                      code:
                        type: string
                        example: 'USERS:CREATE:EMAIL_IN_USE'
      tags:
        - Users
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                mrn:
                  type: string
                  description: 'Medical Record Number.'
                  example: MRN12345678
                name:
                  type: string
                  description: 'User full name.'
                  example: 'Tom Smith'
                email:
                  type: string
                  description: 'User email. MUST_BE_EMAIL.'
                  example: test@example.com
                language:
                  type: string
                  description: 'User language.'
                  example: en
                address1:
                  type: string
                  description: 'Address line 1. MAXIMUM:STRING_LENGTH:100.'
                  example: '38591 Bahringer Passage Suite 566'
                address2:
                  type: string
                  description: 'Address line 2. MAXIMUM:STRING_LENGTH:100.'
                  example: 'Haucktown, MN 25186'
                postal_code:
                  type: string
                  description: 'Postal code. MAXIMUM:STRING_LENGTH:100.'
                  example: 69649-5292
                city:
                  type: string
                  description: 'City. MAXIMUM:STRING_LENGTH:100.'
                  example: Bodeburgh
                clinic_name:
                  type: string
                  description: 'Clinic name. MAXIMUM:STRING_LENGTH:100.'
                  example: Aether
                clinic_location:
                  type: string
                  description: 'Clinic location. MAXIMUM:STRING_LENGTH:100.'
                  example: '38591 Bahringer Passage Suite 566'
                image:
                  type: string
                  format: binary
                  description: 'Attached user image. MUST_BE_IMAGE MAXIMUM:FILE_KB:5120.'
                mfa_enabled:
                  type: boolean
                  description: '<strong>Super Admin only:</strong> MFA enabled.'
                  example: true
                mfa_method:
                  type: string
                  description: '<strong>Super Admin only:</strong> MFA method.'
                  example: email
                  enum:
                    - email
                    - sms
                clinicians:
                  type: array
                  description: 'Clinician ID. The <code>id</code> of an existing record in the App\Models\User table.'
                  example:
                    - 2
                  items:
                    type: string
                notifications_timezone:
                  type: string
                  description: 'User notifications timezone.'
                  example: Europe/Warsaw
                notifications_at:
                  type: string
                  description: 'Time when notifications and reminders should be sent. Format: HH:MM. Set null to notify at default time. Must be a valid date in the format <code>H:i</code>.'
                  example: '8:00'
                role:
                  type: string
                  description: 'Role name.'
                  example: Amputee
                  enum:
                    - Amputee
                    - ClinicianSupport
                    - Clinician
                    - ClinicAdmin
                    - SuperAdmin
                    - AcadleUser
                permissions:
                  type: object
                  description: "List of permissions given to this user.\n\tFor now, it is used for <code>ClinicianSupport</code> role to give access to specific actions\n\t(for example <code>user.update</code> means that user can update users).\n\tYou can assign both predefined permissions (already checked by some endpoints) and custom permissions (check them on your own).\n\tYou can also use wildcards like user.* to give access to all actions for given scope."
                  example: null
                  properties: {  }
              required:
                - email
                - role
  '/api/user/{id}/phone':
    post:
      summary: 'Update user phone number'
      operationId: updateUserPhoneNumber
      description: "Phone number has to be verified after update.\n\t\tCall <code>/api/mfa/phone/verify</code> with user-filled code after performing this operation.\n\t\tIf value is \"0\" phone number will be removed without any verification."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Phone number removed'
                    type: object
                    example:
                      message: 'Phone number removed'
                      code: 'USERS:SET_PHONE:REMOVED'
                    properties:
                      message:
                        type: string
                        example: 'Phone number removed'
                      code:
                        type: string
                        example: 'USERS:SET_PHONE:REMOVED'
                  -
                    description: 'Phone number updated'
                    type: object
                    example:
                      message: 'Verification code sent. Call /api/mfa/phone/verify to verify phone number.'
                      code: 'USERS:SET_PHONE:UPDATED'
                    properties:
                      message:
                        type: string
                        example: 'Verification code sent. Call /api/mfa/phone/verify to verify phone number.'
                      code:
                        type: string
                        example: 'USERS:SET_PHONE:UPDATED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update user data'
                  code: 'USERS:SET_PHONE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update user data'
                  code:
                    type: string
                    example: 'USERS:SET_PHONE:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'USERS:SET_PHONE:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'USERS:SET_PHONE:USER_NOT_FOUND'
        500:
          description: 'Code send failed'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Verification code sending failed'
                  code: 'USERS:SET_PHONE:SEND_FAILED'
                properties:
                  message:
                    type: string
                    example: 'Verification code sending failed'
                  code:
                    type: string
                    example: 'USERS:SET_PHONE:SEND_FAILED'
      tags:
        - Users
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                phone:
                  type: string
                  description: 'User phone number. Pass "0" to remove current one.'
                  example: '+1 (208) 892-0242'
                phone_country:
                  type: string
                  description: "Phone number's country (2 characters). SIZE:STRING_LENGTH:2."
                  example: US
    parameters:
      -
        in: path
        name: id
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/user/{id}/password':
    post:
      summary: 'Change other user password'
      operationId: changeOtherUserPassword
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User password changed'
                  code: 'USERS:PASSWORD_CHANGE:CHANGED'
                properties:
                  message:
                    type: string
                    example: 'User password changed'
                  code:
                    type: string
                    example: 'USERS:PASSWORD_CHANGE:CHANGED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to change user password'
                  code: 'USERS:PASSWORD_CHANGE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to change user password'
                  code:
                    type: string
                    example: 'USERS:PASSWORD_CHANGE:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'USERS:PASSWORD_CHANGE:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'USERS:PASSWORD_CHANGE:USER_NOT_FOUND'
      tags:
        - Users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  description: ''
                  example: est
              required:
                - password
    parameters:
      -
        in: path
        name: id
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/user/{id}/devices':
    get:
      summary: 'Get user devices list'
      operationId: getUserDevicesList
      description: ''
      parameters:
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>model</code>, <code>firmwareVersion</code>, <code>pcbVersion</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>model</code>, <code>firmwareVersion</code>, <code>pcbVersion</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 3
                      serial: 8e45ac6b-d661-3c26-8b2c-be770453fbfa
                      bluetooth_id: 69bb2e46-6ab0-3421-ac3d-977490166893
                      company_id: null
                      model_id: 1
                      amputee_id: null
                      clinician_id: null
                      firmware_version_id: null
                      pcb_version_id: null
                      reverse_magnets: 0
                      is_electrode: 0
                      active: 1
                      last_activity_at: '0000-00-00 00:00:00'
                      created_at: '2025-12-10T11:59:55.000000Z'
                      updated_at: '2025-12-10T11:59:55.000000Z'
                      model:
                        id: 1
                        name: 'Zeus hand v1'
                        type: arm
                        orientation: left
                        active: 1
                        created_at: '2025-12-10T11:59:55.000000Z'
                        updated_at: '2025-12-10T11:59:55.000000Z'
                    -
                      id: 4
                      serial: 822e42cd-1d78-3f05-ba35-c81ec2fcca93
                      bluetooth_id: ded63a68-e8cf-386a-ab3c-23c4157a335c
                      company_id: null
                      model_id: 2
                      amputee_id: null
                      clinician_id: null
                      firmware_version_id: null
                      pcb_version_id: null
                      reverse_magnets: 0
                      is_electrode: 0
                      active: 1
                      last_activity_at: '0000-00-00 00:00:00'
                      created_at: '2025-12-10T11:59:55.000000Z'
                      updated_at: '2025-12-10T11:59:55.000000Z'
                      model:
                        id: 2
                        name: 'Zeus hand v1'
                        type: leg
                        orientation: left
                        active: 1
                        created_at: '2025-12-10T11:59:55.000000Z'
                        updated_at: '2025-12-10T11:59:55.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 3
                        serial: 8e45ac6b-d661-3c26-8b2c-be770453fbfa
                        bluetooth_id: 69bb2e46-6ab0-3421-ac3d-977490166893
                        company_id: null
                        model_id: 1
                        amputee_id: null
                        clinician_id: null
                        firmware_version_id: null
                        pcb_version_id: null
                        reverse_magnets: 0
                        is_electrode: 0
                        active: 1
                        last_activity_at: '0000-00-00 00:00:00'
                        created_at: '2025-12-10T11:59:55.000000Z'
                        updated_at: '2025-12-10T11:59:55.000000Z'
                        model:
                          id: 1
                          name: 'Zeus hand v1'
                          type: arm
                          orientation: left
                          active: 1
                          created_at: '2025-12-10T11:59:55.000000Z'
                          updated_at: '2025-12-10T11:59:55.000000Z'
                      -
                        id: 4
                        serial: 822e42cd-1d78-3f05-ba35-c81ec2fcca93
                        bluetooth_id: ded63a68-e8cf-386a-ab3c-23c4157a335c
                        company_id: null
                        model_id: 2
                        amputee_id: null
                        clinician_id: null
                        firmware_version_id: null
                        pcb_version_id: null
                        reverse_magnets: 0
                        is_electrode: 0
                        active: 1
                        last_activity_at: '0000-00-00 00:00:00'
                        created_at: '2025-12-10T11:59:55.000000Z'
                        updated_at: '2025-12-10T11:59:55.000000Z'
                        model:
                          id: 2
                          name: 'Zeus hand v1'
                          type: leg
                          orientation: left
                          active: 1
                          created_at: '2025-12-10T11:59:55.000000Z'
                          updated_at: '2025-12-10T11:59:55.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 3
                        serial:
                          type: string
                          example: 8e45ac6b-d661-3c26-8b2c-be770453fbfa
                        bluetooth_id:
                          type: string
                          example: 69bb2e46-6ab0-3421-ac3d-977490166893
                        company_id:
                          type: string
                          example: null
                        model_id:
                          type: integer
                          example: 1
                        amputee_id:
                          type: string
                          example: null
                        clinician_id:
                          type: string
                          example: null
                        firmware_version_id:
                          type: string
                          example: null
                        pcb_version_id:
                          type: string
                          example: null
                        reverse_magnets:
                          type: integer
                          example: 0
                        is_electrode:
                          type: integer
                          example: 0
                        active:
                          type: integer
                          example: 1
                        last_activity_at:
                          type: string
                          example: '0000-00-00 00:00:00'
                        created_at:
                          type: string
                          example: '2025-12-10T11:59:55.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T11:59:55.000000Z'
                        model:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Zeus hand v1'
                            type:
                              type: string
                              example: arm
                            orientation:
                              type: string
                              example: left
                            active:
                              type: integer
                              example: 1
                            created_at:
                              type: string
                              example: '2025-12-10T11:59:55.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T11:59:55.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to view user devices'
                  code: 'USERS:DEVICES:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to view user devices'
                  code:
                    type: string
                    example: 'USERS:DEVICES:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'USERS:DEVICES:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'USERS:DEVICES:USER_NOT_FOUND'
      tags:
        - Users
    parameters:
      -
        in: path
        name: id
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/user/attach:
    post:
      summary: 'Attach patient to clinician'
      operationId: attachPatientToClinician
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Patient attached'
                  code: 'USERS:ATTACH:ATTACHED'
                properties:
                  message:
                    type: string
                    example: 'Patient attached'
                  code:
                    type: string
                    example: 'USERS:ATTACH:ATTACHED'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to attach patients'
                      code: 'USERS:ATTACH:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to attach patients'
                      code:
                        type: string
                        example: 'USERS:ATTACH:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Patient is already assigned to another clinician'
                    type: object
                    example:
                      message: 'Patient is already assigned to another clinician'
                      code: 'USERS:ATTACH:ALREADY_ASSIGNED'
                    properties:
                      message:
                        type: string
                        example: 'Patient is already assigned to another clinician'
                      code:
                        type: string
                        example: 'USERS:ATTACH:ALREADY_ASSIGNED'
                  -
                    description: 'User reached the temporary limit of attached devices'
                    type: object
                    example:
                      message: 'Reached the limit of assigned devices'
                      code: 'USERS:ATTACH:LIMIT_REACHED'
                    properties:
                      message:
                        type: string
                        example: 'Reached the limit of assigned devices'
                      code:
                        type: string
                        example: 'USERS:ATTACH:LIMIT_REACHED'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'USERS:ATTACH:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'USERS:ATTACH:USER_NOT_FOUND'
      tags:
        - Users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'User e-mail address. MUST_BE_EMAIL The <code>email</code> of an existing record in the App\Models\User table.'
                  example: name@domain.com
              required:
                - email
  '/api/user/{id}/detach':
    post:
      summary: 'Detach patient from clinician'
      operationId: detachPatientFromClinician
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Patient detached'
                  code: 'USERS:DETACH:DETACHED'
                properties:
                  message:
                    type: string
                    example: 'Patient detached'
                  code:
                    type: string
                    example: 'USERS:DETACH:DETACHED'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to detach patient'
                      code: 'USERS:DETACH:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to detach patient'
                      code:
                        type: string
                        example: 'USERS:DETACH:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Cannot detach last clinician'
                    type: object
                    example:
                      message: "Cannot detach patient's last clinician"
                      code: 'USERS:DETACH:CANNOT_DETACH_LAST_CLINICIAN'
                    properties:
                      message:
                        type: string
                        example: "Cannot detach patient's last clinician"
                      code:
                        type: string
                        example: 'USERS:DETACH:CANNOT_DETACH_LAST_CLINICIAN'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'USERS:DETACH:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'USERS:DETACH:USER_NOT_FOUND'
      tags:
        - Users
    parameters:
      -
        in: path
        name: id
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/user/{id}/mfa-codes':
    get:
      summary: 'Admin access to MFA codes'
      operationId: adminAccessToMFACodes
      description: '<strong>Requires <code>admin.mfa_access</code> permission.</strong>'
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    user_id:
                      type: integer
                      example: 1
                    code:
                      type: string
                      example: '123456'
                    channel:
                      type: string
                      example: email
                    expires:
                      type: string
                      example: '2025-05-09 12:00:00'
                example:
                  -
                    id: 1
                    user_id: 1
                    code: '123456'
                    channel: email
                    expires: '2025-05-09 12:00:00'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to access MFA codes'
                  code: 'USERS:ADMIN_MFA_ACCESS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to access MFA codes'
                  code:
                    type: string
                    example: 'USERS:ADMIN_MFA_ACCESS:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'USERS:ADMIN_MFA_ACCESS:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'USERS:ADMIN_MFA_ACCESS:USER_NOT_FOUND'
      tags:
        - Users
    parameters:
      -
        in: path
        name: id
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/consents:
    get:
      summary: 'Get user mobile consents'
      operationId: getUserMobileConsents
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    user_id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: adipisci
                    value:
                      type: string
                      example: omnis
                    created_at:
                      type: string
                      example: '2010-02-13T05:24:04.000000Z'
                    updated_at:
                      type: string
                      example: '2014-09-25T06:27:53.000000Z'
                example:
                  -
                    id: 1
                    user_id: 1
                    name: adipisci
                    value: omnis
                    created_at: '2010-02-13T05:24:04.000000Z'
                    updated_at: '2014-09-25T06:27:53.000000Z'
                  -
                    id: 2
                    user_id: 1
                    name: eaque
                    value: ipsum
                    created_at: '1981-01-08T16:36:29.000000Z'
                    updated_at: '1971-10-04T00:38:31.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to use mobile consents'
                  code: 'USERS:GET_MOBILE_CONSENTS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to use mobile consents'
                  code:
                    type: string
                    example: 'USERS:GET_MOBILE_CONSENTS:INSUFFICIENT_PERMISSION'
      tags:
        - Users
    post:
      summary: 'Set user mobile consent'
      operationId: setUserMobileConsent
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 3
                    user_id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: illo
                    value:
                      type: string
                      example: sit
                    created_at:
                      type: string
                      example: '1992-03-08T20:10:23.000000Z'
                    updated_at:
                      type: string
                      example: '2006-10-06T20:07:00.000000Z'
                example:
                  -
                    id: 3
                    user_id: 1
                    name: illo
                    value: sit
                    created_at: '1992-03-08T20:10:23.000000Z'
                    updated_at: '2006-10-06T20:07:00.000000Z'
                  -
                    id: 4
                    user_id: 1
                    name: enim
                    value: occaecati
                    created_at: '1991-11-23T02:35:45.000000Z'
                    updated_at: '1971-02-17T13:14:11.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to use mobile consents'
                  code: 'USERS:SET_MOBILE_CONSENTS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to use mobile consents'
                  code:
                    type: string
                    example: 'USERS:SET_MOBILE_CONSENTS:INSUFFICIENT_PERMISSION'
      tags:
        - Users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Consent name.'
                  example: 'Push notifications'
                value:
                  type: string
                  description: 'Consent value.'
                  example: 1
              required:
                - name
                - value
  '/api/notifications/{id}':
    delete:
      summary: 'Clear user notifications'
      operationId: clearUserNotifications
      description: "Clearing notifications allow to receive another notification on same day.\n\t\tThis endpoint deletes notifications of type:\n\t\t<ul>\n\t\t\t<li>daily activity reminders</li>\n\t\t\t<li>goals daily summary</li>\n\t\t</ul>\n\t\tThis endpoint is intended for testing use only."
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  messages: '1 notifications deleted'
                  code: 'USERS:CLEAR_NOTIFICATIONS:CLEARED'
                properties:
                  messages:
                    type: string
                    example: '1 notifications deleted'
                  code:
                    type: string
                    example: 'USERS:CLEAR_NOTIFICATIONS:CLEARED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update user data'
                  code: 'USERS:CLEAR_NOTIFICATIONS:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update user data'
                  code:
                    type: string
                    example: 'USERS:CLEAR_NOTIFICATIONS:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'USERS:CLEAR_NOTIFICATIONS:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'USERS:CLEAR_NOTIFICATIONS:USER_NOT_FOUND'
      tags:
        - Users
    parameters:
      -
        in: path
        name: id
        description: 'User ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/versions/software:
    get:
      summary: 'Get software versions'
      operationId: getSoftwareVersions
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    name:
                      type: string
                      example: 4.4.15
                    created_at:
                      type: string
                      example: '2025-12-10T12:00:15.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T12:00:15.000000Z'
                example:
                  -
                    id: 1
                    name: 4.4.15
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
                  -
                    id: 2
                    name: 0.33.32
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list versions'
                  code: 'SOFTWARE_VERSION:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list versions'
                  code:
                    type: string
                    example: 'SOFTWARE_VERSION:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - Versions
    post:
      summary: 'Create software version'
      operationId: createSoftwareVersion
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  name: 2.84.85
                  created_at: '2025-12-10T12:00:15.000000Z'
                  updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  name:
                    type: string
                    example: 2.84.85
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to create versions'
                  code: 'SOFTWARE_VERSION:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to create versions'
                  code:
                    type: string
                    example: 'SOFTWARE_VERSION:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - Versions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of version.'
                  example: '1.0'
              required:
                - name
  '/api/versions/software/{id}':
    delete:
      summary: 'Delete software version'
      operationId: deleteSoftwareVersion
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Version deleted'
                  code: 'SOFTWARE_VERSION:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Version deleted'
                  code:
                    type: string
                    example: 'SOFTWARE_VERSION:DELETE:DELETED'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to delete versions'
                      code: 'SOFTWARE_VERSION:DELETE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to delete versions'
                      code:
                        type: string
                        example: 'SOFTWARE_VERSION:DELETE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Version in use (compatibility)'
                    type: object
                    example:
                      message: 'Cannot delete: version is used in compatibility entries (1)'
                      code: 'SOFTWARE_VERSION:DELETE:VERSION_IN_USE_COMPATIBILITY'
                    properties:
                      message:
                        type: string
                        example: 'Cannot delete: version is used in compatibility entries (1)'
                      code:
                        type: string
                        example: 'SOFTWARE_VERSION:DELETE:VERSION_IN_USE_COMPATIBILITY'
        404:
          description: 'Version not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Version not found'
                  code: 'SOFTWARE_VERSION:DELETE:VERSION_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Version not found'
                  code:
                    type: string
                    example: 'SOFTWARE_VERSION:DELETE:VERSION_NOT_FOUND'
      tags:
        - Versions
    parameters:
      -
        in: path
        name: id
        description: 'Software Version ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/versions/firmware:
    get:
      summary: 'Get firmware versions'
      operationId: getFirmwareVersions
      description: ''
      parameters:
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>model</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>model</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 2
                    name:
                      type: string
                      example: 3.24.19
                    model_id:
                      type: string
                      example: null
                    file_firmware:
                      type: string
                      example: /tmp/fakerK9xJO6
                    file_firmware_v2:
                      type: string
                      example: /tmp/fakerIjKTfF
                    file_firmware_v3:
                      type: string
                      example: /tmp/fakervxBrxp
                    file_firmware_v4:
                      type: string
                      example: /tmp/fakerhL0EgN
                    file_firmware_v5:
                      type: string
                      example: /tmp/fakerBjm4p2
                    file_firmware_new_pcb:
                      type: string
                      example: /tmp/fakerFU61gT
                    file_bootloader:
                      type: string
                      example: /tmp/fakerGMbIKm
                    file_bootloader_v2:
                      type: string
                      example: /tmp/fakerzZvL5A
                    file_bootloader_v3:
                      type: string
                      example: /tmp/fakerEtns5V
                    file_bootloader_v4:
                      type: string
                      example: /tmp/fakerBfnBPG
                    changelog:
                      type: string
                      example: 'Voluptas officia voluptatum possimus ipsam ipsum non tempore. Quisquam suscipit beatae consequuntur animi nobis impedit quas. Consequatur eveniet debitis laboriosam error laboriosam.'
                    created_at:
                      type: string
                      example: '2025-12-10T12:00:15.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T12:00:15.000000Z'
                example:
                  -
                    id: 2
                    name: 3.24.19
                    model_id: null
                    file_firmware: /tmp/fakerK9xJO6
                    file_firmware_v2: /tmp/fakerIjKTfF
                    file_firmware_v3: /tmp/fakervxBrxp
                    file_firmware_v4: /tmp/fakerhL0EgN
                    file_firmware_v5: /tmp/fakerBjm4p2
                    file_firmware_new_pcb: /tmp/fakerFU61gT
                    file_bootloader: /tmp/fakerGMbIKm
                    file_bootloader_v2: /tmp/fakerzZvL5A
                    file_bootloader_v3: /tmp/fakerEtns5V
                    file_bootloader_v4: /tmp/fakerBfnBPG
                    changelog: 'Voluptas officia voluptatum possimus ipsam ipsum non tempore. Quisquam suscipit beatae consequuntur animi nobis impedit quas. Consequatur eveniet debitis laboriosam error laboriosam.'
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
                  -
                    id: 3
                    name: 1.18.19
                    model_id: null
                    file_firmware: /tmp/fakerShF0Ql
                    file_firmware_v2: /tmp/faker45oPT6
                    file_firmware_v3: /tmp/fakerlrzJpj
                    file_firmware_v4: /tmp/fakerX1zTdp
                    file_firmware_v5: /tmp/fakerndwq2q
                    file_firmware_new_pcb: /tmp/fakerHtj2Wv
                    file_bootloader: /tmp/fakerLb2Pk0
                    file_bootloader_v2: /tmp/faker86Xfm0
                    file_bootloader_v3: /tmp/fakerbq0ILW
                    file_bootloader_v4: /tmp/fakerZG9Oe3
                    changelog: 'Quibusdam itaque dolorum porro expedita dolor rem. Fuga qui impedit ad quia consequatur fuga. Voluptas quae quaerat nemo et sit dolores veritatis velit.'
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list versions'
                  code: 'FIRMWARE_VERSION:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list versions'
                  code:
                    type: string
                    example: 'FIRMWARE_VERSION:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - Versions
    post:
      summary: 'Create firmware version'
      operationId: createFirmwareVersion
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  name: 8.0.76
                  model_id: null
                  file_firmware: /tmp/fakerUtrib9
                  file_firmware_v2: /tmp/fakera2x73k
                  file_firmware_v3: /tmp/fakerDsUSfM
                  file_firmware_v4: /tmp/fakerSF0NU2
                  file_firmware_v5: /tmp/faker75X7Ud
                  file_firmware_new_pcb: /tmp/fakereccmsx
                  file_bootloader: /tmp/fakerEw2yBG
                  file_bootloader_v2: /tmp/fakerOqARPv
                  file_bootloader_v3: /tmp/faker1E0r8N
                  file_bootloader_v4: /tmp/fakerd4caQt
                  changelog: 'Fugiat ipsum tempora et itaque. Doloribus quos eveniet doloremque sed. Et magni et sed consequatur sunt. Libero dolores hic id hic cupiditate eos. Sunt sit autem reiciendis.'
                  created_at: '2025-12-10T12:00:15.000000Z'
                  updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  name:
                    type: string
                    example: 8.0.76
                  model_id:
                    type: string
                    example: null
                  file_firmware:
                    type: string
                    example: /tmp/fakerUtrib9
                  file_firmware_v2:
                    type: string
                    example: /tmp/fakera2x73k
                  file_firmware_v3:
                    type: string
                    example: /tmp/fakerDsUSfM
                  file_firmware_v4:
                    type: string
                    example: /tmp/fakerSF0NU2
                  file_firmware_v5:
                    type: string
                    example: /tmp/faker75X7Ud
                  file_firmware_new_pcb:
                    type: string
                    example: /tmp/fakereccmsx
                  file_bootloader:
                    type: string
                    example: /tmp/fakerEw2yBG
                  file_bootloader_v2:
                    type: string
                    example: /tmp/fakerOqARPv
                  file_bootloader_v3:
                    type: string
                    example: /tmp/faker1E0r8N
                  file_bootloader_v4:
                    type: string
                    example: /tmp/fakerd4caQt
                  changelog:
                    type: string
                    example: 'Fugiat ipsum tempora et itaque. Doloribus quos eveniet doloremque sed. Et magni et sed consequatur sunt. Libero dolores hic id hic cupiditate eos. Sunt sit autem reiciendis.'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to create versions'
                  code: 'FIRMWARE_VERSION:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to create versions'
                  code:
                    type: string
                    example: 'FIRMWARE_VERSION:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - Versions
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of version.'
                  example: '1.0'
                model_id:
                  type: integer
                  description: 'Device Model ID. The <code>id</code> of an existing record in the App\Models\DeviceModel table.'
                  example: 1
                file_firmware:
                  type: string
                  format: binary
                  description: 'Attached firmware file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_firmware_v2:
                  type: string
                  format: binary
                  description: 'Attached firmware file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_firmware_v3:
                  type: string
                  format: binary
                  description: 'Attached firmware file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_firmware_v4:
                  type: string
                  format: binary
                  description: 'Attached firmware file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_firmware_v5:
                  type: string
                  format: binary
                  description: 'Attached firmware file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_firmware_new_pcb:
                  type: string
                  format: binary
                  description: 'Attached firmware for new PCB file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_bootloader:
                  type: string
                  format: binary
                  description: 'Attached bootloader file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_bootloader_v2:
                  type: string
                  format: binary
                  description: 'Attached bootloader file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_bootloader_v3:
                  type: string
                  format: binary
                  description: 'Attached bootloader file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_bootloader_v4:
                  type: string
                  format: binary
                  description: 'Attached bootloader file. Must be a file. MAXIMUM:FILE_KB:102400.'
                changelog:
                  type: array
                  description: 'List of changelog translations.'
                  example: null
                  items:
                    type: object
                    properties:
                      language:
                        type: string
                        description: 'Changelog language (2 characters code).'
                        example: en
                      changelog:
                        type: string
                        description: 'Changelog for the version.'
                        example: 'Fixed bug with the connection'
              required:
                - name
                - model_id
  '/api/versions/firmware/{id}':
    put:
      summary: 'Update firmware version'
      operationId: updateFirmwareVersion
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 5
                  name: 8.27.6
                  model_id: null
                  file_firmware: /tmp/fakerP9HGrJ
                  file_firmware_v2: /tmp/fakerGVuxKM
                  file_firmware_v3: /tmp/fakerkG57tl
                  file_firmware_v4: /tmp/fakerRxTjDD
                  file_firmware_v5: /tmp/fakerbU1JLx
                  file_firmware_new_pcb: /tmp/fakerbpbg2O
                  file_bootloader: /tmp/fakerdyHIg6
                  file_bootloader_v2: /tmp/fakerAt9fjO
                  file_bootloader_v3: /tmp/fakerA0kZC5
                  file_bootloader_v4: /tmp/fakercFO4D5
                  changelog: 'Eligendi sed ab sit explicabo modi assumenda. Qui et vitae eveniet delectus ipsum labore. Eius adipisci placeat modi ipsa. Nostrum tempora qui aspernatur accusamus et accusamus eaque.'
                  created_at: '2025-12-10T12:00:15.000000Z'
                  updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  id:
                    type: integer
                    example: 5
                  name:
                    type: string
                    example: 8.27.6
                  model_id:
                    type: string
                    example: null
                  file_firmware:
                    type: string
                    example: /tmp/fakerP9HGrJ
                  file_firmware_v2:
                    type: string
                    example: /tmp/fakerGVuxKM
                  file_firmware_v3:
                    type: string
                    example: /tmp/fakerkG57tl
                  file_firmware_v4:
                    type: string
                    example: /tmp/fakerRxTjDD
                  file_firmware_v5:
                    type: string
                    example: /tmp/fakerbU1JLx
                  file_firmware_new_pcb:
                    type: string
                    example: /tmp/fakerbpbg2O
                  file_bootloader:
                    type: string
                    example: /tmp/fakerdyHIg6
                  file_bootloader_v2:
                    type: string
                    example: /tmp/fakerAt9fjO
                  file_bootloader_v3:
                    type: string
                    example: /tmp/fakerA0kZC5
                  file_bootloader_v4:
                    type: string
                    example: /tmp/fakercFO4D5
                  changelog:
                    type: string
                    example: 'Eligendi sed ab sit explicabo modi assumenda. Qui et vitae eveniet delectus ipsum labore. Eius adipisci placeat modi ipsa. Nostrum tempora qui aspernatur accusamus et accusamus eaque.'
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update versions'
                  code: 'FIRMWARE_VERSION:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update versions'
                  code:
                    type: string
                    example: 'FIRMWARE_VERSION:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Version not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Version not found'
                  code: 'FIRMWARE_VERSION:UPDATE:VERSION_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Version not found'
                  code:
                    type: string
                    example: 'FIRMWARE_VERSION:UPDATE:VERSION_NOT_FOUND'
      tags:
        - Versions
      requestBody:
        required: false
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of version.'
                  example: '1.0'
                model_id:
                  type: integer
                  description: 'Device Model ID. The <code>id</code> of an existing record in the App\Models\DeviceModel table.'
                  example: 1
                file_firmware:
                  type: string
                  format: binary
                  description: 'Attached firmware file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_firmware_v2:
                  type: string
                  format: binary
                  description: 'Attached firmware file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_firmware_v3:
                  type: string
                  format: binary
                  description: 'Attached firmware file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_firmware_v4:
                  type: string
                  format: binary
                  description: 'Attached firmware file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_firmware_v5:
                  type: string
                  format: binary
                  description: 'Attached firmware file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_firmware_new_pcb:
                  type: string
                  format: binary
                  description: 'Attached firmware for new PCB file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_bootloader:
                  type: string
                  format: binary
                  description: 'Attached bootloader file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_bootloader_v2:
                  type: string
                  format: binary
                  description: 'Attached bootloader file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_bootloader_v3:
                  type: string
                  format: binary
                  description: 'Attached bootloader file. Must be a file. MAXIMUM:FILE_KB:102400.'
                file_bootloader_v4:
                  type: string
                  format: binary
                  description: 'Attached bootloader file. Must be a file. MAXIMUM:FILE_KB:102400.'
                changelog:
                  type: array
                  description: 'List of changelog translations.'
                  example: null
                  items:
                    type: object
                    properties:
                      language:
                        type: string
                        description: 'Changelog language (2 characters code).'
                        example: en
                      changelog:
                        type: string
                        description: 'Changelog for the version. Pass "NULL" string to remove the entry for given language.'
                        example: 'Fixed bug with the connection'
                file_firmware_delete:
                  type: string
                  description: 'Send this parameter with value <code>1</code> to remove existing file for <code>file_firmware</code>.'
                  example: 1
                file_firmware_v2_delete:
                  type: string
                  description: 'Send this parameter with value <code>1</code> to remove existing file for <code>file_firmware_v2</code>.'
                  example: 1
                file_firmware_v3_delete:
                  type: string
                  description: 'Send this parameter with value <code>1</code> to remove existing file for <code>file_firmware_v3</code>.'
                  example: 1
                file_firmware_v4_delete:
                  type: string
                  description: 'Send this parameter with value <code>1</code> to remove existing file for <code>file_firmware_v4</code>.'
                  example: 1
                file_firmware_v5_delete:
                  type: string
                  description: 'Send this parameter with value <code>1</code> to remove existing file for <code>file_firmware_v5</code>.'
                  example: 1
                file_firmware_new_pcb_delete:
                  type: string
                  description: 'Send this parameter with value <code>1</code> to remove existing file for <code>file_firmware_new_pcb</code>.'
                  example: 1
                file_bootloader_delete:
                  type: string
                  description: 'Send this parameter with value <code>1</code> to remove existing file for <code>file_bootloader</code>.'
                  example: 1
                file_bootloader_v2_delete:
                  type: string
                  description: 'Send this parameter with value <code>1</code> to remove existing file for <code>file_bootloader_v2</code>.'
                  example: 1
                file_bootloader_v3_delete:
                  type: string
                  description: 'Send this parameter with value <code>1</code> to remove existing file for <code>file_bootloader_v3</code>.'
                  example: 1
                file_bootloader_v4_delete:
                  type: string
                  description: 'Send this parameter with value <code>1</code> to remove existing file for <code>file_bootloader_v4</code>.'
                  example: 1
    delete:
      summary: 'Delete firmware version'
      operationId: deleteFirmwareVersion
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Version deleted'
                  code: 'FIRMWARE_VERSION:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Version deleted'
                  code:
                    type: string
                    example: 'FIRMWARE_VERSION:DELETE:DELETED'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to delete versions'
                      code: 'FIRMWARE_VERSION:DELETE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to delete versions'
                      code:
                        type: string
                        example: 'FIRMWARE_VERSION:DELETE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Version in use (compatibility)'
                    type: object
                    example:
                      message: 'Cannot delete: version is used in compatibility entries (1)'
                      code: 'FIRMWARE_VERSION:DELETE:VERSION_IN_USE_COMPATIBILITY'
                    properties:
                      message:
                        type: string
                        example: 'Cannot delete: version is used in compatibility entries (1)'
                      code:
                        type: string
                        example: 'FIRMWARE_VERSION:DELETE:VERSION_IN_USE_COMPATIBILITY'
                  -
                    description: 'Version in use (device)'
                    type: object
                    example:
                      message: 'Cannot delete: version is assigned to devices (1)'
                      code: 'FIRMWARE_VERSION:DELETE:VERSION_IN_USE_DEVICE'
                    properties:
                      message:
                        type: string
                        example: 'Cannot delete: version is assigned to devices (1)'
                      code:
                        type: string
                        example: 'FIRMWARE_VERSION:DELETE:VERSION_IN_USE_DEVICE'
        404:
          description: 'Version not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Version not found'
                  code: 'FIRMWARE_VERSION:DELETE:VERSION_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Version not found'
                  code:
                    type: string
                    example: 'FIRMWARE_VERSION:DELETE:VERSION_NOT_FOUND'
      tags:
        - Versions
    parameters:
      -
        in: path
        name: id
        description: 'Firmware Version ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/versions/pcb:
    get:
      summary: 'Get PCB versions'
      operationId: getPCBVersions
      description: ''
      parameters:
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>model</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>model</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 2
                    name:
                      type: string
                      example: 8.78.10
                    model_id:
                      type: string
                      example: null
                    hardware_id:
                      type: string
                      example: ''
                    created_at:
                      type: string
                      example: '2025-12-10T12:00:15.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T12:00:15.000000Z'
                example:
                  -
                    id: 2
                    name: 8.78.10
                    model_id: null
                    hardware_id: ''
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
                  -
                    id: 3
                    name: 6.65.19
                    model_id: null
                    hardware_id: ''
                    created_at: '2025-12-10T12:00:15.000000Z'
                    updated_at: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list versions'
                  code: 'PCB_VERSION:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list versions'
                  code:
                    type: string
                    example: 'PCB_VERSION:LIST:INSUFFICIENT_PERMISSION'
      tags:
        - Versions
    post:
      summary: 'Create PCB version'
      operationId: createPCBVersion
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  name: 5.9.57
                  model_id: null
                  hardware_id: ''
                  created_at: '2025-12-10T12:00:15.000000Z'
                  updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  name:
                    type: string
                    example: 5.9.57
                  model_id:
                    type: string
                    example: null
                  hardware_id:
                    type: string
                    example: ''
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to create versions'
                  code: 'PCB_VERSION:CREATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to create versions'
                  code:
                    type: string
                    example: 'PCB_VERSION:CREATE:INSUFFICIENT_PERMISSION'
      tags:
        - Versions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of version.'
                  example: '1.0'
                model_id:
                  type: integer
                  description: 'Device Model ID. The <code>id</code> of an existing record in the App\Models\DeviceModel table.'
                  example: 1
                hardware_id:
                  type: string
                  description: 'Hardware ID name.'
                  example: '1'
              required:
                - name
                - model_id
                - hardware_id
  '/api/versions/pcb/{id}':
    put:
      summary: 'Update PCB version'
      operationId: updatePCBVersion
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 5
                  name: 4.97.53
                  model_id: null
                  hardware_id: ''
                  created_at: '2025-12-10T12:00:15.000000Z'
                  updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  id:
                    type: integer
                    example: 5
                  name:
                    type: string
                    example: 4.97.53
                  model_id:
                    type: string
                    example: null
                  hardware_id:
                    type: string
                    example: ''
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update versions'
                  code: 'PCB_VERSION:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update versions'
                  code:
                    type: string
                    example: 'PCB_VERSION:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Version not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Version not found'
                  code: 'PCB_VERSION:UPDATE:VERSION_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Version not found'
                  code:
                    type: string
                    example: 'PCB_VERSION:UPDATE:VERSION_NOT_FOUND'
      tags:
        - Versions
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Name of version.'
                  example: '1.0'
                model_id:
                  type: integer
                  description: 'Device Model ID. The <code>id</code> of an existing record in the App\Models\DeviceModel table.'
                  example: 1
                hardware_id:
                  type: string
                  description: 'Hardware ID name.'
                  example: '1'
    delete:
      summary: 'Delete PCB version'
      operationId: deletePCBVersion
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Version deleted'
                  code: 'PCB_VERSION:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Version deleted'
                  code:
                    type: string
                    example: 'PCB_VERSION:DELETE:DELETED'
        403:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Insufficient permission'
                    type: object
                    example:
                      message: 'Insufficient permission to delete versions'
                      code: 'PCB_VERSION:DELETE:INSUFFICIENT_PERMISSION'
                    properties:
                      message:
                        type: string
                        example: 'Insufficient permission to delete versions'
                      code:
                        type: string
                        example: 'PCB_VERSION:DELETE:INSUFFICIENT_PERMISSION'
                  -
                    description: 'Version in use (compatibility)'
                    type: object
                    example:
                      message: 'Cannot delete: version is used in compatibility entries (1)'
                      code: 'PCB_VERSION:DELETE:VERSION_IN_USE_COMPATIBILITY'
                    properties:
                      message:
                        type: string
                        example: 'Cannot delete: version is used in compatibility entries (1)'
                      code:
                        type: string
                        example: 'PCB_VERSION:DELETE:VERSION_IN_USE_COMPATIBILITY'
                  -
                    description: 'Version in use (device)'
                    type: object
                    example:
                      message: 'Cannot delete: version is assigned to devices (1)'
                      code: 'PCB_VERSION:DELETE:VERSION_IN_USE_DEVICE'
                    properties:
                      message:
                        type: string
                        example: 'Cannot delete: version is assigned to devices (1)'
                      code:
                        type: string
                        example: 'PCB_VERSION:DELETE:VERSION_IN_USE_DEVICE'
        404:
          description: 'Version not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Version not found'
                  code: 'PCB_VERSION:DELETE:VERSION_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Version not found'
                  code:
                    type: string
                    example: 'PCB_VERSION:DELETE:VERSION_NOT_FOUND'
      tags:
        - Versions
    parameters:
      -
        in: path
        name: id
        description: 'PCB Version ID.'
        example: 1
        required: true
        schema:
          type: integer
  /api/versions/compatibility:
    get:
      summary: 'List compatibilities'
      operationId: listCompatibilities
      description: "Most typical scenarios to use compatibility matrix:\n\t\t<ul>\n\t\t\t<li>full matrix (no filters) - for admin panel displaying,</li>\n\t\t\t<li>filtered by all of the versions (software, firmware, PCB and device model) - for checking specific scenario compatibility and supported features.</li>\n\t\t</ul>"
      parameters:
        -
          in: query
          name: model
          description: 'Filter compatibility matrix by device model ID.'
          example: 1
          required: false
          schema:
            type: integer
            description: 'Filter compatibility matrix by device model ID.'
            example: 1
        -
          in: query
          name: software
          description: 'Filter compatibility matrix by software version name (not ID!).'
          example: '1.2'
          required: false
          schema:
            type: string
            description: 'Filter compatibility matrix by software version name (not ID!).'
            example: '1.2'
        -
          in: query
          name: firmware
          description: 'Filter compatibility matrix by firmware version name (not ID!).'
          example: '1.5'
          required: false
          schema:
            type: string
            description: 'Filter compatibility matrix by firmware version name (not ID!).'
            example: '1.5'
        -
          in: query
          name: pcb
          description: 'Filter compatibility matrix by PCB version name (not ID!).'
          example: '1.0'
          required: false
          schema:
            type: string
            description: 'Filter compatibility matrix by PCB version name (not ID!).'
            example: '1.0'
        -
          in: query
          name: summary
          description: 'Add to response the device model, software, firmware and PCB entries used to filter the list.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Add to response the device model, software, firmware and PCB entries used to filter the list.'
            example: false
        -
          in: query
          name: perpage
          description: 'Elements per page (Default: 20).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Elements per page (Default: 20).'
            example: null
        -
          in: query
          name: page
          description: 'Page number (Default: 1).'
          example: null
          required: false
          schema:
            type: integer
            description: 'Page number (Default: 1).'
            example: null
        -
          in: query
          name: extend
          description: 'Comma-separated list of relation extensions (available: <code>features</code>, <code>features.feature</code>, <code>deviceModel</code>, <code>softwareVersion</code>, <code>firmwareVersion</code>, <code>pcbVersion</code>).'
          example: null
          required: false
          schema:
            type: string
            description: 'Comma-separated list of relation extensions (available: <code>features</code>, <code>features.feature</code>, <code>deviceModel</code>, <code>softwareVersion</code>, <code>firmwareVersion</code>, <code>pcbVersion</code>).'
            example: null
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  paginator:
                    total: 2
                    count: 2
                    perpage: 20
                    current_page: 1
                    last_page: 1
                  items:
                    -
                      id: 1
                      device_model_id: 10
                      software_version_id: 4
                      firmware_version_id: 14
                      pcb_version_id: 6
                      is_fully_compatible: 1
                      created_at: '2025-12-10T12:00:15.000000Z'
                      updated_at: '2025-12-10T12:00:15.000000Z'
                      features:
                        -
                          id: 1
                          compatibility_id: 1
                          feature_id: 5
                          is_compatible: 0
                          reason: 'Molestiae excepturi sed et laboriosam a amet. Est et dolorem error libero ab porro sunt ut. Vitae repellat consequatur optio rem doloribus. Cum in explicabo culpa vel.'
                          created_at: '2025-12-10T12:00:15.000000Z'
                          updated_at: '2025-12-10T12:00:15.000000Z'
                          feature:
                            id: 5
                            name: olive
                            slug: velit-quaerat-enim-soluta-dolorem-ipsam-esse
                            created_at: '2025-12-10T12:00:15.000000Z'
                            updated_at: '2025-12-10T12:00:15.000000Z'
                        -
                          id: 2
                          compatibility_id: 1
                          feature_id: 7
                          is_compatible: 0
                          reason: 'Modi hic cumque error unde. Qui accusantium atque corporis voluptas aut. Et sequi qui et voluptas aut nihil quia. Facere non ipsum tempore omnis ad. Dolor quo impedit omnis error.'
                          created_at: '2025-12-10T12:00:15.000000Z'
                          updated_at: '2025-12-10T12:00:15.000000Z'
                          feature:
                            id: 7
                            name: green
                            slug: dicta-neque-tempore-autem
                            created_at: '2025-12-10T12:00:15.000000Z'
                            updated_at: '2025-12-10T12:00:15.000000Z'
                        -
                          id: 3
                          compatibility_id: 1
                          feature_id: 9
                          is_compatible: 1
                          reason: 'Deserunt eos eaque dolores ut sit. Sit rerum magni distinctio sit similique maxime nostrum. Quod nihil qui provident a et enim. Beatae voluptas vero et ipsa et tempora similique.'
                          created_at: '2025-12-10T12:00:15.000000Z'
                          updated_at: '2025-12-10T12:00:15.000000Z'
                          feature:
                            id: 9
                            name: maroon
                            slug: distinctio-ut-maiores-beatae-magnam-ut-modi-repudiandae
                            created_at: '2025-12-10T12:00:15.000000Z'
                            updated_at: '2025-12-10T12:00:15.000000Z'
                    -
                      id: 5
                      device_model_id: 14
                      software_version_id: 8
                      firmware_version_id: 18
                      pcb_version_id: 10
                      is_fully_compatible: 0
                      created_at: '2025-12-10T12:00:15.000000Z'
                      updated_at: '2025-12-10T12:00:15.000000Z'
                      features:
                        -
                          id: 4
                          compatibility_id: 5
                          feature_id: 10
                          is_compatible: 1
                          reason: 'Aut accusantium autem perferendis ut eos natus omnis eos. Dolores dolores nihil et. Eveniet qui odit magni et nihil eos assumenda.'
                          created_at: '2025-12-10T12:00:15.000000Z'
                          updated_at: '2025-12-10T12:00:15.000000Z'
                          feature:
                            id: 10
                            name: aqua
                            slug: numquam-pariatur-possimus-aliquam-aut-illum
                            created_at: '2025-12-10T12:00:15.000000Z'
                            updated_at: '2025-12-10T12:00:15.000000Z'
                        -
                          id: 5
                          compatibility_id: 5
                          feature_id: 12
                          is_compatible: 0
                          reason: 'Voluptates autem molestias expedita est quasi animi dolores. Dolorem nobis deleniti consequatur molestiae inventore.'
                          created_at: '2025-12-10T12:00:15.000000Z'
                          updated_at: '2025-12-10T12:00:15.000000Z'
                          feature:
                            id: 12
                            name: silver
                            slug: quasi-aut-sunt-est-ratione
                            created_at: '2025-12-10T12:00:15.000000Z'
                            updated_at: '2025-12-10T12:00:15.000000Z'
                        -
                          id: 6
                          compatibility_id: 5
                          feature_id: 14
                          is_compatible: 1
                          reason: 'Perferendis laborum neque ut excepturi unde doloribus ratione. Et nihil repudiandae enim aut fuga. Cumque molestiae quaerat aut a autem placeat.'
                          created_at: '2025-12-10T12:00:15.000000Z'
                          updated_at: '2025-12-10T12:00:15.000000Z'
                          feature:
                            id: 14
                            name: gray
                            slug: ut-quis-et-accusamus-nemo-maiores-repellat
                            created_at: '2025-12-10T12:00:15.000000Z'
                            updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  paginator:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 2
                      count:
                        type: integer
                        example: 2
                      perpage:
                        type: integer
                        example: 20
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                  items:
                    type: array
                    example:
                      -
                        id: 1
                        device_model_id: 10
                        software_version_id: 4
                        firmware_version_id: 14
                        pcb_version_id: 6
                        is_fully_compatible: 1
                        created_at: '2025-12-10T12:00:15.000000Z'
                        updated_at: '2025-12-10T12:00:15.000000Z'
                        features:
                          -
                            id: 1
                            compatibility_id: 1
                            feature_id: 5
                            is_compatible: 0
                            reason: 'Molestiae excepturi sed et laboriosam a amet. Est et dolorem error libero ab porro sunt ut. Vitae repellat consequatur optio rem doloribus. Cum in explicabo culpa vel.'
                            created_at: '2025-12-10T12:00:15.000000Z'
                            updated_at: '2025-12-10T12:00:15.000000Z'
                            feature:
                              id: 5
                              name: olive
                              slug: velit-quaerat-enim-soluta-dolorem-ipsam-esse
                              created_at: '2025-12-10T12:00:15.000000Z'
                              updated_at: '2025-12-10T12:00:15.000000Z'
                          -
                            id: 2
                            compatibility_id: 1
                            feature_id: 7
                            is_compatible: 0
                            reason: 'Modi hic cumque error unde. Qui accusantium atque corporis voluptas aut. Et sequi qui et voluptas aut nihil quia. Facere non ipsum tempore omnis ad. Dolor quo impedit omnis error.'
                            created_at: '2025-12-10T12:00:15.000000Z'
                            updated_at: '2025-12-10T12:00:15.000000Z'
                            feature:
                              id: 7
                              name: green
                              slug: dicta-neque-tempore-autem
                              created_at: '2025-12-10T12:00:15.000000Z'
                              updated_at: '2025-12-10T12:00:15.000000Z'
                          -
                            id: 3
                            compatibility_id: 1
                            feature_id: 9
                            is_compatible: 1
                            reason: 'Deserunt eos eaque dolores ut sit. Sit rerum magni distinctio sit similique maxime nostrum. Quod nihil qui provident a et enim. Beatae voluptas vero et ipsa et tempora similique.'
                            created_at: '2025-12-10T12:00:15.000000Z'
                            updated_at: '2025-12-10T12:00:15.000000Z'
                            feature:
                              id: 9
                              name: maroon
                              slug: distinctio-ut-maiores-beatae-magnam-ut-modi-repudiandae
                              created_at: '2025-12-10T12:00:15.000000Z'
                              updated_at: '2025-12-10T12:00:15.000000Z'
                      -
                        id: 5
                        device_model_id: 14
                        software_version_id: 8
                        firmware_version_id: 18
                        pcb_version_id: 10
                        is_fully_compatible: 0
                        created_at: '2025-12-10T12:00:15.000000Z'
                        updated_at: '2025-12-10T12:00:15.000000Z'
                        features:
                          -
                            id: 4
                            compatibility_id: 5
                            feature_id: 10
                            is_compatible: 1
                            reason: 'Aut accusantium autem perferendis ut eos natus omnis eos. Dolores dolores nihil et. Eveniet qui odit magni et nihil eos assumenda.'
                            created_at: '2025-12-10T12:00:15.000000Z'
                            updated_at: '2025-12-10T12:00:15.000000Z'
                            feature:
                              id: 10
                              name: aqua
                              slug: numquam-pariatur-possimus-aliquam-aut-illum
                              created_at: '2025-12-10T12:00:15.000000Z'
                              updated_at: '2025-12-10T12:00:15.000000Z'
                          -
                            id: 5
                            compatibility_id: 5
                            feature_id: 12
                            is_compatible: 0
                            reason: 'Voluptates autem molestias expedita est quasi animi dolores. Dolorem nobis deleniti consequatur molestiae inventore.'
                            created_at: '2025-12-10T12:00:15.000000Z'
                            updated_at: '2025-12-10T12:00:15.000000Z'
                            feature:
                              id: 12
                              name: silver
                              slug: quasi-aut-sunt-est-ratione
                              created_at: '2025-12-10T12:00:15.000000Z'
                              updated_at: '2025-12-10T12:00:15.000000Z'
                          -
                            id: 6
                            compatibility_id: 5
                            feature_id: 14
                            is_compatible: 1
                            reason: 'Perferendis laborum neque ut excepturi unde doloribus ratione. Et nihil repudiandae enim aut fuga. Cumque molestiae quaerat aut a autem placeat.'
                            created_at: '2025-12-10T12:00:15.000000Z'
                            updated_at: '2025-12-10T12:00:15.000000Z'
                            feature:
                              id: 14
                              name: gray
                              slug: ut-quis-et-accusamus-nemo-maiores-repellat
                              created_at: '2025-12-10T12:00:15.000000Z'
                              updated_at: '2025-12-10T12:00:15.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        device_model_id:
                          type: integer
                          example: 10
                        software_version_id:
                          type: integer
                          example: 4
                        firmware_version_id:
                          type: integer
                          example: 14
                        pcb_version_id:
                          type: integer
                          example: 6
                        is_fully_compatible:
                          type: integer
                          example: 1
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:15.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:15.000000Z'
                        features:
                          type: array
                          example:
                            -
                              id: 1
                              compatibility_id: 1
                              feature_id: 5
                              is_compatible: 0
                              reason: 'Molestiae excepturi sed et laboriosam a amet. Est et dolorem error libero ab porro sunt ut. Vitae repellat consequatur optio rem doloribus. Cum in explicabo culpa vel.'
                              created_at: '2025-12-10T12:00:15.000000Z'
                              updated_at: '2025-12-10T12:00:15.000000Z'
                              feature:
                                id: 5
                                name: olive
                                slug: velit-quaerat-enim-soluta-dolorem-ipsam-esse
                                created_at: '2025-12-10T12:00:15.000000Z'
                                updated_at: '2025-12-10T12:00:15.000000Z'
                            -
                              id: 2
                              compatibility_id: 1
                              feature_id: 7
                              is_compatible: 0
                              reason: 'Modi hic cumque error unde. Qui accusantium atque corporis voluptas aut. Et sequi qui et voluptas aut nihil quia. Facere non ipsum tempore omnis ad. Dolor quo impedit omnis error.'
                              created_at: '2025-12-10T12:00:15.000000Z'
                              updated_at: '2025-12-10T12:00:15.000000Z'
                              feature:
                                id: 7
                                name: green
                                slug: dicta-neque-tempore-autem
                                created_at: '2025-12-10T12:00:15.000000Z'
                                updated_at: '2025-12-10T12:00:15.000000Z'
                            -
                              id: 3
                              compatibility_id: 1
                              feature_id: 9
                              is_compatible: 1
                              reason: 'Deserunt eos eaque dolores ut sit. Sit rerum magni distinctio sit similique maxime nostrum. Quod nihil qui provident a et enim. Beatae voluptas vero et ipsa et tempora similique.'
                              created_at: '2025-12-10T12:00:15.000000Z'
                              updated_at: '2025-12-10T12:00:15.000000Z'
                              feature:
                                id: 9
                                name: maroon
                                slug: distinctio-ut-maiores-beatae-magnam-ut-modi-repudiandae
                                created_at: '2025-12-10T12:00:15.000000Z'
                                updated_at: '2025-12-10T12:00:15.000000Z'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              compatibility_id:
                                type: integer
                                example: 1
                              feature_id:
                                type: integer
                                example: 5
                              is_compatible:
                                type: integer
                                example: 0
                              reason:
                                type: string
                                example: 'Molestiae excepturi sed et laboriosam a amet. Est et dolorem error libero ab porro sunt ut. Vitae repellat consequatur optio rem doloribus. Cum in explicabo culpa vel.'
                              created_at:
                                type: string
                                example: '2025-12-10T12:00:15.000000Z'
                              updated_at:
                                type: string
                                example: '2025-12-10T12:00:15.000000Z'
                              feature:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 5
                                  name:
                                    type: string
                                    example: olive
                                  slug:
                                    type: string
                                    example: velit-quaerat-enim-soluta-dolorem-ipsam-esse
                                  created_at:
                                    type: string
                                    example: '2025-12-10T12:00:15.000000Z'
                                  updated_at:
                                    type: string
                                    example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to list versions compatibilities'
                  code: 'COMPATIBILITY:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to list versions compatibilities'
                  code:
                    type: string
                    example: 'COMPATIBILITY:LIST:INSUFFICIENT_PERMISSION'
        404:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: 'Device model not found'
                    type: object
                    example:
                      message: 'Device model not found'
                      code: 'COMPATIBILITY:LIST:DEVICE_MODEL_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Device model not found'
                      code:
                        type: string
                        example: 'COMPATIBILITY:LIST:DEVICE_MODEL_NOT_FOUND'
                  -
                    description: 'Software version not found'
                    type: object
                    example:
                      message: 'Software version not found'
                      code: 'COMPATIBILITY:LIST:SOFTWARE_VERSION_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Software version not found'
                      code:
                        type: string
                        example: 'COMPATIBILITY:LIST:SOFTWARE_VERSION_NOT_FOUND'
                  -
                    description: 'Firmware version not found'
                    type: object
                    example:
                      message: 'Firmware version not found'
                      code: 'COMPATIBILITY:LIST:FIRMWARE_VERSION_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'Firmware version not found'
                      code:
                        type: string
                        example: 'COMPATIBILITY:LIST:FIRMWARE_VERSION_NOT_FOUND'
                  -
                    description: 'PCB version not found'
                    type: object
                    example:
                      message: 'PCB version not found'
                      code: 'COMPATIBILITY:LIST:PCB_VERSION_NOT_FOUND'
                    properties:
                      message:
                        type: string
                        example: 'PCB version not found'
                      code:
                        type: string
                        example: 'COMPATIBILITY:LIST:PCB_VERSION_NOT_FOUND'
      tags:
        - Versions
    post:
      summary: 'Add compatibility'
      operationId: addCompatibility
      description: 'Adds or updates compatibility matrix with assigned features. You can specify many versions for each list.'
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  added: 1
                  updated: 0
                  not_changed: 0
                properties:
                  added:
                    type: integer
                    example: 1
                  updated:
                    type: integer
                    example: 0
                  not_changed:
                    type: integer
                    example: 0
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to add versions compatibility'
                  code: 'COMPATIBILITY:ADD:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to add versions compatibility'
                  code:
                    type: string
                    example: 'COMPATIBILITY:ADD:INSUFFICIENT_PERMISSION'
      tags:
        - Versions
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                device_models:
                  type: array
                  description: 'Array of Device Model IDs. The <code>id</code> of an existing record in the App\Models\DeviceModel table.'
                  example:
                    - 1
                  items:
                    type: integer
                    nullable: true
                software_versions:
                  type: array
                  description: 'Array of Software Version IDs. The <code>id</code> of an existing record in the App\Models\SoftwareVersion table.'
                  example:
                    - 1
                  items:
                    type: integer
                    nullable: true
                firmware_versions:
                  type: array
                  description: 'Array of Firmware Version IDs. The <code>id</code> of an existing record in the App\Models\FirmwareVersion table.'
                  example:
                    - 1
                  items:
                    type: integer
                    nullable: true
                pcb_versions:
                  type: array
                  description: 'Array of PCB Version IDs. The <code>id</code> of an existing record in the App\Models\PCBVersion table.'
                  example:
                    - 1
                  items:
                    type: integer
                    nullable: true
                is_fully_compatible:
                  type: boolean
                  description: 'Is this set of versions fully compatible?.'
                  example: true
                features:
                  type: array
                  description: 'Array of features to be assigned to this set of versions.'
                  example: null
                  items:
                    type: object
                    properties:
                      feature_id:
                        type: string
                        description: 'Product feature ID. The <code>id</code> of an existing record in the App\Models\ProductFeature table.'
                        example: 1
                        nullable: true
                      compatible:
                        type: boolean
                        description: 'Is this feature compatible?.'
                        example: true
                      reason:
                        type: string
                        description: 'Reason of incompatibility.'
                        example: 'Firmware does not support...'
  '/api/versions/compatibility/{id}':
    put:
      summary: 'Update compatibility'
      operationId: updateCompatibility
      description: ''
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 9
                  device_model_id: 18
                  software_version_id: 12
                  firmware_version_id: 22
                  pcb_version_id: 14
                  is_fully_compatible: 1
                  created_at: '2025-12-10T12:00:15.000000Z'
                  updated_at: '2025-12-10T12:00:15.000000Z'
                  features:
                    -
                      id: 7
                      compatibility_id: 9
                      feature_id: 15
                      is_compatible: 0
                      reason: 'Facilis iste blanditiis unde amet eius rerum. Maxime deserunt vitae quidem. Molestias omnis officiis nulla quae. Tenetur ut ducimus qui inventore ut ea voluptatibus quo.'
                      created_at: '2025-12-10T12:00:15.000000Z'
                      updated_at: '2025-12-10T12:00:15.000000Z'
                      feature:
                        id: 15
                        name: teal
                        slug: dolorum-quia-aperiam-officiis
                        created_at: '2025-12-10T12:00:15.000000Z'
                        updated_at: '2025-12-10T12:00:15.000000Z'
                properties:
                  id:
                    type: integer
                    example: 9
                  device_model_id:
                    type: integer
                    example: 18
                  software_version_id:
                    type: integer
                    example: 12
                  firmware_version_id:
                    type: integer
                    example: 22
                  pcb_version_id:
                    type: integer
                    example: 14
                  is_fully_compatible:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:15.000000Z'
                  features:
                    type: array
                    example:
                      -
                        id: 7
                        compatibility_id: 9
                        feature_id: 15
                        is_compatible: 0
                        reason: 'Facilis iste blanditiis unde amet eius rerum. Maxime deserunt vitae quidem. Molestias omnis officiis nulla quae. Tenetur ut ducimus qui inventore ut ea voluptatibus quo.'
                        created_at: '2025-12-10T12:00:15.000000Z'
                        updated_at: '2025-12-10T12:00:15.000000Z'
                        feature:
                          id: 15
                          name: teal
                          slug: dolorum-quia-aperiam-officiis
                          created_at: '2025-12-10T12:00:15.000000Z'
                          updated_at: '2025-12-10T12:00:15.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 7
                        compatibility_id:
                          type: integer
                          example: 9
                        feature_id:
                          type: integer
                          example: 15
                        is_compatible:
                          type: integer
                          example: 0
                        reason:
                          type: string
                          example: 'Facilis iste blanditiis unde amet eius rerum. Maxime deserunt vitae quidem. Molestias omnis officiis nulla quae. Tenetur ut ducimus qui inventore ut ea voluptatibus quo.'
                        created_at:
                          type: string
                          example: '2025-12-10T12:00:15.000000Z'
                        updated_at:
                          type: string
                          example: '2025-12-10T12:00:15.000000Z'
                        feature:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 15
                            name:
                              type: string
                              example: teal
                            slug:
                              type: string
                              example: dolorum-quia-aperiam-officiis
                            created_at:
                              type: string
                              example: '2025-12-10T12:00:15.000000Z'
                            updated_at:
                              type: string
                              example: '2025-12-10T12:00:15.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to update versions compatibility'
                  code: 'COMPATIBILITY:UPDATE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to update versions compatibility'
                  code:
                    type: string
                    example: 'COMPATIBILITY:UPDATE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Versions Compatibility not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Versions compatibility not found'
                  code: 'COMPATIBILITY:UPDATE:COMPATIBILITY_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Versions compatibility not found'
                  code:
                    type: string
                    example: 'COMPATIBILITY:UPDATE:COMPATIBILITY_NOT_FOUND'
      tags:
        - Versions
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                device_model_id:
                  type: integer
                  description: 'Device Model ID. The <code>id</code> of an existing record in the App\Models\DeviceModel table.'
                  example: 6
                  nullable: true
                software_version_id:
                  type: integer
                  description: 'Software Version ID. The <code>id</code> of an existing record in the App\Models\SoftwareVersion table.'
                  example: 18
                  nullable: true
                firmware_version_id:
                  type: integer
                  description: 'Firmware Version ID. The <code>id</code> of an existing record in the App\Models\FirmwareVersion table.'
                  example: 10
                  nullable: true
                pcb_version_id:
                  type: integer
                  description: 'PCB Version ID. The <code>id</code> of an existing record in the App\Models\PCBVersion table.'
                  example: 10
                  nullable: true
                is_fully_compatible:
                  type: boolean
                  description: 'Is this set of versions fully compatible?.'
                  example: true
                features:
                  type: array
                  description: 'Array of features to be assigned to this set of versions.'
                  example: null
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: "Versions compatibility feature ID. Use with <code>delete</code> parameter to delete specific entry.\n\tDo not confuse with <code>feature_id</code>, this field refers to ID of relation between versions compatibility and product feature. The <code>id</code> of an existing record in the App\\Models\\VersionsCompatibilityFeature table."
                        example: 1
                        nullable: true
                      feature_id:
                        type: string
                        description: '<a href="#list-product-features">Product feature</a> ID. The <code>id</code> of an existing record in the App\Models\ProductFeature table.'
                        example: 1
                        nullable: true
                      compatible:
                        type: boolean
                        description: 'Is this feature compatible?.'
                        example: true
                      reason:
                        type: string
                        description: 'Reason of incompatibility.'
                        example: 'Firmware does not support...'
                      delete:
                        type: boolean
                        description: 'Pass 1 to detach feature from this set of versions, skip otherwise.'
                        example: true
    delete:
      summary: 'Delete compatibility'
      operationId: deleteCompatibility
      description: ''
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Versions compatibility deleted'
                  code: 'COMPATIBILITY:DELETE:DELETED'
                properties:
                  message:
                    type: string
                    example: 'Versions compatibility deleted'
                  code:
                    type: string
                    example: 'COMPATIBILITY:DELETE:DELETED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to delete versions compatibility'
                  code: 'COMPATIBILITY:DELETE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to delete versions compatibility'
                  code:
                    type: string
                    example: 'COMPATIBILITY:DELETE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Versions compatibility not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Versions compatibility not found'
                  code: 'COMPATIBILITY:DELETE:COMPATIBILITY_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Versions compatibility not found'
                  code:
                    type: string
                    example: 'COMPATIBILITY:DELETE:COMPATIBILITY_NOT_FOUND'
      tags:
        - Versions
    parameters:
      -
        in: path
        name: id
        description: 'Versions Compatibility ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/sessions/video/{guestId}':
    get:
      summary: 'List video sessions'
      operationId: listVideoSessions
      description: "Returns list of open video sessions.\n\t\tFor most cases there should be exactly one entry (open/active session) or exactly zero entries (empty array, no open sessions)."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 1
                    moderator_id:
                      type: integer
                      example: 122
                    guest_id:
                      type: integer
                      example: 123
                    jwt_moderator:
                      type: string
                      example: 0249af3cb8273cd95b205d978b772ea8d173374cc3d69618ddcdf32e45569474
                    jwt_guest:
                      type: string
                      example: 4f3dd1bb9c48c37fbf21a850a6060f27c111920fda745fc58eb5ca0455cb483c
                    room_name:
                      type: string
                      example: room_7c3551005ddc792b6c0f7ebbe53cfde7
                    expires:
                      type: integer
                      example: 1765368904
                    status:
                      type: string
                      example: open
                    created_at:
                      type: string
                      example: '2025-12-10T12:00:05.000000Z'
                    updated_at:
                      type: string
                      example: '2025-12-10T12:00:05.000000Z'
                example:
                  -
                    id: 1
                    moderator_id: 122
                    guest_id: 123
                    jwt_moderator: 0249af3cb8273cd95b205d978b772ea8d173374cc3d69618ddcdf32e45569474
                    jwt_guest: 4f3dd1bb9c48c37fbf21a850a6060f27c111920fda745fc58eb5ca0455cb483c
                    room_name: room_7c3551005ddc792b6c0f7ebbe53cfde7
                    expires: 1765368904
                    status: open
                    created_at: '2025-12-10T12:00:05.000000Z'
                    updated_at: '2025-12-10T12:00:05.000000Z'
                  -
                    id: 2
                    moderator_id: 126
                    guest_id: 127
                    jwt_moderator: f056b8cae37dc3ed60ee52da9a2951f8a6c531fe3222a3ad6835dbdd905c7d2a
                    jwt_guest: 2162456ce5874b705f4bfdbeaa45dd2d596ed346c0b90cb7a5866d1246e769e6
                    room_name: room_81a1c55bfef1d04132422c65b8737123
                    expires: 1765368905
                    status: open
                    created_at: '2025-12-10T12:00:05.000000Z'
                    updated_at: '2025-12-10T12:00:05.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to access video session'
                  code: 'VIDEO_SESSIONS:LIST:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to access video session'
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:LIST:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'VIDEO_SESSIONS:LIST:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:LIST:USER_NOT_FOUND'
      tags:
        - 'Video sessions'
    post:
      summary: 'Initialize video session'
      operationId: initializeVideoSession
      description: "Creates JWT (JSON Web Token) and room name for Jitsi session.\n\t\tLogged-in user is a moderator of the session.\n\t\tJWT lifetime is 15 minutes."
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3
                  moderator_id: 130
                  guest_id: 131
                  jwt_moderator: 0075870f97c892ba9a7243718e397d34ec7966d4fd9782974c0d2d6406797139
                  jwt_guest: 80c980ff9125cd274a3a1cd88cd9dfa4ba0bec9c6336182c78095a90db65b1de
                  room_name: room_81a1c55bfef1d04132422c65b8737123
                  expires: 1765368905
                  status: open
                  created_at: '2025-12-10T12:00:05.000000Z'
                  updated_at: '2025-12-10T12:00:05.000000Z'
                properties:
                  id:
                    type: integer
                    example: 3
                  moderator_id:
                    type: integer
                    example: 130
                  guest_id:
                    type: integer
                    example: 131
                  jwt_moderator:
                    type: string
                    example: 0075870f97c892ba9a7243718e397d34ec7966d4fd9782974c0d2d6406797139
                  jwt_guest:
                    type: string
                    example: 80c980ff9125cd274a3a1cd88cd9dfa4ba0bec9c6336182c78095a90db65b1de
                  room_name:
                    type: string
                    example: room_81a1c55bfef1d04132422c65b8737123
                  expires:
                    type: integer
                    example: 1765368905
                  status:
                    type: string
                    example: open
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:05.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:05.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to initialize video session'
                  code: 'VIDEO_SESSIONS:INIT:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to initialize video session'
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:INIT:INSUFFICIENT_PERMISSION'
        404:
          description: 'User not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                  code: 'VIDEO_SESSIONS:INIT:USER_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'User not found'
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:INIT:USER_NOT_FOUND'
        500:
          description: 'Server error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server error'
                  code: 'VIDEO_SESSIONS:INIT:SERVER_ERROR'
                properties:
                  message:
                    type: string
                    example: 'Server error'
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:INIT:SERVER_ERROR'
      tags:
        - 'Video sessions'
    parameters:
      -
        in: path
        name: guestId
        description: 'User ID (guest of the meeting).'
        example: 1
        required: true
        schema:
          type: integer
  '/api/sessions/video/{sessionId}/refresh':
    post:
      summary: 'Refresh video session'
      operationId: refreshVideoSession
      description: 'Refreshes video session JWT tokens to extend session lifetime.'
      parameters: []
      responses:
        202:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 4
                  moderator_id: 134
                  guest_id: 135
                  jwt_moderator: 8fe9c2c44847ab572a08f2c5d689077ca1e07377e82a4f82364e8ce39b162257
                  jwt_guest: 70e88c7a26a5e6daca0dc1c611bbf05e26b7e1d645faeaa30c1d316c67ed9869
                  room_name: room_81a1c55bfef1d04132422c65b8737123
                  expires: 1765368905
                  status: open
                  created_at: '2025-12-10T12:00:05.000000Z'
                  updated_at: '2025-12-10T12:00:05.000000Z'
                properties:
                  id:
                    type: integer
                    example: 4
                  moderator_id:
                    type: integer
                    example: 134
                  guest_id:
                    type: integer
                    example: 135
                  jwt_moderator:
                    type: string
                    example: 8fe9c2c44847ab572a08f2c5d689077ca1e07377e82a4f82364e8ce39b162257
                  jwt_guest:
                    type: string
                    example: 70e88c7a26a5e6daca0dc1c611bbf05e26b7e1d645faeaa30c1d316c67ed9869
                  room_name:
                    type: string
                    example: room_81a1c55bfef1d04132422c65b8737123
                  expires:
                    type: integer
                    example: 1765368905
                  status:
                    type: string
                    example: open
                  created_at:
                    type: string
                    example: '2025-12-10T12:00:05.000000Z'
                  updated_at:
                    type: string
                    example: '2025-12-10T12:00:05.000000Z'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to refresh video session'
                  code: 'VIDEO_SESSIONS:REFRESH:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to refresh video session'
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:REFRESH:INSUFFICIENT_PERMISSION'
        404:
          description: 'Session not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Video session not found'
                  code: 'VIDEO_SESSIONS:REFRESH:SESSION_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Video session not found'
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:REFRESH:SESSION_NOT_FOUND'
      tags:
        - 'Video sessions'
    parameters:
      -
        in: path
        name: sessionId
        description: 'Video Session ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/sessions/video/{sessionId}':
    delete:
      summary: 'Close video session'
      operationId: closeVideoSession
      description: 'Marks video session (database entry) as closed. Does not close session on Jitsi side.'
      parameters: []
      responses:
        202:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Video session closed'
                  code: 'VIDEO_SESSIONS:CLOSE:CLOSED'
                properties:
                  message:
                    type: string
                    example: 'Video session closed'
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:CLOSE:CLOSED'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to close video session'
                  code: 'VIDEO_SESSIONS:CLOSE:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to close video session'
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:CLOSE:INSUFFICIENT_PERMISSION'
        404:
          description: 'Session not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Video session not found'
                  code: 'VIDEO_SESSIONS:CLOSE:SESSION_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Video session not found'
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:CLOSE:SESSION_NOT_FOUND'
      tags:
        - 'Video sessions'
    parameters:
      -
        in: path
        name: sessionId
        description: 'Video Session ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/sessions/video/invite-support/{deviceId}':
    post:
      summary: 'Invite technical support'
      operationId: inviteTechnicalSupport
      description: 'Sends notification to Slack channel. Link to meeting is valid for 10 minutes.'
      parameters: []
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                example:
                  response: success
                  code: 'VIDEO_SESSIONS:INVITE_TECH_SUPPORT:SUCCESS'
                properties:
                  response:
                    type: string
                    example: success
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:INVITE_TECH_SUPPORT:SUCCESS'
        403:
          description: 'Insufficient permission'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Insufficient permission to invite tech support'
                  code: 'VIDEO_SESSIONS:INVITE_TECH_SUPPORT:INSUFFICIENT_PERMISSION'
                properties:
                  message:
                    type: string
                    example: 'Insufficient permission to invite tech support'
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:INVITE_TECH_SUPPORT:INSUFFICIENT_PERMISSION'
        404:
          description: 'Device not found'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Device not found'
                  code: 'VIDEO_SESSIONS:INVITE_TECH_SUPPORT:DEVICE_NOT_FOUND'
                properties:
                  message:
                    type: string
                    example: 'Device not found'
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:INVITE_TECH_SUPPORT:DEVICE_NOT_FOUND'
        500:
          description: 'Request failed'
          content:
            application/json:
              schema:
                type: object
                example:
                  response: invalid_payload
                  code: 'VIDEO_SESSIONS:INVITE_TECH_SUPPORT:FAILED'
                properties:
                  response:
                    type: string
                    example: invalid_payload
                  code:
                    type: string
                    example: 'VIDEO_SESSIONS:INVITE_TECH_SUPPORT:FAILED'
      tags:
        - 'Video sessions'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                room:
                  type: string
                  description: 'Name of Jitsi room to connect.'
                  example: room_1081c785cf1464e4d6ebc3976561d490
                description:
                  type: string
                  description: 'Description of problem provided by clinician.'
                  example: 'Grip switching is not working, please join.'
              required:
                - room
    parameters:
      -
        in: path
        name: deviceId
        description: 'Device ID (current device of the session).'
        example: 1
        required: true
        schema:
          type: integer
