# 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
Class | Method | HTTP request | Description |
---|---|---|---|
AddIpToAuthenticatedDomain | AddIpToAuthenticatedDomain | Post /v3/whitelabel/domains/{Id}/ips | Add an IP to an authenticated domain |
AssociateSubuserWithDomain | AssociateSubuserWithDomain | Post /v3/whitelabel/domains/{DomainId}/subuser | Associate an authenticated domain with a given user. |
AssociateSubuserWithDomainMultiple | AssociateSubuserWithDomainMultiple | Post /v3/whitelabel/domains/{DomainId}/subuser:add | Associate an authenticated domain with a given user, for up to five domains. |
AuthenticateDomain | AuthenticateDomain | Post /v3/whitelabel/domains | Authenticate a domain |
DeleteAuthenticatedDomain | DeleteAuthenticatedDomain | Delete /v3/whitelabel/domains/{DomainId} | Delete an authenticated domain. |
DeleteIpFromAuthenticatedDomain | DeleteIpFromAuthenticatedDomain | Delete /v3/whitelabel/domains/{Id}/ips/{Ip} | Remove an IP from an authenticated domain. |
DisassociateAuthenticatedDomainFromUser | DisassociateAuthenticatedDomainFromUser | Delete /v3/whitelabel/domains/subuser | Disassociate an authenticated domain from a given user. |
DisassociateSubuserFromDomain | DisassociateSubuserFromDomain | Delete /v3/whitelabel/domains/{DomainId}/subuser | Disassociate an authenticated domain from a given user for users with up to five associated domains. |
EmailDnsRecord | EmailDnsRecord | Post /v3/whitelabel/dns/email | Email DNS records to a co-worker |
GetAuthenticatedDomain | GetAuthenticatedDomain | Get /v3/whitelabel/domains/{DomainId} | Retrieve an authenticated domain |
ListAllAuthenticatedDomainWithUser | ListAllAuthenticatedDomainWithUser | Get /v3/whitelabel/domains/subuser/all | List all the authenticated domains associated with the given user. |
ListAuthenticatedDomain | ListAuthenticatedDomain | Get /v3/whitelabel/domains | List all authenticated domains |
ListAuthenticatedDomainWithUser | ListAuthenticatedDomainWithUser | Get /v3/whitelabel/domains/subuser | List the authenticated domain associated with the given user. |
ListDefaultAuthenticatedDomain | ListDefaultAuthenticatedDomain | Get /v3/whitelabel/domains/default | Get the default authentication |
UpdateAuthenticatedDomain | UpdateAuthenticatedDomain | Patch /v3/whitelabel/domains/{DomainId} | Update an authenticated domain |
ValidateAuthenticatedDomain | ValidateAuthenticatedDomain | Post /v3/whitelabel/domains/{Id}/validate | Validate a domain authentication. |
Documentation For Models
- AddIpToAuthenticatedDomainRequest
- AssociateSubuserWithDomainRequest
- AuthenticateDomainRequest
- AuthenticatedDomain
- AuthenticatedDomainSpf
- AuthenticatedDomainSpfDns
- AuthenticatedDomainSpfDnsDkim
- AuthenticatedDomainSpfDnsDomainSpf
- AuthenticatedDomainSpfDnsMailServer
- AuthenticatedDomainSpfDnsSubdomainSpf
- EmailDnsRecord400Response
- EmailDnsRecord400ResponseErrors
- EmailDnsRecordRequest
- ListAllAuthenticatedDomainWithUser200ResponseInner
- ListAllAuthenticatedDomainWithUser200ResponseInnerDns
- ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1
- ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname
- UpdateAuthenticatedDomainRequest
- ValidateAuthenticatedDomain200Response
- ValidateAuthenticatedDomain200ResponseValidationResults
- ValidateAuthenticatedDomain200ResponseValidationResultsDkim1
- ValidateAuthenticatedDomain200ResponseValidationResultsMailCname
- ValidateAuthenticatedDomain200ResponseValidationResultsSpf
- ValidateAuthenticatedDomain500Response
- ValidateAuthenticatedDomain500ResponseErrorsInner
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)