Skip to main content

When using the API to POST a new email draft, I receive the following error if the recipient list is longer than 21 addresses:

{
    "_error": {
        "status": 400,
        "title": "Bad request",
        "message": "Body did not satisfy requirements",
        "details": b
            "body.cc: should be an array"
        ]
    }
}

 

Does anyone know why this is the case?

Thank you.

I believe this has come up in the past when sending using multipart/form-data encoding, and submitting the recipients as a numbered array;

--form 'cc[0]=email0@example.com' \
--form 'cc[1]=email1@example.com' \
--form 'cc[2]=email2@example.com' \
...

If you remove the number from the array, does that fix this issue? Or are you sending a JSON payload?


We are indeed using that encoding. So do you mean:

--form 'cc[]=email0@example.com' \
--form 'cc[]=email1@example.com' \
--form 'cc[]=email2@example.com' \
...

Yes - that should do the trick 🤞

I’ll ensure a bug report is raised with our engineers to get this addressed in the future


Reply