Product
Docs
Resources
Log In

Sign Up

Error: SendGrid 406: Not Acceptable

What's Causing This Error?

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.

Solution - Here's How To Resolve It

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 8 curl 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 \

Other Common SendGrid Errors (and Solutions)

View all errors

Build your first notification in minutes

Send up to 10,000 notifications every month, for free.

Get started for free

Email & push notification

Build your first notification in minutes

Send up to 10,000 notifications every month, for free.

Get started for free

Email & push notification

Product

Pricing

Providers

Developers

Documentation

API

Libraries

Status

© 2022 Courier. All rights reserved.