provider Link branding POST /whitelabel/links
@utdk/sendgrid /whitelabel/links
Create a branded link
**This endpoint allows you to create a new branded link.** To create the link branding, supply the root domain and, optionally, the subdomain — these go into separate fields in your request body. The root domain should match your FROM email address. If you provide a subdomain, it must be different from the subdomain you used for authenticating your domain. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request.
on-behalf-of header
string

Try it

Authentication
Configure credentials for Email Activity (beta)
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

postWhitelabelLinks
POST/whitelabel/links
**This endpoint allows you to create a new branded link.** To create the link branding, supply the root domain and, optionally, the subdomain — these go into separate fields in your request body. The root domain should match your FROM email address. If you provide a subdomain, it must be different from the subdomain you used for authenticating your domain. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request.

Input

Indicates if you want to use this link branding as the default or fallback. When setting a new default, the existing default link branding will have its default status removed automatically.

required

The root domain for the subdomain that you are creating the link branding for. This should match your FROM email address.

The subdomain to create the link branding for. Must be different from the subdomain you used for authenticating your domain.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import sendgrid from '@utdk/sendgrid';

await sendgrid.postWhitelabelLinks({
  "on-behalf-of": "The subuser's username. This header generates the API call as if the subuser account was making the call."
})