> ## Documentation Index
> Fetch the complete documentation index at: https://seam-feat-mintlify-migration-iteration.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Updating an Access Grant

> Learn how to update the time window for an Access Grant

You can update the starting and ending times for an Access Grant.

Note that you cannot update the access methods, entrances, or spaces associated with an Access Grant. To change these access characteristics, delete the Access Grant and recreate it.

<Tabs>
  <Tab title="JavaScript">
    **Code:**

    ```javascript theme={null}
    await seam.accessGrants.update({
      access_grant_id: '4ec65722-bf38-4b2f-b4c8-f488aa6ba3f1',
      starts_at: '2025-06-19T18:01:32.000Z',
      ends_at: '2025-06-22T13:24:50.000Z',
    })
    ```

    **Output:**

    ```javascript theme={null}
    // void
    ```
  </Tab>

  <Tab title="cURL">
    **Code:**

    ```curl theme={null}
    curl --include --request POST "https://connect.getseam.com/access_grants/update" \
      --header "Authorization: Bearer $SEAM_API_KEY" \
      --json @- <<EOF
    {
      "access_grant_id": "4ec65722-bf38-4b2f-b4c8-f488aa6ba3f1",
      "starts_at": "2025-06-19T18:01:32.000Z",
      "ends_at": "2025-06-22T13:24:50.000Z"
    }
    EOF
    ```

    **Output:**

    ```curl theme={null}
    {}
    ```
  </Tab>

  <Tab title="Python">
    **Code:**

    ```python theme={null}
    seam.access_grants.update(
        access_grant_id="4ec65722-bf38-4b2f-b4c8-f488aa6ba3f1",
        starts_at="2025-06-19T18:01:32.000Z",
        ends_at="2025-06-22T13:24:50.000Z",
    )
    ```

    **Output:**

    ```python theme={null}
    None
    ```
  </Tab>

  <Tab title="Ruby">
    **Code:**

    ```ruby theme={null}
    seam.access_grants.update(
      access_grant_id: "4ec65722-bf38-4b2f-b4c8-f488aa6ba3f1",
      starts_at: "2025-06-19T18:01:32.000Z",
      ends_at: "2025-06-22T13:24:50.000Z",
    )
    ```

    **Output:**

    ```ruby theme={null}
    nil
    ```
  </Tab>

  <Tab title="PHP">
    **Code:**

    ```php theme={null}
    $seam->access_grants->update(
        access_grant_id: "4ec65722-bf38-4b2f-b4c8-f488aa6ba3f1",
        starts_at: "2025-06-19T18:01:32.000Z",
        ends_at: "2025-06-22T13:24:50.000Z"
    );
    ```

    **Output:**

    ```php theme={null}
    ```
  </Tab>

  <Tab title="C#">
    **Code:**

    ```csharp theme={null}
    // Coming Soon!
    ```

    **Output:**

    ```json theme={null}
    // Coming Soon!
    ```
  </Tab>
</Tabs>

***

## Updating Cards

If you update an Access Grant that includes a card access method, the `access_method.card_encoding_required` event indicates that you must [re-encode the card](../../low-level-apis/access-systems/working-with-card-encoders-and-scanners/creating-and-encoding-card-access-methods) using the same access method. After you re-encode the card, Seam emits an `access_method.reissued` event.

You can also view the `is_encoding_required`, `is_issued`, and `issued_at` properties of the affected access method.

***

## Updating Mobile Keys

If you update an Access Grant that includes a mobile key access method, Seam emits an `access_method.reissued` event.

You can also view the `is_issued` and `issued_at` properties of the affected access method.
