# How can i send data in a POST request?

**URL:** <https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695>\
**Category:** Web API's\
**Tags:** webapi\
**Created:** [September 21, 2023, 12:05pm UTC](https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695 "2023-09-21T12:05:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)\
**Post date:** [September 21, 2023, 12:05pm UTC](https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695/1 "2023-09-21T12:05:06Z")

</div>

Hi

I am not a beginner. I wanted to create an app to post a message and get the result.  
But with the POST block, the curl command `-d` is not possible. I know we can send values through the URL but for this API the URL for every action is the same

---

<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 21, 2023, 7:03pm UTC](https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695/2 "2023-09-21T19:03:30Z")

</div>

Hello @vishruth-ram!  
Could you please share the curl you have?  
And we can help you with the implementation.

---

<div class="post-metadata">

**Author:** ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)\
**Post date:** [September 23, 2023, 6:13am UTC](https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695/3 "2023-09-23T06:13:37Z")

</div>

```auto
curl \
-H 'Content-Type: application/json' \
-d '{ "prompt": { "text": "Write a story about a magic backpack"} }' \
"https://generativelanguage.googleapis.com/v1beta2/models/text-bison-001:generateText?key=YOUR_API_KEY"

```

---

<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 25, 2023, 11:43pm UTC](https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695/4 "2023-09-25T23:43:23Z")

</div>

Hello @vishruth-ram  
The WebAPI needs to be like this:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/b/eb3f840279644765ce027c394f5de52d1926086a.png)

---

<div class="post-metadata">

**Author:** ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)\
**Post date:** [September 27, 2023, 10:16am UTC](https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695/5 "2023-09-27T10:16:57Z")

</div>

Hi @ioannis I tried it in several ways but it always gives me `null`

---

<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 27, 2023, 12:15pm UTC](https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695/6 "2023-09-27T12:15:07Z")

</div>

Hello @vishruth-ram!  
Have you added your API key?

---

<div class="post-metadata">

**Author:** ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)\
**Post date:** [September 27, 2023, 2:24pm UTC](https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695/7 "2023-09-27T14:24:22Z")

</div>

yes

---

<div class="post-metadata">

**Author:** ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)\
**Post date:** [September 29, 2023, 12:50pm UTC](https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695/9 "2023-09-29T12:50:03Z")

</div>

I tried with a get request.

---

<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 29, 2023, 1:45pm UTC](https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695/10 "2023-09-29T13:45:25Z")

</div>

@vishruth-ram what was the response?

---

<div class="post-metadata">

**Author:** ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)\
**Post date:** [September 29, 2023, 2:22pm UTC](https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695/11 "2023-09-29T14:22:38Z")

</div>

On [postman, ok

---

<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:** [November 8, 2024, 1:33pm UTC](https://community.thunkable.com/t/how-can-i-send-data-in-a-post-request/2606695/12 "2024-11-08T13:33:26Z")

</div>


