# README
Go API client for
The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur.
For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week.
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.233700Z[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 |
---|---|---|---|
CreateAlert | CreateAlert | Post /v3/alerts | Create a new Alert |
DeleteAlert | DeleteAlert | Delete /v3/alerts/{AlertId} | Delete an alert |
GetAlert | GetAlert | Get /v3/alerts/{AlertId} | Retrieve a specific alert |
ListAlert | ListAlert | Get /v3/alerts | Retrieve all alerts |
UpdateAlert | UpdateAlert | Patch /v3/alerts/{AlertId} | Update an alert |
Documentation For Models
- CreateAlert201Response
- CreateAlertRequest
- ErrorResponse
- ErrorResponseErrorsInner
- GetAlert200Response
- ListAlert200ResponseInner
- Type
- Type1
- Type2
- Type3
- UpdateAlert200Response
- UpdateAlertRequest
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)