# How to upgrade bucket of old devices?

**URL:** <https://community.tago.io/t/how-to-upgrade-bucket-of-old-devices/1167>\
**Category:** Devices and Connectors\
**Created:** [May 30, 2022, 12:43pm UTC](https://community.tago.io/t/how-to-upgrade-bucket-of-old-devices/1167 "2022-05-30T12:43:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![douglas.zuqueto](https://yyz2.discourse-cdn.com/flex034/user_avatar/community.tago.io/douglas.zuqueto/32/11_2.png) [@douglas.zuqueto](https://community.tago.io/u/douglas.zuqueto)\
**Post date:** [May 30, 2022, 12:43pm UTC](https://community.tago.io/t/how-to-upgrade-bucket-of-old-devices/1167/1 "2022-05-30T12:43:09Z")

</div>

Hi,

How to update the old devices bucket without having to remove and re-add the device?

---

<div class="post-metadata">

**Author:** ![eger](https://yyz2.discourse-cdn.com/flex034/user_avatar/community.tago.io/eger/32/10_2.png) [@eger](https://community.tago.io/u/eger)\
**Post date:** [May 31, 2022, 1:33pm UTC](https://community.tago.io/t/how-to-upgrade-bucket-of-old-devices/1167/2 "2022-05-31T13:33:28Z")

</div>

Hi Douglas,

Are you using legacy devices? If yes, make a PUT in your device by editing the bucket id field. It will change the bucket of your device.

PUT /device

{ bucket: “new\_bucket\_id” }

NOTE: This only works for legacy devices.

---

<div class="post-metadata">

**Author:** ![douglas.zuqueto](https://yyz2.discourse-cdn.com/flex034/user_avatar/community.tago.io/douglas.zuqueto/32/11_2.png) [@douglas.zuqueto](https://community.tago.io/u/douglas.zuqueto)\
**Post date:** [May 31, 2022, 5:32pm UTC](https://community.tago.io/t/how-to-upgrade-bucket-of-old-devices/1167/3 "2022-05-31T17:32:58Z")

</div>

Hi Fabiano

So I have some legacy devices (bucket as well), and I wanted to upgrade those devices to immutable bucket.

When trying to update the device to an immutable bucket, I get the error:

**Request:**

```auto
{
"bucket": "62964f5874a7f00011b9ecef"
}

```

**Response:**

```auto
{
"status": false,
"message": "This is a legacy device, you can only select a legacy bucket"
}

```

---

<div class="post-metadata">

**Author:** ![vitorfdl](https://yyz2.discourse-cdn.com/flex034/user_avatar/community.tago.io/vitorfdl/32/1728_2.png) [@vitorfdl](https://community.tago.io/u/vitorfdl)\
**Post date:** [May 31, 2022, 6:59pm UTC](https://community.tago.io/t/how-to-upgrade-bucket-of-old-devices/1167/4 "2022-05-31T18:59:52Z")

</div>

Hey Douglas,

You can’t update Legacy Buckets to Immutable/Mutable by yourself. The only way is by removing the device and adding it back, and you need to reinsert the data you already have in the old bucket.

If keeping your data/token is important for your application, you may want to consider contacting TagoIO support by opening a ticket. Notice that migration through the support system is only available for starter and scale account.

---

<div class="post-metadata">

**Author:** ![douglas.zuqueto](https://yyz2.discourse-cdn.com/flex034/user_avatar/community.tago.io/douglas.zuqueto/32/11_2.png) [@douglas.zuqueto](https://community.tago.io/u/douglas.zuqueto)\
**Post date:** [June 1, 2022, 7:42am UTC](https://community.tago.io/t/how-to-upgrade-bucket-of-old-devices/1167/5 "2022-06-01T07:42:23Z")

</div>

Perfect Vitor.

My fear was just needing to re-register the device, and thus lose your token.

I will open a ticket on my company profile.

Thank you for your support.

---

<div class="post-metadata">

**Author:** ![vitorfdl](https://yyz2.discourse-cdn.com/flex034/user_avatar/community.tago.io/vitorfdl/32/1728_2.png) [@vitorfdl](https://community.tago.io/u/vitorfdl)\
**Post date:** [June 21, 2022, 2:52pm UTC](https://community.tago.io/t/how-to-upgrade-bucket-of-old-devices/1167/6 "2022-06-21T14:52:37Z")

</div>

A new API route is now available for converting devices:

> **[Convert Device Type | TagoIO Docs](https://docs.tago.io/docs/api/convert-device-type)**
>
> Convert the device immutable or mutable.

---

<div class="post-metadata">

**Author:** ![douglas.zuqueto](https://yyz2.discourse-cdn.com/flex034/user_avatar/community.tago.io/douglas.zuqueto/32/11_2.png) [@douglas.zuqueto](https://community.tago.io/u/douglas.zuqueto)\
**Post date:** [June 21, 2022, 10:48pm UTC](https://community.tago.io/t/how-to-upgrade-bucket-of-old-devices/1167/7 "2022-06-21T22:48:32Z")

</div>

Great Victor.

I did the tests here, and it was 100%!

---

<div class="post-metadata">

**Author:** ![vitorfdl](https://yyz2.discourse-cdn.com/flex034/user_avatar/community.tago.io/vitorfdl/32/1728_2.png) [@vitorfdl](https://community.tago.io/u/vitorfdl)\
**Post date:** [June 23, 2022, 11:09am UTC](https://community.tago.io/t/how-to-upgrade-bucket-of-old-devices/1167/8 "2022-06-23T11:09:26Z")

</div>

Hey Douglas,

Great to know! We quickly understand how bad is to lose your token or device ID, so I think this new route will help in many situations.

Hopefully we can add this option as button in the bucket’s page soon.
