# Using the Node-RED API

**URL:** <https://discourse.nodered.org/t/using-the-node-red-api/101535>\
**Category:** General\
**Created:** [26 July 2026 17:00 UTC](https://discourse.nodered.org/t/using-the-node-red-api/101535 "2026-07-26T17:00:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcNR](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@MarcNR](https://discourse.nodered.org/u/MarcNR)\
**Post date:** [26 July 2026 17:00 UTC](https://discourse.nodered.org/t/using-the-node-red-api/101535/1 "2026-07-26T17:00:18Z")

</div>

Bonjours à tous,

J'ai rélisé un programme en NODE RED qui effectue la mise à jour d'un flow par l'intermédiare de l'API j'utilise  
msg.method = "PUT";  
msg.url = "http://" + retain.host + ":1880/flow/" + encodeURIComponent(msg.idtab);  
msg.headers = {  
"Content-Type": "application/json",  
"Authorization": "Bearer " + msg.Updatetopic  
};

Tout se passe correctement et la mise à jour ce fait correctement.  
Ma question est de savoir si le flow est bien démarré et que tout le flow de l'application à bein redémarré ? J'ai bien l'éditeur qui m'indique qu'il y a eu une modification. L'editeur trouve tous les nouveaux noeuds et ne trouve pas de conflit. Mais visuellement je ne vois pas un fonctionnement correcte ! Il suffit que je décalle un noeuds pour forcer un déploiement et tout se synchronise et le fonctionnent est optimum. Que pensez vous de mon problème ?

Cordialement

Hello everyone,

I created a Node-RED program that updates a flow via the API. I use the following:  
msg.method = "PUT";  
msg.url = "http://" + retain.host + ":1880/flow/" + encodeURIComponent(msg.idtab);  
msg.headers = {  
"Content-Type": "application/json",  
"Authorization": "Bearer " + msg.Updatetopic  
};

Everything proceeds smoothly, and the update completes successfully.  
My question is: has the flow actually started, and has the entire application flow properly restarted? The editor indicates that a modification has occurred; it detects all the new nodes and finds no conflicts. However, visually, it doesn't seem to be working correctly! If I simply shift a node to force a deployment, everything synchronizes and operates optimally. What do you think about this issue?

Best regards,

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 July 2026 17:25 UTC](https://discourse.nodered.org/t/using-the-node-red-api/101535/2 "2026-07-26T17:25:44Z")

</div>

Try refreshing the browser page

---

<div class="post-metadata">

**Author:** ![MarcNR](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@MarcNR](https://discourse.nodered.org/u/MarcNR)\
**Post date:** [27 July 2026 05:49 UTC](https://discourse.nodered.org/t/using-the-node-red-api/101535/3 "2026-07-27T05:49:31Z")

</div>

Hello,  
I did refresh the page, but unfortunately, there is no improvement. The update flow is inactive.  
Inactive flow:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/5/6501cf648cea98283380e8af48b2c1a5c4c26a46.png)

Active flow

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/1/d17f989cd4a2e14568999b4f8c2cd0c7a8d47c5e.png)

I just tested integrating all the flows using a `POST /flows` request to force deployment via the API. I can see the process restarting, but there is no improvement regarding my issue.

Best regards,

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 July 2026 07:53 UTC](https://discourse.nodered.org/t/using-the-node-red-api/101535/4 "2026-07-27T07:53:44Z")

</div>

What happens if you click the inject node?

---

<div class="post-metadata">

**Author:** ![MarcNR](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@MarcNR](https://discourse.nodered.org/u/MarcNR)\
**Post date:** [27 July 2026 08:30 UTC](https://discourse.nodered.org/t/using-the-node-red-api/101535/5 "2026-07-27T08:30:51Z")

</div>

I did press inject node, but nothing happens.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/0/d0d057e1b92c2fe1945df6579b0ddd78065f3fb2.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 July 2026 08:44 UTC](https://discourse.nodered.org/t/using-the-node-red-api/101535/6 "2026-07-27T08:44:57Z")

</div>

Add some debug nodes to the flow you post, with their output set to System Console and Debug Window and see what it shows in the node red log when you post.

---

<div class="post-metadata">

**Author:** ![MarcNR](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@MarcNR](https://discourse.nodered.org/u/MarcNR)\
**Post date:** [27 July 2026 12:43 UTC](https://discourse.nodered.org/t/using-the-node-red-api/101535/7 "2026-07-27T12:43:11Z")

</div>

Nothing in particular. No error message. 27 Jul 12:10:31 - [info] Stopping flows  
27 Jul 12:10:31 - [info] Stopped flows  
27 Jul 12:10:31 - [info] Updated flows  
27 Jul 12:10:31 - [info] Starting flows  
27 Jul 12:10:31 - [info] Started flows  
27 Jul 12:10:31 - [info] [sqlitedb:7d4740589faebf3b] opened /data/PFC300.db ok  
27 Jul 12:10:31 - [info] [sqlitedb:ec208ae4f8bd7c83] opened /data/records.db ok  
27 Jul 12:10:31 - [info] [sqlitedb:f9e81dceef4ae0cb] opened /data/translation.db ok

I had the integration of a flow carried out instead of a modification  
I have the same result

27 Jul 14:36:05 - [info] Updated flows  
27 Jul 14:36:05 - [info] Adding flow: Workflow1785155765394 [268daa3ca0fc1d6e]  
27 Jul 14:36:09 - [info] Stopping flows  
27 Jul 14:36:09 - [info] Stopped flows  
27 Jul 14:36:09 - [info] Updated flows  
27 Jul 14:36:09 - [info] Starting flows  
27 Jul 14:36:09 - [info] Started flows  
27 Jul 14:36:09 - [info] [sqlitedb:7d4740589faebf3b] opened /data/PFC300.db ok  
27 Jul 14:36:09 - [info] [sqlitedb:f9e81dceef4ae0cb] opened /data/translation.db ok  
27 Jul 14:36:09 - [info] [sqlitedb:ec208ae4f8bd7c83] opened /data/records.db ok

What I've noticed is that the nodes are in either an "added" or "modified" status.  
For the nodes to be processed, I have to perform a manual rebuild by changing something so that the modifications are picked up without any issues.  
Strange.

---

<div class="post-metadata">

**Author:** ![striper](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/striper/32/81114_2.png) [@striper](https://discourse.nodered.org/u/striper)\
**Post date:** [28 July 2026 14:42 UTC](https://discourse.nodered.org/t/using-the-node-red-api/101535/8 "2026-07-28T14:42:57Z")

</div>

I recently experienced a similar situation when I tried to update the subflows (id: global). I made a mistake by having a duplicate subflow in my subflows array, which was accepted by the API, but resulted in a strange situation that was not easy to debug: I only saw the old subflow and the new subflow was completely hidden from the UI. Maybe something similar happened to you too? Your flow might contain duplicate nodes (same id). You should be able to find this out by inspecting the output from GET /flow/:id
