# How do I specify an array within the Body of an API Connector API call?

**URL:** <https://forum.bubble.io/t/how-do-i-specify-an-array-within-the-body-of-an-api-connector-api-call/127339>\
**Category:** APIs\
**Created:** [December 24, 2020, 9:39pm UTC](https://forum.bubble.io/t/how-do-i-specify-an-array-within-the-body-of-an-api-connector-api-call/127339 "2020-12-24T21:39:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin4](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kevin4/32/59688_2.png) [@kevin4](https://forum.bubble.io/u/kevin4)\
**Post date:** [December 24, 2020, 9:39pm UTC](https://forum.bubble.io/t/how-do-i-specify-an-array-within-the-body-of-an-api-connector-api-call/127339/1 "2020-12-24T21:39:11Z")

</div>

I’m trying to define an API Connector call for a call that requires an array of email addresses as input.

I don’t understand the syntax. I’ve seen from other forum threads that I do this using the Body (JSON object) section of the API Call definition rather than by adding a parameter, as parameters can not be arrays.

However, my trial and error for various syntax is not finding syntax that works.

Here is my current static definition. I’ll paramaterize it after I get it working with static values, which is my current hurdle.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/8/5/8536da0fae3c770cb33a997360db5c01b34bd3fe.png)

And this is what Initialize call returns:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/1/c/1c11cca52f8d5bfea908a807ed7667c861d88f56.png)

If you know the syntax to make this work, or another way of making this work, please share.

---

<div class="post-metadata">

**Author:** ![shawnmi6](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/shawnmi6/32/96625_2.png) [@shawnmi6](https://forum.bubble.io/u/shawnmi6)\
**Post date:** [December 25, 2020, 1:29am UTC](https://forum.bubble.io/t/how-do-i-specify-an-array-within-the-body-of-an-api-connector-api-call/127339/3 "2020-12-25T01:29:40Z")

</div>

Add a header Content-Type with the value application/json

---

<div class="post-metadata">

**Author:** ![kevin4](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kevin4/32/59688_2.png) [@kevin4](https://forum.bubble.io/u/kevin4)\
**Post date:** [December 25, 2020, 5:51am UTC](https://forum.bubble.io/t/how-do-i-specify-an-array-within-the-body-of-an-api-connector-api-call/127339/4 "2020-12-25T05:51:06Z")

</div>

Can you please be a little more specific about the syntax.

I tried this, and it generates a different error message:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/6/3/63a7ff38b1829c91db358e26aa1a7ccc1de167da.png)

![image](https://us1.discourse-cdn.com/bubble/original/3X/4/a/4a002c371776e4f1f8410878adc1c2bb8f211df1.png)

---

<div class="post-metadata">

**Author:** ![shawnmi6](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/shawnmi6/32/96625_2.png) [@shawnmi6](https://forum.bubble.io/u/shawnmi6)\
**Post date:** [December 25, 2020, 5:54am UTC](https://forum.bubble.io/t/how-do-i-specify-an-array-within-the-body-of-an-api-connector-api-call/127339/5 "2020-12-25T05:54:30Z")

</div>

Your Header is correct your Syntax is correct. Try deleting that api call and build a new one exactly the same and try to initialize it.

I have received this error in the past and by deleting the api call all together and recreating it fixed the issue for me.

---

<div class="post-metadata">

**Author:** ![kevin4](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kevin4/32/59688_2.png) [@kevin4](https://forum.bubble.io/u/kevin4)\
**Post date:** [December 25, 2020, 5:55am UTC](https://forum.bubble.io/t/how-do-i-specify-an-array-within-the-body-of-an-api-connector-api-call/127339/6 "2020-12-25T05:55:59Z")

</div>

That did the trick! Thank you very much.

---

<div class="post-metadata">

**Author:** ![kevin4](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kevin4/32/59688_2.png) [@kevin4](https://forum.bubble.io/u/kevin4)\
**Post date:** [December 25, 2020, 5:58am UTC](https://forum.bubble.io/t/how-do-i-specify-an-array-within-the-body-of-an-api-connector-api-call/127339/7 "2020-12-25T05:58:06Z")

</div>

Next… How do I transition from the static array of email addresses I entered to the use of dynamic values.

I’m concerned that when I edit the Body to use the \<\> syntax to switch to dynamic values, the API call will need to be reinitialized, but won’t.

---

<div class="post-metadata">

**Author:** ![kevin4](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kevin4/32/59688_2.png) [@kevin4](https://forum.bubble.io/u/kevin4)\
**Post date:** [December 25, 2020, 3:10pm UTC](https://forum.bubble.io/t/how-do-i-specify-an-array-within-the-body-of-an-api-connector-api-call/127339/8 "2020-12-25T15:10:09Z")

</div>

FYI. I figured this out. It wasn’t as weird as I thought it might be.

---

<div class="post-metadata">

**Author:** ![kevin4](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kevin4/32/59688_2.png) [@kevin4](https://forum.bubble.io/u/kevin4)\
**Post date:** [December 25, 2020, 8:59pm UTC](https://forum.bubble.io/t/how-do-i-specify-an-array-within-the-body-of-an-api-connector-api-call/127339/9 "2020-12-25T20:59:09Z")

</div>

For anyone who stumbles across this thread, the next problem I encountered in getting this API Call to work is documented in a different forum thread:

> [@API Connector call returns data when call is initialized, but when it's used seems to return empty data](http://forum.bubble.io/t/api-connector-call-returns-data-when-call-is-initialized-but-when-its-used-seems-to-return-empty-data/127408):
>
> This is going to be kind of a long one, so please bear with me. I’ve defined an API call using the API Connector. When I initialize it, I see that data is returned. However, when I use it as a workflow action, it seems that no data is returned. I am not seeing what I’m doing wrong. The API Call definition is below: The “Reinitialize call” returns data: Notice in the above screen shot that the returned data uses the email address being verified as part of the field …
