# README
Go API client for
The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs.
Overview
This API client was generated by the OpenAPI Generator project from the OpenAPI specs located at twilio/sendgrid-oai. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version:
- Build date: 2025-08-18T08:58:25.602653Z[Etc/UTC]
- Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit https://support.sendgrid.com/hc/en-us
Installation
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import "./"
Documentation for API Endpoints
All URIs are relative to https://api.sendgrid.com
Class | Method | HTTP request | Description |
---|---|---|---|
CreateMailBatch | CreateMailBatch | Post /v3/mail/batch | Create a batch ID. |
GetMailBatch | GetMailBatch | Get /v3/mail/batch/{BatchId} | Validate a batch ID. |
SendMail | SendMail | Post /v3/mail/send | Send Email with Twilio SendGrid. |
Documentation For Models
- ContentEncoding
- Disposition
- ErrorResponse
- ErrorResponseErrorsInner
- MailBatchResponse
- MailFrom
- MailTo
- SendMailRequest
- SendMailRequestAsm
- SendMailRequestAttachmentsInner
- SendMailRequestContentInner
- SendMailRequestMailSettings
- SendMailRequestMailSettingsBypassBounceManagement
- SendMailRequestMailSettingsBypassListManagement
- SendMailRequestMailSettingsBypassSpamManagement
- SendMailRequestMailSettingsBypassUnsubscribeManagement
- SendMailRequestMailSettingsFooter
- SendMailRequestMailSettingsSandboxMode
- SendMailRequestPersonalizationsInner
- SendMailRequestTrackingSettings
- SendMailRequestTrackingSettingsClickTracking
- SendMailRequestTrackingSettingsGanalytics
- SendMailRequestTrackingSettingsOpenTracking
- SendMailRequestTrackingSettingsSubscriptionTracking
Documentation For Authorization
BearerAuth
- Type: HTTP basic authentication
Example
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
UserName: "username",
Password: "password",
})
r, err := client.Service.Operation(auth, args)