An unofficial client library for the SendGrid API

40 releases (16 breaking)

0.17.1 May 7, 2021
0.17.0 Mar 14, 2021
0.16.0 Jan 19, 2021
0.15.0 Nov 15, 2020
0.1.1 Nov 29, 2015

#25 in Email

Download history 847/week @ 2021-02-24 824/week @ 2021-03-03 889/week @ 2021-03-10 1431/week @ 2021-03-17 1547/week @ 2021-03-24 1313/week @ 2021-03-31 1409/week @ 2021-04-07 2035/week @ 2021-04-14 2172/week @ 2021-04-21 2278/week @ 2021-04-28 1819/week @ 2021-05-05 1725/week @ 2021-05-12 1280/week @ 2021-05-19 1309/week @ 2021-05-26 1820/week @ 2021-06-02 1421/week @ 2021-06-09

6,244 downloads per month
Used in json-rules-engine

MIT license

659 lines


Unofficial Rust library for the SendGrid API.

Build Status

This crate requires Rust 1.15 or higher as it uses a crate that has a custom derive implementation.

sendgrid-rs implements all of the functionality of other supported SendGrid client libraries. To use sendgrid-rs you must first create a SendGrid account and generate an API key. To create an API key for your SendGrid account, use the account management interface or see the SendGrid API Documentation.

sendgrid-rs is available on crates.io and can be included in your Cargo.toml as follows:

sendgrid = "X.X.X"

Build Dependencies

This library utilises reqwest. Follow the instructions on the reqwest README in order to enable sending HTTPS requests to the SendGrid API.


You can take advantage of a couple features for the crate. To enable the asynchronous send function, you can use the async flag. To enable the rustls TLS feature, use the rustls flag.


An example of using this library can be found in the examples directory. This example code expects to find your SendGrid API key in the process environment. In shells such as Bash or ZSH this can be set as follows:

export SENDGRID_API_KEY="SG.my.api.key"



Please don't hesitate to contact me at the email listed in my profile. I will try to help as quickly as I can. If you would like to contribute, contact me as well.


Thanks to meehow for their contributions.

Thanks to richo for their improvements to the V2 API.




~182K SLoC