Skip to main content

Why does Bubble only send the last value when I have duplicate keys in a Form-data API call?

When the API Connector body type is set to Form-data and you add multiple parameters with the same key, Bubble only sends the last instance. Switching to Raw body type works around this.

Written by Sofia Maconi

When the request body type is set to Form-data and you add multiple parameters with the same key, Bubble only sends the last (bottommost) instance of that key. Bubble's current setup stores key/value parameters as objects rather than arrays, which means duplicated keys aren't preserved. Tools like Postman support sending multiple values under the same key, but Bubble doesn't expose this.

What you might notice

  • When you have duplicate parameter keys in a Form-data request body, only the last key/value pair is sent

  • In tools like Postman, both duplicate keys are sent correctly

Workaround

Switch the body type to "Raw" if you need to send multiple values with the same key.

Did this answer your question?