Create Flows,Skills,Text... via API call

Hello all, I am using botpress v11 and i am trying to create builtin text without editor.

I am calling an api to create builtin text
http://LOCALIP:3000/api/v1/bots/BOTID/content/builtin_text/element/
Method: Post
Sending Bearer token in header
Body : form data as {“formData”:{“text$en”:“my text field value”,“typing$en”:true}}

But my response is

Could not get any response

There was an error connecting to http://LOCALIP:3000/api/v1/bots/BOTID/content/builtin_text/element/.

Please help me out to resolve this. Thanks in advance

Are you sure you have a properly botpress instance to http://LOCALIP:3000 and that it’s reachable ?

I just started botpress and perform a simple curl with pretty much same body as yours.

curl -XPOST http://localhost:3000/api/v1/bots/{my_botID}/content/builtin_text/element/ 
-H "Authorization: my-bearer"
-H "content-type: application/json"
-d '{"formData":{"text$en":"hello my frien","typing$en":true}}'

and everything worked fine. Just make sure you’re setting content-type as application/json

Thanks,I think i am doing mistake in posting form data… could you clarify me how are you sending header payload

Hello all, Now i can able to create skills.

Now i am trying to create a flow without UI. any idea how botpress admin is generating json to generate a flow

Hello All, I am trying to create a flow programatically.

i have called the below endpoint
http://APPURL:3000/api/v1/bots/BOTID/flows

I can able to create a flow using botpress admin UI and it is sending an JSON object into body using post method. Flows are created and working fine.

Now i am trying to create a flow programatically , I took same JSON object and tried to post using postman. New flow is not generating.

My understanding is : I have compared JSON body for flows. seems it is creating an Node ID in each flows.

My Question is : How are you generating Node id in each flows. does it have any logic or is it a random number.

For clarification i am attaching an image.

Kindly clarify how node id is generated. when we create a flow.