How to craft Bubble's API Response Message

I am trying to get my API response to resemble this format below:

{
“body”: {
“result”: “Y”,
“errorcode”: “”,
“errormessage”: “”,
“resend”: “N”
}
}

What I am getting is this:

{
“body”: {
“status”: “success”,
“response”: {
“result”: “Y”,
“errorcode”: “”,
“errormessage”: “”,
“resend”: “N”
}
}

This is the result from using “Return Data From API” as shown below:

Somehow the “result”, “errorcode”, “errormessage” and “resend” have been enclosed inside another group “response”. Is there any way I can make these 4 items a direct child of “body” and not “result”?

I was wondering if the plugin Json Generator by @gaurav can help to generate the Json formatted text.

Assuming that it can create the format, how do I send the text as formatted as a response from my webhook?

Feeling lost at present.

Actually you don’t need any plugin to do this @kaventan1.
Just check the ‘Return a plan text’ checkbox at top in your screenshot and put in whatever json you want as the repsonse in the box that shows up

1 Like

@gaurav, many thanks for your guidance. The body now looks correct.

The response is now as shown below:

{
    "body": {
        "result": "Y",
        "errorcode": "DUPLICATE SIG DETECTED",
        "errormessage": "Potential Duplicate Transaction",
        "resend": "N"
    },
    "headers": {
        "x-powered-by": "Express",

As a non-programmer, I have a few questions:
a) Is it normal to have body in front of header? Does order of appearance matter to the receiving app?
b) The receiving app does not ask for header, does it matter to the receiving app that the header is also provided or is extra information just ignored?