Content-Type Header
All responses are returned in JSON format. We specify this by sending
the Content-Type
header.
1
GET https://api.sendgrid.com/v3/resource HTTP / 1.1
1
2
3
4
5
6
HTTP / 1.1 200 OK
Content-Type : application/json
{
"foo" : "bar" ,
}
Status Codes
Below is a table description of the various status codes we currently
support against resources.
Status Code
Description
200 No error
201 Successfully created
204 Successfully deleted
400 Bad request
401 Requires authentication
406 Missing Accept header. example: Accept: application/json
429 Too Many Requests
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.
1
GET https://api.sendgrid.com/v3/resource?limit=5&offset=0 HTTP / 1.1
1
2
3
4
5
6
7
HTTP / 1.1 200 OK
Content-Type : application/json
Link: <http://api.sendgrid.com/v 3 /resource?limit= 5 &offset= 5 >; rel= "next" ; title= "2" ,
<http://api.sendgrid.com/v 3 /resource?limit= 5 &offset= 0 >; rel= "prev" ; title= "1" ,
<http://api.sendgrid.com/v 3 /resource?limit= 5 &offset= 10 >; rel= "last" ; title= "3" ,
<http://api.sendgrid.com/v 3 /resource?limit= 5 &offset= 0 >; rel= "first" ; title= "1"