> ## 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.

# Set app visibility

> Sets the visibility of this app. Preferred over setting
`visibility` / `visibility_group_ids` / `import_visibility` inline on
`POST /apps` or `PATCH /apps/{app_id}` for drift-sensitive callers
(Terraform, GitOps). Semantics are a replace, not a merge:
`visibility_group_ids` is written to exactly what the request sends
(an omitted or empty array clears all groups), and `import_visibility`
is updated only when present.



## OpenAPI

````yaml https://app.opal.dev/openapi.yaml put /apps/{app_id}/visibility
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: agent-activity
    description: Operations related to agent activity telemetry
  - 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: opal-scripts
    description: Operations related to OpalScripts
  - name: owners
    description: Operations related to owners
  - name: requests
    description: Operations related to requests
  - name: resources
    description: Operations related to resources
  - name: role-assignments
    description: >-
      Operations related to role assignments (general grants between an entity
      and a principal)
  - name: paladin
    description: Operations related to Paladin
  - name: service-users
    description: Operations related to service users (non-human identities owned by a team)
  - 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:
  /apps/{app_id}/visibility:
    put:
      tags:
        - apps
      summary: Set app visibility
      description: |-
        Sets the visibility of this app. Preferred over setting
        `visibility` / `visibility_group_ids` / `import_visibility` inline on
        `POST /apps` or `PATCH /apps/{app_id}` for drift-sensitive callers
        (Terraform, GitOps). Semantics are a replace, not a merge:
        `visibility_group_ids` is written to exactly what the request sends
        (an omitted or empty array clears all groups), and `import_visibility`
        is updated only when present.
      operationId: setAppVisibility
      parameters:
        - description: The ID of the app.
          example: 32acc112-21ff-4669-91c2-21e27683eaa1
          explode: false
          in: path
          name: app_id
          required: true
          schema:
            type: string
            format: uuid
          style: simple
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppVisibilityInfo'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVisibilityInfo'
          description: The updated visibility info of this app.
        '400':
          description: |
            Invalid request body or app state. Returned for any of:
            a malformed JSON body, an unknown field, an invalid `visibility`
            or `import_visibility` enum value, a `visibility_group_ids` entry
            that does not resolve to a group in the caller's org, a
            `visibility_group_ids` value that is non-empty while the effective
            `visibility` is `GLOBAL` (either sent on this request or already
            stored on the app), or an app whose type does not support
            visibility writes (only `CUSTOM` and `CUSTOM_CONNECTOR` do).
        '403':
          description: The caller is not authorized to edit this app's visibility.
        '404':
          description: The app was not found.
      security:
        - BearerAuth: []
components:
  schemas:
    AppVisibilityInfo:
      description: |-
        Visibility information for an app. Mirrors `VisibilityInfo` but adds
        the App-specific `import_visibility`, which governs the default
        visibility of items imported from the app.
      example:
        visibility: LIMITED
        visibility_group_ids:
          - 7870617d-e72a-47f5-a84c-693817ab4567
          - 1520617d-e72a-47f5-a84c-693817ab48ad
        import_visibility: LIMITED
      properties:
        visibility:
          $ref: '#/components/schemas/VisibilityTypeEnum'
        visibility_group_ids:
          description: >-
            The IDs of groups that can see this app when visibility is
            `LIMITED`.

            Must be empty when visibility is `GLOBAL`.
          items:
            type: string
            format: uuid
          type: array
        import_visibility:
          $ref: '#/components/schemas/VisibilityTypeEnum'
          description: |-
            The visibility of items imported from this app. Defaults to
            `GLOBAL` when omitted on a write.
      type: object
      required:
        - visibility
    VisibilityTypeEnum:
      description: The visibility level of the entity.
      enum:
        - GLOBAL
        - LIMITED
      example: GLOBAL
      type: string
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````

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