# README
Go API client for
The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them.
You must purchase additional email activity history to gain access to the Email Activity Feed API.
See Getting Started with the Email Activity Feed API for help building queries and working with this API. You can also work with email activity in the Activity section of the Twilio SendGrid application user interface.
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.290021Z[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 |
---|---|---|---|
DownloadCsv | DownloadCsv | Get /v3/messages/download/{DownloadUuid} | Download CSV |
GetMessage | GetMessage | Get /v3/messages/{MsgId} | Filter messages by message ID |
ListMessage | ListMessage | Get /v3/messages | Filter all messages |
RequestCsv | RequestCsv | Post /v3/messages/download | Request CSV |
Documentation For Models
- AbbvMessage
- BounceType
- BounceType1
- DownloadCsv200Response
- EmailActivityResponseBaseProps
- Event
- EventName
- EventName1
- GetMessage404Response
- GetMessage404ResponseErrorsInner
- ListMessage200Response
- ListMessage400Response
- ListMessage400ResponseErrorsInner
- ListMessage429Response
- ListMessage429ResponseErrorsInner
- Message
- OutboundIpType
- OutboundIpType1
- RequestCsv202Response
- Status
- Status1
- Status2
- Status3
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)