# README
Go API client for
The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the Dedicated IP Addresses for more information about obtaining and allocating IPs.
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.888623Z[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 |
---|---|---|---|
AddIp | AddIp | Post /v3/ips | Add IPs |
AddIpToIpPool | AddIpToIpPool | Post /v3/ips/pools/{PoolName}/ips | Add an IP address to a pool |
CreateIpPool | CreateIpPool | Post /v3/ips/pools | Create an IP pool |
DeleteIpFromIpPool | DeleteIpFromIpPool | Delete /v3/ips/pools/{PoolName}/ips/{Ip} | Remove an IP address from a pool |
DeleteIpPool | DeleteIpPool | Delete /v3/ips/pools/{PoolName} | Delete an IP pool |
GetIp | GetIp | Get /v3/ips/{IpAddress} | Retrieve all IP pools an IP address belongs to |
GetIpPool | GetIpPool | Get /v3/ips/pools/{PoolName} | Retrieve all the IPs in a specified pool |
ListAssignedIp | ListAssignedIp | Get /v3/ips/assigned | Retrieve all assigned IPs |
ListIp | ListIp | Get /v3/ips | Retrieve all IP addresses |
ListIpPool | ListIpPool | Get /v3/ips/pools | Retrieve all IP pools |
ListRemainingIpCount | ListRemainingIpCount | Get /v3/ips/remaining | Get remaining IPs count |
UpdateIpPool | UpdateIpPool | Put /v3/ips/pools/{PoolName} | Rename an IP pool |
Documentation For Models
- AddIp201Response
- AddIp201ResponseIpsInner
- AddIpRequest
- AddIpToIpPool201Response
- AddIpToIpPool404Response
- AddIpToIpPool404ResponseErrorsInner
- AddIpToIpPoolRequest
- CreateIpPoolRequest
- DeleteIpFromIpPool404Response
- DeleteIpPool404Response
- ErrorResponse
- ErrorResponseErrorsInner
- GetIp200Response
- GetIpPool200Response
- GetIpPool404Response
- GetIpPool404ResponseErrorsInner
- IpPools200
- ListAssignedIp200ResponseInner
- ListIp200ResponseInner
- ListRemainingIpCount200Response
- ListRemainingIpCount200ResponseResultsInner
- SortByDirection
- UpdateIpPool404Response
- UpdateIpPool404ResponseErrorsInner
- UpdateIpPoolRequest
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)