Menu

How to use the SendGrid V3 API

Welcome to SendGrid’s Web API v3! This API is RESTful, fully featured, easy to integrate with, and offers support in 7 different languages.

Libraries

Responses

Content-Type Header

All responses are returned in JSON format. We specify this by sending the Content-Type header.

GET https://api.sendgrid.com/v3/resource HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json

{
  "foo": "bar"
}

Status Codes

Below is a table containing descriptions of the various status codes we currently support against various resources.

Status Code Description
200 No error
201 Successfully created
204 Successfully deleted
400 Bad request
401 Requires authentication
403 From address doesn't match Verified Sender Identity. To learn how to resolve this error, see our Sender Identity requirements.
406 Missing Accept header. For example: Accept: application/json
429 Too many requests/Rate limit exceeded
500 Internal server error

Pagination

When a request is made with a pagination query, the following data is included in the header to allow for easy traversal of previous, current, first, and last page of the data set.

GET https://api.sendgrid.com/v3/resource?limit=5&offset=0 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json

Link: <http://api.sendgrid.com/v3/resource?limit=5&offset=5>; rel="next"; title="2",
      <http://api.sendgrid.com/v3/resource?limit=5&offset=0>; rel="prev"; title="1",
      <http://api.sendgrid.com/v3/resource?limit=5&offset=10>; rel="last"; title="3",
      <http://api.sendgrid.com/v3/resource?limit=5&offset=0>; rel="first"; title="1"

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the SendGrid tag on Stack Overflow.

Thank you for your feedback!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

Refer us and get $10 in 3 simple steps!

Step 1

Get link

Get a free personal referral link here

Step 2

Give $10

Your user signs up and upgrade using link

Step 3

Get $10

1,250 free SMSes
OR 1,000 free voice mins
OR 12,000 chats
OR more