openapi

package
v4.0.0-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 6 Imported by: 0

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: 2024-10-24T13:26:03.044420Z[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

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)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddIpToAuthenticatedDomainParam

type AddIpToAuthenticatedDomainParam struct {
	// ID of the domain to which you are adding an IP
	Id *int32 `json:"id"`
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
	//
	AddIpToAuthenticatedDomainRequest *AddIpToAuthenticatedDomainRequest `json:"AddIpToAuthenticatedDomainRequest,omitempty"`
}

func (*AddIpToAuthenticatedDomainParam) SetAddIpToAuthenticatedDomainRequest

func (params *AddIpToAuthenticatedDomainParam) SetAddIpToAuthenticatedDomainRequest(AddIpToAuthenticatedDomainRequest AddIpToAuthenticatedDomainRequest) *AddIpToAuthenticatedDomainParam

func (*AddIpToAuthenticatedDomainParam) SetId

func (*AddIpToAuthenticatedDomainParam) SetOnbehalfof

func (params *AddIpToAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *AddIpToAuthenticatedDomainParam

type AddIpToAuthenticatedDomainRequest

type AddIpToAuthenticatedDomainRequest struct {
	// IP to associate with the domain. Used for manually specifying IPs for custom SPF.
	Ip string `json:"ip"`
}

AddIpToAuthenticatedDomainRequest struct for AddIpToAuthenticatedDomainRequest

type ApiService

type ApiService struct {
	// contains filtered or unexported fields
}

func NewApiService

func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService

func NewApiServiceWithClient

func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService

func (*ApiService) AddIpToAuthenticatedDomain

func (c *ApiService) AddIpToAuthenticatedDomain(params *AddIpToAuthenticatedDomainParam) (interface{}, error)

**This endpoint allows you to add an IP address to an authenticated domain.**

func (*ApiService) AssociateSubuserWithDomain

func (c *ApiService) AssociateSubuserWithDomain(params *AssociateSubuserWithDomainParam) (interface{}, error)

**This endpoint allows you to associate a specific authenticated domain with a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. [You can associate more than one domain with a subuser using the `v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple).

func (*ApiService) AssociateSubuserWithDomainMultiple

func (c *ApiService) AssociateSubuserWithDomainMultiple(params *AssociateSubuserWithDomainMultipleParam) (interface{}, error)

**This endpoint allows you to associate a specific authenticated domain with a subuser. It can be used to associate up to five authenticated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. A subuser can have up to five associated authenticated domains. To see the domains that have already been associated with this user, you can [use the API to list the domains currently associated with the subuser](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple). When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net

func (*ApiService) AuthenticateDomain

func (c *ApiService) AuthenticateDomain(params *AuthenticateDomainParam) (interface{}, error)

**This endpoint allows you to authenticate a domain.** If you are authenticating a domain for a subuser, you have two options: 1. Use the \"username\" parameter. This allows you to authenticate a domain on behalf of your subuser. This means the subuser is able to see and modify the authenticated domain. 2. Use the Association workflow (see Associate Domain section). This allows you to authenticate a domain created by the parent to a subuser. This means the subuser will default to the assigned domain, but will not be able to see or modify that authenticated domain. However, if the subuser authenticates their own domain it will overwrite the assigned domain.

func (*ApiService) DeleteAuthenticatedDomain

func (c *ApiService) DeleteAuthenticatedDomain(params *DeleteAuthenticatedDomainParam) (interface{}, error)

**This endpoint allows you to delete an authenticated domain.**

func (*ApiService) DeleteIpFromAuthenticatedDomain

func (c *ApiService) DeleteIpFromAuthenticatedDomain(params *DeleteIpFromAuthenticatedDomainParam) (interface{}, error)

**This endpoint allows you to remove an IP address from that domain's authentication.**

func (*ApiService) DisassociateAuthenticatedDomainFromUser

func (c *ApiService) DisassociateAuthenticatedDomainFromUser(params *DisassociateAuthenticatedDomainFromUserParam) (interface{}, error)

**This endpoint allows you to disassociate a specific authenticated domain from a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you should use the [`/v3/whitelabel/domains/{domain_id}/subuser` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/disassociate-an-authenticated-domain-from-a-subuser-multiple) to disassociate those domains.

func (*ApiService) DisassociateSubuserFromDomain

func (c *ApiService) DisassociateSubuserFromDomain(params *DisassociateSubuserFromDomainParam) (interface{}, error)

**This endpoint allows you to disassociate a specific authenticated domain from a subuser, for users with up to five associated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers kknt, and a subuser can have up to five associated authenticated domains. You can dissociate an authenticated domain from any subuser that has one or more authenticated domains using this endpoint.

func (*ApiService) EmailDnsRecord

func (c *ApiService) EmailDnsRecord(params *EmailDnsRecordParam) (interface{}, error)

**This endpoint is used to share DNS records with a colleagues** Use this endpoint to send SendGrid-generated DNS record information to a co-worker so they can enter it into your DNS provider to validate your domain and link branding. What type of records are sent will depend on whether you have chosen Automated Security or not. When using Automated Security, SendGrid provides you with three CNAME records. If you turn Automated Security off, you are instead given TXT and MX records. If you pass a `link_id` to this endpoint, the generated email will supply the DNS records necessary to complete [Link Branding](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) setup. If you pass a `domain_id` to this endpoint, the generated email will supply the DNS records needed to complete [Domain Authentication](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Passing both IDs will generate an email with the records needed to complete both setup steps. You can retrieve all your domain IDs from the returned `id` fields for each domain using the \"List all authenticated domains\" endpoint. You can retrieve all of your link IDs using the \"Retrieve all branded links\" endpoint.

func (*ApiService) GetAuthenticatedDomain

func (c *ApiService) GetAuthenticatedDomain(params *GetAuthenticatedDomainParam) (interface{}, error)

**This endpoint allows you to retrieve a specific authenticated domain.**

func (*ApiService) ListAllAuthenticatedDomainWithUser

func (c *ApiService) ListAllAuthenticatedDomainWithUser(params *ListAllAuthenticatedDomainWithUserParam) (interface{}, error)

**This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account, and a subuser can have up to five associated domains. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net

func (*ApiService) ListAuthenticatedDomain

func (c *ApiService) ListAuthenticatedDomain(params *ListAuthenticatedDomainParam) (interface{}, error)

**This endpoint allows you to retrieve a paginated list of all domains you have authenticated.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items.

func (*ApiService) ListAuthenticatedDomainWithUser

func (c *ApiService) ListAuthenticatedDomainWithUser(params *ListAuthenticatedDomainWithUserParam) (interface{}, error)

**This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint]( https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you can use the [`/v3/whitelabel/domains/subuser/all` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple) to list those associated domains.

func (*ApiService) ListDefaultAuthenticatedDomain

func (c *ApiService) ListDefaultAuthenticatedDomain(params *ListDefaultAuthenticatedDomainParam) (interface{}, error)

**This endpoint allows you to retrieve the default authentication for a domain.** When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden. This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status.

func (*ApiService) UpdateAuthenticatedDomain

func (c *ApiService) UpdateAuthenticatedDomain(params *UpdateAuthenticatedDomainParam) (interface{}, error)

**This endpoint allows you to update the settings for an authenticated domain.**

func (*ApiService) ValidateAuthenticatedDomain

func (c *ApiService) ValidateAuthenticatedDomain(params *ValidateAuthenticatedDomainParam) (interface{}, error)

**This endpoint allows you to validate an authenticated domain. If it fails, it will return an error message describing why the domain could not be validated.**

type AssociateSubuserWithDomainMultipleParam

type AssociateSubuserWithDomainMultipleParam struct {
	// ID of the authenticated domain to associate with the subuser.
	DomainId *int32 `json:"domain_id"`
	//
	AssociateSubuserWithDomainRequest *AssociateSubuserWithDomainRequest `json:"AssociateSubuserWithDomainRequest,omitempty"`
}

func (*AssociateSubuserWithDomainMultipleParam) SetAssociateSubuserWithDomainRequest

func (params *AssociateSubuserWithDomainMultipleParam) SetAssociateSubuserWithDomainRequest(AssociateSubuserWithDomainRequest AssociateSubuserWithDomainRequest) *AssociateSubuserWithDomainMultipleParam

func (*AssociateSubuserWithDomainMultipleParam) SetDomainId

type AssociateSubuserWithDomainParam

type AssociateSubuserWithDomainParam struct {
	// ID of the authenticated domain to associate with the subuser.
	DomainId *int32 `json:"domain_id"`
	//
	AssociateSubuserWithDomainRequest *AssociateSubuserWithDomainRequest `json:"AssociateSubuserWithDomainRequest,omitempty"`
}

func (*AssociateSubuserWithDomainParam) SetAssociateSubuserWithDomainRequest

func (params *AssociateSubuserWithDomainParam) SetAssociateSubuserWithDomainRequest(AssociateSubuserWithDomainRequest AssociateSubuserWithDomainRequest) *AssociateSubuserWithDomainParam

func (*AssociateSubuserWithDomainParam) SetDomainId

type AssociateSubuserWithDomainRequest

type AssociateSubuserWithDomainRequest struct {
	// Username to associate with the authenticated domain.
	Username string `json:"username"`
}

AssociateSubuserWithDomainRequest struct for AssociateSubuserWithDomainRequest

type AuthenticateDomainParam

type AuthenticateDomainParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
	//
	AuthenticateDomainRequest *AuthenticateDomainRequest `json:"AuthenticateDomainRequest,omitempty"`
}

func (*AuthenticateDomainParam) SetAuthenticateDomainRequest

func (params *AuthenticateDomainParam) SetAuthenticateDomainRequest(AuthenticateDomainRequest AuthenticateDomainRequest) *AuthenticateDomainParam

func (*AuthenticateDomainParam) SetOnbehalfof

func (params *AuthenticateDomainParam) SetOnbehalfof(Onbehalfof string) *AuthenticateDomainParam

type AuthenticateDomainRequest

type AuthenticateDomainRequest struct {
	// Domain being authenticated.
	Domain string `json:"domain"`
	// The subdomain to use for this authenticated domain.
	Subdomain *string `json:"subdomain,omitempty"`
	// The username associated with this domain.
	Username *string `json:"username,omitempty"`
	// The IP addresses that will be included in the custom SPF record for this authenticated domain.
	Ips *[]string `json:"ips,omitempty"`
	// Specify whether to use a custom SPF or allow SendGrid to manage your SPF. This option is only available to authenticated domains set up for manual security.
	CustomSpf *bool `json:"custom_spf,omitempty"`
	// Whether to use this authenticated domain as the fallback if no authenticated domains match the sender's domain.
	Default *bool `json:"default,omitempty"`
	// Whether to allow SendGrid to manage your SPF records, DKIM keys, and DKIM key rotation.
	AutomaticSecurity *bool `json:"automatic_security,omitempty"`
	// Add a custom DKIM selector. Accepts three letters or numbers.
	CustomDkimSelector *string `json:"custom_dkim_selector,omitempty"`
	// The region of the domain. Allowed values are `global` and `eu`. The default value is `global`.
	Region *string `json:"region,omitempty"`
}

AuthenticateDomainRequest struct for AuthenticateDomainRequest

type AuthenticatedDomain

type AuthenticatedDomain struct {
	// The ID of the authenticated domain.
	Id float32 `json:"id"`
	// The ID of the user that this domain is associated with.
	UserId float32 `json:"user_id"`
	// The subdomain to use for this authenticated domain.
	Subdomain string `json:"subdomain"`
	// The domain to be authenticated.
	Domain string `json:"domain"`
	// The username that this domain will be associated with.
	Username string `json:"username"`
	// The IPs to be included in the custom SPF record for this authenticated domain.
	Ips []string `json:"ips"`
	// Indicates whether this authenticated domain uses custom SPF.
	CustomSpf bool `json:"custom_spf"`
	// Indicates if this is the default authenticated domain.
	Default bool `json:"default"`
	// Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it.
	Legacy bool `json:"legacy"`
	// Indicates if this authenticated domain uses automated security.
	AutomaticSecurity bool `json:"automatic_security"`
	// Indicates if this is a valid authenticated domain.
	Valid bool                                                  `json:"valid"`
	Dns   ListAllAuthenticatedDomainWithUser200ResponseInnerDns `json:"dns"`
}

AuthenticatedDomain struct for AuthenticatedDomain

type AuthenticatedDomainSpf

type AuthenticatedDomainSpf struct {
	// The ID of the authenticated domain.
	Id int32 `json:"id"`
	// The domain authenticated.
	Domain string `json:"domain"`
	// The subdomain that was used to create this authenticated domain.
	Subdomain *string `json:"subdomain,omitempty"`
	// The username of the account that this authenticated domain is associated with.
	Username string `json:"username"`
	// The user_id of the account that this authenticated domain is associated with.
	UserId int32 `json:"user_id"`
	// The IP addresses that are included in the SPF record for this authenticated domain.
	Ips []interface{} `json:"ips"`
	// Indicates if this authenticated domain uses custom SPF.
	CustomSpf bool `json:"custom_spf"`
	// Indicates if this is the default domain.
	Default bool `json:"default"`
	// Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it.
	Legacy bool `json:"legacy"`
	// Indicates if this authenticated domain uses automated security.
	AutomaticSecurity bool `json:"automatic_security"`
	// Indicates if this is a valid authenticated domain .
	Valid bool                      `json:"valid"`
	Dns   AuthenticatedDomainSpfDns `json:"dns"`
}

AuthenticatedDomainSpf struct for AuthenticatedDomainSpf

type AuthenticatedDomainSpfDns

type AuthenticatedDomainSpfDns struct {
	MailServer   AuthenticatedDomainSpfDnsMailServer   `json:"mail_server"`
	SubdomainSpf AuthenticatedDomainSpfDnsSubdomainSpf `json:"subdomain_spf"`
	DomainSpf    AuthenticatedDomainSpfDnsDomainSpf    `json:"domain_spf"`
	Dkim         AuthenticatedDomainSpfDnsDkim         `json:"dkim"`
}

AuthenticatedDomainSpfDns The DNS records for this authenticated domain.

type AuthenticatedDomainSpfDnsDkim

type AuthenticatedDomainSpfDnsDkim struct {
	// The DNS labels for the DKIM signature.
	Host string `json:"host"`
	// The type of data in the DKIM record.
	Type string `json:"type"`
	// The DKIM record.
	Data string `json:"data"`
	// Indicates if the DKIM record is valid.
	Valid bool `json:"valid"`
}

AuthenticatedDomainSpfDnsDkim The DKIM record for messages sent using this authenticated domain.

type AuthenticatedDomainSpfDnsDomainSpf

type AuthenticatedDomainSpfDnsDomainSpf struct {
	// The root domain that this SPF record will be used to authenticate.
	Host string `json:"host"`
	// The type of data in the SPF record.
	Type string `json:"type"`
	// The SPF record.
	Data string `json:"data"`
	// Indicates if the SPF record is valid.
	Valid bool `json:"valid"`
}

AuthenticatedDomainSpfDnsDomainSpf The SPF record for the root domain.

type AuthenticatedDomainSpfDnsMailServer

type AuthenticatedDomainSpfDnsMailServer struct {
	// The domain sending the messages.
	Host string `json:"host"`
	// They type of DNS record.
	Type string `json:"type"`
	// The mail server responsible for accepting messages from the sending domain.
	Data string `json:"data"`
	// Indicates if this is a valid DNS record.
	Valid bool `json:"valid"`
}

AuthenticatedDomainSpfDnsMailServer Designates which mail server is responsible for accepting messages from a domain.

type AuthenticatedDomainSpfDnsSubdomainSpf

type AuthenticatedDomainSpfDnsSubdomainSpf struct {
	// The domain that this SPF record will be used to authenticate.
	Host string `json:"host"`
	// The type of data in the SPF record.
	Type string `json:"type"`
	// The SPF record.
	Data string `json:"data"`
	// Indicates if this is a valid SPF record.
	Valid bool `json:"valid"`
}

AuthenticatedDomainSpfDnsSubdomainSpf The SPF record for the subdomain used to create this authenticated domain.

type DeleteAuthenticatedDomainParam

type DeleteAuthenticatedDomainParam struct {
	//
	DomainId *string `json:"domain_id"`
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*DeleteAuthenticatedDomainParam) SetDomainId

func (*DeleteAuthenticatedDomainParam) SetOnbehalfof

func (params *DeleteAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *DeleteAuthenticatedDomainParam

type DeleteIpFromAuthenticatedDomainParam

type DeleteIpFromAuthenticatedDomainParam struct {
	// ID of the domain to delete the IP from.
	Id *int32 `json:"id"`
	// IP to remove from the domain.
	Ip *string `json:"ip"`
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*DeleteIpFromAuthenticatedDomainParam) SetId

func (*DeleteIpFromAuthenticatedDomainParam) SetIp

func (*DeleteIpFromAuthenticatedDomainParam) SetOnbehalfof

type DisassociateAuthenticatedDomainFromUserParam

type DisassociateAuthenticatedDomainFromUserParam struct {
	// Username for the subuser to find associated authenticated domain.
	Username *string `json:"username,omitempty"`
}

func (*DisassociateAuthenticatedDomainFromUserParam) SetUsername

type DisassociateSubuserFromDomainParam

type DisassociateSubuserFromDomainParam struct {
	// ID of the authenticated domain to be disassociated with the subuser.
	DomainId *int32 `json:"domain_id"`
	// Username for the subuser to find associated authenticated domain.
	Username *string `json:"username,omitempty"`
}

func (*DisassociateSubuserFromDomainParam) SetDomainId

func (*DisassociateSubuserFromDomainParam) SetUsername

type EmailDnsRecord400Response

type EmailDnsRecord400Response struct {
	Errors *EmailDnsRecord400ResponseErrors `json:"errors,omitempty"`
}

EmailDnsRecord400Response struct for EmailDnsRecord400Response

type EmailDnsRecord400ResponseErrors

type EmailDnsRecord400ResponseErrors struct {
	Error *string `json:"error,omitempty"`
	Field *string `json:"field,omitempty"`
}

EmailDnsRecord400ResponseErrors struct for EmailDnsRecord400ResponseErrors

type EmailDnsRecordParam

type EmailDnsRecordParam struct {
	//
	EmailDnsRecordRequest *EmailDnsRecordRequest `json:"EmailDnsRecordRequest,omitempty"`
}

func (*EmailDnsRecordParam) SetEmailDnsRecordRequest

func (params *EmailDnsRecordParam) SetEmailDnsRecordRequest(EmailDnsRecordRequest EmailDnsRecordRequest) *EmailDnsRecordParam

type EmailDnsRecordRequest

type EmailDnsRecordRequest struct {
	// The ID of the branded link.
	LinkId int32 `json:"link_id"`
	// The ID of your SendGrid domain record.
	DomainId int32 `json:"domain_id"`
	// The email address to send the DNS information to.
	Email string `json:"email"`
	// A custom text block to include in the email body sent with the records.
	Message *string `json:"message,omitempty"`
}

EmailDnsRecordRequest struct for EmailDnsRecordRequest

type GetAuthenticatedDomainParam

type GetAuthenticatedDomainParam struct {
	//
	DomainId *string `json:"domain_id"`
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*GetAuthenticatedDomainParam) SetDomainId

func (params *GetAuthenticatedDomainParam) SetDomainId(DomainId string) *GetAuthenticatedDomainParam

func (*GetAuthenticatedDomainParam) SetOnbehalfof

func (params *GetAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *GetAuthenticatedDomainParam

type ListAllAuthenticatedDomainWithUser200ResponseInner

type ListAllAuthenticatedDomainWithUser200ResponseInner struct {
	// The ID of the authenticated domain.
	Id float32 `json:"id"`
	// The ID of the user that this domain is associated with.
	UserId float32 `json:"user_id"`
	// The subdomain to use for this authenticated domain.
	Subdomain string `json:"subdomain"`
	// The domain to be authenticated.
	Domain string `json:"domain"`
	// The username that this domain will be associated with.
	Username string `json:"username"`
	// The IPs to be included in the custom SPF record for this authenticated domain.
	Ips []string `json:"ips"`
	// Indicates whether this authenticated domain uses custom SPF.
	CustomSpf bool `json:"custom_spf"`
	// Indicates if this is the default authenticated domain.
	Default bool `json:"default"`
	// Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it.
	Legacy bool `json:"legacy"`
	// Indicates if this authenticated domain uses automated security.
	AutomaticSecurity bool `json:"automatic_security"`
	// Indicates if this is a valid authenticated domain.
	Valid bool                                                  `json:"valid"`
	Dns   ListAllAuthenticatedDomainWithUser200ResponseInnerDns `json:"dns"`
}

ListAllAuthenticatedDomainWithUser200ResponseInner struct for ListAllAuthenticatedDomainWithUser200ResponseInner

type ListAllAuthenticatedDomainWithUser200ResponseInnerDns

type ListAllAuthenticatedDomainWithUser200ResponseInnerDns struct {
	MailCname ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname `json:"mail_cname"`
	Dkim1     ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1     `json:"dkim1"`
	Dkim2     ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1     `json:"dkim2"`
}

ListAllAuthenticatedDomainWithUser200ResponseInnerDns The DNS records used to authenticate the sending domain.

type ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1

type ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 struct {
	// Indicates if this is a valid DNS record.
	Valid bool `json:"valid"`
	// The type of DNS record.
	Type string `json:"type"`
	// The domain that this DNS record was created for.
	Host string `json:"host"`
	// The DNS record.
	Data string `json:"data"`
}

ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 A DNS record.

type ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname

type ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname struct {
	// Indicates if this is a valid CNAME.
	Valid bool `json:"valid"`
	// The type of DNS record.
	Type string `json:"type"`
	// The domain that this CNAME is created for.
	Host string `json:"host"`
	// The CNAME record.
	Data string `json:"data"`
}

ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname The CNAME for your sending domain that points to sendgrid.net.

type ListAllAuthenticatedDomainWithUserParam

type ListAllAuthenticatedDomainWithUserParam struct {
	// Username for the subuser to find associated authenticated domains.
	Username *string `json:"username"`
}

func (*ListAllAuthenticatedDomainWithUserParam) SetUsername

type ListAuthenticatedDomainParam

type ListAuthenticatedDomainParam struct {
	// `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used.
	Limit *int32 `json:"limit,omitempty"`
	// The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list.
	Offset *int32 `json:"offset,omitempty"`
	// Exclude subuser domains from the result.
	ExcludeSubusers *bool `json:"exclude_subusers,omitempty"`
	// The username associated with an authenticated domain.
	Username *string `json:"username,omitempty"`
	// Search for authenticated domains.
	Domain *string `json:"domain,omitempty"`
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*ListAuthenticatedDomainParam) SetDomain

func (*ListAuthenticatedDomainParam) SetExcludeSubusers

func (params *ListAuthenticatedDomainParam) SetExcludeSubusers(ExcludeSubusers bool) *ListAuthenticatedDomainParam

func (*ListAuthenticatedDomainParam) SetLimit

func (*ListAuthenticatedDomainParam) SetOffset

func (*ListAuthenticatedDomainParam) SetOnbehalfof

func (params *ListAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *ListAuthenticatedDomainParam

func (*ListAuthenticatedDomainParam) SetUsername

func (params *ListAuthenticatedDomainParam) SetUsername(Username string) *ListAuthenticatedDomainParam

type ListAuthenticatedDomainWithUserParam

type ListAuthenticatedDomainWithUserParam struct {
	// Username for the subuser to find associated authenticated domain.
	Username *string `json:"username"`
}

func (*ListAuthenticatedDomainWithUserParam) SetUsername

type ListDefaultAuthenticatedDomainParam

type ListDefaultAuthenticatedDomainParam struct {
	// The domain to find a default authentication.
	Domain *string `json:"domain,omitempty"`
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*ListDefaultAuthenticatedDomainParam) SetDomain

func (*ListDefaultAuthenticatedDomainParam) SetOnbehalfof

type UpdateAuthenticatedDomainParam

type UpdateAuthenticatedDomainParam struct {
	//
	DomainId *string `json:"domain_id"`
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
	//
	UpdateAuthenticatedDomainRequest *UpdateAuthenticatedDomainRequest `json:"UpdateAuthenticatedDomainRequest,omitempty"`
}

func (*UpdateAuthenticatedDomainParam) SetDomainId

func (*UpdateAuthenticatedDomainParam) SetOnbehalfof

func (params *UpdateAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *UpdateAuthenticatedDomainParam

func (*UpdateAuthenticatedDomainParam) SetUpdateAuthenticatedDomainRequest

func (params *UpdateAuthenticatedDomainParam) SetUpdateAuthenticatedDomainRequest(UpdateAuthenticatedDomainRequest UpdateAuthenticatedDomainRequest) *UpdateAuthenticatedDomainParam

type UpdateAuthenticatedDomainRequest

type UpdateAuthenticatedDomainRequest struct {
	// Indicates whether this is the default authenticated domain.
	Default *bool `json:"default,omitempty"`
	// Indicates whether to generate a custom SPF record for manual security.
	CustomSpf *bool `json:"custom_spf,omitempty"`
}

UpdateAuthenticatedDomainRequest struct for UpdateAuthenticatedDomainRequest

type ValidateAuthenticatedDomain200Response

type ValidateAuthenticatedDomain200Response struct {
	// The ID of the authenticated domain.
	Id *int32 `json:"id,omitempty"`
	// Indicates if this is a valid authenticated domain.
	Valid             *bool                                                    `json:"valid,omitempty"`
	ValidationResults *ValidateAuthenticatedDomain200ResponseValidationResults `json:"validation_results,omitempty"`
}

ValidateAuthenticatedDomain200Response struct for ValidateAuthenticatedDomain200Response

type ValidateAuthenticatedDomain200ResponseValidationResults

type ValidateAuthenticatedDomain200ResponseValidationResults struct {
	MailCname *ValidateAuthenticatedDomain200ResponseValidationResultsMailCname `json:"mail_cname,omitempty"`
	Dkim1     *ValidateAuthenticatedDomain200ResponseValidationResultsDkim1     `json:"dkim1,omitempty"`
	Dkim2     *ValidateAuthenticatedDomain200ResponseValidationResultsDkim1     `json:"dkim2,omitempty"`
	Spf       *ValidateAuthenticatedDomain200ResponseValidationResultsSpf       `json:"spf,omitempty"`
}

ValidateAuthenticatedDomain200ResponseValidationResults The individual DNS records that are checked when validating, including the reason for any invalid DNS records.

type ValidateAuthenticatedDomain200ResponseValidationResultsDkim1

type ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 struct {
	// Indicates if the DNS record is valid.
	Valid  *bool   `json:"valid,omitempty"`
	Reason *string `json:"reason,omitempty"`
}

ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 A DNS record for this authenticated domain.

type ValidateAuthenticatedDomain200ResponseValidationResultsMailCname

type ValidateAuthenticatedDomain200ResponseValidationResultsMailCname struct {
	// Indicates if this DNS record is valid.
	Valid *bool `json:"valid,omitempty"`
	// The reason this record is invalid.
	Reason *string `json:"reason,omitempty"`
}

ValidateAuthenticatedDomain200ResponseValidationResultsMailCname The CNAME record for the authenticated domain.

type ValidateAuthenticatedDomain200ResponseValidationResultsSpf

type ValidateAuthenticatedDomain200ResponseValidationResultsSpf struct {
	// Indicates if the SPF record is valid.
	Valid  *bool   `json:"valid,omitempty"`
	Reason *string `json:"reason,omitempty"`
}

ValidateAuthenticatedDomain200ResponseValidationResultsSpf The SPF record for the authenticated domain.

type ValidateAuthenticatedDomain500Response

type ValidateAuthenticatedDomain500Response struct {
	Errors *[]ValidateAuthenticatedDomain500ResponseErrorsInner `json:"errors,omitempty"`
}

ValidateAuthenticatedDomain500Response struct for ValidateAuthenticatedDomain500Response

type ValidateAuthenticatedDomain500ResponseErrorsInner

type ValidateAuthenticatedDomain500ResponseErrorsInner struct {
	// A message explaining the reason for the error.
	Message string `json:"message"`
}

ValidateAuthenticatedDomain500ResponseErrorsInner struct for ValidateAuthenticatedDomain500ResponseErrorsInner

type ValidateAuthenticatedDomainParam

type ValidateAuthenticatedDomainParam struct {
	// ID of the domain to validate.
	Id *int32 `json:"id"`
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*ValidateAuthenticatedDomainParam) SetId

func (*ValidateAuthenticatedDomainParam) SetOnbehalfof

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL