> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opal.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Put resources reviewer stages

> Sets the list of reviewer stages for a resource.



## OpenAPI

````yaml https://app.opal.dev/openapi.yaml put /resources/{resource_id}/reviewer-stages
openapi: 3.1.0
info:
  contact:
    email: hello@opal.dev
    name: Opal Team
    url: https://www.opal.dev/
  description: >-
    The Opal API is a RESTful API that allows you to interact with the Opal
    Security platform programmatically.
  title: Opal API
  version: '1.0'
servers:
  - description: Production
    url: https://api.opal.dev/v1
security: []
tags:
  - name: access-rules
    description: Operations related to access rules
  - name: apps
    description: Operations related to apps
  - name: bundles
    description: Operations related to bundles
  - name: campaigns
    description: Operations related to access review campaigns
  - name: configuration-templates
    description: Operations related to configuration templates
  - name: delegations
    description: Operations related to request reviewer delegations
  - name: event-streams
    description: Operations related to event streaming connections
  - name: events
    description: Operations related to events
  - name: groups
    description: Operations related to groups
  - name: group-bindings
    description: Operations related to group bindings
  - name: idp-group-mappings
    description: Operations related to IDP group mappings
  - name: message-channels
    description: Operations related to message channels
  - name: non-human-identities
    description: Operations related to non-human identities
  - name: on-call-schedules
    description: Operations related to on-call schedules
  - name: opal-queries
    description: Operations related to OpalQuery
  - name: owners
    description: Operations related to owners
  - name: requests
    description: Operations related to requests
  - name: resources
    description: Operations related to resources
  - name: paladin
    description: Operations related to Paladin
  - name: sessions
    description: Operations related to sessions
  - name: tags
    description: Operations related to tags
  - name: tokens
    description: Operations related to API tokens
  - name: uars
    description: Operations related to UARs. Deprecated in favor of the `campaigns` API.
  - name: users
    description: Operations related to users
paths:
  /resources/{resource_id}/reviewer-stages:
    put:
      tags:
        - resources
      description: Sets the list of reviewer stages for a resource.
      operationId: set_resource_reviewer_stages
      parameters:
        - description: The ID of the resource.
          example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
          explode: false
          in: path
          name: resource_id
          required: true
          schema:
            type: string
            format: uuid
          style: simple
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewerStageList'
      responses:
        '200':
          content:
            application/json:
              schema:
                description: A list of reviewer stages.
                items:
                  $ref: '#/components/schemas/ReviewerStage'
                type: array
          description: The updated reviewer stages for this resource.
      security:
        - BearerAuth: []
components:
  schemas:
    ReviewerStageList:
      properties:
        stages:
          description: A list of reviewer stages.
          items:
            $ref: '#/components/schemas/ReviewerStage'
          type: array
      type: object
      required:
        - stages
    ReviewerStage:
      description: A reviewer stage.
      example:
        owner_ids:
          - 7870617d-e72a-47f5-a84c-693817ab4567
          - 1520617d-e72a-47f5-a84c-693817ab48ad2
        service_user_ids:
          - 7870617d-e72a-47f5-a84c-693817ab4568
      properties:
        require_manager_approval:
          description: Whether this reviewer stage should require manager approval.
          example: false
          type: boolean
        require_admin_approval:
          description: Whether this reviewer stage should require admin approval.
          example: false
          type: boolean
        operator:
          description: >-
            The operator of the reviewer stage. Admin and manager approval are
            also treated as reviewers. A stage that sets `escalation` must use
            `OR`; `AND` is rejected there, because the escalation timer joins
            the stage as an additional reviewer and would otherwise become a
            required approver that stalls every request until the timeout.
          enum:
            - AND
            - OR
          example: AND
          type: string
        owner_ids:
          description: The IDs of owners assigned as reviewers for this stage.
          items:
            type: string
            format: uuid
          type: array
        service_user_ids:
          description: The IDs of service users assigned as reviewers for this stage.
          items:
            type: string
            format: uuid
          type: array
        escalation:
          $ref: '#/components/schemas/ReviewerStageEscalation'
      type: object
      required:
        - operator
        - require_manager_approval
        - owner_ids
    ReviewerStageEscalation:
      description: |-
        Escalation for a reviewer stage. When set, the request advances to the
        reviewers named here if nobody responds within delay_minutes. Timely
        approval by any of the stage's own reviewers resolves the stage without
        escalating.

        owner_ids and user_ids name only who to escalate to; the stage's own
        reviewers are added automatically and must not be repeated here. A
        stage with owner_ids [X] escalating to Y sets escalation.owner_ids to
        [Y], and reviewing after escalation is then open to both X and Y.

        Because the stage's reviewers are unioned in rather than copied,
        removing someone from the stage also removes them from the escalation.
        At least one owner or user named here must not already be a reviewer
        of the stage.
      example:
        delay_minutes: 60
        owner_ids:
          - 7870617d-e72a-47f5-a84c-693817ab4569
      properties:
        delay_minutes:
          description: >-
            How long to wait for a response before escalating, in minutes.
            Between 1 and 1440 (24 hours).
          example: 60
          minimum: 1
          maximum: 1440
          type: integer
        owner_ids:
          description: >-
            The owners to escalate to. The stage's own owner_ids are added
            automatically and must not be repeated here.
          items:
            type: string
            format: uuid
          type: array
        user_ids:
          description: >-
            The users to escalate to. The stage's own service_user_ids are added
            automatically and must not be repeated here.
          items:
            type: string
            format: uuid
          type: array
      type: object
      required:
        - delay_minutes
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.