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

# Update scheduled grant

> Sets when a pending scheduled grant starts and how long its access lasts. Requires permission to edit the assignments of the grant's resource or group. Only grants added directly by an admin can be updated; a grant created by approving a request keeps its approved window, so cancel the request and submit a new one instead.



## OpenAPI

````yaml https://app.opal.dev/openapi.yaml put /scheduled-grants/{id}
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/{id}:
    put:
      tags:
        - scheduled-grants
      summary: Update scheduled grant
      description: >-
        Sets when a pending scheduled grant starts and how long its access
        lasts. Requires permission to edit the assignments of the grant's
        resource or group. Only grants added directly by an admin can be
        updated; a grant created by approving a request keeps its approved
        window, so cancel the request and submit a new one instead.
      operationId: updateScheduledGrant
      parameters:
        - description: The ID of the scheduled grant to update.
          in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateScheduledGrantInfo'
      responses:
        '200':
          description: The updated scheduled grant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledGrant'
        '400':
          description: >-
            The grant was created from a request, `start_at` is not in the
            future, `duration_minutes` is out of range, or scheduled access
            requests are not enabled for your organization.
        '403':
          description: >-
            The caller cannot edit the assignments of the grant's resource or
            group.
        '404':
          description: >-
            The scheduled grant was not found, or has already been activated or
            canceled.
      security:
        - BearerAuth: []
components:
  schemas:
    UpdateScheduledGrantInfo:
      description: When a scheduled grant starts and how long its access lasts.
      properties:
        start_at:
          description: When access should begin. Must be in the future.
          example: '2026-12-01T17:00:00.000Z'
          format: date-time
          type: string
        duration_minutes:
          description: >-
            How long access lasts after `start_at`. Omit (or send `0`) for
            access that does not expire.
          example: 60
          minimum: 0
          maximum: 153722867
          type: integer
      required:
        - start_at
      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
    ScheduledGrantStatusEnum:
      description: The status of a scheduled grant.
      enum:
        - PENDING
        - FAILED
      example: PENDING
      type: string
    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.