# Adding new flows using curl

**URL:** <https://discourse.nodered.org/t/adding-new-flows-using-curl/39305>\
**Category:** General\
**Created:** [18 January 2021 06:47 UTC](https://discourse.nodered.org/t/adding-new-flows-using-curl/39305 "2021-01-18T06:47:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akhtar321h](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@akhtar321h](https://discourse.nodered.org/u/akhtar321h)\
**Post date:** [18 January 2021 06:47 UTC](https://discourse.nodered.org/t/adding-new-flows-using-curl/39305/1 "2021-01-18T06:47:11Z")

</div>

Hello Everyone,

I am working with node-red flow manager and trying to get, replace, delete, add and modify the flows with the help of curl command. Get, replace, delete commands are working fine but when I am trying to add new flow it is giving error.  
I am working on @node-red-contrib-flow-manager.  
and executing command for adding new flow is-

```auto
curl --header "Content-Type: application/json" --request POST --data '[{"id":"5a664b67.5d1fa4","type":"tab","label":"Flow ","disabled":false,"info":""}]' http://localhost:1880/flow-manager/flow-files/flow/Flow 

```

it is throwing an error:

```auto
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>SyntaxError: Unexpected token &#39; in JSON at position 0<br> &nbsp; &nbsp;at JSON.parse (&lt;anonymous&gt;)<br> &nbsp; &nbsp;at createStrictSyntaxError (C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red\node_modules\body-parser\lib\types\json.js:158:10)<br> &nbsp; &nbsp;at parse (C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red\node_modules\body-parser\lib\types\json.js:83:15)<br> &nbsp; &nbsp;at C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red\node_modules\body-parser\lib\read.js:121:18<br> &nbsp; &nbsp;at invokeCallback (C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red\node_modules\raw-body\index.js:224:16)<br> &nbsp; &nbsp;at done (C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red\node_modules\raw-body\index.js:213:7)<br> &nbsp; &nbsp;at IncomingMessage.onEnd (C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red\node_modules\raw-body\index.js:273:7)<br> &nbsp; &nbsp;at IncomingMessage.emit (events.js:322:22)<br> &nbsp; &nbsp;at endReadableNT (_stream_readable.js:1187:12)<br> &nbsp; &nbsp;at processTicksAndRejections (internal/process/task_queues.js:84:21)</pre>
</body>
</html>

```

Please tell me, is there something I am missing or how I can add new flows with the help of curl command.  
Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [19 March 2021 06:47 UTC](https://discourse.nodered.org/t/adding-new-flows-using-curl/39305/2 "2021-03-19T06:47:14Z")

</div>

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