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

# List scheduled grants

> Returns the pending and failed scheduled grants for one resource, group, or user, oldest start first. A scheduled grant is approved access that is waiting for its start time; the recipient has no access until then. Set exactly one of `resource_id`, `group_id`, or `user_id`. Listing a resource's or group's grants requires read access to its assignments; listing a user's grants requires being that user or an admin. Returns an empty list when scheduled access requests are not enabled for your organization.



## OpenAPI

````yaml https://app.opal.dev/openapi.yaml get /scheduled-grants
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: favorites
    description: Operations related to the current user's favorites
  - 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: idp-user-attribute-mappings
    description: >-
      Operations related to the user attributes Opal imports from identity
      providers and HRIS apps
  - name: ip-acl
    description: >-
      Operations related to the API IP allowlist (IP zones and its enforcement
      setting)
  - 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: scheduled-grants
    description: >-
      Operations related to scheduled grants (approved access waiting for its
      start time)
  - 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:
  /scheduled-grants:
    get:
      tags:
        - scheduled-grants
      summary: List scheduled grants
      description: >-
        Returns the pending and failed scheduled grants for one resource, group,
        or user, oldest start first. A scheduled grant is approved access that
        is waiting for its start time; the recipient has no access until then.
        Set exactly one of `resource_id`, `group_id`, or `user_id`. Listing a
        resource's or group's grants requires read access to its assignments;
        listing a user's grants requires being that user or an admin. Returns an
        empty list when scheduled access requests are not enabled for your
        organization.
      operationId: getScheduledGrants
      parameters:
        - description: List the grants for this resource.
          in: query
          name: resource_id
          required: false
          schema:
            type: string
            format: uuid
        - description: List the grants for this group.
          in: query
          name: group_id
          required: false
          schema:
            type: string
            format: uuid
        - description: List the grants this user will receive.
          in: query
          name: user_id
          required: false
          schema:
            type: string
            format: uuid
        - description: Only return grants with this status. Omit to return both.
          in: query
          name: status
          required: false
          schema:
            $ref: '#/components/schemas/ScheduledGrantStatusEnum'
        - description: Only return grants created this way. Omit to return both.
          in: query
          name: method
          required: false
          schema:
            $ref: '#/components/schemas/ScheduledGrantMethodEnum'
        - description: The pagination cursor value.
          example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
          in: query
          name: cursor
          required: false
          schema:
            type: string
        - description: Number of results to return per page. Default is 50.
          example: 50
          in: query
          name: page_size
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 200
      responses:
        '200':
          description: A page of scheduled grants.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedScheduledGrantsList'
        '400':
          description: >-
            Not exactly one of `resource_id`, `group_id`, or `user_id` is set,
            or the cursor is invalid.
        '403':
          description: The caller cannot view the grants for this resource, group, or user.
      security:
        - BearerAuth: []
components:
  schemas:
    ScheduledGrantStatusEnum:
      description: The status of a scheduled grant.
      enum:
        - PENDING
        - FAILED
      example: PENDING
      type: string
    ScheduledGrantMethodEnum:
      description: >-
        How a scheduled grant was created. REQUEST grants come from approving an
        access request; MANUAL grants were added directly by an admin.
      enum:
        - REQUEST
        - MANUAL
      example: REQUEST
      type: string
    PaginatedScheduledGrantsList:
      description: A page of scheduled grants.
      properties:
        next:
          description: The cursor for the next page. Null when there are no more pages.
          nullable: true
          type: string
        results:
          items:
            $ref: '#/components/schemas/ScheduledGrant'
          type: array
      required:
        - results
      type: object
    ScheduledGrant:
      description: >-
        Approved access waiting for its start time. The recipient has no access
        until `start_at`.
      properties:
        id:
          description: The ID of the scheduled grant.
          format: uuid
          type: string
        status:
          $ref: '#/components/schemas/ScheduledGrantStatusEnum'
        start_at:
          description: When access is scheduled to begin.
          example: '2026-12-01T17:00:00.000Z'
          format: date-time
          type: string
        expiration:
          description: >-
            When the granted access expires. Null if it does not expire or if
            `duration_minutes` sets it.
          format: date-time
          type: string
        duration_minutes:
          description: >-
            How long access lasts after `start_at`. Null if the access does not
            expire.
          type: integer
        principal_id:
          description: The ID of the user or group that will receive access.
          format: uuid
          type: string
        principal_type:
          $ref: '#/components/schemas/EntityTypeEnum'
        entity_id:
          description: The ID of the resource or group the access is for.
          format: uuid
          type: string
        entity_type:
          $ref: '#/components/schemas/EntityTypeEnum'
        access_level_remote_id:
          description: The remote ID of the access level being granted.
          type: string
        request_id:
          description: >-
            The access request this grant was created from. Null for grants an
            admin added directly.
          format: uuid
          type: string
        created_by_user_id:
          description: >-
            The requester for grants created from a request, or the admin who
            added the grant.
          format: uuid
          type: string
        failed_at:
          description: >-
            When provisioning permanently failed. Null unless `status` is
            FAILED.
          format: date-time
          type: string
        failed_reason:
          description: Why provisioning permanently failed. Null unless `status` is FAILED.
          type: string
      required:
        - id
        - status
        - start_at
      type: object
    EntityTypeEnum:
      description: The type of an entity.
      enum:
        - GROUP
        - RESOURCE
        - USER
      example: GROUP
      type: string
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````

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