# Update an Unmanaged Access Code

* [Request Parameters](#request-parameters)
* [Response](#response)

Updates a specified [unmanaged access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/migrating-existing-access-codes).

{% tabs %}
{% tab title="JavaScript" %}
Updates a specified unmanaged access code.

**Code:**

```javascript
await seam.accessCodes.unmanaged.update({
  access_code_id: "ebd8e488-db1b-4f4b-9d02-489fbfa6829a",
  is_managed: true,
  is_external_modification_allowed: true,
  force: true,
});
```

**Output:**

```javascript
// void
```

{% endtab %}

{% tab title="cURL" %}
Updates a specified unmanaged access code.

**Code:**

```curl
curl --include --request POST "https://connect.getseam.com/access_codes/unmanaged/update" \
  --header "Authorization: Bearer $SEAM_API_KEY" \
  --json @- <<EOF
{
  "access_code_id": "ebd8e488-db1b-4f4b-9d02-489fbfa6829a",
  "is_managed": true,
  "is_external_modification_allowed": true,
  "force": true
}
EOF
```

**Output:**

```curl
{}
```

{% endtab %}

{% tab title="Python" %}
Updates a specified unmanaged access code.

**Code:**

```python
seam.access_codes.unmanaged.update(
    access_code_id="ebd8e488-db1b-4f4b-9d02-489fbfa6829a",
    is_managed=true,
    is_external_modification_allowed=true,
    force=true,
)
```

**Output:**

```python
None
```

{% endtab %}

{% tab title="Ruby" %}
Updates a specified unmanaged access code.

**Code:**

```ruby
seam.access_codes.unmanaged.update(
  access_code_id: "ebd8e488-db1b-4f4b-9d02-489fbfa6829a",
  is_managed: true,
  is_external_modification_allowed: true,
  force: true,
)
```

**Output:**

```ruby
nil
```

{% endtab %}

{% tab title="PHP" %}
Updates a specified unmanaged access code.

**Code:**

```php
$seam->access_codes->unmanaged->update(
    access_code_id: "ebd8e488-db1b-4f4b-9d02-489fbfa6829a",
    is_managed: true,
    is_external_modification_allowed: true,
    force: true,
);
```

**Output:**

```php
```

{% endtab %}

{% tab title="Seam CLI" %}
Updates a specified unmanaged access code.

**Code:**

```seam_cli
seam access-codes unmanaged update --access_code_id "ebd8e488-db1b-4f4b-9d02-489fbfa6829a" --is_managed true --is_external_modification_allowed true --force true
```

**Output:**

```seam_cli
{}
```

{% endtab %}
{% endtabs %}

<details>

<summary>Authentication Methods</summary>

* API key
* Client session token
* Personal access token\
  Must also include the `seam-workspace` header in the request.

To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication).

</details>

## Request Parameters

**`access_code_id`** *String* (Required)

ID of the unmanaged access code that you want to update.

***

**`is_managed`** *Boolean* (Required)

***

**`allow_external_modification`** *Boolean*

Indicates whether [external modification](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes#external-modification) of the code is allowed.

***

**`force`** *Boolean*

Indicates whether to force the unmanaged access code update.

***

**`is_external_modification_allowed`** *Boolean*

Indicates whether [external modification](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes#external-modification) of the code is allowed.

***

## Response

{% hint style="success" %}
Returns: **void**
{% endhint %}


---

# 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/api/access_codes/unmanaged/update.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.
