How to send json body using POST method of HTTP Request activity

Hi all,

I’d like to send json body using post method of HTTP request activity.
And the body includes variable.
How can I do this?

The body I want to send is below.
“Upn”: “emailaddress”

“emailaddress” is string variable.



Can you try this in the body

"[{‘Upn’: “+ emailVariable.tostring +” }]"

Thank you for your quick response.
I tried that but it didn’t work.
I set as below. upn is string variable.

Can I need to confirm another settings?


That’s wrong, Can you try changing those double quotes manually?

The string should display as


I tried that but it didn’t work…

The Json should be in this format “{ …}” , can you try removing the braces [ and ] in the start and end and then try

Like this?
Unfortunately, it didn’t work…

If you are sending the correct body and headers to the correct end point URL, you must get 200 status code. Have you tried it in post man or doing it directly in UiPath?

Post the screenshot of the error you are getting

If it is a public server, then can you message me the request details individually so that I will check and let you know

Thanks for your assistance.
Yes, I tried it in post man and did it in Uipath(not using variable).
When I tried it in Uipath not using variable, I set as below.

Both case, I could do that.

I’m trying to Azure Automation to automate assign O365 license.
This is the screenshot of the error.

Black box area is variable(email address).
Strangely, there is no word from @.
It is displayed as below. →test


Are you able to get the exact results? Can you post the screenshot of the output when you send the request?

And json format is wrong in the screenshot above

Is this OK as below?

As per the screenshot , you are getting 202, it states that, the request is accepted and when transferred to process the actual http request, it just stops there and disallows the request.

May be the JSON body is wrong. Can you try removing those braces [ and ] in json and try in postman? and let me know if you got 200 status…

Thanks for reply.
I removed those braces and tried.
As a result, I got 202 status.

Are you sure your request is correct as per the documents of the application rest services?

I hope you are missing some headers or the query params you need to pass… Can you check again the documents of the services of the application again

Hi Hareesh,
I want to expose some API from ui path so that i can consume them in different system.
I can find the tutorials for consuming the API’s in ui path but if i want to expose from UI path what will be the url of it and how to do it, if there is any tutorial or guideline then please share it.
Manish Jawla

If your web application has rest services enabled, then you can use the same URL which is different for different kind of request @Manish_Jawla . So, make sure your application has services , if so, then you will have documentation for sure. Please check

Hello Tutu,
IN this movie I have a very fast way to create JSON: