In the “API by Pabbly” action, how do I send a nested JSON object in the request body?

Status: Closed · Asked by Pete Tkachuk on · 0 views

Pete Tkachuk — Question ·
In the “API by Pabbly” action, how do I send a nested JSON object in the request body? I need {"employee": {"id": 31220}}. Set Parameters only builds a flat object, and Enable Select Transform shows the transformed body in the test but does not appear to send it.
Pabbly Support — Reply ·

Hello Pete,

Thank you for reaching out. To send a nested JSON object like {"employee": {"id": 31220}} in the API by Pabbly action, the reliable approach is to send the raw JSON body yourself instead of relying on the flat Set Parameters fields.

Please try the following:

1. In the API by Pabbly step, choose the Custom Request action (instead of building the request through individual Set Parameters fields).
2. Set the Method (e.g., POST/PUT/PATCH) and enter your full endpoint URL.
3. Set Payload Type to JSON.
4. In the Data field, paste your complete nested JSON structure exactly as the target API expects it, for example:
   {
     "employee": {
       "id": 31220
     }
   }
5. In Headers, add Content-Type: application/json along with any required authorization headers (e.g., Authorization: Bearer <token>).
6. Map dynamic values from previous steps directly inside the JSON while keeping the nested structure intact. Keep string values inside quotes and numeric/boolean values without quotes to avoid type mismatches.
7. Click Save & Send Test Request and check the response.

This preserves nested objects and avoids flattening into bracket notation (e.g., employee[id]) that many APIs reject.

If the step still won't save or the body is still rejected, please share the exact save/test error and the target API's documented request format so we can review it further.

Thanks & Regards,

Adeel Akhtar
🌐 Pabbly.com

Signature image

Pabbly Support — Reply ·

Hello Pete,

I hope you’re doing well. I just wanted to follow up regarding my last message.

Thanks & Regards,

Adeel Akhtar
🌐 Pabbly.com

Signature image

Pabbly Support — Reply ·

Hello Pete,

I hope this message finds you well. I’m following up on my previous message. Further, this is our last follow-up. This Forum thread will be closed automatically as we have not received a reply. You can start a new thread or email us at support@pabbly.com to raise your concern.

Thanks & Regards,

Adeel Akhtar
🌐 Pabbly.com

Back to all forum threads · Log in to reply