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 Domain Authentication API allows you to manage your authenticated domains and their settings.

Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see How to Set Up Domain Authentication.

Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings.

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.502629Z[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
AddIpToAuthenticatedDomainAddIpToAuthenticatedDomainPost /v3/whitelabel/domains/{Id}/ipsAdd an IP to an authenticated domain
AssociateSubuserWithDomainAssociateSubuserWithDomainPost /v3/whitelabel/domains/{DomainId}/subuserAssociate an authenticated domain with a given user.
AssociateSubuserWithDomainMultipleAssociateSubuserWithDomainMultiplePost /v3/whitelabel/domains/{DomainId}/subuser:addAssociate an authenticated domain with a given user, for up to five domains.
AuthenticateDomainAuthenticateDomainPost /v3/whitelabel/domainsAuthenticate a domain
DeleteAuthenticatedDomainDeleteAuthenticatedDomainDelete /v3/whitelabel/domains/{DomainId}Delete an authenticated domain.
DeleteIpFromAuthenticatedDomainDeleteIpFromAuthenticatedDomainDelete /v3/whitelabel/domains/{Id}/ips/{Ip}Remove an IP from an authenticated domain.
DisassociateAuthenticatedDomainFromUserDisassociateAuthenticatedDomainFromUserDelete /v3/whitelabel/domains/subuserDisassociate an authenticated domain from a given user.
DisassociateSubuserFromDomainDisassociateSubuserFromDomainDelete /v3/whitelabel/domains/{DomainId}/subuserDisassociate an authenticated domain from a given user for users with up to five associated domains.
EmailDnsRecordEmailDnsRecordPost /v3/whitelabel/dns/emailEmail DNS records to a co-worker
GetAuthenticatedDomainGetAuthenticatedDomainGet /v3/whitelabel/domains/{DomainId}Retrieve an authenticated domain
ListAllAuthenticatedDomainWithUserListAllAuthenticatedDomainWithUserGet /v3/whitelabel/domains/subuser/allList all the authenticated domains associated with the given user.
ListAuthenticatedDomainListAuthenticatedDomainGet /v3/whitelabel/domainsList all authenticated domains
ListAuthenticatedDomainWithUserListAuthenticatedDomainWithUserGet /v3/whitelabel/domains/subuserList the authenticated domain associated with the given user.
ListDefaultAuthenticatedDomainListDefaultAuthenticatedDomainGet /v3/whitelabel/domains/defaultGet the default authentication
UpdateAuthenticatedDomainUpdateAuthenticatedDomainPatch /v3/whitelabel/domains/{DomainId}Update an authenticated domain
ValidateAuthenticatedDomainValidateAuthenticatedDomainPost /v3/whitelabel/domains/{Id}/validateValidate a domain authentication.

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)