# Web API. How to upload Json formatted text to web server?

**URL:** <https://community.thunkable.com/t/web-api-how-to-upload-json-formatted-text-to-web-server/3173500>\
**Category:** Questions about Thunkable X\
**Created:** [September 3, 2024, 8:39am UTC](https://community.thunkable.com/t/web-api-how-to-upload-json-formatted-text-to-web-server/3173500 "2024-09-03T08:39:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![motzet](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/motzet/32/91214_2.png) [@motzet](https://community.thunkable.com/u/motzet)\
**Post date:** [September 3, 2024, 8:39am UTC](https://community.thunkable.com/t/web-api-how-to-upload-json-formatted-text-to-web-server/3173500/1 "2024-09-03T08:39:51Z")

</div>

I’m using Web API with GET parameter to download Json files from my own Web server: it works quite nicely.  
The problem is : how do I reverse this action, that is to say how do I upload a Json string to my web server?  
Specifically what I don’t know is, if I use the PUT parameter of the Web API, where should be the Json string to be uploaded ?  
Thk’s in advance for any reply.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [September 3, 2024, 7:22pm UTC](https://community.thunkable.com/t/web-api-how-to-upload-json-formatted-text-to-web-server/3173500/2 "2024-09-03T19:22:49Z")

</div>

Hello @motzet  
To send a JSON you need to use the API body block:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/2/c269fda9056abb49b7338340c084124648be26e5.png)

---

<div class="post-metadata">

**Author:** ![motzet](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/motzet/32/91214_2.png) [@motzet](https://community.thunkable.com/u/motzet)\
**Post date:** [September 4, 2024, 2:15pm UTC](https://community.thunkable.com/t/web-api-how-to-upload-json-formatted-text-to-web-server/3173500/3 "2024-09-04T14:15:21Z")

</div>

Thks @Ionnis for your reply!  
Unfortunately this doesn’t solve my problem…  
In fact, the file I want to upload is in my Assets. Hence, I guess that when using the block “ **url from uploaded file** ” I should put in this block the full url of the aimed directory in the web server: correct ?  
That’s what I’ve done, but it failed…

Btw. how could I put an asset file content into a variable ?

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [September 4, 2024, 7:07pm UTC](https://community.thunkable.com/t/web-api-how-to-upload-json-formatted-text-to-web-server/3173500/4 "2024-09-04T19:07:17Z")

</div>

Hi @motzet  
Thank you for sharing more information  
You will need to upload the file on the [project assets](https://docs.thunkable.com/settings/assets#assets-panel) and then select it on the “url from uploaded file” block

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [December 3, 2024, 7:07pm UTC](https://community.thunkable.com/t/web-api-how-to-upload-json-formatted-text-to-web-server/3173500/5 "2024-12-03T19:07:28Z")

</div>

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