{"id":37169314,"url":"https://github.com/miquido/sendgrid-go","last_synced_at":"2026-01-14T19:59:39.141Z","repository":{"id":57569020,"uuid":"142307524","full_name":"miquido/sendgrid-go","owner":"miquido","description":"The Official SendGrid Led, Community Driven Golang API Library","archived":false,"fork":true,"pushed_at":"2018-07-25T15:57:45.000Z","size":8039,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T10:18:14.658Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://sendgrid.com","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sendgrid/sendgrid-go","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miquido.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-25T13:57:26.000Z","updated_at":"2018-07-25T15:57:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/miquido/sendgrid-go","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/miquido/sendgrid-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fsendgrid-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fsendgrid-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fsendgrid-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fsendgrid-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miquido","download_url":"https://codeload.github.com/miquido/sendgrid-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fsendgrid-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T19:59:38.341Z","updated_at":"2026-01-14T19:59:39.133Z","avatar_url":"https://github.com/miquido.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![SendGrid Logo](https://uiux.s3.amazonaws.com/2016-logos/email-logo%402x.png)\n\n[![BuildStatus](https://travis-ci.org/sendgrid/sendgrid-go.svg?branch=master)](https://travis-ci.org/sendgrid/sendgrid-go)\n[![Email Notifications Badge](https://dx.sendgrid.com/badge/go)](https://dx.sendgrid.com/newsletter/go)\n[![Go Report Card](https://goreportcard.com/badge/github.com/sendgrid/sendgrid-go)](https://goreportcard.com/report/github.com/sendgrid/sendgrid-go)\n[![GoDoc](https://godoc.org/github.com/sendgrid/sendgrid-go?status.svg)](https://godoc.org/github.com/sendgrid/sendgrid-go) \n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.txt)\n[![Twitter Follow](https://img.shields.io/twitter/follow/sendgrid.svg?style=social\u0026label=Follow)](https://twitter.com/sendgrid)\n[![GitHub contributors](https://img.shields.io/github/contributors/sendgrid/sendgrid-go.svg)](https://github.com/sendgrid/sendgrid-go/graphs/contributors)\n\n**NEW:** Subscribe to email [notifications](https://dx.sendgrid.com/newsletter/go) for releases and breaking changes.\n\n**This library allows you to quickly and easily use the SendGrid Web API v3 via Go.**\n\nVersion 3.X.X of this library provides full support for all SendGrid [Web API v3](https://sendgrid.com/docs/API_Reference/Web_API_v3/index.html) endpoints, including the new [v3 /mail/send](https://sendgrid.com/blog/introducing-v3mailsend-sendgrids-new-mail-endpoint).\n\nThis library represents the beginning of a new path for SendGrid. We want this library to be community driven and SendGrid led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/sendgrid/sendgrid-go/issues) and [pull requests](https://github.com/sendgrid/sendgrid-go/blob/master/CONTRIBUTING.md) or simply upvote or comment on existing issues or pull requests.\n\nPlease browse the rest of this README for further detail.\n\nWe appreciate your continued support, thank you!\n\n# Table of Contents\n\n* [Installation](#installation)\n* [Quick Start](#quick-start)\n* [Processing Inbound Email](#inbound)\n* [Usage](#usage)\n* [Use Cases](#use-cases)\n* [Announcements](#announcements)\n* [Roadmap](#roadmap)\n* [How to Contribute](#contribute)\n* [Troubleshooting](#troubleshooting)\n* [About](#about)\n* [License](#license)\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\n# Installation\n\n## Prerequisites\n\n- Go version 1.6\n- The SendGrid service, starting at the [free level](https://sendgrid.com/free?source=sendgrid-go)\n\n## Setup Environment Variables\n\nUpdate the development environment with your [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys), for example:\n\n```bash\necho \"export SENDGRID_API_KEY='YOUR_API_KEY'\" \u003e sendgrid.env\necho \"sendgrid.env\" \u003e\u003e .gitignore\nsource ./sendgrid.env\n```\n\n## Install Package\n\n`go get github.com/sendgrid/sendgrid-go`\n\n## Dependencies\n\n- [rest](https://github.com/sendgrid/rest)\n\n## Setup Environment Variables\n\n### Initial Setup\n\n```bash\ncp .env_sample .env\n```\n\n### Environment Variable\n\nUpdate the development environment with your [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys), for example:\n\n```bash\necho \"export SENDGRID_API_KEY='YOUR_API_KEY'\" \u003e sendgrid.env\necho \"sendgrid.env\" \u003e\u003e .gitignore\nsource ./sendgrid.env\n```\n\n\u003ca name=\"quick-start\"\u003e\u003c/a\u003e\n# Quick Start\n\n## Hello Email\n\nThe following is the minimum needed code to send an email with the [/mail/send Helper](https://github.com/sendgrid/sendgrid-go/tree/master/helpers/mail) ([here](https://github.com/sendgrid/sendgrid-go/blob/master/examples/helpers/mail/example.go#L32) is a full example):\n\n### With Mail Helper Class\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/sendgrid/sendgrid-go\"\n\t\"github.com/sendgrid/sendgrid-go/helpers/mail\"\n)\n\nfunc main() {\n\tfrom := mail.NewEmail(\"Example User\", \"test@example.com\")\n\tsubject := \"Sending with SendGrid is Fun\"\n\tto := mail.NewEmail(\"Example User\", \"test@example.com\")\n\tplainTextContent := \"and easy to do anywhere, even with Go\"\n\thtmlContent := \"\u003cstrong\u003eand easy to do anywhere, even with Go\u003c/strong\u003e\"\n\tmessage := mail.NewSingleEmail(from, subject, to, plainTextContent, htmlContent)\n\tclient := sendgrid.NewSendClient(os.Getenv(\"SENDGRID_API_KEY\"))\n\tresponse, err := client.Send(message)\n\tif err != nil {\n\t\tlog.Println(err)\n\t} else {\n\t\tfmt.Println(response.StatusCode)\n\t\tfmt.Println(response.Body)\n\t\tfmt.Println(response.Headers)\n\t}\n}\n```\n\nThe `NewEmail` constructor creates a [personalization object](https://sendgrid.com/docs/Classroom/Send/v3_Mail_Send/personalizations.html) for you. [Here](https://github.com/sendgrid/sendgrid-go/blob/master/examples/helpers/mail/example.go#L28) is an example of how to add to it.\n\n### Without Mail Helper Class\n\nThe following is the minimum needed code to send an email without the /mail/send Helper ([here](https://github.com/sendgrid/sendgrid-go/blob/master/examples/mail/mail.go#L47) is a full example):\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/sendgrid/sendgrid-go\"\n\t\"log\"\n\t\"os\"\n)\n\nfunc main() {\n\trequest := sendgrid.GetRequest(os.Getenv(\"SENDGRID_API_KEY\"), \"/v3/mail/send\", \"https://api.sendgrid.com\")\n\trequest.Method = \"POST\"\n\trequest.Body = []byte(` {\n\t\"personalizations\": [\n\t\t{\n\t\t\t\"to\": [\n\t\t\t\t{\n\t\t\t\t\t\"email\": \"test@example.com\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"subject\": \"Sending with SendGrid is Fun\"\n\t\t}\n\t],\n\t\"from\": {\n\t\t\"email\": \"test@example.com\"\n\t},\n\t\"content\": [\n\t\t{\n\t\t\t\"type\": \"text/plain\",\n\t\t\t\"value\": \"and easy to do anywhere, even with Go\"\n\t\t}\n\t]\n}`)\n\tresponse, err := sendgrid.API(request)\n\tif err != nil {\n\t\tlog.Println(err)\n\t} else {\n\t\tfmt.Println(response.StatusCode)\n\t\tfmt.Println(response.Body)\n\t\tfmt.Println(response.Headers)\n\t}\n}\n```\n\n## General v3 Web API Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/sendgrid/sendgrid-go\"\n\t\"log\"\n\t\"os\"\n)\n\nfunc main() {\n\trequest := sendgrid.GetRequest(os.Getenv(\"SENDGRID_API_KEY\"), \"/v3/api_keys\", \"https://api.sendgrid.com\")\n\trequest.Method = \"GET\"\n\n\tresponse, err := sendgrid.API(request)\n\tif err != nil {\n\t\tlog.Println(err)\n\t} else {\n\t\tfmt.Println(response.StatusCode)\n\t\tfmt.Println(response.Body)\n\t\tfmt.Println(response.Headers)\n\t}\n}\n```\n\n\n\u003ca name=\"inbound\"\u003e\u003c/a\u003e\n# Processing Inbound Email\n\nPlease see [our helper](https://github.com/sendgrid/sendgrid-go/tree/master/helpers/inbound) for utilizing our Inbound Parse webhook.\n\n\u003ca name=\"usage\"\u003e\u003c/a\u003e\n# Usage\n\n- [SendGrid Docs](https://sendgrid.com/docs/API_Reference/index.html)\n- [Library Usage Docs](https://github.com/sendgrid/sendgrid-go/tree/master/USAGE.md)\n- [Example Code](https://github.com/sendgrid/sendgrid-go/tree/master/examples)\n- [How-to: Migration from v2 to v3](https://sendgrid.com/docs/Classroom/Send/v3_Mail_Send/how_to_migrate_from_v2_to_v3_mail_send.html)\n- [v3 Web API Mail Send Helper](https://github.com/sendgrid/sendgrid-go/tree/master/helpers/mail/README.md)\n\n\u003ca name=\"use-cases\"\u003e\u003c/a\u003e\n# Use Cases\n\n[Examples of common API use cases](https://github.com/sendgrid/sendgrid-go/blob/master/USE_CASES.md), such as how to send an email with a transactional template.\n\n\u003ca name=\"announcements\"\u003e\u003c/a\u003e\n# Announcements\n\nJoin an experienced and passionate team that focuses on making an impact. Opportunities abound to grow the product - and grow your career! Check out our [Software Engineer- Delivery role](http://grnh.se/mg6dr31)\n\nPlease see our announcement regarding [breaking changes](https://github.com/sendgrid/sendgrid-go/issues/81). Your support is appreciated!\n\nAll updates to this library are documented in our [CHANGELOG](https://github.com/sendgrid/sendgrid-go/blob/master/CHANGELOG.md) and [releases](https://github.com/sendgrid/sendgrid-go/releases). You may also subscribe to email [release notifications](https://dx.sendgrid.com/newsletter/go) for releases and breaking changes.\n\n\u003ca name=\"roadmap\"\u003e\u003c/a\u003e\n# Roadmap\n\nIf you are interested in the future direction of this project, please take a look at our open [issues](https://github.com/sendgrid/sendgrid-go/issues) and [pull requests](https://github.com/sendgrid/sendgrid-go/pulls). We would love to hear your feedback.\n\n\u003ca name=\"contribute\"\u003e\u003c/a\u003e\n# How to Contribute\n\nWe encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/sendgrid/sendgrid-go/blob/master/CONTRIBUTING.md) guide for details.\n\nQuick links:\n\n- [Feature Request](https://github.com/sendgrid/sendgrid-go/tree/master/CONTRIBUTING.md#feature-request)\n- [Bug Reports](https://github.com/sendgrid/sendgrid-go/tree/master/CONTRIBUTING.md#submit-a-bug-report)\n- [Sign the CLA to Create a Pull Request](https://github.com/sendgrid/sendgrid-go/tree/master/CONTRIBUTING.md#cla)\n- [Improvements to the Codebase](https://github.com/sendgrid/sendgrid-go/tree/master/CONTRIBUTING.md#improvements-to-the-codebase)\n\n\u003ca name=\"troubleshooting\"\u003e\u003c/a\u003e\n# Troubleshooting\n\nPlease see our [troubleshooting guide](https://github.com/sendgrid/sendgrid-go/blob/master/TROUBLESHOOTING.md) for common library issues.\n\n\u003ca name=\"about\"\u003e\u003c/a\u003e\n# About\n\nsendgrid-go is guided and supported by the SendGrid [Developer Experience Team](mailto:dx@sendgrid.com).\n\nsendgrid-go is maintained and funded by SendGrid, Inc. The names and logos for sendgrid-go are trademarks of SendGrid, Inc.\n\n# License\n[The MIT License (MIT)](LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiquido%2Fsendgrid-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiquido%2Fsendgrid-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiquido%2Fsendgrid-go/lists"}