Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Responses



API libraries on GitHub

api-libraries-on-github page anchor

The Twilio SendGrid Web REST API v3 provides SDK support in seven different languages.

C#(link takes you to an external page)Go(link takes you to an external page)Java(link takes you to an external page)Node.js(link takes you to an external page)PHP(link takes you to an external page)Python(link takes you to an external page)Ruby(link takes you to an external page)

Any API response with a content body expresses it in JSON format. The Content-Type header indicates this.

GET https://api.sendgrid.com/v3/resource HTTP/1.1
1
HTTP/1.1 200 OK
2
Content-Type: application/json
3
4
{
5
"foo": "bar"
6
}

The following table describes the various status codes returned for the API.

Status codeDescriptionResponse body
200(link takes you to an external page)OKNo
201(link takes you to an external page)Creation succeededNo
202(link takes you to an external page)Request acceptedVaries
204(link takes you to an external page)Deletion succeededNo
400(link takes you to an external page)Bad requestYes
401(link takes you to an external page)Requires authenticationYes
403(link takes you to an external page)From address doesn't match Verified Sender IdentityYes
403(link takes you to an external page)You are temporarily blocked from sending emails due to repeated bad requests.Yes
406(link takes you to an external page)Missing the Accept header. For example: Accept: application/jsonYes
429(link takes you to an external page)Too many requests or rate limit exceededYes
500(link takes you to an external page)Internal server errorYes

When a request includes a pagination query parameter, the response returns the following properties in the header. These allow the user to go to the previous, next, first, and last page of the data set.

GET https://api.sendgrid.com/v3/resource?limit=5&offset=0 HTTP/1.1
1
HTTP/1.1 200 OK
2
Content-Type: application/json
3
4
Link: <http://api.sendgrid.com/v3/resource?limit=5&offset=5>; rel="next"; title="2",
5
<http://api.sendgrid.com/v3/resource?limit=5&offset=0>; rel="prev"; title="1",
6
<http://api.sendgrid.com/v3/resource?limit=5&offset=10>; rel="last"; title="3",
7
<http://api.sendgrid.com/v3/resource?limit=5&offset=0>; rel="first"; title="1"