openapi: 3.0.3
info:
  title: ''
  version: 0.0.1
servers:
  - url: https://api.{customer}.app.identitii.com
    variables:
      customer:
        default: example
        description: >-
          The customer identifier issued to you during onboarding. Contact our
          support team for assistance if required.
paths:
  /request/v1alpha/scenarios:
    get:
      tags:
        - ScenarioService
      summary: List scenarios
      description: List scenarios.
      operationId: ListScenarios
      parameters:
        - name: page_size
          in: query
          description: >-
            Optional. The maximum number of scenarios to return. The service may
            return
             fewer than this value. If unspecified, the server will decide the number of
             scenarios to return.
          schema:
            type: integer
            format: int32
        - name: page_token
          in: query
          description: >-
            Optional. A page token received from a previous `ListScenarios`
            call.
             Provide this to retrieve the subsequent page of results.
          schema:
            type: string
        - name: show_deleted
          in: query
          description: >-
            Optional. Controls whether deleted scenarios are included in the
            response.
             Defaults to false.
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListScenariosResponse'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}:
    get:
      tags:
        - ScenarioService
      summary: Get a scenario
      description: Get a scenario.
      operationId: GetScenario
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Scenario'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
    delete:
      tags:
        - ScenarioService
      summary: Delete a scenario
      description: Delete a scenario
      operationId: DeleteScenario
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: etag
          in: query
          description: |-
            Optional. The current ETag of the scenario.

             If provided, and this value does not match the current ETag of the scenario,
             the request will fail and an ABORTED error will be returned.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content: {}
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/drafts:
    get:
      tags:
        - DraftService
      summary: List all drafts
      description: List all drafts.
      operationId: ListDrafts
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: page_size
          in: query
          description: >-
            Optional. The maximum number of drafts to return. The service may
            return fewer
             than this value. If unspecified, the server will decide the number of drafts to return.
          schema:
            type: integer
            format: int32
        - name: page_token
          in: query
          description: |-
            Optional. A page token received from a previous `ListDrafts` call.
             Provide this to retrieve the subsequent page of results.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDraftsResponse'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
    post:
      tags:
        - DraftService
      summary: Create a draft
      description: Create a draft.
      operationId: CreateDraft
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: draft_id
          in: query
          description: |-
            Optional. The ID to use for the draft, which will become the final
             component of the draft's resource name. A system-generated ID will
             be used if this is not provided.

             This value should be 4-63 characters, and valid characters
             are /[a-z][0-9]-/.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Draft'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Draft'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/drafts/{draft}:
    get:
      tags:
        - DraftService
      summary: Get a draft
      description: Get a draft.
      operationId: GetDraft
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: draft
          in: path
          description: The draft id.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Draft'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
    delete:
      tags:
        - DraftService
      summary: Delete a draft
      description: Delete a draft.
      operationId: DeleteDraft
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: draft
          in: path
          description: The draft id.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content: {}
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
    patch:
      tags:
        - DraftService
      summary: Update a draft
      description: Update a draft.
      operationId: UpdateDraft
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: draft
          in: path
          description: The draft id.
          required: true
          schema:
            type: string
        - name: update_mask
          in: query
          description: Required. The fields to update.
          schema:
            type: string
            format: field-mask
        - name: allow_missing
          in: query
          description: >-
            Optional. If set to true, and the draft is not found, a new draft
            will be created.
          schema:
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Draft'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Draft'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/drafts/{draft}:publish:
    post:
      tags:
        - DraftService
      summary: Publish a draft
      description: |-
        Publish a draft.

         Publishing a draft converts it into an RFI.
      operationId: PublishDraft
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: draft
          in: path
          description: The draft id.
          required: true
          schema:
            type: string
        - name: name
          in: query
          description: |-
            Required. The resource name of the draft to publish.

             Format: `scenarios/{scenario}/drafts/{draft}`
          schema:
            type: string
        - name: etag
          in: query
          description: |-
            Optional. The current ETag of the draft.

             If provided, and this value does not match the current ETag of the draft,
             the request will fail and an ABORTED error will be returned.
          schema:
            type: string
      requestBody:
        content:
          application/json: {}
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishDraftResponse'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/drafts/{draft}:undelete:
    post:
      tags:
        - DraftService
      summary: Undelete a draft
      description: Undelete a draft.
      operationId: UndeleteDraft
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: draft
          in: path
          description: The draft id.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UndeleteDraftRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Draft'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/rfis:
    get:
      tags:
        - RFIService
      summary: List all RFIs
      description: List RFIs.
      operationId: ListRFIs
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: page_size
          in: query
          description: >-
            Optional. The maximum number of RFIs to return. The server may
            return fewer than this value.
             If unspecified, the server will decide the number of RFIs to return.
          schema:
            type: integer
            format: int32
        - name: page_token
          in: query
          description: |-
            Optional. A page token received from a previous `ListRFIs` call.
             Provide this to retrieve the subsequent page of results.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRFIsResponse'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
    post:
      tags:
        - RFIService
      summary: Create an RFI
      description: Create an RFI.
      operationId: CreateRFI
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: rfi_id
          in: query
          description: |-
            Optional. The ID to use for the RFI, which will become the final
             component of the RFI's resource name. A system-generated ID will
             be used if this is not provided.

             This value should be 4-63 characters, and valid characters
             are /[a-z][0-9]-/.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RFI'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RFI'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/rfis/{rfi}:
    get:
      tags:
        - RFIService
      summary: Get an RFI
      description: Get an RFI.
      operationId: GetRFI
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: rfi
          in: path
          description: The rfi id.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RFI'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
    delete:
      tags:
        - RFIService
      summary: Delete an RFI
      operationId: DeleteRFI
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: rfi
          in: path
          description: The rfi id.
          required: true
          schema:
            type: string
        - name: etag
          in: query
          description: |-
            Optional. The current ETag of the RFI.

             If provided, and this value does not match the current ETag of the RFI,
             the request will fail and an ABORTED error will be returned.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content: {}
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/rfis/{rfi}:complete:
    post:
      tags:
        - RFIService
      summary: Complete an RFI
      description: |-
        Complete an RFI.

         The broker of an RFI can complete it to indicate that the response to the RFI is satisfactory.

         An RFI can be completed in the `OPEN`, `IN_PROGRESS` and `IN_REVIEW` states.
         Completing an RFI will transition it to `COMPLETE` state and assign it to the creator.
      operationId: CompleteRFI
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: rfi
          in: path
          description: The rfi id.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompleteRFIRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RFI'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/rfis/{rfi}:reject:
    post:
      tags:
        - RFIService
      summary: Reject an RFI
      description: >-
        The current assignee of an RFI can reject it to indicate that they are
        unable to respond.
      operationId: RejectRFI
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: rfi
          in: path
          description: The rfi id.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RejectRFIRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RFI'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/rfis/{rfi}:respond:
    post:
      tags:
        - RFIService
      summary: Respond to an RFI
      description: |-
        Respond to an RFI.

         An RFI can be responded to in the `OPEN` and `IN_PROGRESS` states.
         Responding to an RFI in the `OPEN` state will transition it to `IN_PROGRESS`.
      operationId: RespondToRFI
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: rfi
          in: path
          description: The rfi id.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RespondToRFIRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RFI'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/rfis/{rfi}:review:
    post:
      tags:
        - RFIService
      summary: Review an RFI
      description: |-
        Review an RFI.

         The broker of an RFI can review it to approve/reject the answers provided by the initial assignee of the RFI.

         An RFI can be only be reviewed in the `IN_REVIEW` state.
      operationId: ReviewRFI
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: rfi
          in: path
          description: The rfi id.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewRFIRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RFI'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/rfis/{rfi}:revoke:
    post:
      tags:
        - RFIService
      summary: Revoke an RFI
      description: >-
        The broker of an RFI can revoke it to indicate that a response is no
        longer required.
      operationId: RevokeRFI
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: rfi
          in: path
          description: The rfi id.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeRFIRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RFI'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/rfis/{rfi}:submit:
    post:
      tags:
        - RFIService
      summary: Submit an RFI for review
      description: |-
        Submit an RFI for review.

         The current assignee of an RFI can submit their answers for review by the broker.

         An RFI can only be submitted for review in the `IN_PROGRESS` state.
         If any answers require review, the RFI will transition to `IN_REVIEW` state and be assigned to the broker.
         Otherwise, the RFI will transition directly to `COMPLETE` state and be assigned to the creator.
      operationId: SubmitRFI
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: rfi
          in: path
          description: The rfi id.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRFIRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RFI'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}/rfis/{rfi}:undelete:
    post:
      tags:
        - RFIService
      summary: Undelete an RFI
      operationId: UndeleteRFI
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
        - name: rfi
          in: path
          description: The rfi id.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UndeleteRFIRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RFI'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/scenarios/{scenario}:undelete:
    post:
      tags:
        - ScenarioService
      summary: Undelete a scenario
      description: Undelete a scenario
      operationId: UndeleteScenario
      parameters:
        - name: scenario
          in: path
          description: The scenario id.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UndeleteScenarioRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Scenario'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/teams:
    get:
      tags:
        - TeamService
      summary: List teams
      description: List teams.
      operationId: ListTeams
      parameters:
        - name: page_size
          in: query
          description: >-
            Optional. The maximum number of teams to return. The service may
            return
             fewer than this value. If unspecified, the server will decide the number
             of teams to return.
          schema:
            type: integer
            format: int32
        - name: page_token
          in: query
          description: |-
            Optional. A page token received from a previous `ListTeams` call.
             Provide this to retrieve the subsequent page of results.
          schema:
            type: string
        - name: show_deleted
          in: query
          description: >-
            Optional. Controls whether deleted teams are included in the
            response.
             Defaults to false.
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTeamsResponse'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
    post:
      tags:
        - TeamService
      summary: Create a team
      description: Create a team.
      operationId: CreateTeam
      parameters:
        - name: team_id
          in: query
          description: |-
            Optional. The ID to use for the team, which will become the final
             component of the team's resource name. A system-generated ID will
             be used if this is not provided.

             This value should be 4-63 characters, and valid characters
             are /[a-z][0-9]-/.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Team'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/teams/{team}:
    get:
      tags:
        - TeamService
      summary: Get a team
      description: Get a team.
      operationId: GetTeam
      parameters:
        - name: team
          in: path
          description: The team id.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
    delete:
      tags:
        - TeamService
      summary: Delete a team
      description: Delete a team.
      operationId: DeleteTeam
      parameters:
        - name: team
          in: path
          description: The team id.
          required: true
          schema:
            type: string
        - name: etag
          in: query
          description: |-
            Optional. The current ETag of the team.

             If provided, and this value does not match the current ETag of the team,
             the request will fail and an ABORTED error will be returned.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content: {}
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
    patch:
      tags:
        - TeamService
      summary: Update a team
      description: Update a team.
      operationId: UpdateTeam
      parameters:
        - name: team
          in: path
          description: The team id.
          required: true
          schema:
            type: string
        - name: update_mask
          in: query
          description: Optional. The fields to update.
          schema:
            type: string
            format: field-mask
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Team'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /request/v1alpha/teams/{team}:undelete:
    post:
      tags:
        - TeamService
      summary: Undelete a team
      description: Undelete a team.
      operationId: UndeleteTeam
      parameters:
        - name: team
          in: path
          description: The team id.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UndeleteTeamRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /v1alpha/tokens:generate:
    post:
      tags:
        - AuthenticationService
      summary: Generate an access token
      description: Exchange client credentials for an access token.
      operationId: GenerateToken
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateTokenRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateTokenResponse'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
      security:
        - {}
