# Update a Device

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

Updates a specified [device](https://docs.seam.co/latest/core-concepts/devices).

You can add or change [custom metadata](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://docs.seam.co/latest/core-concepts/devices/managed-and-unmanaged-devices).

{% tabs %}
{% tab title="JavaScript" %}
Updates a specified device.

**Code:**

```javascript
await seam.devices.update({
  device_id: "ccfab465-4838-4ff3-af62-97c78e8bf44b",
  name: "My Updated Device",
  is_managed: true,
  custom_metadata: { id: "internalId1" },
});
```

**Output:**

```javascript
// void
```

{% endtab %}

{% tab title="cURL" %}
Updates a specified device.

**Code:**

```curl
curl --include --request POST "https://connect.getseam.com/devices/update" \
  --header "Authorization: Bearer $SEAM_API_KEY" \
  --json @- <<EOF
{
  "device_id": "ccfab465-4838-4ff3-af62-97c78e8bf44b",
  "name": "My Updated Device",
  "is_managed": true,
  "custom_metadata": {
    "id": "internalId1"
  }
}
EOF
```

**Output:**

```curl
{}
```

{% endtab %}

{% tab title="Python" %}
Updates a specified device.

**Code:**

```python
seam.devices.update(
    device_id="ccfab465-4838-4ff3-af62-97c78e8bf44b",
    name="My Updated Device",
    is_managed=true,
    custom_metadata={"id": "internalId1"},
)
```

**Output:**

```python
None
```

{% endtab %}

{% tab title="Ruby" %}
Updates a specified device.

**Code:**

```ruby
seam.devices.update(
  device_id: "ccfab465-4838-4ff3-af62-97c78e8bf44b",
  name: "My Updated Device",
  is_managed: true,
  custom_metadata: {
    id: "internalId1",
  },
)
```

**Output:**

```ruby
nil
```

{% endtab %}

{% tab title="PHP" %}
Updates a specified device.

**Code:**

```php
$seam->devices->update(
    device_id: "ccfab465-4838-4ff3-af62-97c78e8bf44b",
    name: "My Updated Device",
    is_managed: true,
    custom_metadata: ["id" => "internalId1"],
);
```

**Output:**

```php
```

{% endtab %}

{% tab title="Seam CLI" %}
Updates a specified device.

**Code:**

```seam_cli
seam devices update --device_id "ccfab465-4838-4ff3-af62-97c78e8bf44b" --name "My Updated Device" --is_managed true --custom_metadata {"id":"internalId1"}
```

**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

**`device_id`** *String* (Required)

ID of the device that you want to update.

***

**`custom_metadata`** *Object*

Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs. [Adding custom metadata to a device](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter devices by the desired metadata](https://docs.seam.co/latest/core-concepts/devices/filtering-devices-by-custom-metadata).

***

**`is_managed`** *Boolean*

Indicates whether the device is managed. To unmanage a device, set `is_managed` to `false`.

***

**`name`** *String*

Name for the device.

***

**`properties`** *Object*

<details>

<summary><code>name</code> <em>String</em></summary>

Name for the device.

</details>

***

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