# How do I write an array in a parameter within the API connector in JSON?

**URL:** <https://forum.bubble.io/t/how-do-i-write-an-array-in-a-parameter-within-the-api-connector-in-json/227042>\
**Category:** Need help\
**Created:** [October 5, 2022, 7:37am UTC](https://forum.bubble.io/t/how-do-i-write-an-array-in-a-parameter-within-the-api-connector-in-json/227042 "2022-10-05T07:37:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adammiko10](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@adammiko10](https://forum.bubble.io/u/adammiko10)\
**Post date:** [October 5, 2022, 7:37am UTC](https://forum.bubble.io/t/how-do-i-write-an-array-in-a-parameter-within-the-api-connector-in-json/227042/1 "2022-10-05T07:37:59Z")

</div>

How do I write an array in a parameter within the API connector in JSON?

Here’s an example of my attempting to write an array of texts in the form of cities that is incorrect. Please let me know what I can do to fix:

[“Los Angeles, CA”, “Paris, France”]

---

<div class="post-metadata">

**Author:** ![jonah.deleseleuc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jonah.deleseleuc/32/199133_2.png) [@jonah.deleseleuc](https://forum.bubble.io/u/jonah.deleseleuc)\
**Post date:** [October 5, 2022, 7:51am UTC](https://forum.bubble.io/t/how-do-i-write-an-array-in-a-parameter-within-the-api-connector-in-json/227042/2 "2022-10-05T07:51:47Z")

</div>

To be honest for us to be able to help you, you’d have to show us the whole API call. Sure, the Array you showed us may be correct depending on the context. If I were you, I would copy the whole body and stick it here:

> **[The JSON Validator](https://jsonlint.com/)**
>
> JSONLint is the free online validator and reformatter tool for JSON, a lightweight data-interchange format.

This is a JSON validator. If there is a syntax error in your body, then it will throw an error.

I hope it helped

---

<div class="post-metadata">

**Author:** ![adammiko10](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@adammiko10](https://forum.bubble.io/u/adammiko10)\
**Post date:** [October 6, 2022, 7:47pm UTC](https://forum.bubble.io/t/how-do-i-write-an-array-in-a-parameter-within-the-api-connector-in-json/227042/3 "2022-10-06T19:47:14Z")

</div>

Here’s an example

---

<div class="post-metadata">

**Author:** ![jonah.deleseleuc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jonah.deleseleuc/32/199133_2.png) [@jonah.deleseleuc](https://forum.bubble.io/u/jonah.deleseleuc)\
**Post date:** [October 7, 2022, 6:58am UTC](https://forum.bubble.io/t/how-do-i-write-an-array-in-a-parameter-within-the-api-connector-in-json/227042/4 "2022-10-07T06:58:13Z")

</div>

You’re putting your Keys inside the parameters section, this is not where it’s supposed to go for POST calls. **The body of your API call needs to go in the Body section in the API connector (the text box that says Body (JSON Object, use \<\> for dynamic values)).**

You need to actually create a JSON for the body.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [December 14, 2022, 7:38am UTC](https://forum.bubble.io/t/how-do-i-write-an-array-in-a-parameter-within-the-api-connector-in-json/227042/5 "2022-12-14T07:38:33Z")

</div>

Closed on December 14, 2022, 7:38am UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
