diff --git a/USAGE.md b/USAGE.md index 8b3949bd..1aececeb 100644 --- a/USAGE.md +++ b/USAGE.md @@ -36,6 +36,7 @@ host := "https://api.sendgrid.com" * [PARTNER SETTINGS](#partner-settings) * [SCOPES](#scopes) * [SENDERS](#senders) +* [SENDER AUTHENTICATION](#sender-authentication) * [STATS](#stats) * [SUBUSERS](#subusers) * [SUPPRESSION](#suppression) @@ -43,8 +44,6 @@ host := "https://api.sendgrid.com" * [TRACKING SETTINGS](#tracking-settings) * [ON-BEHALF OF SUBUSER](#on-behalf-of) * [USER](#user) -* [WHITELABEL](#whitelabel) - # ACCESS SETTINGS @@ -2311,7 +2310,7 @@ if err != nil { **This endpoint allows you to retrieve a list of all assigned and unassigned IPs.** -Response includes warm up status, pools, assigned subusers, and whitelabel info. The start_date field corresponds to when warmup started for that IP. +Response includes warm up status, pools, assigned subusers, and authentication info. The start_date field corresponds to when warmup started for that IP. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. @@ -2366,7 +2365,7 @@ if err != nil { IP Pools allow you to group your dedicated SendGrid IP addresses together. For example, you could create separate pools for your transactional and marketing email. When sending marketing emails, specify that you want to use the marketing IP pool. This allows you to maintain separate reputations for your different email traffic. -IP pools can only be used with whitelabeled IP addresses. +IP pools can only be used with authenticated IP addresses. If an IP pool is NOT specified for an email, it will use any IP available, including ones in pools. @@ -2394,7 +2393,7 @@ if err != nil { IP Pools allow you to group your dedicated SendGrid IP addresses together. For example, you could create separate pools for your transactional and marketing email. When sending marketing emails, specify that you want to use the marketing IP pool. This allows you to maintain separate reputations for your different email traffic. -IP pools can only be used with whitelabeled IP addresses. +IP pools can only be used with authenticated IP addresses. If an IP pool is NOT specified for an email, it will use any IP available, including ones in pools. @@ -2419,7 +2418,7 @@ if err != nil { IP Pools allow you to group your dedicated SendGrid IP addresses together. For example, you could create separate pools for your transactional and marketing email. When sending marketing emails, specify that you want to use the marketing IP pool. This allows you to maintain separate reputations for your different email traffic. -IP pools can only be used with whitelabeled IP addresses. +IP pools can only be used with authenticated IP addresses. If an IP pool is NOT specified for an email, it will use any IP available, including ones in pools. @@ -2447,7 +2446,7 @@ if err != nil { IP Pools allow you to group your dedicated SendGrid IP addresses together. For example, you could create separate pools for your transactional and marketing email. When sending marketing emails, specify that you want to use the marketing IP pool. This allows you to maintain separate reputations for your different email traffic. -IP pools can only be used with whitelabeled IP addresses. +IP pools can only be used with authenticated IP addresses. If an IP pool is NOT specified for an email, it will use any IP available, including ones in pools. @@ -2472,7 +2471,7 @@ if err != nil { IP Pools allow you to group your dedicated SendGrid IP addresses together. For example, you could create separate pools for your transactional and marketing email. When sending marketing emails, specify that you want to use the marketing IP pool. This allows you to maintain separate reputations for your different email traffic. -IP pools can only be used with whitelabeled IP addresses. +IP pools can only be used with authenticated IP addresses. If an IP pool is NOT specified for an email, it will use any IP available, including ones in pools. @@ -3509,7 +3508,7 @@ if err != nil { *You may create up to 100 unique sender identities.* -Sender Identities are required to be verified before use. If your domain has been whitelabeled it will auto verify on creation. Otherwise an email will be sent to the `from.email`. +Sender Identities are required to be verified before use. If your domain has been authenticated, it will auto verify on creation. Otherwise an email will be sent to the `from.email`. ### POST /senders @@ -3547,7 +3546,7 @@ if err != nil { **This endpoint allows you to retrieve a list of all sender identities that have been created for your account.** -Sender Identities are required to be verified before use. If your domain has been whitelabeled it will auto verify on creation. Otherwise an email will be sent to the `from.email`. +Sender Identities are required to be verified before use. If your domain has been authenticated, it will auto verify on creation. Otherwise an email will be sent to the `from.email`. ### GET /senders @@ -3568,7 +3567,7 @@ if err != nil { **This endpoint allows you to update a sender identity.** -Updates to `from.email` require re-verification. If your domain has been whitelabeled it will auto verify on creation. Otherwise an email will be sent to the `from.email`. +Updates to `from.email` require re-verification. If your domain has been authenticated, it will auto verify on creation. Otherwise an email will be sent to the `from.email`. Partial updates are allowed, but fields that are marked as "required" in the POST (create) endpoint must not be nil if that field is included in the PATCH request. @@ -3608,7 +3607,7 @@ if err != nil { **This endpoint allows you to retrieve a specific sender identity.** -Sender Identities are required to be verified before use. If your domain has been whitelabeled it will auto verify on creation. Otherwise an email will be sent to the `from.email`. +Sender Identities are required to be verified before use. If your domain has been authenticated, it will auto verify on creation. Otherwise an email will be sent to the `from.email`. ### GET /senders/{sender_id} @@ -3629,7 +3628,7 @@ if err != nil { **This endpoint allows you to delete one of your sender identities.** -Sender Identities are required to be verified before use. If your domain has been whitelabeled it will auto verify on creation. Otherwise an email will be sent to the `from.email`. +Sender Identities are required to be verified before use. If your domain has been authenticated, it will auto verify on creation. Otherwise an email will be sent to the `from.email`. ### DELETE /senders/{sender_id} @@ -3650,7 +3649,7 @@ if err != nil { **This endpoint allows you to resend a sender identity verification email.** -Sender Identities are required to be verified before use. If your domain has been whitelabeled it will auto verify on creation. Otherwise an email will be sent to the `from.email`. +Sender Identities are required to be verified before use. If your domain has been authenticated, it will auto verify on creation. Otherwise an email will be sent to the `from.email`. ### POST /senders/{sender_id}/resend_verification @@ -3667,62 +3666,37 @@ if err != nil { } ``` - -# STATS - -## Retrieve global email statistics - -**This endpoint allows you to retrieve all of your global email statistics between a given date range.** - -Parent accounts will see aggregated stats for their account and all subuser accounts. Subuser accounts will only see their own stats. - -### GET /stats - -```go -request := sendgrid.GetRequest(apiKey, "/v3/stats", host) -request.Method = "GET" -queryParams := make(map[string]string) -queryParams["aggregated_by"] = "day" -queryParams["limit"] = "1" -queryParams["start_date"] = "2016-01-01" -queryParams["end_date"] = "2016-04-01" -queryParams["offset"] = "1" -request.QueryParams = queryParams -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` + +# SENDER AUTHENTICATION - -# SUBUSERS +## Create an authenticated domain. -## Create Subuser +**This endpoint allows you to create a domain authentication for one of your domains.** -This endpoint allows you to retrieve a list of all of your subusers. You can choose to retrieve specific subusers as well as limit the results that come back from the API. +If you are creating a domain authentication that you would like a subuser to use, you have two options: +1. Use the "username" parameter. This allows you to create am authenticated subuser. This means the subuser is able to see and modify the created authentication. +2. Use the Association workflow (see Associate Domain section). This allows you to assign a domain authentication created by the parent to a subuser. This means the subuser will default to the assigned domain authentication, but will not be able to see or modify that authentication. However, if the subuser creates their own domain authentication it will overwrite the assigned domain authentication. -For more information about Subusers: +A domain authentication allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. -* [User Guide > Subusers](https://sendgrid.com/docs/User_Guide/Settings/Subusers/index.html) -* [Classroom > How do I add more subusers to my account?](https://sendgrid.com/docs/Classroom/Basics/Account/how_do_i_add_more_subusers_to_my_account.html) +For more information on domain authentication, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) -### POST /subusers +### POST /whitelabel/domains ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers", host) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains", host) request.Method = "POST" request.Body = []byte(` { - "email": "John@example.com", + "automatic_security": false, + "custom_spf": true, + "default": true, + "domain": "example.com", "ips": [ - "1.1.1.1", - "2.2.2.2" + "192.168.1.1", + "192.168.1.2" ], - "password": "johns_password", - "username": "John@example.com" + "subdomain": "news", + "username": "john@example.com" }`) response, err := sendgrid.API(request) if err != nil { @@ -3734,22 +3708,24 @@ if err != nil { } ``` -## List all Subusers +## List all domain authentications. -This endpoint allows you to retrieve a list of all of your subusers. You can choose to retrieve specific subusers as well as limit the results that come back from the API. +**This endpoint allows you to retrieve a list of all domain authentications you have created.** -For more information about Subusers: +A domain authentication allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. -* [User Guide > Subusers](https://sendgrid.com/docs/User_Guide/Settings/Subusers/index.html) -* [Classroom > How do I add more subusers to my account?](https://sendgrid.com/docs/Classroom/Basics/Account/how_do_i_add_more_subusers_to_my_account.html) +For more information on domain authentication, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) -### GET /subusers + +### GET /whitelabel/domains ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers", host) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains", host) request.Method = "GET" queryParams := make(map[string]string) queryParams["username"] = "test_string" +queryParams["domain"] = "test_string" +queryParams["exclude_subusers"] = "true" queryParams["limit"] = "1" queryParams["offset"] = "1" request.QueryParams = queryParams @@ -3763,20 +3739,24 @@ if err != nil { } ``` -## Retrieve Subuser Reputations +## Get the default domain authentication. -Subuser sender reputations give a good idea how well a sender is doing with regards to how recipients and recipient servers react to the mail that is being received. When a bounce, spam report, or other negative action happens on a sent email, it will effect your sender rating. +**This endpoint allows you to retrieve the default authentication for a domain.** -This endpoint allows you to request the reputations for your subusers. +A domain authentication allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. -### GET /subusers/reputations +For more information on domain authentication, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) + +## URI Parameters +| URI Parameter | Type | Description | +|---|---|---| +| domain | string |The domain to find a default domain whitelabel for. | + +### GET /whitelabel/domains/default ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers/reputations", host) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/default", host) request.Method = "GET" -queryParams := make(map[string]string) -queryParams["usernames"] = "test_string" -request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -3787,29 +3767,26 @@ if err != nil { } ``` -## Retrieve email statistics for your subusers. +## List the domain authentication associated with the given user. -**This endpoint allows you to retrieve the email statistics for the given subusers.** +**This endpoint allows you to retrieve all of the domain authentications that have been assigned to a specific subuser.** -You may retrieve statistics for up to 10 different subusers by including an additional _subusers_ parameter for each additional subuser. +A domain authentication allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. -While you can always view the statistics for all email activity on your account, subuser statistics enable you to view specific segments of your stats. Emails sent, bounces, and spam reports are always tracked for subusers. Unsubscribes, clicks, and opens are tracked if you have enabled the required settings. +Domain authentications can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's authenticated domains. To associate a domain authentication with a subuser, the parent account must first create the domain authentication and validate it. The parent may then associate the domain authentication via the subuser management tools. -For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/Statistics/subuser.html). +For more information on domain authentication, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) -### GET /subusers/stats +## URI Parameters +| URI Parameter | Type | Description | +|---|---|---| +| username | string | Username of the subuser to find associated whitelabels for. | + +### GET /whitelabel/domains/subuser ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers/stats", host) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/subuser", host) request.Method = "GET" -queryParams := make(map[string]string) -queryParams["end_date"] = "2016-04-01" -queryParams["aggregated_by"] = "day" -queryParams["limit"] = "1" -queryParams["offset"] = "1" -queryParams["start_date"] = "2016-01-01" -queryParams["subusers"] = "test_string" -request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -3820,30 +3797,26 @@ if err != nil { } ``` -## Retrieve monthly stats for all subusers +## Disassociate a domain authentication from a given user. -**This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.** +**This endpoint allows you to disassociate a specific domain authentication from a subuser.** -While you can always view the statistics for all email activity on your account, subuser statistics enable you to view specific segments of your stats for your subusers. Emails sent, bounces, and spam reports are always tracked for subusers. Unsubscribes, clicks, and opens are tracked if you have enabled the required settings. +A domain authentication allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. -When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: -`bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. +Domain authentications can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's authenticated domains. To associate a domain authentication with a subuser, the parent account must first create the domain authentication and validate it. The parent may then associate the domain authentication via the subuser management tools. -For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/Statistics/subuser.html). +For more information on domain authentication, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) -### GET /subusers/stats/monthly +## URI Parameters +| URI Parameter | Type | Required? | Description | +|---|---|---|---| +| username | string | required | Username for the subuser to find associated whitelabels for. | + +### DELETE /whitelabel/domains/subuser ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers/stats/monthly", host) -request.Method = "GET" -queryParams := make(map[string]string) -queryParams["subuser"] = "test_string" -queryParams["limit"] = "1" -queryParams["sort_by_metric"] = "test_string" -queryParams["offset"] = "1" -queryParams["date"] = "test_string" -queryParams["sort_by_direction"] = "asc" -request.QueryParams = queryParams +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/subuser", host) +request.Method = "DELETE" response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -3854,29 +3827,23 @@ if err != nil { } ``` -## Retrieve the totals for each email statistic metric for all subusers. - -**This endpoint allows you to retrieve the total sums of each email statistic metric for all subusers over the given date range.** +## Update a domain authentication. +**This endpoint allows you to update the settings for a domain authentication.** -While you can always view the statistics for all email activity on your account, subuser statistics enable you to view specific segments of your stats. Emails sent, bounces, and spam reports are always tracked for subusers. Unsubscribes, clicks, and opens are tracked if you have enabled the required settings. +A domain authentication allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. -For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/Statistics/subuser.html). +For more information on domain authentication, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) -### GET /subusers/stats/sums +### PATCH /whitelabel/domains/{domain_id} ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers/stats/sums", host) -request.Method = "GET" -queryParams := make(map[string]string) -queryParams["end_date"] = "2016-04-01" -queryParams["aggregated_by"] = "day" -queryParams["limit"] = "1" -queryParams["sort_by_metric"] = "test_string" -queryParams["offset"] = "1" -queryParams["start_date"] = "2016-01-01" -queryParams["sort_by_direction"] = "asc" -request.QueryParams = queryParams +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{domain_id}", host) +request.Method = "PATCH" +request.Body = []byte(` { + "custom_spf": true, + "default": false +}`) response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -3887,23 +3854,20 @@ if err != nil { } ``` -## Enable/disable a subuser +## Retrieve a domain authentication. -This endpoint allows you to enable or disable a subuser. +**This endpoint allows you to retrieve a specific domain authentication.** -For more information about Subusers: +A domain authentication allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. -* [User Guide > Subusers](https://sendgrid.com/docs/User_Guide/Settings/Subusers/index.html) -* [Classroom > How do I add more subusers to my account?](https://sendgrid.com/docs/Classroom/Basics/Account/how_do_i_add_more_subusers_to_my_account.html) +For more information on domain authentication, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) -### PATCH /subusers/{subuser_name} + +### GET /whitelabel/domains/{domain_id} ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}", host) -request.Method = "PATCH" -request.Body = []byte(` { - "disabled": false -}`) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{domain_id}", host) +request.Method = "GET" response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -3914,19 +3878,18 @@ if err != nil { } ``` -## Delete a subuser +## Delete a domain authentication. -This endpoint allows you to delete a subuser. This is a permanent action, once deleted a subuser cannot be retrieved. +**This endpoint allows you to delete a domain authentication.** -For more information about Subusers: +A domain authentication allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. -* [User Guide > Subusers](https://sendgrid.com/docs/User_Guide/Settings/Subusers/index.html) -* [Classroom > How do I add more subusers to my account?](https://sendgrid.com/docs/Classroom/Basics/Account/how_do_i_add_more_subusers_to_my_account.html) +For more information on domain authentication, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) -### DELETE /subusers/{subuser_name} +### DELETE /whitelabel/domains/{domain_id} ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}", host) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{domain_id}", host) request.Method = "DELETE" response, err := sendgrid.API(request) if err != nil { @@ -3938,23 +3901,29 @@ if err != nil { } ``` -## Update IPs assigned to a subuser +## Associate a domain authentication with a given user. -Each subuser should be assigned to an IP address, from which all of this subuser's mail will be sent. Often, this is the same IP as the parent account, but each subuser can have their own, or multiple, IP addresses as well. +**This endpoint allows you to associate a specific domain authentication with a subuser.** -More information: +A domain authentication allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. -* [How to request more IPs](https://sendgrid.com/docs/Classroom/Basics/Account/adding_an_additional_dedicated_ip_to_your_account.html) -* [IPs can be whitelabeled](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/ips.html) +Domain authentications can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's authenticated domains. To associate a domain authentication with a subuser, the parent account must first create the domain authentication and validate it. The parent may then associate the domain authentication via the subuser management tools. -### PUT /subusers/{subuser_name}/ips +For more information on domain authentication, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) + +## URI Parameters +| URI Parameter | Type | Description | +|---|---|---| +| domain_id | integer | ID of the domain whitelabel to associate with the subuser. | + +### POST /whitelabel/domains/{domain_id}/subuser ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}/ips", host) -request.Method = "PUT" -request.Body = []byte(` [ - "127.0.0.1" -]`) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{domain_id}/subuser", host) +request.Method = "POST" +request.Body = []byte(` { + "username": "jane@example.com" +}`) response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -3965,18 +3934,26 @@ if err != nil { } ``` -## Update Monitor Settings for a subuser +## Add an IP to a domain authentication. -Subuser monitor settings allow you to receive a sample of an outgoing message by a specific customer at a specific frequency of emails. +**This endpoint allows you to add an IP address to a domain authentication.** -### PUT /subusers/{subuser_name}/monitor +A domain authentication allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. + +For more information on domain authentication, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) + +## URI Parameters +| URI Parameter | Type | Description | +|---|---|---| +| id | integer | ID of the domain to which you are adding an IP | + +### POST /whitelabel/domains/{id}/ips ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}/monitor", host) -request.Method = "PUT" +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{id}/ips", host) +request.Method = "POST" request.Body = []byte(` { - "email": "example@example.com", - "frequency": 500 + "ip": "192.168.0.1" }`) response, err := sendgrid.API(request) if err != nil { @@ -3988,19 +3965,25 @@ if err != nil { } ``` -## Create monitor settings +## Remove an IP from a domain authenticaiton. -Subuser monitor settings allow you to receive a sample of an outgoing message by a specific customer at a specific frequency of emails. +**This endpoint allows you to remove a domain's IP address from that domain's authentication.** -### POST /subusers/{subuser_name}/monitor +A domain authentication allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. + +For more information on domain authentication, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) + +## URI Parameters +| URI Parameter | Type | Description | +|---|---|---| +| id | integer | ID of the domain whitelabel to delete the IP from. | +| ip | string | IP to remove from the domain whitelabel. | + +### DELETE /whitelabel/domains/{id}/ips/{ip} ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}/monitor", host) -request.Method = "POST" -request.Body = []byte(` { - "email": "example@example.com", - "frequency": 50000 -}`) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{id}/ips/{ip}", host) +request.Method = "DELETE" response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4011,15 +3994,24 @@ if err != nil { } ``` -## Retrieve monitor settings for a subuser +## Validate a domain authentication. -Subuser monitor settings allow you to receive a sample of an outgoing message by a specific customer at a specific frequency of emails. +**This endpoint allows you to validate a domain authentication. If it fails, it will return an error message describing why the domain could not be validated.** -### GET /subusers/{subuser_name}/monitor +A domain authentication allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Authenticating a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. + +For more information on domain authentication, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) + +## URI Parameters +| URI Parameter | Type | Description | +|---|---|---| +| id | integer |ID of the domain whitelabel to validate. | + +### POST /whitelabel/domains/{id}/validate ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}/monitor", host) -request.Method = "GET" +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{id}/validate", host) +request.Method = "POST" response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4030,48 +4022,26 @@ if err != nil { } ``` -## Delete monitor settings +## Create reverse DNS record -Subuser monitor settings allow you to receive a sample of an outgoing message by a specific customer at a specific frequency of emails. +**This endpoint allows you to create a reverse DNS record.** -### DELETE /subusers/{subuser_name}/monitor +When creating a reverse DNS record, you should use the same subdomain that you used when you created a domain authentication. -```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}/monitor", host) -request.Method = "DELETE" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Retrieve the monthly email statistics for a single subuser - -**This endpoint allows you to retrieve the monthly email statistics for a specific subuser.** +Reverse DNS consists of a subdomain and domain that will be used to generate a record for a given IP. Once SendGrid has verified that the appropriate A record for the IP has been created, the appropriate reverse DNS record for the IP is generated. -While you can always view the statistics for all email activity on your account, subuser statistics enable you to view specific segments of your stats for your subusers. Emails sent, bounces, and spam reports are always tracked for subusers. Unsubscribes, clicks, and opens are tracked if you have enabled the required settings. - -When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: -`bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/). -For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/Statistics/subuser.html). - -### GET /subusers/{subuser_name}/stats/monthly +### POST /whitelabel/ips ```go -request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}/stats/monthly", host) -request.Method = "GET" -queryParams := make(map[string]string) -queryParams["date"] = "test_string" -queryParams["sort_by_direction"] = "asc" -queryParams["limit"] = "1" -queryParams["sort_by_metric"] = "test_string" -queryParams["offset"] = "1" -request.QueryParams = queryParams +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/ips", host) +request.Method = "POST" +request.Body = []byte(` { + "domain": "example.com", + "ip": "192.168.1.1", + "subdomain": "email" +}`) response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4082,26 +4052,24 @@ if err != nil { } ``` - -# SUPPRESSION +## Retrieve all reverse DNS records -## Retrieve all blocks +**This endpoint allows you to retrieve all of the reverse DNS records that have been created by this account.** -**This endpoint allows you to retrieve a list of all email addresses that are currently on your blocks list.** +You may include a search key by using the "ip" parameter. This enables you to perform a prefix search for a given IP segment (e.g. "192."). -[Blocks](https://sendgrid.com/docs/Glossary/blocks.html) happen when your message was rejected for a reason related to the message, not the recipient address. This can happen when your mail server IP address has been added to a blacklist or blocked by an ISP, or if the message content is flagged by a filter on the receiving server. +Reverse DNS consists of a subdomain and domain that will be used to generate a record for a given IP. Once SendGrid has verified that the appropriate A record for the IP has been created, the appropriate reverse DNS record for the IP is generated. -For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/blocks.html). +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/). -### GET /suppression/blocks +### GET /whitelabel/ips ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/blocks", host) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/ips", host) request.Method = "GET" queryParams := make(map[string]string) -queryParams["start_time"] = "1" +queryParams["ip"] = "test_string" queryParams["limit"] = "1" -queryParams["end_time"] = "1" queryParams["offset"] = "1" request.QueryParams = queryParams response, err := sendgrid.API(request) @@ -4114,31 +4082,19 @@ if err != nil { } ``` -## Delete blocks - -**This endpoint allows you to delete all email addresses on your blocks list.** - -There are two options for deleting blocked emails: +## Retrieve an reverse DNS record -1. You can delete all blocked emails by setting `delete_all` to true in the request body. -2. You can delete some blocked emails by specifying the email addresses in an array in the request body. +**This endpoint allows you to retrieve a reverse DNS record.** -[Blocks](https://sendgrid.com/docs/Glossary/blocks.html) happen when your message was rejected for a reason related to the message, not the recipient address. This can happen when your mail server IP address has been added to a blacklist or blocked by an ISP, or if the message content is flagged by a filter on the receiving server. +Reverse DNS consists of a subdomain and domain that will be used to generate a record for a given IP. Once SendGrid has verified that the appropriate A record for the IP has been created, the appropriate reverse DNS record for the IP is generated. -For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/blocks.html). +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/). -### DELETE /suppression/blocks +### GET /whitelabel/ips/{id} ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/blocks", host) -request.Method = "DELETE" -request.Body = []byte(` { - "delete_all": false, - "emails": [ - "example1@example.com", - "example2@example.com" - ] -}`) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/ips/{id}", host) +request.Method = "GET" response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4149,19 +4105,19 @@ if err != nil { } ``` -## Retrieve a specific block +## Delete an reverse DNS record -**This endpoint allows you to retrieve a specific email address from your blocks list.** +**This endpoint allows you to delete a reverse DNS record.** -[Blocks](https://sendgrid.com/docs/Glossary/blocks.html) happen when your message was rejected for a reason related to the message, not the recipient address. This can happen when your mail server IP address has been added to a blacklist or blocked by an ISP, or if the message content is flagged by a filter on the receiving server. +Reverse DNS consists of a subdomain and domain that will be used to generate a record for a given IP. Once SendGrid has verified that the appropriate A record for the IP has been created, the appropriate reverse DNS record for the IP is generated. -For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/blocks.html). +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/). -### GET /suppression/blocks/{email} +### DELETE /whitelabel/ips/{id} ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/blocks/{email}", host) -request.Method = "GET" +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/ips/{id}", host) +request.Method = "DELETE" response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4172,19 +4128,19 @@ if err != nil { } ``` -## Delete a specific block +## Validate a reverse DNS -**This endpoint allows you to delete a specific email address from your blocks list.** +**This endpoint allows you to validate a reverse DNS record.** -[Blocks](https://sendgrid.com/docs/Glossary/blocks.html) happen when your message was rejected for a reason related to the message, not the recipient address. This can happen when your mail server IP address has been added to a blacklist or blocked by an ISP, or if the message content is flagged by a filter on the receiving server. +Reverse DNS consists of a subdomain and domain that will be used to generate a record for a given IP. Once SendGrid has verified that the appropriate A record for the IP has been created, the appropriate reverse DNS record for the IP is generated. -For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/blocks.html). +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/). -### DELETE /suppression/blocks/{email} +### POST /whitelabel/ips/{id}/validate ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/blocks/{email}", host) -request.Method = "DELETE" +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/ips/{id}/validate", host) +request.Method = "POST" response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4195,25 +4151,27 @@ if err != nil { } ``` -## Retrieve all bounces - -**This endpoint allows you to retrieve all of your bounces.** +## Create a Branded Link -Bounces are messages that are returned to the server that sent it. +**This endpoint allows you to create a new link branding.** -For more information see: +Email link branding allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. -* [User Guide > Bounces](https://sendgrid.com/docs/User_Guide/Suppressions/bounces.html) for more information -* [Glossary > Bounces](https://sendgrid.com/docs/Glossary/Bounces.html) +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/). -### GET /suppression/bounces +### POST /whitelabel/links ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/bounces", host) -request.Method = "GET" +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links", host) +request.Method = "POST" +request.Body = []byte(` { + "default": true, + "domain": "example.com", + "subdomain": "mail" +}`) queryParams := make(map[string]string) -queryParams["start_time"] = "1" -queryParams["end_time"] = "1" +queryParams["limit"] = "1" +queryParams["offset"] = "1" request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { @@ -4225,32 +4183,22 @@ if err != nil { } ``` -## Delete bounces - -**This endpoint allows you to delete all of your bounces. You can also use this endpoint to remove a specific email address from your bounce list.** - -Bounces are messages that are returned to the server that sent it. +## Retrieve all link brandings -For more information see: +**This endpoint allows you to retrieve all link brandings.** -* [User Guide > Bounces](https://sendgrid.com/docs/User_Guide/Suppressions/bounces.html) for more information -* [Glossary > Bounces](https://sendgrid.com/docs/Glossary/Bounces.html) -* [Classroom > List Scrubbing Guide](https://sendgrid.com/docs/Classroom/Deliver/list_scrubbing.html) +Email link branding allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. -Note: the `delete_all` and `emails` parameters should be used independently of each other as they have different purposes. +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/). -### DELETE /suppression/bounces +### GET /whitelabel/links ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/bounces", host) -request.Method = "DELETE" -request.Body = []byte(` { - "delete_all": true, - "emails": [ - "example@example.com", - "example2@example.com" - ] -}`) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links", host) +request.Method = "GET" +queryParams := make(map[string]string) +queryParams["limit"] = "1" +request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4261,23 +4209,29 @@ if err != nil { } ``` -## Retrieve a Bounce +## Retrieve a Default Link Branding -**This endpoint allows you to retrieve a specific bounce for a given email address.** +**This endpoint allows you to retrieve the default link branding.** -Bounces are messages that are returned to the server that sent it. +Default link branding is the actual link branding to be used when sending messages. If there are multiple link brandings, the default is determined by the following order: + -For more information see: +Email link branding allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. -* [User Guide > Bounces](https://sendgrid.com/docs/User_Guide/Suppressions/bounces.html) for more information -* [Glossary > Bounces](https://sendgrid.com/docs/Glossary/Bounces.html) -* [Classroom > List Scrubbing Guide](https://sendgrid.com/docs/Classroom/Deliver/list_scrubbing.html) +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/). -### GET /suppression/bounces/{email} +### GET /whitelabel/links/default ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/bounces/{email}", host) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/default", host) request.Method = "GET" +queryParams := make(map[string]string) +queryParams["domain"] = "test_string" +request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4288,25 +4242,25 @@ if err != nil { } ``` -## Delete a bounce +## Retrieve Associated Link Branding -**This endpoint allows you to remove an email address from your bounce list.** +**This endpoint allows you to retrieve the associated link branding for a subuser.** -Bounces are messages that are returned to the server that sent it. This endpoint allows you to delete a single email addresses from your bounce list. +Link branding can be associated with subusers from the parent account. This functionality allows +subusers to send mail using their parent's link brands. To associate a link branding, the parent account +must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the Subuser Management page in the user interface. -For more information see: +Email link branding allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. -* [User Guide > Bounces](https://sendgrid.com/docs/User_Guide/Suppressions/bounces.html) for more information -* [Glossary > Bounces](https://sendgrid.com/docs/Glossary/Bounces.html) -* [Classroom > List Scrubbing Guide](https://sendgrid.com/docs/Classroom/Deliver/list_scrubbing.html) +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/). -### DELETE /suppression/bounces/{email} +### GET /whitelabel/links/subuser ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/bounces/{email}", host) -request.Method = "DELETE" +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/subuser", host) +request.Method = "GET" queryParams := make(map[string]string) -queryParams["email_address"] = "example@example.com" +queryParams["username"] = "test_string" request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { @@ -4318,26 +4272,25 @@ if err != nil { } ``` -## Retrieve all invalid emails +## Disassociate a Link Branding -**This endpoint allows you to retrieve a list of all invalid email addresses.** +**This endpoint allows you to disassociate a link branding from a subuser.** -An invalid email occurs when you attempt to send email to an address that is formatted in a manner that does not meet internet email format standards or the email does not exist at the recipients mail server. +Link branding can be associated with subusers from the parent account. This functionality allows +subusers to send mail using their parent's link brands. To associate a link branding, the parent account +must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the Subuser Management page in the user interface. -Examples include addresses without the @ sign or addresses that include certain special characters and/or spaces. This response can come from our own server or the recipient mail server. +Email link branding allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. -For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/invalid_emails.html). +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/). -### GET /suppression/invalid_emails +### DELETE /whitelabel/links/subuser ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/invalid_emails", host) -request.Method = "GET" +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/subuser", host) +request.Method = "DELETE" queryParams := make(map[string]string) -queryParams["start_time"] = "1" -queryParams["limit"] = "1" -queryParams["end_time"] = "1" -queryParams["offset"] = "1" +queryParams["username"] = "test_string" request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { @@ -4349,32 +4302,21 @@ if err != nil { } ``` -## Delete invalid emails +## Update a Link Branding -**This endpoint allows you to remove email addresses from your invalid email address list.** +**This endpoint allows you to update a specific link branding. You can use this endpoint to change a branded link's default status.** -There are two options for deleting invalid email addresses: +Email link branding allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. -1) You can delete all invalid email addresses by setting `delete_all` to true in the request body. -2) You can delete some invalid email addresses by specifying certain addresses in an array in the request body. +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/). -An invalid email occurs when you attempt to send email to an address that is formatted in a manner that does not meet internet email format standards or the email does not exist at the recipients mail server. - -Examples include addresses without the @ sign or addresses that include certain special characters and/or spaces. This response can come from our own server or the recipient mail server. - -For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/invalid_emails.html). - -### DELETE /suppression/invalid_emails +### PATCH /whitelabel/links/{id} ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/invalid_emails", host) -request.Method = "DELETE" +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/{id}", host) +request.Method = "PATCH" request.Body = []byte(` { - "delete_all": false, - "emails": [ - "example1@example.com", - "example2@example.com" - ] + "default": true }`) response, err := sendgrid.API(request) if err != nil { @@ -4386,20 +4328,18 @@ if err != nil { } ``` -## Retrieve a specific invalid email - -**This endpoint allows you to retrieve a specific invalid email addresses.** +## Retrieve a Link Branding -An invalid email occurs when you attempt to send email to an address that is formatted in a manner that does not meet internet email format standards or the email does not exist at the recipients mail server. +**This endpoint allows you to retrieve a specific link branding.** -Examples include addresses without the @ sign or addresses that include certain special characters and/or spaces. This response can come from our own server or the recipient mail server. +Email link branding allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. -For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/invalid_emails.html). +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/). -### GET /suppression/invalid_emails/{email} +### GET /whitelabel/links/{id} ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/invalid_emails/{email}", host) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/{id}", host) request.Method = "GET" response, err := sendgrid.API(request) if err != nil { @@ -4411,20 +4351,18 @@ if err != nil { } ``` -## Delete a specific invalid email +## Delete a Link Branding -**This endpoint allows you to remove a specific email address from the invalid email address list.** +**This endpoint allows you to delete a link branding.** -An invalid email occurs when you attempt to send email to an address that is formatted in a manner that does not meet internet email format standards or the email does not exist at the recipients mail server. +Email link branding allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. -Examples include addresses without the @ sign or addresses that include certain special characters and/or spaces. This response can come from our own server or the recipient mail server. +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/). -For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/invalid_emails.html). - -### DELETE /suppression/invalid_emails/{email} +### DELETE /whitelabel/links/{id} ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/invalid_emails/{email}", host) +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/{id}", host) request.Method = "DELETE" response, err := sendgrid.API(request) if err != nil { @@ -4436,19 +4374,19 @@ if err != nil { } ``` -## Retrieve a specific spam report +## Validate a Link Branding -**This endpoint allows you to retrieve a specific spam report.** +**This endpoint allows you to validate a link branding.** -[Spam reports](https://sendgrid.com/docs/Glossary/spam_reports.html) happen when a recipient indicates that they think your email is [spam](https://sendgrid.com/docs/Glossary/spam.html) and then their email provider reports this to SendGrid. +Email link branding allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. -For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/spam_reports.html). +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/). -### GET /suppression/spam_report/{email} +### POST /whitelabel/links/{id}/validate ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/spam_report/{email}", host) -request.Method = "GET" +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/{id}/validate", host) +request.Method = "POST" response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4459,19 +4397,26 @@ if err != nil { } ``` -## Delete a specific spam report +## Associate a Link Branding + +**This endpoint allows you to associate a link branding with a subuser account.** -**This endpoint allows you to delete a specific spam report.** +Link branding can be associated with subusers from the parent account. This functionality allows +subusers to send mail using their parent's link brands. To associate a link branding, the parent account +must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the Subuser Management page in the user interface. -[Spam reports](https://sendgrid.com/docs/Glossary/spam_reports.html) happen when a recipient indicates that they think your email is [spam](https://sendgrid.com/docs/Glossary/spam.html) and then their email provider reports this to SendGrid. +Email link branding allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. -For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/spam_reports.html). +For more information, please see our [User Guide](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/). -### DELETE /suppression/spam_report/{email} +### POST /whitelabel/links/{link_id}/subuser ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/spam_report/{email}", host) -request.Method = "DELETE" +request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/{link_id}/subuser", host) +request.Method = "POST" +request.Body = []byte(` { + "username": "jane@example.com" +}`) response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4482,23 +4427,25 @@ if err != nil { } ``` -## Retrieve all spam reports + +# STATS -**This endpoint allows you to retrieve all spam reports.** +## Retrieve global email statistics -[Spam reports](https://sendgrid.com/docs/Glossary/spam_reports.html) happen when a recipient indicates that they think your email is [spam](https://sendgrid.com/docs/Glossary/spam.html) and then their email provider reports this to SendGrid. +**This endpoint allows you to retrieve all of your global email statistics between a given date range.** -For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/spam_reports.html). +Parent accounts will see aggregated stats for their account and all subuser accounts. Subuser accounts will only see their own stats. -### GET /suppression/spam_reports +### GET /stats ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/spam_reports", host) +request := sendgrid.GetRequest(apiKey, "/v3/stats", host) request.Method = "GET" queryParams := make(map[string]string) -queryParams["start_time"] = "1" +queryParams["aggregated_by"] = "day" queryParams["limit"] = "1" -queryParams["end_time"] = "1" +queryParams["start_date"] = "2016-01-01" +queryParams["end_date"] = "2016-04-01" queryParams["offset"] = "1" request.QueryParams = queryParams response, err := sendgrid.API(request) @@ -4511,30 +4458,31 @@ if err != nil { } ``` -## Delete spam reports - -**This endpoint allows you to delete your spam reports.** + +# SUBUSERS -There are two options for deleting spam reports: +## Create Subuser -1) You can delete all spam reports by setting "delete_all" to true in the request body. -2) You can delete some spam reports by specifying the email addresses in an array in the request body. +This endpoint allows you to retrieve a list of all of your subusers. You can choose to retrieve specific subusers as well as limit the results that come back from the API. -[Spam reports](https://sendgrid.com/docs/Glossary/spam_reports.html) happen when a recipient indicates that they think your email is [spam](https://sendgrid.com/docs/Glossary/spam.html) and then their email provider reports this to SendGrid. +For more information about Subusers: -For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/spam_reports.html). +* [User Guide > Subusers](https://sendgrid.com/docs/User_Guide/Settings/Subusers/index.html) +* [Classroom > How do I add more subusers to my account?](https://sendgrid.com/docs/Classroom/Basics/Account/how_do_i_add_more_subusers_to_my_account.html) -### DELETE /suppression/spam_reports +### POST /subusers ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/spam_reports", host) -request.Method = "DELETE" +request := sendgrid.GetRequest(apiKey, "/v3/subusers", host) +request.Method = "POST" request.Body = []byte(` { - "delete_all": false, - "emails": [ - "example1@example.com", - "example2@example.com" - ] + "email": "John@example.com", + "ips": [ + "1.1.1.1", + "2.2.2.2" + ], + "password": "johns_password", + "username": "John@example.com" }`) response, err := sendgrid.API(request) if err != nil { @@ -4546,21 +4494,23 @@ if err != nil { } ``` -## Retrieve all global suppressions +## List all Subusers + +This endpoint allows you to retrieve a list of all of your subusers. You can choose to retrieve specific subusers as well as limit the results that come back from the API. -**This endpoint allows you to retrieve a list of all email address that are globally suppressed.** +For more information about Subusers: -A global suppression (or global unsubscribe) is an email address of a recipient who does not want to receive any of your messages. A globally suppressed recipient will be removed from any email you send. For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/global_unsubscribes.html). +* [User Guide > Subusers](https://sendgrid.com/docs/User_Guide/Settings/Subusers/index.html) +* [Classroom > How do I add more subusers to my account?](https://sendgrid.com/docs/Classroom/Basics/Account/how_do_i_add_more_subusers_to_my_account.html) -### GET /suppression/unsubscribes +### GET /subusers ```go -request := sendgrid.GetRequest(apiKey, "/v3/suppression/unsubscribes", host) +request := sendgrid.GetRequest(apiKey, "/v3/subusers", host) request.Method = "GET" queryParams := make(map[string]string) -queryParams["start_time"] = "1" +queryParams["username"] = "test_string" queryParams["limit"] = "1" -queryParams["end_time"] = "1" queryParams["offset"] = "1" request.QueryParams = queryParams response, err := sendgrid.API(request) @@ -4573,25 +4523,20 @@ if err != nil { } ``` - -# TEMPLATES - -## Create a transactional template. - -**This endpoint allows you to create a transactional template.** +## Retrieve Subuser Reputations -Each user can create up to 300 different transactional templates. Transactional templates are specific to accounts and subusers. Templates created on a parent account will not be accessible from the subuser accounts. +Subuser sender reputations give a good idea how well a sender is doing with regards to how recipients and recipient servers react to the mail that is being received. When a bounce, spam report, or other negative action happens on a sent email, it will effect your sender rating. -Transactional templates are templates created specifically for transactional email and are not to be confused with [Marketing Campaigns templates](https://sendgrid.com/docs/User_Guide/Marketing_Campaigns/templates.html). For more information about transactional templates, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). +This endpoint allows you to request the reputations for your subusers. -### POST /templates +### GET /subusers/reputations ```go -request := sendgrid.GetRequest(apiKey, "/v3/templates", host) -request.Method = "POST" -request.Body = []byte(` { - "name": "example_name" -}`) +request := sendgrid.GetRequest(apiKey, "/v3/subusers/reputations", host) +request.Method = "GET" +queryParams := make(map[string]string) +queryParams["usernames"] = "test_string" +request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4602,19 +4547,29 @@ if err != nil { } ``` -## Retrieve all transactional templates. +## Retrieve email statistics for your subusers. + +**This endpoint allows you to retrieve the email statistics for the given subusers.** -**This endpoint allows you to retrieve all transactional templates.** +You may retrieve statistics for up to 10 different subusers by including an additional _subusers_ parameter for each additional subuser. -Each user can create up to 300 different transactional templates. Transactional templates are specific to accounts and subusers. Templates created on a parent account will not be accessible from the subuser accounts. +While you can always view the statistics for all email activity on your account, subuser statistics enable you to view specific segments of your stats. Emails sent, bounces, and spam reports are always tracked for subusers. Unsubscribes, clicks, and opens are tracked if you have enabled the required settings. -Transactional templates are templates created specifically for transactional email and are not to be confused with [Marketing Campaigns templates](https://sendgrid.com/docs/User_Guide/Marketing_Campaigns/templates.html). For more information about transactional templates, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). +For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/Statistics/subuser.html). -### GET /templates +### GET /subusers/stats ```go -request := sendgrid.GetRequest(apiKey, "/v3/templates", host) +request := sendgrid.GetRequest(apiKey, "/v3/subusers/stats", host) request.Method = "GET" +queryParams := make(map[string]string) +queryParams["end_date"] = "2016-04-01" +queryParams["aggregated_by"] = "day" +queryParams["limit"] = "1" +queryParams["offset"] = "1" +queryParams["start_date"] = "2016-01-01" +queryParams["subusers"] = "test_string" +request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4625,23 +4580,30 @@ if err != nil { } ``` -## Edit a transactional template. +## Retrieve monthly stats for all subusers -**This endpoint allows you to edit a transactional template.** +**This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.** -Each user can create up to 300 different transactional templates. Transactional templates are specific to accounts and subusers. Templates created on a parent account will not be accessible from the subuser accounts. +While you can always view the statistics for all email activity on your account, subuser statistics enable you to view specific segments of your stats for your subusers. Emails sent, bounces, and spam reports are always tracked for subusers. Unsubscribes, clicks, and opens are tracked if you have enabled the required settings. -Transactional templates are templates created specifically for transactional email and are not to be confused with [Marketing Campaigns templates](https://sendgrid.com/docs/User_Guide/Marketing_Campaigns/templates.html). For more information about transactional templates, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). +When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: +`bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. +For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/Statistics/subuser.html). -### PATCH /templates/{template_id} +### GET /subusers/stats/monthly ```go -request := sendgrid.GetRequest(apiKey, "/v3/templates/{template_id}", host) -request.Method = "PATCH" -request.Body = []byte(` { - "name": "new_example_name" -}`) +request := sendgrid.GetRequest(apiKey, "/v3/subusers/stats/monthly", host) +request.Method = "GET" +queryParams := make(map[string]string) +queryParams["subuser"] = "test_string" +queryParams["limit"] = "1" +queryParams["sort_by_metric"] = "test_string" +queryParams["offset"] = "1" +queryParams["date"] = "test_string" +queryParams["sort_by_direction"] = "asc" +request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4652,20 +4614,29 @@ if err != nil { } ``` -## Retrieve a single transactional template. +## Retrieve the totals for each email statistic metric for all subusers. -**This endpoint allows you to retrieve a single transactional template.** +**This endpoint allows you to retrieve the total sums of each email statistic metric for all subusers over the given date range.** -Each user can create up to 300 different transactional templates. Transactional templates are specific to accounts and subusers. Templates created on a parent account will not be accessible from the subuser accounts. -Transactional templates are templates created specifically for transactional email and are not to be confused with [Marketing Campaigns templates](https://sendgrid.com/docs/User_Guide/Marketing_Campaigns/templates.html). For more information about transactional templates, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). +While you can always view the statistics for all email activity on your account, subuser statistics enable you to view specific segments of your stats. Emails sent, bounces, and spam reports are always tracked for subusers. Unsubscribes, clicks, and opens are tracked if you have enabled the required settings. +For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/Statistics/subuser.html). -### GET /templates/{template_id} +### GET /subusers/stats/sums ```go -request := sendgrid.GetRequest(apiKey, "/v3/templates/{template_id}", host) +request := sendgrid.GetRequest(apiKey, "/v3/subusers/stats/sums", host) request.Method = "GET" +queryParams := make(map[string]string) +queryParams["end_date"] = "2016-04-01" +queryParams["aggregated_by"] = "day" +queryParams["limit"] = "1" +queryParams["sort_by_metric"] = "test_string" +queryParams["offset"] = "1" +queryParams["start_date"] = "2016-01-01" +queryParams["sort_by_direction"] = "asc" +request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4676,20 +4647,23 @@ if err != nil { } ``` -## Delete a template. - -**This endpoint allows you to delete a transactional template.** +## Enable/disable a subuser -Each user can create up to 300 different transactional templates. Transactional templates are specific to accounts and subusers. Templates created on a parent account will not be accessible from the subuser accounts. +This endpoint allows you to enable or disable a subuser. -Transactional templates are templates created specifically for transactional email and are not to be confused with [Marketing Campaigns templates](https://sendgrid.com/docs/User_Guide/Marketing_Campaigns/templates.html). For more information about transactional templates, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). +For more information about Subusers: +* [User Guide > Subusers](https://sendgrid.com/docs/User_Guide/Settings/Subusers/index.html) +* [Classroom > How do I add more subusers to my account?](https://sendgrid.com/docs/Classroom/Basics/Account/how_do_i_add_more_subusers_to_my_account.html) -### DELETE /templates/{template_id} +### PATCH /subusers/{subuser_name} ```go -request := sendgrid.GetRequest(apiKey, "/v3/templates/{template_id}", host) -request.Method = "DELETE" +request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}", host) +request.Method = "PATCH" +request.Body = []byte(` { + "disabled": false +}`) response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4700,28 +4674,20 @@ if err != nil { } ``` -## Create a new transactional template version. - -**This endpoint allows you to create a new version of a template.** +## Delete a subuser -Each transactional template can have multiple versions, each version with its own subject and content. Each user can have up to 300 versions across all templates. +This endpoint allows you to delete a subuser. This is a permanent action, once deleted a subuser cannot be retrieved. -For more information about transactional templates, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). +For more information about Subusers: +* [User Guide > Subusers](https://sendgrid.com/docs/User_Guide/Settings/Subusers/index.html) +* [Classroom > How do I add more subusers to my account?](https://sendgrid.com/docs/Classroom/Basics/Account/how_do_i_add_more_subusers_to_my_account.html) -### POST /templates/{template_id}/versions +### DELETE /subusers/{subuser_name} ```go -request := sendgrid.GetRequest(apiKey, "/v3/templates/{template_id}/versions", host) -request.Method = "POST" -request.Body = []byte(` { - "active": 1, - "html_content": "<%body%>", - "name": "example_version_name", - "plain_content": "<%body%>", - "subject": "<%subject%>", - "template_id": "ddb96bbc-9b92-425e-8979-99464621b543" -}`) +request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}", host) +request.Method = "DELETE" response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4732,32 +4698,23 @@ if err != nil { } ``` -## Edit a transactional template version. - -**This endpoint allows you to edit a version of one of your transactional templates.** +## Update IPs assigned to a subuser -Each transactional template can have multiple versions, each version with its own subject and content. Each user can have up to 300 versions across all templates. +Each subuser should be assigned to an IP address, from which all of this subuser's mail will be sent. Often, this is the same IP as the parent account, but each subuser can have their own, or multiple, IP addresses as well. -For more information about transactional templates, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). +More information: -## URI Parameters -| URI Parameter | Type | Description | -|---|---|---| -| template_id | string | The ID of the original template | -| version_id | string | The ID of the template version | +* [How to request more IPs](https://sendgrid.com/docs/Classroom/Basics/Account/adding_an_additional_dedicated_ip_to_your_account.html) +* [Setup Reverse DNS](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) -### PATCH /templates/{template_id}/versions/{version_id} +### PUT /subusers/{subuser_name}/ips ```go -request := sendgrid.GetRequest(apiKey, "/v3/templates/{template_id}/versions/{version_id}", host) -request.Method = "PATCH" -request.Body = []byte(` { - "active": 1, - "html_content": "<%body%>", - "name": "updated_example_name", - "plain_content": "<%body%>", - "subject": "<%subject%>" -}`) +request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}/ips", host) +request.Method = "PUT" +request.Body = []byte(` [ + "127.0.0.1" +]`) response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4768,25 +4725,19 @@ if err != nil { } ``` -## Retrieve a specific transactional template version. - -**This endpoint allows you to retrieve a specific version of a template.** - -Each transactional template can have multiple versions, each version with its own subject and content. Each user can have up to 300 versions across across all templates. - -For more information about transactional templates, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). +## Update Monitor Settings for a subuser -## URI Parameters -| URI Parameter | Type | Description | -|---|---|---| -| template_id | string | The ID of the original template | -| version_id | string | The ID of the template version | +Subuser monitor settings allow you to receive a sample of an outgoing message by a specific customer at a specific frequency of emails. -### GET /templates/{template_id}/versions/{version_id} +### PUT /subusers/{subuser_name}/monitor ```go -request := sendgrid.GetRequest(apiKey, "/v3/templates/{template_id}/versions/{version_id}", host) -request.Method = "GET" +request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}/monitor", host) +request.Method = "PUT" +request.Body = []byte(` { + "email": "example@example.com", + "frequency": 500 +}`) response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4797,25 +4748,19 @@ if err != nil { } ``` -## Delete a transactional template version. - -**This endpoint allows you to delete one of your transactional template versions.** - -Each transactional template can have multiple versions, each version with its own subject and content. Each user can have up to 300 versions across across all templates. - -For more information about transactional templates, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). +## Create monitor settings -## URI Parameters -| URI Parameter | Type | Description | -|---|---|---| -| template_id | string | The ID of the original template | -| version_id | string | The ID of the template version | +Subuser monitor settings allow you to receive a sample of an outgoing message by a specific customer at a specific frequency of emails. -### DELETE /templates/{template_id}/versions/{version_id} +### POST /subusers/{subuser_name}/monitor ```go -request := sendgrid.GetRequest(apiKey, "/v3/templates/{template_id}/versions/{version_id}", host) -request.Method = "DELETE" +request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}/monitor", host) +request.Method = "POST" +request.Body = []byte(` { + "email": "example@example.com", + "frequency": 50000 +}`) response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4826,26 +4771,15 @@ if err != nil { } ``` -## Activate a transactional template version. - -**This endpoint allows you to activate a version of one of your templates.** - -Each transactional template can have multiple versions, each version with its own subject and content. Each user can have up to 300 versions across across all templates. - - -For more information about transactional templates, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). +## Retrieve monitor settings for a subuser -## URI Parameters -| URI Parameter | Type | Description | -|---|---|---| -| template_id | string | The ID of the original template | -| version_id | string | The ID of the template version | +Subuser monitor settings allow you to receive a sample of an outgoing message by a specific customer at a specific frequency of emails. -### POST /templates/{template_id}/versions/{version_id}/activate +### GET /subusers/{subuser_name}/monitor ```go -request := sendgrid.GetRequest(apiKey, "/v3/templates/{template_id}/versions/{version_id}/activate", host) -request.Method = "POST" +request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}/monitor", host) +request.Method = "GET" response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4856,26 +4790,15 @@ if err != nil { } ``` - -# TRACKING SETTINGS - -## Retrieve Tracking Settings - -**This endpoint allows you to retrieve a list of all tracking settings that you can enable on your account.** - -You can track a variety of the actions your recipients may take when interacting with your emails including opening your emails, clicking on links in your emails, and subscribing to (or unsubscribing from) your emails. +## Delete monitor settings -For more information about tracking, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/tracking.html). +Subuser monitor settings allow you to receive a sample of an outgoing message by a specific customer at a specific frequency of emails. -### GET /tracking_settings +### DELETE /subusers/{subuser_name}/monitor ```go -request := sendgrid.GetRequest(apiKey, "/v3/tracking_settings", host) -request.Method = "GET" -queryParams := make(map[string]string) -queryParams["limit"] = "1" -queryParams["offset"] = "1" -request.QueryParams = queryParams +request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}/monitor", host) +request.Method = "DELETE" response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4886,22 +4809,29 @@ if err != nil { } ``` -## Update Click Tracking Settings +## Retrieve the monthly email statistics for a single subuser + +**This endpoint allows you to retrieve the monthly email statistics for a specific subuser.** -**This endpoint allows you to change your current click tracking setting. You can enable, or disable, click tracking using this endpoint.** +While you can always view the statistics for all email activity on your account, subuser statistics enable you to view specific segments of your stats for your subusers. Emails sent, bounces, and spam reports are always tracked for subusers. Unsubscribes, clicks, and opens are tracked if you have enabled the required settings. -You can track a variety of the actions your recipients may take when interacting with your emails including opening your emails, clicking on links in your emails, and subscribing to (or unsubscribing from) your emails. +When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: +`bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. -For more information about tracking, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/tracking.html). +For more information, see our [User Guide](https://sendgrid.com/docs/User_Guide/Statistics/subuser.html). -### PATCH /tracking_settings/click +### GET /subusers/{subuser_name}/stats/monthly ```go -request := sendgrid.GetRequest(apiKey, "/v3/tracking_settings/click", host) -request.Method = "PATCH" -request.Body = []byte(` { - "enabled": true -}`) +request := sendgrid.GetRequest(apiKey, "/v3/subusers/{subuser_name}/stats/monthly", host) +request.Method = "GET" +queryParams := make(map[string]string) +queryParams["date"] = "test_string" +queryParams["sort_by_direction"] = "asc" +queryParams["limit"] = "1" +queryParams["sort_by_metric"] = "test_string" +queryParams["offset"] = "1" +request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4912,19 +4842,28 @@ if err != nil { } ``` -## Retrieve Click Track Settings + +# SUPPRESSION + +## Retrieve all blocks -**This endpoint allows you to retrieve your current click tracking setting.** +**This endpoint allows you to retrieve a list of all email addresses that are currently on your blocks list.** -You can track a variety of the actions your recipients may take when interacting with your emails including opening your emails, clicking on links in your emails, and subscribing to (or unsubscribing from) your emails. +[Blocks](https://sendgrid.com/docs/Glossary/blocks.html) happen when your message was rejected for a reason related to the message, not the recipient address. This can happen when your mail server IP address has been added to a blacklist or blocked by an ISP, or if the message content is flagged by a filter on the receiving server. -For more information about tracking, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/tracking.html). +For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/blocks.html). -### GET /tracking_settings/click +### GET /suppression/blocks ```go -request := sendgrid.GetRequest(apiKey, "/v3/tracking_settings/click", host) +request := sendgrid.GetRequest(apiKey, "/v3/suppression/blocks", host) request.Method = "GET" +queryParams := make(map[string]string) +queryParams["start_time"] = "1" +queryParams["limit"] = "1" +queryParams["end_time"] = "1" +queryParams["offset"] = "1" +request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -4935,30 +4874,30 @@ if err != nil { } ``` -## Update Google Analytics Settings +## Delete blocks -**This endpoint allows you to update your current setting for Google Analytics.** +**This endpoint allows you to delete all email addresses on your blocks list.** -For more information about using Google Analytics, please refer to [Googles URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on ["Best Practices for Campaign Building"](https://support.google.com/analytics/answer/1037445). +There are two options for deleting blocked emails: -We default the settings to Googles recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/Classroom/Track/Collecting_Data/google_analytics_demystified_ga_statistics_vs_sg_statistics.html). +1. You can delete all blocked emails by setting `delete_all` to true in the request body. +2. You can delete some blocked emails by specifying the email addresses in an array in the request body. -You can track a variety of the actions your recipients may take when interacting with your emails including opening your emails, clicking on links in your emails, and subscribing to (or unsubscribing from) your emails. +[Blocks](https://sendgrid.com/docs/Glossary/blocks.html) happen when your message was rejected for a reason related to the message, not the recipient address. This can happen when your mail server IP address has been added to a blacklist or blocked by an ISP, or if the message content is flagged by a filter on the receiving server. -For more information about tracking, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/tracking.html). +For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/blocks.html). -### PATCH /tracking_settings/google_analytics +### DELETE /suppression/blocks ```go -request := sendgrid.GetRequest(apiKey, "/v3/tracking_settings/google_analytics", host) -request.Method = "PATCH" +request := sendgrid.GetRequest(apiKey, "/v3/suppression/blocks", host) +request.Method = "DELETE" request.Body = []byte(` { - "enabled": true, - "utm_campaign": "website", - "utm_content": "", - "utm_medium": "email", - "utm_source": "sendgrid.com", - "utm_term": "" + "delete_all": false, + "emails": [ + "example1@example.com", + "example2@example.com" + ] }`) response, err := sendgrid.API(request) if err != nil { @@ -4970,22 +4909,18 @@ if err != nil { } ``` -## Retrieve Google Analytics Settings - -**This endpoint allows you to retrieve your current setting for Google Analytics.** - -For more information about using Google Analytics, please refer to [Googles URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on ["Best Practices for Campaign Building"](https://support.google.com/analytics/answer/1037445). +## Retrieve a specific block -We default the settings to Googles recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/Classroom/Track/Collecting_Data/google_analytics_demystified_ga_statistics_vs_sg_statistics.html). +**This endpoint allows you to retrieve a specific email address from your blocks list.** -You can track a variety of the actions your recipients may take when interacting with your emails including opening your emails, clicking on links in your emails, and subscribing to (or unsubscribing from) your emails. +[Blocks](https://sendgrid.com/docs/Glossary/blocks.html) happen when your message was rejected for a reason related to the message, not the recipient address. This can happen when your mail server IP address has been added to a blacklist or blocked by an ISP, or if the message content is flagged by a filter on the receiving server. -For more information about tracking, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/tracking.html). +For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/blocks.html). -### GET /tracking_settings/google_analytics +### GET /suppression/blocks/{email} ```go -request := sendgrid.GetRequest(apiKey, "/v3/tracking_settings/google_analytics", host) +request := sendgrid.GetRequest(apiKey, "/v3/suppression/blocks/{email}", host) request.Method = "GET" response, err := sendgrid.API(request) if err != nil { @@ -4997,24 +4932,19 @@ if err != nil { } ``` -## Update Open Tracking Settings - -**This endpoint allows you to update your current settings for open tracking.** +## Delete a specific block -Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrids server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. +**This endpoint allows you to delete a specific email address from your blocks list.** -You can track a variety of the actions your recipients may take when interacting with your emails including opening your emails, clicking on links in your emails, and subscribing to (or unsubscribing from) your emails. +[Blocks](https://sendgrid.com/docs/Glossary/blocks.html) happen when your message was rejected for a reason related to the message, not the recipient address. This can happen when your mail server IP address has been added to a blacklist or blocked by an ISP, or if the message content is flagged by a filter on the receiving server. -For more information about tracking, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/tracking.html). +For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/blocks.html). -### PATCH /tracking_settings/open +### DELETE /suppression/blocks/{email} ```go -request := sendgrid.GetRequest(apiKey, "/v3/tracking_settings/open", host) -request.Method = "PATCH" -request.Body = []byte(` { - "enabled": true -}`) +request := sendgrid.GetRequest(apiKey, "/v3/suppression/blocks/{email}", host) +request.Method = "DELETE" response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -5025,21 +4955,26 @@ if err != nil { } ``` -## Get Open Tracking Settings +## Retrieve all bounces -**This endpoint allows you to retrieve your current settings for open tracking.** +**This endpoint allows you to retrieve all of your bounces.** -Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrids server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. +Bounces are messages that are returned to the server that sent it. -You can track a variety of the actions your recipients may take when interacting with your emails including opening your emails, clicking on links in your emails, and subscribing to (or unsubscribing from) your emails. +For more information see: -For more information about tracking, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/tracking.html). +* [User Guide > Bounces](https://sendgrid.com/docs/User_Guide/Suppressions/bounces.html) for more information +* [Glossary > Bounces](https://sendgrid.com/docs/Glossary/Bounces.html) -### GET /tracking_settings/open +### GET /suppression/bounces ```go -request := sendgrid.GetRequest(apiKey, "/v3/tracking_settings/open", host) +request := sendgrid.GetRequest(apiKey, "/v3/suppression/bounces", host) request.Method = "GET" +queryParams := make(map[string]string) +queryParams["start_time"] = "1" +queryParams["end_time"] = "1" +request.QueryParams = queryParams response, err := sendgrid.API(request) if err != nil { log.Println(err) @@ -5050,28 +4985,31 @@ if err != nil { } ``` -## Update Subscription Tracking Settings +## Delete bounces -**This endpoint allows you to update your current settings for subscription tracking.** +**This endpoint allows you to delete all of your bounces. You can also use this endpoint to remove a specific email address from your bounce list.** -Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. +Bounces are messages that are returned to the server that sent it. -You can track a variety of the actions your recipients may take when interacting with your emails including opening your emails, clicking on links in your emails, and subscribing to (or unsubscribing from) your emails. +For more information see: -For more information about tracking, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/tracking.html). +* [User Guide > Bounces](https://sendgrid.com/docs/User_Guide/Suppressions/bounces.html) for more information +* [Glossary > Bounces](https://sendgrid.com/docs/Glossary/Bounces.html) +* [Classroom > List Scrubbing Guide](https://sendgrid.com/docs/Classroom/Deliver/list_scrubbing.html) -### PATCH /tracking_settings/subscription +Note: the `delete_all` and `emails` parameters should be used independently of each other as they have different purposes. + +### DELETE /suppression/bounces ```go -request := sendgrid.GetRequest(apiKey, "/v3/tracking_settings/subscription", host) -request.Method = "PATCH" +request := sendgrid.GetRequest(apiKey, "/v3/suppression/bounces", host) +request.Method = "DELETE" request.Body = []byte(` { - "enabled": true, - "html_content": "html content", - "landing": "landing page html", - "plain_content": "text content", - "replace": "replacement tag", - "url": "url" + "delete_all": true, + "emails": [ + "example@example.com", + "example2@example.com" + ] }`) response, err := sendgrid.API(request) if err != nil { @@ -5083,20 +5021,22 @@ if err != nil { } ``` -## Retrieve Subscription Tracking Settings +## Retrieve a Bounce -**This endpoint allows you to retrieve your current settings for subscription tracking.** +**This endpoint allows you to retrieve a specific bounce for a given email address.** -Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. +Bounces are messages that are returned to the server that sent it. -You can track a variety of the actions your recipients may take when interacting with your emails including opening your emails, clicking on links in your emails, and subscribing to (or unsubscribing from) your emails. +For more information see: -For more information about tracking, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/tracking.html). +* [User Guide > Bounces](https://sendgrid.com/docs/User_Guide/Suppressions/bounces.html) for more information +* [Glossary > Bounces](https://sendgrid.com/docs/Glossary/Bounces.html) +* [Classroom > List Scrubbing Guide](https://sendgrid.com/docs/Classroom/Deliver/list_scrubbing.html) -### GET /tracking_settings/subscription +### GET /suppression/bounces/{email} ```go -request := sendgrid.GetRequest(apiKey, "/v3/tracking_settings/subscription", host) +request := sendgrid.GetRequest(apiKey, "/v3/suppression/bounces/{email}", host) request.Method = "GET" response, err := sendgrid.API(request) if err != nil { @@ -5108,6 +5048,7 @@ if err != nil { } ``` + # On-Behalf of Subuser @@ -5770,766 +5711,3 @@ if err != nil { fmt.Println(response.Headers) } ``` - - -# WHITELABEL - -## Create a domain whitelabel. - -**This endpoint allows you to create a whitelabel for one of your domains.** - -If you are creating a domain whitelabel that you would like a subuser to use, you have two options: -1. Use the "username" parameter. This allows you to create a whitelabel on behalf of your subuser. This means the subuser is able to see and modify the created whitelabel. -2. Use the Association workflow (see Associate Domain section). This allows you to assign a whitelabel created by the parent to a subuser. This means the subuser will default to the assigned whitelabel, but will not be able to see or modify that whitelabel. However, if the subuser creates their own whitelabel it will overwrite the assigned whitelabel. - -A domain whitelabel allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Whitelabeling a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. - -For more information on whitelabeling, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/index.html) - -### POST /whitelabel/domains - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains", host) -request.Method = "POST" -request.Body = []byte(` { - "automatic_security": false, - "custom_spf": true, - "default": true, - "domain": "example.com", - "ips": [ - "192.168.1.1", - "192.168.1.2" - ], - "subdomain": "news", - "username": "john@example.com" -}`) -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## List all domain whitelabels. - -**This endpoint allows you to retrieve a list of all domain whitelabels you have created.** - -A domain whitelabel allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Whitelabeling a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. - -For more information on whitelabeling, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/index.html) - - -### GET /whitelabel/domains - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains", host) -request.Method = "GET" -queryParams := make(map[string]string) -queryParams["username"] = "test_string" -queryParams["domain"] = "test_string" -queryParams["exclude_subusers"] = "true" -queryParams["limit"] = "1" -queryParams["offset"] = "1" -request.QueryParams = queryParams -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Get the default domain whitelabel. - -**This endpoint allows you to retrieve the default whitelabel for a domain.** - -A domain whitelabel allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Whitelabeling a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. - -For more information on whitelabeling, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/index.html) - -## URI Parameters -| URI Parameter | Type | Description | -|---|---|---| -| domain | string |The domain to find a default domain whitelabel for. | - -### GET /whitelabel/domains/default - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/default", host) -request.Method = "GET" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## List the domain whitelabel associated with the given user. - -**This endpoint allows you to retrieve all of the whitelabels that have been assigned to a specific subuser.** - -A domain whitelabel allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Whitelabeling a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. - -Domain whitelabels can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's whitelabels. To associate a whitelabel with a subuser, the parent account must first create the whitelabel and validate it. The parent may then associate the whitelabel via the subuser management tools. - -For more information on whitelabeling, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/index.html) - -## URI Parameters -| URI Parameter | Type | Description | -|---|---|---| -| username | string | Username of the subuser to find associated whitelabels for. | - -### GET /whitelabel/domains/subuser - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/subuser", host) -request.Method = "GET" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Disassociate a domain whitelabel from a given user. - -**This endpoint allows you to disassociate a specific whitelabel from a subuser.** - -A domain whitelabel allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Whitelabeling a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. - -Domain whitelabels can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's whitelabels. To associate a whitelabel with a subuser, the parent account must first create the whitelabel and validate it. The parent may then associate the whitelabel via the subuser management tools. - -For more information on whitelabeling, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/index.html) - -## URI Parameters -| URI Parameter | Type | Required? | Description | -|---|---|---|---| -| username | string | required | Username for the subuser to find associated whitelabels for. | - -### DELETE /whitelabel/domains/subuser - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/subuser", host) -request.Method = "DELETE" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Update a domain whitelabel. - -**This endpoint allows you to update the settings for a domain whitelabel.** - -A domain whitelabel allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Whitelabeling a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. - -For more information on whitelabeling, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/index.html) - -### PATCH /whitelabel/domains/{domain_id} - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{domain_id}", host) -request.Method = "PATCH" -request.Body = []byte(` { - "custom_spf": true, - "default": false -}`) -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Retrieve a domain whitelabel. - -**This endpoint allows you to retrieve a specific domain whitelabel.** - -A domain whitelabel allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Whitelabeling a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. - -For more information on whitelabeling, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/index.html) - - -### GET /whitelabel/domains/{domain_id} - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{domain_id}", host) -request.Method = "GET" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Delete a domain whitelabel. - -**This endpoint allows you to delete a domain whitelabel.** - -A domain whitelabel allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Whitelabeling a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. - -For more information on whitelabeling, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/index.html) - -### DELETE /whitelabel/domains/{domain_id} - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{domain_id}", host) -request.Method = "DELETE" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Associate a domain whitelabel with a given user. - -**This endpoint allows you to associate a specific domain whitelabel with a subuser.** - -A domain whitelabel allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Whitelabeling a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. - -Domain whitelabels can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's whitelabels. To associate a whitelabel with a subuser, the parent account must first create the whitelabel and validate it. The parent may then associate the whitelabel via the subuser management tools. - -For more information on whitelabeling, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/index.html) - -## URI Parameters -| URI Parameter | Type | Description | -|---|---|---| -| domain_id | integer | ID of the domain whitelabel to associate with the subuser. | - -### POST /whitelabel/domains/{domain_id}/subuser - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{domain_id}/subuser", host) -request.Method = "POST" -request.Body = []byte(` { - "username": "jane@example.com" -}`) -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Add an IP to a domain whitelabel. - -**This endpoint allows you to add an IP address to a domain whitelabel.** - -A domain whitelabel allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Whitelabeling a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. - -For more information on whitelabeling, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/index.html) - -## URI Parameters -| URI Parameter | Type | Description | -|---|---|---| -| id | integer | ID of the domain to which you are adding an IP | - -### POST /whitelabel/domains/{id}/ips - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{id}/ips", host) -request.Method = "POST" -request.Body = []byte(` { - "ip": "192.168.0.1" -}`) -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Remove an IP from a domain whitelabel. - -**This endpoint allows you to remove a domain's IP address from that domain's whitelabel.** - -A domain whitelabel allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Whitelabeling a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. - -For more information on whitelabeling, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/index.html) - -## URI Parameters -| URI Parameter | Type | Description | -|---|---|---| -| id | integer | ID of the domain whitelabel to delete the IP from. | -| ip | string | IP to remove from the domain whitelabel. | - -### DELETE /whitelabel/domains/{id}/ips/{ip} - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{id}/ips/{ip}", host) -request.Method = "DELETE" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Validate a domain whitelabel. - -**This endpoint allows you to validate a domain whitelabel. If it fails, it will return an error message describing why the whitelabel could not be validated.** - -A domain whitelabel allows you to remove the via or sent on behalf of message that your recipients see when they read your emails. Whitelabeling a domain allows you to replace sendgrid.net with your personal sending domain. You will be required to create a subdomain so that SendGrid can generate the DNS records which you must give to your host provider. If you choose to use Automated Security, SendGrid will provide you with 3 CNAME records. If you turn Automated Security off, you will be given 2 TXT records and 1 MX record. - -For more information on whitelabeling, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Settings/Whitelabel/index.html) - -## URI Parameters -| URI Parameter | Type | Description | -|---|---|---| -| id | integer |ID of the domain whitelabel to validate. | - -### POST /whitelabel/domains/{id}/validate - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/domains/{id}/validate", host) -request.Method = "POST" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Create an IP whitelabel - -**This endpoint allows you to create an IP whitelabel.** - -When creating an IP whitelable, you should use the same subdomain that you used when you created a domain whitelabel. - -A IP whitelabel consists of a subdomain and domain that will be used to generate a reverse DNS record for a given IP. Once SendGrid has verified that the appropriate A record for the IP has been created, the appropriate reverse DNS record for the IP is generated. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/ips.html). - -### POST /whitelabel/ips - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/ips", host) -request.Method = "POST" -request.Body = []byte(` { - "domain": "example.com", - "ip": "192.168.1.1", - "subdomain": "email" -}`) -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Retrieve all IP whitelabels - -**This endpoint allows you to retrieve all of the IP whitelabels that have been created by this account.** - -You may include a search key by using the "ip" parameter. This enables you to perform a prefix search for a given IP segment (e.g. "192."). - -A IP whitelabel consists of a subdomain and domain that will be used to generate a reverse DNS record for a given IP. Once SendGrid has verified that the appropriate A record for the IP has been created, the appropriate reverse DNS record for the IP is generated. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/ips.html). - -### GET /whitelabel/ips - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/ips", host) -request.Method = "GET" -queryParams := make(map[string]string) -queryParams["ip"] = "test_string" -queryParams["limit"] = "1" -queryParams["offset"] = "1" -request.QueryParams = queryParams -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Retrieve an IP whitelabel - -**This endpoint allows you to retrieve an IP whitelabel.** - -A IP whitelabel consists of a subdomain and domain that will be used to generate a reverse DNS record for a given IP. Once SendGrid has verified that the appropriate A record for the IP has been created, the appropriate reverse DNS record for the IP is generated. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/ips.html). - -### GET /whitelabel/ips/{id} - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/ips/{id}", host) -request.Method = "GET" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Delete an IP whitelabel - -**This endpoint allows you to delete an IP whitelabel.** - -A IP whitelabel consists of a subdomain and domain that will be used to generate a reverse DNS record for a given IP. Once SendGrid has verified that the appropriate A record for the IP has been created, the appropriate reverse DNS record for the IP is generated. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/ips.html). - -### DELETE /whitelabel/ips/{id} - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/ips/{id}", host) -request.Method = "DELETE" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Validate an IP whitelabel - -**This endpoint allows you to validate an IP whitelabel.** - -A IP whitelabel consists of a subdomain and domain that will be used to generate a reverse DNS record for a given IP. Once SendGrid has verified that the appropriate A record for the IP has been created, the appropriate reverse DNS record for the IP is generated. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/ips.html). - -### POST /whitelabel/ips/{id}/validate - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/ips/{id}/validate", host) -request.Method = "POST" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Create a Link Whitelabel - -**This endpoint allows you to create a new link whitelabel.** - -Email link whitelabels allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/links.html). - -### POST /whitelabel/links - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links", host) -request.Method = "POST" -request.Body = []byte(` { - "default": true, - "domain": "example.com", - "subdomain": "mail" -}`) -queryParams := make(map[string]string) -queryParams["limit"] = "1" -queryParams["offset"] = "1" -request.QueryParams = queryParams -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Retrieve all link whitelabels - -**This endpoint allows you to retrieve all link whitelabels.** - -Email link whitelabels allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/links.html). - -### GET /whitelabel/links - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links", host) -request.Method = "GET" -queryParams := make(map[string]string) -queryParams["limit"] = "1" -request.QueryParams = queryParams -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Retrieve a Default Link Whitelabel - -**This endpoint allows you to retrieve the default link whitelabel.** - -Default link whitelabel is the actual link whitelabel to be used when sending messages. If there are multiple link whitelabels, the default is determined by the following order: - - -Email link whitelabels allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/links.html). - -### GET /whitelabel/links/default - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/default", host) -request.Method = "GET" -queryParams := make(map[string]string) -queryParams["domain"] = "test_string" -request.QueryParams = queryParams -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Retrieve Associated Link Whitelabel - -**This endpoint allows you to retrieve the associated link whitelabel for a subuser.** - -Link whitelables can be associated with subusers from the parent account. This functionality allows -subusers to send mail using their parent's link whitelabels. To associate a link whitelabel, the parent account -must first create a whitelabel and validate it. The parent may then associate that whitelabel with a subuser via the API or the Subuser Management page in the user interface. - -Email link whitelabels allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/links.html). - -### GET /whitelabel/links/subuser - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/subuser", host) -request.Method = "GET" -queryParams := make(map[string]string) -queryParams["username"] = "test_string" -request.QueryParams = queryParams -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Disassociate a Link Whitelabel - -**This endpoint allows you to disassociate a link whitelabel from a subuser.** - -Link whitelables can be associated with subusers from the parent account. This functionality allows -subusers to send mail using their parent's link whitelabels. To associate a link whitelabel, the parent account -must first create a whitelabel and validate it. The parent may then associate that whitelabel with a subuser via the API or the Subuser Management page in the user interface. - -Email link whitelabels allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/links.html). - -### DELETE /whitelabel/links/subuser - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/subuser", host) -request.Method = "DELETE" -queryParams := make(map[string]string) -queryParams["username"] = "test_string" -request.QueryParams = queryParams -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Update a Link Whitelabel - -**This endpoint allows you to update a specific link whitelabel. You can use this endpoint to change a link whitelabel's default status.** - -Email link whitelabels allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/links.html). - -### PATCH /whitelabel/links/{id} - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/{id}", host) -request.Method = "PATCH" -request.Body = []byte(` { - "default": true -}`) -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Retrieve a Link Whitelabel - -**This endpoint allows you to retrieve a specific link whitelabel.** - -Email link whitelabels allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/links.html). - -### GET /whitelabel/links/{id} - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/{id}", host) -request.Method = "GET" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Delete a Link Whitelabel - -**This endpoint allows you to delete a link whitelabel.** - -Email link whitelabels allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/links.html). - -### DELETE /whitelabel/links/{id} - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/{id}", host) -request.Method = "DELETE" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Validate a Link Whitelabel - -**This endpoint allows you to validate a link whitelabel.** - -Email link whitelabels allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/links.html). - -### POST /whitelabel/links/{id}/validate - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/{id}/validate", host) -request.Method = "POST" -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - -## Associate a Link Whitelabel - -**This endpoint allows you to associate a link whitelabel with a subuser account.** - -Link whitelables can be associated with subusers from the parent account. This functionality allows -subusers to send mail using their parent's link whitelabels. To associate a link whitelabel, the parent account -must first create a whitelabel and validate it. The parent may then associate that whitelabel with a subuser via the API or the Subuser Management page in the user interface. - -Email link whitelabels allow all of the click-tracked links you send in your emails to include the URL of your domain instead of sendgrid.net. - -For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Web_API_v3/Whitelabel/links.html). - -### POST /whitelabel/links/{link_id}/subuser - -```go -request := sendgrid.GetRequest(apiKey, "/v3/whitelabel/links/{link_id}/subuser", host) -request.Method = "POST" -request.Body = []byte(` { - "username": "jane@example.com" -}`) -response, err := sendgrid.API(request) -if err != nil { - log.Println(err) -} else { - fmt.Println(response.StatusCode) - fmt.Println(response.Body) - fmt.Println(response.Headers) -} -``` - - diff --git a/examples/whitelabel/whitelabel.go b/examples/senderauthentication/senderauthentication.go similarity index 88% rename from examples/whitelabel/whitelabel.go rename to examples/senderauthentication/senderauthentication.go index 95080225..89d7e5f2 100644 --- a/examples/whitelabel/whitelabel.go +++ b/examples/senderauthentication/senderauthentication.go @@ -7,7 +7,7 @@ import ( "os" ) -// Createadomainwhitelabel : Create a domain whitelabel. +// Createadomainauthentication : Create a domain authentication. // POST /whitelabel/domains func Createadomainwhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -36,7 +36,7 @@ func Createadomainwhitelabel() { } } -// Listalldomainwhitelabels : List all domain whitelabels. +// Listalldomainauthentications : List all domain authentications. // GET /whitelabel/domains func Listalldomainwhitelabels() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -60,7 +60,7 @@ func Listalldomainwhitelabels() { } } -// Getthedefaultdomainwhitelabel : Get the default domain whitelabel. +// Getthedefaultdomainauthentication : Get the default domain authentication. // GET /whitelabel/domains/default func Getthedefaultdomainwhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -77,7 +77,7 @@ func Getthedefaultdomainwhitelabel() { } } -// Listthedomainwhitelabelassociatedwiththegivenuser : List the domain whitelabel associated with the given user. +// Listthedomainauthenticationassociatedwiththegivenuser : List the domain authentication associated with the given user. // GET /whitelabel/domains/subuser func Listthedomainwhitelabelassociatedwiththegivenuser() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -94,7 +94,7 @@ func Listthedomainwhitelabelassociatedwiththegivenuser() { } } -// Disassociateadomainwhitelabelfromagivenuser : Disassociate a domain whitelabel from a given user. +// Disassociateadomainauthenticationfromagivenuser : Disassociate a domain authentication from a given user. // DELETE /whitelabel/domains/subuser func Disassociateadomainwhitelabelfromagivenuser() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -111,7 +111,7 @@ func Disassociateadomainwhitelabelfromagivenuser() { } } -// Updateadomainwhitelabel : Update a domain whitelabel. +// Updateadomainauthentication : Update a domain authentication. // PATCH /whitelabel/domains/{domain_id} func Updateadomainwhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -132,7 +132,7 @@ func Updateadomainwhitelabel() { } } -// Retrieveadomainwhitelabel : Retrieve a domain whitelabel. +// Retrieveadomainauthentication : Retrieve a domain authentication. // GET /whitelabel/domains/{domain_id} func Retrieveadomainwhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -149,7 +149,7 @@ func Retrieveadomainwhitelabel() { } } -// Deleteadomainwhitelabel : Delete a domain whitelabel. +// Deleteadomainauthentication : Delete a domain authentication. // DELETE /whitelabel/domains/{domain_id} func Deleteadomainwhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -166,7 +166,7 @@ func Deleteadomainwhitelabel() { } } -// Associateadomainwhitelabelwithagivenuser : Associate a domain whitelabel with a given user. +// Associateadomainauthenticationwithagivenuser : Associate a domain authentication with a given user. // POST /whitelabel/domains/{domain_id}/subuser func Associateadomainwhitelabelwithagivenuser() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -186,7 +186,7 @@ func Associateadomainwhitelabelwithagivenuser() { } } -// AddanIPtoadomainwhitelabel : Add an IP to a domain whitelabel. +// AddanIPtoadomainauthentication : Add an IP to a domain authentication. // POST /whitelabel/domains/{id}/ips func AddanIPtoadomainwhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -206,7 +206,7 @@ func AddanIPtoadomainwhitelabel() { } } -// RemoveanIPfromadomainwhitelabel : Remove an IP from a domain whitelabel. +// RemoveanIPfromadomainauthentication : Remove an IP from a domain authentication. // DELETE /whitelabel/domains/{id}/ips/{ip} func RemoveanIPfromadomainwhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -223,7 +223,7 @@ func RemoveanIPfromadomainwhitelabel() { } } -// Validateadomainwhitelabel : Validate a domain whitelabel. +// Validateadomainauthentication : Validate a domain authentication. // POST /whitelabel/domains/{id}/validate func Validateadomainwhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -240,7 +240,7 @@ func Validateadomainwhitelabel() { } } -// CreateanIPwhitelabel : Create an IP whitelabel +// CreateanreverseDNS : Create reverse DNS // POST /whitelabel/ips func CreateanIPwhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -262,7 +262,7 @@ func CreateanIPwhitelabel() { } } -// RetrieveallIPwhitelabels : Retrieve all IP whitelabels +// RetrieveallreverseDNSrecords : Retrieve all reverse DNS records // GET /whitelabel/ips func RetrieveallIPwhitelabels() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -284,7 +284,7 @@ func RetrieveallIPwhitelabels() { } } -// RetrieveanIPwhitelabel : Retrieve an IP whitelabel +// RetrieveareverseDNSrecord : Retrieve a reverse DNS record // GET /whitelabel/ips/{id} func RetrieveanIPwhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -301,7 +301,7 @@ func RetrieveanIPwhitelabel() { } } -// DeleteanIPwhitelabel : Delete an IP whitelabel +// DeleteareverseDNSrecord : Delete a reverse DNS record // DELETE /whitelabel/ips/{id} func DeleteanIPwhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -318,7 +318,7 @@ func DeleteanIPwhitelabel() { } } -// ValidateanIPwhitelabel : Validate an IP whitelabel +// ValidateareverseDNSrecord : Validate a reverse DNS record // POST /whitelabel/ips/{id}/validate func ValidateanIPwhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -335,7 +335,7 @@ func ValidateanIPwhitelabel() { } } -// CreateaLinkWhitelabel : Create a Link Whitelabel +// Createalinkbranding : Create a branded link // POST /whitelabel/links func CreateaLinkWhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -361,7 +361,7 @@ func CreateaLinkWhitelabel() { } } -// Retrievealllinkwhitelabels : Retrieve all link whitelabels +// Retrievealllinkbrands : Retrieve all link brands // GET /whitelabel/links func Retrievealllinkwhitelabels() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -381,7 +381,7 @@ func Retrievealllinkwhitelabels() { } } -// RetrieveaDefaultLinkWhitelabel : Retrieve a Default Link Whitelabel +// RetrieveaDefaultLinkBranding : Retrieve a Default Link Branding // GET /whitelabel/links/default func RetrieveaDefaultLinkWhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -401,7 +401,7 @@ func RetrieveaDefaultLinkWhitelabel() { } } -// RetrieveAssociatedLinkWhitelabel : Retrieve Associated Link Whitelabel +// RetrieveAssociatedLinkBranding : Retrieve Associated Link Branding // GET /whitelabel/links/subuser func RetrieveAssociatedLinkWhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -421,7 +421,7 @@ func RetrieveAssociatedLinkWhitelabel() { } } -// DisassociateaLinkWhitelabel : Disassociate a Link Whitelabel +// DisassociateaLinkBranding : Disassociate a Link Branding // DELETE /whitelabel/links/subuser func DisassociateaLinkWhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -441,7 +441,7 @@ func DisassociateaLinkWhitelabel() { } } -// UpdateaLinkWhitelabel : Update a Link Whitelabel +// UpdateaLinkBranding : Update a Link Branding // PATCH /whitelabel/links/{id} func UpdateaLinkWhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -461,7 +461,7 @@ func UpdateaLinkWhitelabel() { } } -// RetrieveaLinkWhitelabel : Retrieve a Link Whitelabel +// RetrieveaLinkBranding : Retrieve a Link Branding // GET /whitelabel/links/{id} func RetrieveaLinkWhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -478,7 +478,7 @@ func RetrieveaLinkWhitelabel() { } } -// DeleteaLinkWhitelabel : Delete a Link Whitelabel +// DeleteaLinkBranding : Delete a Link Branding // DELETE /whitelabel/links/{id} func DeleteaLinkWhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -495,7 +495,7 @@ func DeleteaLinkWhitelabel() { } } -// ValidateaLinkWhitelabel : Validate a Link Whitelabel +// ValidateaLinkBranding : Validate a Link Branding // POST /whitelabel/links/{id}/validate func ValidateaLinkWhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") @@ -512,7 +512,7 @@ func ValidateaLinkWhitelabel() { } } -// AssociateaLinkWhitelabel : Associate a Link Whitelabel +// AssociateaLinkBranding : Associate a Link Branding // POST /whitelabel/links/{link_id}/subuser func AssociateaLinkWhitelabel() { apiKey := os.Getenv("SENDGRID_API_KEY") diff --git a/use-cases/README.md b/use-cases/README.md index 00c96294..0e5a7634 100644 --- a/use-cases/README.md +++ b/use-cases/README.md @@ -10,4 +10,4 @@ This documentation provides examples for specific use cases. Please [open an iss * [Sections](sections.md) * [Attachments](attachments.md) * [How to View Email Statistics](view-email-stats.md) -* [How to Setup a Domain Whitelabel](setup-domain-whitelabel.md) \ No newline at end of file +* [How to Setup a Domain Authentication](setup-domain-authentication.md) \ No newline at end of file diff --git a/use-cases/setup-domain-whitelabel.md b/use-cases/setup-domain-authentication.md similarity index 64% rename from use-cases/setup-domain-whitelabel.md rename to use-cases/setup-domain-authentication.md index e9463a85..25f3f8af 100644 --- a/use-cases/setup-domain-whitelabel.md +++ b/use-cases/setup-domain-authentication.md @@ -1,9 +1,9 @@ -## How to Setup a Domain Whitelabel +## How to Setup a Domain Authentication -You can find documentation for how to setup a domain whitelabel via the UI [here](https://sendgrid.com/docs/Classroom/Basics/Whitelabel/setup_domain_whitelabel.html). -Find more information about all of SendGrid's whitelabeling related documentation [here](https://sendgrid.com/docs/Classroom/Basics/Whitelabel/index.html). +You can find documentation for how to setup a domain authentication via the UI [here](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). +Find more information about all of SendGrid's authentication related documentation [here](https://sendgrid.com/docs/ui/account-and-settings/). -To create a Domain Whitelabel Via the API: +To create a Domain authentication Via the API: ``` package main