got the response code from sendgrid by require nethttp look for sendgrid.com/docs/API_reference/libraries.html for ruby toolkits