components:
  schemas:
    Answer:
      type: object
      properties:
        address:
          allOf:
            - $ref: '#/components/schemas/PostalAddress'
          description: An address value.
        date:
          type: string
          description: A date value.
          format: date
        multi_file:
          allOf:
            - $ref: '#/components/schemas/Answer_MultiFile'
          description: A collection of file IDs.
        text:
          type: string
          description: A text value.
    Answer_MultiFile:
      type: object
      properties:
        file_ids:
          type: array
          items:
            type: string
          description: |-
            A list of file IDs associated with this answer.
             Each file ID references an `api.identitii.com/File` resource.
      description: Represents a collection of files associated with an answer.
    CompleteRFIRequest:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: |-
            Required. The resource name of the RFI to complete.

             Format: `scenarios/{scenario}/rfis/{rfi}`
        etag:
          type: string
          description: |-
            Optional. The current ETag of the RFI.

             If provided, and this value does not match the current ETag of the RFI,
             the request will fail and an ABORTED error will be returned.
      description: Request message for the `CompleteRFI` method.
    DisplayMetadata_Group:
      type: object
      properties:
        label:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/LocalizedText'
          description: The label for the group.
        description:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/LocalizedText'
          description: The description of the group.
        questions:
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Group_Question'
          description: The questions within this group.
      description: Represents a group of questions in the UI.
    Draft:
      required:
        - input
      type: object
      properties:
        name:
          type: string
          description: |-
            The resource name of the draft.

             Format: `scenarios/{scenario}/drafts/{draft}`
        uid:
          readOnly: true
          type: string
          description: A system-assigned unique identifier for the draft, in UUID4 format.
        creator_team:
          type: string
          description: |-
            The resource name of the team that will create or initiate the RFI.

             Format: `teams/{team}`
        broker_team:
          type: string
          description: >-
            The resource name of the team that will facilitate or coordinate the
            RFI process.

             Format: `teams/{team}`
        assignee_team:
          type: string
          description: >-
            The resource name of the team that will become the initial assignee
            of the RFI.

             Format: `teams/{team}`
        input:
          type: object
          description: |-
            Input data that will be used to create the RFI.

             This field should contain JSON that matches the scenario's input schema.
        create_time:
          readOnly: true
          type: string
          description: Timestamp of when the draft was created.
          format: date-time
        update_time:
          readOnly: true
          type: string
          description: Timestamp of when the draft was last updated.
          format: date-time
        delete_time:
          readOnly: true
          type: string
          description: Timestamp of when the draft was deleted.
          format: date-time
        etag:
          readOnly: true
          type: string
          description: The ETag of the draft, used for optimistic concurrency control.
        annotations:
          type: object
          additionalProperties:
            type: string
          description: |-
            Unstructured key-value pairs that can be used to store and retrieve
             arbitrary metadata related to the draft.

             Annotations are intended for client-side usage. They are not used by the
             server except for size or character set validation as defined
             in [AIP-148](https://google.aip.dev/148#annotations)
      description: A draft request for information.
    GenerateTokenRequest:
      required:
        - grant_type
        - client_id
        - client_secret
      type: object
      properties:
        grant_type:
          type: string
          description: This is a constant value of `client_credentials`.
        client_id:
          type: string
          description: |-
            The client identifier issued to you by Identitii during
             API onboarding.
        client_secret:
          type: string
          description: |-
            The client secret issued to you by Identitii during
             API onboarding.
      description: Request message for the `GenerateToken` method.
    GenerateTokenResponse:
      type: object
      properties:
        access_token:
          type: string
          description: The access token issued by the authorization server.
        token_type:
          type: string
          description: The type of token issued. This is a constant value of `Bearer`.
        expires_in:
          type: integer
          description: The lifetime in seconds of the access token.
          format: int32
      description: Response message for the `GenerateToken` method
    GoogleProtobufAny:
      type: object
      properties:
        '@type':
          type: string
          description: The type of the serialized message.
      additionalProperties: true
      description: >-
        Contains an arbitrary serialized message along with a @type that
        describes the type of the serialized message.
    Group_Question:
      type: object
      properties:
        key:
          readOnly: true
          type: string
          description: The key identifier for the question.
        label:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/LocalizedText'
          description: The label for the question.
        description:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/LocalizedText'
          description: The description of the question.
      description: Represents a question within a group.
    ListDraftsResponse:
      type: object
      properties:
        drafts:
          type: array
          items:
            $ref: '#/components/schemas/Draft'
          description: The list of drafts.
        next_page_token:
          type: string
          description: |-
            A token to retrieve the next page of results.
             This field is empty if there are no more results.
        show_deleted:
          type: boolean
          description: >-
            Optional. Controls whether deleted drafts are included in the
            response.
             Defaults to false.
      description: Response message for the `ListDrafts` method.
    ListRFIsResponse:
      type: object
      properties:
        rfis:
          type: array
          items:
            $ref: '#/components/schemas/RFI'
          description: The list of RFIs.
        next_page_token:
          type: string
          description: |-
            A token to retrieve the next page of results.
             This field is empty if there are no more results.
      description: Response message for the `ListRFIs` method.
    ListScenariosResponse:
      type: object
      properties:
        scenarios:
          type: array
          items:
            $ref: '#/components/schemas/Scenario'
          description: The list of scenarios.
        next_page_token:
          type: string
          description: |-
            A token to retrieve the next page of results.
             This field is empty if there are no more results.
      description: Response message for the `ListScenarios` method.
    ListTeamsResponse:
      type: object
      properties:
        teams:
          type: array
          items:
            $ref: '#/components/schemas/Team'
          description: The list of teams.
        next_page_token:
          type: string
          description: |-
            A token to retrieve the next page of results.
             This field is empty if there are no more results.
      description: Response message for the `ListTeams` method.
    LocalizedText:
      type: object
      properties:
        text:
          type: string
          description: >-
            Localized string in the language corresponding to `language_code'
            below.
        language_code:
          type: string
          description: |-
            The text's BCP-47 language code, such as "en-US" or "sr-Latn".

             For more information, see
             http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
      description: Localized variant of a text in a particular language.
    PostalAddress:
      type: object
      properties:
        revision:
          type: integer
          description: >-
            The schema revision of the `PostalAddress`. This must be set to 0,
            which is
             the latest revision.

             All new revisions **must** be backward compatible with old revisions.
          format: int32
        region_code:
          type: string
          description: >-
            Required. CLDR region code of the country/region of the address.
            This
             is never inferred and it is up to the user to ensure the value is
             correct. See http://cldr.unicode.org/ and
             http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
             for details. Example: "CH" for Switzerland.
        language_code:
          type: string
          description: |-
            Optional. BCP-47 language code of the contents of this address (if
             known). This is often the UI language of the input form or is expected
             to match one of the languages used in the address' country/region, or their
             transliterated equivalents.
             This can affect formatting in certain countries, but is not critical
             to the correctness of the data and will never affect any validation or
             other non-formatting related operations.

             If this value is not known, it should be omitted (rather than specifying a
             possibly incorrect default).

             Examples: "zh-Hant", "ja", "ja-Latn", "en".
        postal_code:
          type: string
          description: >-
            Optional. Postal code of the address. Not all countries use or
            require
             postal codes to be present, but where they are used, they may trigger
             additional validation with other parts of the address (e.g. state/zip
             validation in the U.S.A.).
        sorting_code:
          type: string
          description: >-
            Optional. Additional, country-specific, sorting code. This is not
            used
             in most regions. Where it is used, the value is either a string like
             "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
             alone, representing the "sector code" (Jamaica), "delivery area indicator"
             (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
        administrative_area:
          type: string
          description: >-
            Optional. Highest administrative subdivision which is used for
            postal
             addresses of a country or region.
             For example, this can be a state, a province, an oblast, or a prefecture.
             Specifically, for Spain this is the province and not the autonomous
             community (e.g. "Barcelona" and not "Catalonia").
             Many countries don't use an administrative area in postal addresses. E.g.
             in Switzerland this should be left unpopulated.
        locality:
          type: string
          description: |-
            Optional. Generally refers to the city/town portion of the address.
             Examples: US city, IT comune, UK post town.
             In regions of the world where localities are not well defined or do not fit
             into this structure well, leave locality empty and use address_lines.
        sublocality:
          type: string
          description: |-
            Optional. Sublocality of the address.
             For example, this can be neighborhoods, boroughs, districts.
        address_lines:
          type: array
          items:
            type: string
          description: >-
            Unstructured address lines describing the lower levels of an
            address.

             Because values in address_lines do not have type information and may
             sometimes contain multiple values in a single field (e.g.
             "Austin, TX"), it is important that the line order is clear. The order of
             address lines should be "envelope order" for the country/region of the
             address. In places where this can vary (e.g. Japan), address_language is
             used to make it explicit (e.g. "ja" for large-to-small ordering and
             "ja-Latn" or "en" for small-to-large). This way, the most specific line of
             an address can be selected based on the language.

             The minimum permitted structural representation of an address consists
             of a region_code with all remaining information placed in the
             address_lines. It would be possible to format such an address very
             approximately without geocoding, but no semantic reasoning could be
             made about any of the address components until it was at least
             partially resolved.

             Creating an address only containing a region_code and address_lines, and
             then geocoding is the recommended way to handle completely unstructured
             addresses (as opposed to guessing which parts of the address should be
             localities or administrative areas).
        recipients:
          type: array
          items:
            type: string
          description: |-
            Optional. The recipient at the address.
             This field may, under certain circumstances, contain multiline information.
             For example, it might contain "care of" information.
        organization:
          type: string
          description: Optional. The name of the organization at the address.
      description: >-
        Represents a postal address, e.g. for postal delivery or payments
        addresses.
         Given a postal address, a postal service can deliver items to a premise, P.O.
         Box or similar.
         It is not intended to model geographical locations (roads, towns,
         mountains).

         In typical usage an address would be created via user input or from importing
         existing data, depending on the type of process.

         Advice on address input / editing:
          - Use an i18n-ready address widget such as
            https://github.com/google/libaddressinput)
         - Users should not be presented with UI elements for input or editing of
           fields outside countries where that field is used.

         For more guidance on how to use this schema, please see:
         https://support.google.com/business/answer/6397478
    PublishDraftResponse:
      type: object
      properties:
        rfi:
          allOf:
            - $ref: '#/components/schemas/RFI'
          description: The RFI that was created from the draft.
      description: Response message for the `PublishDraft` method.
    RFI:
      type: object
      properties:
        name:
          type: string
          description: |-
            The resource name of the RFI.

             Format: `scenarios/{scenario}/rfis/{rfi}`
        uid:
          readOnly: true
          type: string
          description: A unique identifier for the RFI, in UUID4 format.
        creator_team:
          type: string
          description: |-
            The resource name of the team that created or initiated the RFI.

             Format: `teams/{team}`
        broker_team:
          type: string
          description: >-
            The resource name of the team that facilitates and coordinates the
            RFI process.

             Format: `teams/{team}`
        current_assignee_team:
          type: string
          description: |-
            The resource name of the team currently assigned to the RFI.
             Note: RFIs are reassigned as a side effect of state transitions and cannot be explicitly reassigned.

             Format: `teams/{team}`
        initial_assignee_team:
          readOnly: true
          type: string
          description: >-
            The resource name of the team that was initially assigned to the
            RFI.

             Format: `teams/{team}`
        input:
          type: object
          description: |-
            Input data used to create the RFI, immutable after creation.

             This field should contain JSON that matches the scenario's input schema.
        create_time:
          readOnly: true
          type: string
          description: Timestamp when the RFI was created.
          format: date-time
        update_time:
          readOnly: true
          type: string
          description: Timestamp when the RFI was last updated.
          format: date-time
        expire_time:
          readOnly: true
          type: string
          description: |-
            Timestamp of when the RFI will expire.

             The expiry time, and whether or not an RFI can expire, is determined by the scenario.

             This field is only set when the RFI is in OPEN state and the scenario specifies an expiry time.
          format: date-time
        state:
          readOnly: true
          enum:
            - STATE_UNSPECIFIED
            - OPEN
            - IN_PROGRESS
            - IN_REVIEW
            - COMPLETE
            - REVOKED
            - EXPIRED
            - REJECTED
          type: string
          description: The current state of the RFI.
          format: enum
        questions:
          readOnly: true
          type: object
          additionalProperties:
            $ref: '#/components/schemas/RFI_Question'
          description: >-
            A map of questions being asked in the RFI, keyed by question
            identifiers.
             Each question contains the expected kind of answer and the current answer if provided.
        display_metadata:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/RFI_DisplayMetadata'
          description: Metadata for display purposes, such as UI rendering instructions.
        annotations:
          type: object
          additionalProperties:
            type: string
          description: |-
            Unstructured key-value pairs that can be used to store and retrieve
             arbitrary metadata related to the RFI.

             Annotations are intended for client-side usage. They are not used by the
             server except for size or character set validation as defined
             in [AIP-148](https://google.aip.dev/148#annotations)
        etag:
          readOnly: true
          type: string
          description: The etag of the RFI, used for optimistic concurrency control.
    RFI_DisplayMetadata:
      type: object
      properties:
        instructions:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/LocalizedText'
          description: Instructions for displaying the RFI, localized as needed.
        groups:
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/DisplayMetadata_Group'
          description: Groups of questions for UI display purposes.
      description: Metadata for display purposes, such as UI rendering instructions.
    RFI_Question:
      type: object
      properties:
        kind:
          enum:
            - KIND_UNSPECIFIED
            - ADDRESS
            - DATE
            - MULTI_FILE
            - TEXT
          type: string
          description: The kind of answer expected for this question.
          format: enum
        answer:
          allOf:
            - $ref: '#/components/schemas/Answer'
          description: |-
            The answer provided for this question.
             Becomes required when the RFI is in IN_REVIEW or COMPLETE state.
        review_state:
          readOnly: true
          enum:
            - REVIEW_STATE_UNSPECIFIED
            - NOT_REQUIRED
            - PENDING
            - APPROVED
            - REJECTED
          type: string
          description: The review state of the answer.
          format: enum
      description: Represents a question within an RFI.
    RejectRFIRequest:
      required:
        - name
        - comment
      type: object
      properties:
        name:
          type: string
          description: |-
            Required. The resource name of the RFI to reject.

             Format: `scenarios/{scenario}/rfis/{rfi}`
        comment:
          type: string
          description: Required. A comment explaining the reason for rejection.
        etag:
          type: string
          description: |-
            Optional. The current ETag of the RFI.

             If provided, and this value does not match the current ETag of the RFI,
             the request will fail and an ABORTED error will be returned.
      description: Request message for the `RejectRFI` method.
    RespondToRFIRequest:
      required:
        - name
        - answers
      type: object
      properties:
        name:
          type: string
          description: |-
            Required. The resource name of the RFI to respond to.

             Format: `scenarios/{scenario}/rfis/{rfi}`
        etag:
          type: string
          description: |-
            Optional. The current ETag of the RFI.

             If provided, and this value does not match the current ETag of the RFI,
             the request will fail and an ABORTED error will be returned.
        answers:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Answer'
          description: |-
            Required. A map of answers keyed by question identifiers.
             The keys must correspond to valid question IDs within the RFI.
      description: Request message for `RespondToRFI` method.
    ReviewRFIRequest:
      required:
        - name
        - reviews
      type: object
      properties:
        name:
          type: string
          description: |-
            Required. The resource name of the RFI to review.

             Format: `scenarios/{scenario}/rfis/{rfi}`
        etag:
          type: string
          description: |-
            Optional. The current ETag of the RFI.

             If provided, and this value does not match the current ETag of the RFI,
             the request will fail and an ABORTED error will be returned.
        reviews:
          type: object
          additionalProperties:
            enum:
              - REVIEW_STATE_UNSPECIFIED
              - NOT_REQUIRED
              - PENDING
              - APPROVED
              - REJECTED
            type: string
            format: enum
          description: >-
            Required. A map of review states for answers, keyed by question
            identifiers.
             The keys must correspond to valid question IDs within the RFI.
      description: Request message for the `ReviewRFI` method.
    RevokeRFIRequest:
      required:
        - name
        - comment
      type: object
      properties:
        name:
          type: string
          description: |-
            Required. The resource name of the RFI to revoke.

             Format: `scenarios/{scenario}/rfis/{rfi}`
        comment:
          type: string
          description: Required. A comment explaining the reason for revocation.
        etag:
          type: string
          description: |-
            Optional. The current ETag of the RFI.

             If provided, and this value does not match the current ETag of the RFI,
             the request will fail and an ABORTED error will be returned.
      description: Request message for `RevokeRFI` method.
    Scenario:
      type: object
      properties:
        name:
          type: string
          description: |-
            The resource name of the scenario.

             Format: `scenarios/{scenario}`
        uid:
          readOnly: true
          type: string
          description: A system-assigned unique identifier for the scenario.
        display_name:
          type: string
          description: A human-readable name for the scenario, for use in user interfaces.
        rfi_ttl:
          pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
          type: string
          description: >-
            The TTL for an RFI based on this scenario, relative to when the RFI
            is
             created.

             If not set, the RFI will not expire.
        rfi_input_json_schema:
          type: object
          description: |-
            The JSON schema that the input for an RFI based on this scenario
             must adhere to.
        annotations:
          type: object
          additionalProperties:
            type: string
          description: |-
            Unstructured key-value pairs that can be used to store and retrieve
             arbitrary metadata related to the scenario.

             Annotations are intended for client-side usage. They are not used by the
             server except for size or character set validation as defined
             in [AIP-148](https://google.aip.dev/148#annotations)
        create_time:
          readOnly: true
          type: string
          description: Timestamp of when the scenario was created.
          format: date-time
        update_time:
          readOnly: true
          type: string
          description: Timestamp of when the scenario was last updated.
          format: date-time
        delete_time:
          readOnly: true
          type: string
          description: Timestamp of when the scenario was deleted.
          format: date-time
        etag:
          readOnly: true
          type: string
          description: The etag of the scenario, used for optimistic concurrency control.
      description: >-
        A Scenario represents a predefined template or setup for creating
        [RFIs][identitii.request.v1alpha.RFI]. It defines the structure, input
        schema, and lifecycle behaviors of RFIs created based on it.
    Status:
      type: object
      properties:
        code:
          type: integer
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
          format: int32
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
        details:
          type: array
          items:
            $ref: '#/components/schemas/GoogleProtobufAny'
          description: >-
            A list of messages that carry the error details.  There is a common
            set of message types for APIs to use.
      description: >-
        The `Status` type defines a logical error model that is suitable for
        different programming environments, including REST APIs and RPC APIs. It
        is used by [gRPC](https://github.com/grpc). Each `Status` message
        contains three pieces of data: error code, error message, and error
        details. You can find out more about this error model and how to work
        with it in the [API Design
        Guide](https://cloud.google.com/apis/design/errors).
    SubmitRFIRequest:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: |-
            Required. The resource name of the RFI to submit.

             Format: `scenarios/{scenario}/rfis/{rfi}`
        etag:
          type: string
          description: |-
            Optional. The current ETag of the RFI.

             If provided, and this value does not match the current ETag of the RFI,
             the request will fail and an ABORTED error will be returned.
      description: Request message for the `SubmitRFI` method.
    Team:
      required:
        - display_name
      type: object
      properties:
        name:
          type: string
          description: |-
            The resource name of the team.

             Format: `teams/{team}`
        uid:
          readOnly: true
          type: string
          description: A system-assigned unique identifier for the team, in UUID4 format.
        display_name:
          type: string
          description: A human-readable name for the team, for use in user interfaces.
        parent_team:
          readOnly: true
          type: string
          description: The resource name of this team's parent.
        annotations:
          type: object
          additionalProperties:
            type: string
          description: |-
            Unstructured key-value pairs that can be used to store and retrieve
             arbitrary metadata related to the team.

             Annotations are intended for client-side usage. They are not used by the
             server except for size or character set validation as defined
             in [AIP-148](https://google.aip.dev/148#annotations)
        create_time:
          readOnly: true
          type: string
          description: Timestamp of when the team was created.
          format: date-time
        update_time:
          readOnly: true
          type: string
          description: Timestamp of when the team was last updated.
          format: date-time
        delete_time:
          readOnly: true
          type: string
          description: Timestamp of when the team was deleted.
          format: date-time
        etag:
          readOnly: true
          type: string
          description: The etag of the team, used for optimistic concurrency control.
    UndeleteDraftRequest:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: |-
            Required. The resource name of the deleted draft.

             Format: `scenarios/{scenario}/drafts/{draft}`
        etag:
          type: string
          description: |-
            Optional. The current ETag of the draft.

             If provided, and this value does not match the current ETag of the draft,
             the request will fail and an ABORTED error will be returned.
      description: Request message for the `UndeleteDraft` method.
    UndeleteRFIRequest:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: |-
            Required. The resource name of the deleted RFI.

             Format: `scenarios/{scenario}/rfis/{rfi}`
        etag:
          type: string
          description: |-
            Optional. The current ETag of the RFI.

             If provided, and this value does not match the current ETag of the RFI,
             the request will fail and an ABORTED error will be returned.
      description: Request message for the `UndeleteRFI` method.
    UndeleteScenarioRequest:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: |-
            Required. The resource name of the deleted team.

             Format: `scenarios/{scenario}`
        etag:
          type: string
          description: |-
            Optional. The current ETag of the scenario.

             If provided, and this value does not match the current ETag of the scenario,
             the request will fail and an ABORTED error will be returned.
      description: Request message for the `UndeleteScenario` method.
    UndeleteTeamRequest:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: |-
            Required. The resource name of the deleted team.

             Format: `teams/{team}`
        etag:
          type: string
          description: |-
            Optional. The current ETag of the team.

             If provided, and this value does not match the current ETag of the team,
             the request will fail and an ABORTED error will be returned.
      description: Request message for the `UndeleteTeam` method.
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
security:
  - Bearer: []
tags:
  - name: AuthenticationService
  - name: DraftService
  - name: RFIService
  - name: ScenarioService
  - name: TeamService
