# Setting Mqtt url through API

**URL:** https://discourse.nodered.org/t/setting-mqtt-url-through-api/17623
**Category:** General
**Created:** [7 November 2019 09:25 UTC](https://discourse.nodered.org/t/setting-mqtt-url-through-api/17623 "2019-11-07T09:25:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Iliyas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iliyas/32/19045_2.png) [@Iliyas](https://discourse.nodered.org/u/Iliyas)
#### Post date: [7 November 2019 09:25 UTC](https://discourse.nodered.org/t/setting-mqtt-url-through-api/17623/1 "2019-11-07T09:25:40Z")

</div>

Hello all,  
I have a doubt regarding MQTT in-node, how can we set the url of mqtt in-node through an API?  
Can somebody help me out with this

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [7 November 2019 09:34 UTC](https://discourse.nodered.org/t/setting-mqtt-url-through-api/17623/2 "2019-11-07T09:34:43Z")

</div>

The MQTT node does not support dynamically change the broker it connects to.

There is a high-level design for some changes to allow that, but as yet, that is as far as it has got.

---

<div class="post-metadata">

### Author: ![Iliyas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iliyas/32/19045_2.png) [@Iliyas](https://discourse.nodered.org/u/Iliyas)
#### Post date: [7 November 2019 09:51 UTC](https://discourse.nodered.org/t/setting-mqtt-url-through-api/17623/3 "2019-11-07T09:51:27Z")

</div>

Ya got it it won't change dynamically but we can change the URL through API using Postman or some other thing?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [7 November 2019 09:53 UTC](https://discourse.nodered.org/t/setting-mqtt-url-through-api/17623/4 "2019-11-07T09:53:07Z")

</div>

You could use the Admin API to get the full flow configuration, modify it however you want, and then post it back.

[https://nodered.org/docs/api/admin/methods/get/flows/](https://nodered.org/docs/api/admin/methods/get/flows/)

[https://nodered.org/docs/api/admin/methods/post/flows/](https://nodered.org/docs/api/admin/methods/post/flows/)
