package
4.0.0-rc.10
Repository: https://github.com/sendgrid/sendgrid-go.git
Documentation: pkg.go.dev

# 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

ClassMethodHTTP requestDescription
AddIpAddIpPost /v3/ipsAdd IPs
AddIpToIpPoolAddIpToIpPoolPost /v3/ips/pools/{PoolName}/ipsAdd an IP address to a pool
CreateIpPoolCreateIpPoolPost /v3/ips/poolsCreate an IP pool
DeleteIpFromIpPoolDeleteIpFromIpPoolDelete /v3/ips/pools/{PoolName}/ips/{Ip}Remove an IP address from a pool
DeleteIpPoolDeleteIpPoolDelete /v3/ips/pools/{PoolName}Delete an IP pool
GetIpGetIpGet /v3/ips/{IpAddress}Retrieve all IP pools an IP address belongs to
GetIpPoolGetIpPoolGet /v3/ips/pools/{PoolName}Retrieve all the IPs in a specified pool
ListAssignedIpListAssignedIpGet /v3/ips/assignedRetrieve all assigned IPs
ListIpListIpGet /v3/ipsRetrieve all IP addresses
ListIpPoolListIpPoolGet /v3/ips/poolsRetrieve all IP pools
ListRemainingIpCountListRemainingIpCountGet /v3/ips/remainingGet remaining IPs count
UpdateIpPoolUpdateIpPoolPut /v3/ips/pools/{PoolName}Rename an IP pool

Documentation For Models

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)