# Updating 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
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
// void
```

{% endtab %}

{% tab title="cURL" %}
**Code:**

```curl
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
{}
```

{% endtab %}

{% tab title="Python" %}
**Code:**

```python
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
None
```

{% endtab %}

{% tab title="Ruby" %}
**Code:**

```ruby
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
nil
```

{% endtab %}

{% tab title="PHP" %}
**Code:**

```php
$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
```

{% endtab %}

{% tab title="C#" %}
**Code:**

```csharp
// Coming Soon!
```

**Output:**

```json
// Coming Soon!
```

{% endtab %}
{% endtabs %}

***

## 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](/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners/creating-and-encoding-card-access-methods.md) 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seam.co/latest/capability-guides/access-grants/updating-an-access-grant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
