# API call to flash tinker?

**URL:** <https://community.particle.io/t/api-call-to-flash-tinker/70308>\
**Category:** Firmware\
**Tags:** electron\
**Created:** [August 19, 2025, 7:46pm UTC](https://community.particle.io/t/api-call-to-flash-tinker/70308 "2025-08-19T19:46:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Punkster81](https://avatars.discourse-cdn.com/v4/letter/p/50afbb/32.png) [@Punkster81](https://community.particle.io/u/Punkster81)\
**Post date:** [August 19, 2025, 7:46pm UTC](https://community.particle.io/t/api-call-to-flash-tinker/70308/1 "2025-08-19T19:46:57Z")

</div>

Is there a method to flash tinker through an api call? were trying to achieve a method to potentially save us wireless publishes if the device gets stuck boot looping.

---

<div class="post-metadata">

**Author:** ![no1089](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/no1089/32/24051_2.png) [@no1089](https://community.particle.io/u/no1089)\
**Post date:** [August 19, 2025, 7:51pm UTC](https://community.particle.io/t/api-call-to-flash-tinker/70308/2 "2025-08-19T19:51:40Z")

</div>

That’s not something we’d recommend automating, but yes, the API can flash binaries.  
There is no direct way to flash Tinker, but you can compile a binary and use [https://docs.particle.io/reference/cloud-apis/api/#flash-a-device-with-a-pre-compiled-binary](https://docs.particle.io/reference/cloud-apis/api/#flash-a-device-with-a-pre-compiled-binary) to then flash it.

---

<div class="post-metadata">

**Author:** ![Punkster81](https://avatars.discourse-cdn.com/v4/letter/p/50afbb/32.png) [@Punkster81](https://community.particle.io/u/Punkster81)\
**Post date:** [August 19, 2025, 7:58pm UTC](https://community.particle.io/t/api-call-to-flash-tinker/70308/3 "2025-08-19T19:58:49Z")

</div>

What would be a recommended solution to this then? primarily were worried about outside device messages causing issues with unexpected responses (wrong data type/failed conversions) causing panics over and over, we have a fail safe for waiting and trying again in 10 minutes right now, however another level of failsafe would be nice to prevent constant retries for hours on end. Also, other things that didn’t allow our prevention methods time to interfere have happened, though were not quite sure what they were

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [August 19, 2025, 8:43pm UTC](https://community.particle.io/t/api-call-to-flash-tinker/70308/4 "2025-08-19T20:43:37Z")

</div>

You should use enterSafeMode from the device. See

> [@Verify a "Good" Firmware Update - User Code](https://community.particle.io/t/verify-a-good-firmware-update-user-code/69522/2):
>
> This is not a feature of Device OS, but you could add a feature to your user firmware fairly easily. You store a flag and a counter in EEPROM or the file system. It could be in retained memory on Gen 3 and earlier, but that won't work right for this code on Gen 4 (P2, Photon 2, M-SoM). You clear the successful boot flag at the very beginning of setup, and set it sometime later from loop, like 3 minutes after boot. You can use the millis() counter to check, which resets to 0 on system reset. Al…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/3/2/3291e3c9351789fe8620ae5bcec8d3fec67ff221.png) [@system](https://community.particle.io/u/system)\
**Post date:** [February 18, 2026, 8:44am UTC](https://community.particle.io/t/api-call-to-flash-tinker/70308/5 "2026-02-18T08:44:32Z")

</div>

Closed on February 18, 2026, 8:44am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
