Error Guide
This error occurs when your API request is missing the Accept request header. The SendGrid documentation specifies that they have not yet made the Accept header mandatory. However, if you run into this error, it is likely that this header is missing.
Ensure that you've added the Accept request header. For example, your Accept header can be application/json.
Consider the CURL request shown below that illustrates the use of the Accept header.
1 2 3 4 5 6 7 8curl https://api.sendgrid.com/api/mail.send.json \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' \ -F to=recipient@email.com subject="Test Subject" \ -F text="testing text body"\ -F from=verifiedsender@email.com \ -F api_user=your_sendgrid_username \ -F api_key=your_sendgrid_password \
View all errors
© 2025 Courier. All rights reserved.