get:
  operationId: getPasswordOrgConfig
  tags:
    - Password Configuration
  summary: Get Password Org Config
  description: >-
    This API returns the password org config .
    Requires ORG_ADMIN, API role or authorization scope of 'idn:password-org-config:read'
  security:
      - oauth2: ['idn:password-org-config:read']
  responses:
    '200':
      description: Reference to the password org config.
      content:
        application/json:
          schema:
            $ref: '../schemas/PasswordOrgConfig.yaml'
          example:
            {
              "customInstructionsEnabled": true,
              "digitTokenDurationMinutes": 9,
              "digitTokenEnabled": false,
              "digitTokenLength": 6
            }
    '400':
      $ref: '../responses/400.yaml'
    '401':
      $ref: '../responses/401.yaml'
    '403':
      $ref: '../responses/403.yaml'
    '429':
      $ref: '../responses/429.yaml'
    '500':
      $ref: '../responses/500.yaml'
put:
  operationId: updatePasswordOrgConfig
  tags:
    - Password Configuration
  summary: Update Password Org Config
  description: >-
    This API updates the password org config for specified fields. Other fields will keep original value.
    Requires ORG_ADMIN, API role or authorization scope of 'idn:password-org-config:write'
  security:
        - oauth2: ['idn:password-org-config:write']
  requestBody:
    required: true
    content:
      application/json:
        schema:
          $ref: '../schemas/PasswordOrgConfig.yaml'
        example:
          {
            "digitTokenEnabled": true,
            "digitTokenDurationMinutes": 12
          }
  responses:
    '200':
      description: Reference to the password org config.
      content:
        application/json:
          schema:
            $ref: '../schemas/PasswordOrgConfig.yaml'
          example:
            {
              "customInstructionsEnabled": true,
              "digitTokenDurationMinutes": 12,
              "digitTokenEnabled": true,
              "digitTokenLength": 6
            }

    '400':
      $ref: '../responses/400.yaml'
    '401':
      $ref: '../responses/401.yaml'
    '403':
      $ref: '../responses/403.yaml'
    '429':
      $ref: '../responses/429.yaml'
    '500':
      $ref: '../responses/500.yaml'
post:
  operationId: createPasswordOrgConfig
  tags:
    - Password Configuration
  summary: Create Password Org Config
  description: >-
    This API creates the password org config. Unspecified fields will use default value.
    Requires ORG_ADMIN, API role or authorization scope of 'idn:password-org-config:write'
  security:
    - oauth2: [ 'idn:password-org-config:write' ]
  requestBody:
    required: true
    content:
      application/json:
        schema:
          $ref: '../schemas/PasswordOrgConfig.yaml'
        example:
          {
            "customInstructionsEnabled": true,
            "digitTokenEnabled": true,
            "digitTokenDurationMinutes": 12,
            "digitTokenLength": 9
          }
  responses:
    '200':
      description: Reference to the password org config.
      content:
        application/json:
          schema:
            $ref: '../schemas/PasswordOrgConfig.yaml'
          example:
            {
              "customInstructionsEnabled": true,
              "digitTokenDurationMinutes": 9,
              "digitTokenEnabled": true,
              "digitTokenLength": 12
            }
    '400':
      $ref: '../responses/400.yaml'
    '401':
      $ref: '../responses/401.yaml'
    '403':
      $ref: '../responses/403.yaml'
    '429':
      $ref: '../responses/429.yaml'
    '500':
      $ref: '../responses/500.yaml'
