Designsapi 7 endpoints

GET /designs/pre-builts

This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid.

Unlike the /designs endpoint where your designs are stored, a GET request made to designs/pre-builts will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library.

By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the page_size query parameter.

This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify.

operationId: DesignsApi_listPreBuiltDesigns

Parameters

Name In Required Type Description
page_size query optional integer

number of results to return

page_token query optional string

token corresponding to a specific page of results, as provided by metadata

summary query optional boolean

set to false to return all fields

Responses

200
GET /designs/pre-builts
GET /designs/pre-builts/{id}

This endpoint allows you to retrieve a single pre-built design.

A GET request to /designs/pre-builts/{id} will retrieve details about a specific pre-built design.

This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify.

operationId: DesignsApi_getSinglePreBuiltDesign

Parameters

Name In Required Type Description
id path required string

The ID of the pre-built Design you want to duplicate.

Responses

200
400
404
GET /designs/pre-builts/{id}
POST /designs/pre-builts/{id}

This endpoint allows you to duplicate one of the pre-built Twilio SendGrid designs.

Like duplicating one of your existing designs, you are not required to pass any data in the body of a request to this endpoint. If you choose to leave the name field blank, your duplicate will be assigned the name of the design it was copied from with the text “Duplicate: “ prepended to it. This name change is only a convenience, as the duplicate design will be assigned a unique ID that differentiates it from your other designs. You can retrieve the IDs for Twilio SendGrid pre-built designs using the “List SendGrid Pre-built Designs” endpoint.

You can modify your duplicate’s name at the time of creation by passing an updated value to the name field when making the initial request.
More on retrieving design IDs can be found above.

operationId: DesignsApi_duplicatePreBuiltDesign

Parameters

Name In Required Type Description
id path required string

The ID of the pre-built Design you want to duplicate.

Request Body

application/json
schema design-duplicate-input
Property Type Required
name string optional
editor string optional

Responses

200
400
404
POST /designs/pre-builts/{id}
DELETE /designs/{id}

This endpoint allows you to delete a single design.

Be sure to check the ID of the design you intend to delete before making this request; deleting a design is a permanent action.

operationId: DesignsApi_deleteDesignById

Parameters

Name In Required Type Description
id path required string

The ID of the Design you want to duplicate.

Responses

204
400
404
DELETE /designs/{id}
GET /designs/{id}

This endpoint allows you to retrieve a single design.

A GET request to /designs/{id} will retrieve details about a specific design in your Design Library.

This endpoint is valuable when retrieving information stored in a field that you wish to update using a PATCH request.

operationId: DesignsApi_getSingleDesign

Parameters

Name In Required Type Description
id path required string

The ID of the Design you want to duplicate.

Responses

200
400
404
GET /designs/{id}
PATCH /designs/{id}

This endpoint allows you to edit a design.

The Design API supports PATCH requests, which allow you to make partial updates to a single design. Passing data to a specific field will update only the data stored in that field; all other fields will be unaltered.

For example, updating a design’s name requires that you make a PATCH request to this endpoint with data specified for the name field only.

{
    "name": "<Updated Name>"
}
operationId: DesignsApi_updateDesignById

Parameters

Name In Required Type Description
id path required string

The ID of the Design you want to duplicate.

Request Body

application/json
schema DesignsApiUpdateDesignByIdRequest
Property Type Required
name string optional
subject string optional
categories array optional
html_content string optional
plain_content string optional
generate_plain_content boolean optional

Responses

200
400
404
PATCH /designs/{id}
POST /designs/{id}

This endpoint allows you to duplicate one of your existing designs.

Modifying an existing design is often the easiest way to create something new.

You are not required to pass any data in the body of a request to this endpoint. If you choose to leave the name field blank, your duplicate will be assigned the name of the design it was copied from with the text “Duplicate: “ prepended to it. This name change is only a convenience, as the duplicate will be assigned a unique ID that differentiates it from your other designs.

You can modify your duplicate’s name at the time of creation by passing an updated value to the name field when making the initial request.
More on retrieving design IDs can be found below.

operationId: DesignsApi_duplicateDesign

Parameters

Name In Required Type Description
id path required string

The ID of the Design you want to duplicate.

Request Body

application/json
schema design-duplicate-input
Property Type Required
name string optional
editor string optional

Responses

201
400
404
POST /designs/{id}

Domainauthentication 12 endpoints

GET /whitelabel/domains

This endpoint allows you to retrieve a list of all domains you have authenticated.

operationId: DomainAuthentication_getAllDomains

Parameters

Name In Required Type Description
limit query optional integer

Number of domains to return.

offset query optional integer

Paging offset.

exclude_subusers query optional boolean

Exclude subuser domains from the result.

username query optional string

The username associated with an authenticated domain.

domain query optional string

Search for authenticated domains.

on-behalf-of header optional string

Responses

200
GET /whitelabel/domains
POST /whitelabel/domains

This endpoint allows you to authenticate a domain.

If you are authenticating a domain for a subuser, you have two options:

  1. Use the “username” parameter. This allows you to authenticate a domain on behalf of your subuser. This means the subuser is able to see and modify the authenticated domain.
  2. Use the Association workflow (see Associate Domain section). This allows you to authenticate a domain created by the parent to a subuser. This means the subuser will default to the assigned domain, but will not be able to see or modify that authenticated domain. However, if the subuser authenticates their own domain it will overwrite the assigned domain.
operationId: DomainAuthentication_postAuthenticateDomain

Parameters

Name In Required Type Description
on-behalf-of header optional string

Request Body

application/json
schema DomainAuthenticationPostAuthenticateDomainRequest
Property Type Required
ips array optional
domain string required
default boolean optional
username string optional
subdomain string optional
custom_spf boolean optional
automatic_security boolean optional
custom_dkim_selector string optional

Responses

201
POST /whitelabel/domains
GET /whitelabel/domains/default

This endpoint allows you to retrieve the default authentication for a domain.

When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden.

This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status.

operationId: DomainAuthentication_getDefaultAuthentication

Parameters

Name In Required Type Description
domain query optional string

The domain to find a default authentication.

on-behalf-of header optional string

Responses

200
GET /whitelabel/domains/default
DELETE /whitelabel/domains/subuser

This endpoint allows you to disassociate a specific authenticated domain from a subuser.

Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent’s domain authentication. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools.

operationId: DomainAuthentication_disassociateDomainFromSubuser

Parameters

Name In Required Type Description
username query optional string

Username for the subuser to find associated authenticated domain.

Responses

204
DELETE /whitelabel/domains/subuser
GET /whitelabel/domains/subuser

This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.

Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent’s domain authentication. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools.

operationId: DomainAuthentication_listSubuserDomains

Parameters

Name In Required Type Description
username query required string

Username for the subuser to find associated authenticated domain.

Responses

200
GET /whitelabel/domains/subuser
DELETE /whitelabel/domains/{domain_id}

This endpoint allows you to delete an authenticated domain.

operationId: DomainAuthentication_deleteAuthenticatedDomain

Parameters

Name In Required Type Description
domain_id path required string
on-behalf-of header optional string

Responses

204
DELETE /whitelabel/domains/{domain_id}
GET /whitelabel/domains/{domain_id}

This endpoint allows you to retrieve a specific authenticated domain.

operationId: DomainAuthentication_getSpecificDomain

Parameters

Name In Required Type Description
domain_id path required string
on-behalf-of header optional string

Responses

200
GET /whitelabel/domains/{domain_id}
PATCH /whitelabel/domains/{domain_id}

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

operationId: DomainAuthentication_updateDomainSettings

Parameters

Name In Required Type Description
domain_id path required string
on-behalf-of header optional string

Request Body

application/json
schema DomainAuthenticationUpdateDomainSettingsRequest
Property Type Required
default boolean optional
custom_spf boolean optional

Responses

200
PATCH /whitelabel/domains/{domain_id}
POST /whitelabel/domains/{domain_id}/subuser

This endpoint allows you to associate a specific authenticated domain with a subuser.

Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent’s domain authentication. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools.

operationId: DomainAuthentication_associateSubuserWithDomain

Parameters

Name In Required Type Description
domain_id path required integer

ID of the authenticated domain to associate with the subuser

Request Body

application/json
schema DomainAuthenticationAssociateSubuserWithDomainRequest
Property Type Required
username string required

Responses

201
POST /whitelabel/domains/{domain_id}/subuser
POST /whitelabel/domains/{id}/ips

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

operationId: DomainAuthentication_addIpToDomain

Parameters

Name In Required Type Description
id path required integer

ID of the domain to which you are adding an IP

on-behalf-of header optional string

Request Body

application/json
schema DomainAuthenticationAddIpToDomainRequest
Property Type Required
ip string required

Responses

200
POST /whitelabel/domains/{id}/ips
DELETE /whitelabel/domains/{id}/ips/{ip}

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

operationId: DomainAuthentication_removeIp

Parameters

Name In Required Type Description
id path required integer

ID of the domain to delete the IP from.

ip path required string

IP to remove from the domain.

on-behalf-of header optional string

Responses

200
DELETE /whitelabel/domains/{id}/ips/{ip}
POST /whitelabel/domains/{id}/validate

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

operationId: DomainAuthentication_validateDomain

Parameters

Name In Required Type Description
id path required integer

ID of the domain to validate.

on-behalf-of header optional string

Responses

200
500
POST /whitelabel/domains/{id}/validate

Emailaddressvalidation 1 endpoints

POST /validations/email

This endpoint allows you to validate an email address.

operationId: EmailAddressValidation_checkValidity

Request Body

application/json
schema EmailAddressValidationCheckValidityRequest
Property Type Required
email string required
source string optional

Responses

200
POST /validations/email

Emailcnamerecords 1 endpoints

POST /whitelabel/dns/email

This endpoint is used to share DNS records with a colleagues

Use this endpoint to send SendGrid-generated DNS record information to a co-worker so they can enter it into your DNS provider to validate your domain and link branding.

What type of records are sent will depend on whether you have chosen Automated Security or not. When using Automated Security, SendGrid provides you with three CNAME records. If you turn Automated Security off, you are instead given TXT and MX records.

If you pass a link_id to this endpoint, the generated email will supply the DNS records necessary to complete Link Branding setup. If you pass a domain_id to this endpoint, the generated email will supply the DNS records needed to complete Domain Authentication. Passing both IDs will generate an email with the records needed to complete both setup steps.

You can retrieve all your domain IDs from the returned id fields for each domain using the “List all authenticated domains” endpoint. You can retrieve all of your link IDs using the “Retrieve all branded links” endpoint.

operationId: EmailCnameRecords_sendDnsEmail

Request Body

application/json
schema EmailCnameRecordsSendDnsEmailRequest
Property Type Required
email string required
link_id integer required
message string optional
domain_id integer required

Responses

204
400
POST /whitelabel/dns/email

Ipaccessmanagement 6 endpoints

GET /access_settings/activity

This endpoint allows you to retrieve a list of all of the IP addresses that recently attempted to access your account either through the User Interface or the API.

operationId: IpAccessManagement_getRecentAccessAttempts

Parameters

Name In Required Type Description
limit query optional integer

Limits the number of IPs to return.

on-behalf-of header optional string

Responses

200
401
403
404
500
GET /access_settings/activity
DELETE /access_settings/whitelist

This endpoint allows you to remove one or more IP addresses from your list of allowed addresses.

To remove one or more IP addresses, pass this endpoint an array containing the ID(s) associated with the IP(s) you intend to remove. You can retrieve the IDs associated with your allowed IP addresses using the “Retrieve a list of currently allowed IPs” endpoint.

It is possible to remove your own IP address, which will block access to your account. You will need to submit a support ticket if this happens. For this reason, it is important to double check that you are removing only the IPs you intend to remove when using this endpoint.

operationId: IpAccessManagement_removeIpAddresses

Parameters

Name In Required Type Description
on-behalf-of header optional string

Request Body

application/json
schema IpAccessManagementRemoveIpAddressesRequest
Property Type Required
ids array optional

Responses

204
401
403
404
500
DELETE /access_settings/whitelist
GET /access_settings/whitelist

This endpoint allows you to retrieve a list of IP addresses that are currently allowed to access your account.

Each IP address returned to you will have created_at and updated_at dates. Each IP will also be associated with an id that can be used to remove the address from your allow list.

operationId: IpAccessManagement_getAllowedIPs

Parameters

Name In Required Type Description
on-behalf-of header optional string

Responses

200
401
403
404
500
GET /access_settings/whitelist
POST /access_settings/whitelist

This endpoint allows you to add one or more allowed IP addresses.

To allow one or more IP addresses, pass them to this endpoint in an array. Once an IP address is added to your allow list, it will be assigned an id that can be used to remove the address. You can retrieve the ID associated with an IP using the “Retrieve a list of currently allowed IPs” endpoint.

operationId: IpAccessManagement_addAllowedIps

Parameters

Name In Required Type Description
on-behalf-of header optional string

Request Body

application/json
schema IpAccessManagementAddAllowedIpsRequest
Property Type Required
ips array required
ip string required

Responses

201
401
403
404
500
POST /access_settings/whitelist
DELETE /access_settings/whitelist/{rule_id}

This endpoint allows you to remove a specific IP address from your list of allowed addresses.

When removing a specific IP address from your list, you must include the ID in your call. You can retrieve the IDs associated with your allowed IP addresses using the “Retrieve a list of currently allowed IPs” endpoint.

operationId: IpAccessManagement_removeSpecificIpFromAllowedList

Parameters

Name In Required Type Description
rule_id path required string

The ID of the allowed IP address that you want to retrieve.

on-behalf-of header optional string

Responses

204
DELETE /access_settings/whitelist/{rule_id}
GET /access_settings/whitelist/{rule_id}

This endpoint allows you to retreive a specific IP address that has been allowed to access your account.

You must include the ID for the specific IP address you want to retrieve in your call. You can retrieve the IDs associated with your allowed IP addresses using the “Retrieve a list of currently allowed IPs” endpoint.

operationId: IpAccessManagement_getAllowedIp

Parameters

Name In Required Type Description
rule_id path required string

The ID of the allowed IP address that you want to retrieve.

on-behalf-of header optional string

Responses

200
GET /access_settings/whitelist/{rule_id}

Ipaddresses 5 endpoints

GET /ips

This endpoint allows you to retrieve a list of all assigned and unassigned IPs.

Response includes warm up status, pools, assigned subusers, and reverse DNS 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.

operationId: GET_ips

Parameters

Name In Required Type Description
ip query optional string

The IP address to get

exclude_whitelabels query optional boolean

Should we exclude reverse DNS records (whitelabels)?

limit query optional integer

The number of IPs you want returned at the same time.

offset query optional integer

The offset for the number of IPs that you are requesting.

subuser query optional string

The subuser you are requesting for.

sort_by_direction query optional string

The direction to sort the results.

Responses

200
GET /ips
POST /ips

This endpoint is for adding a(n) IP Address(es) to your account.

operationId: POST_ips

Request Body

application/json
schema PostIpsRequest
Property Type Required
count integer required
warmup boolean optional
subusers array optional

Responses

201
400
POST /ips
GET /ips/assigned

This endpoint allows you to retrieve only assigned IP addresses.

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.

operationId: IpAddresses_getAssignedIps

Responses

200
GET /ips/assigned
GET /ips/remaining

This endpoint gets amount of IP Addresses that can still be created during a given period and the price of those IPs.

operationId: IpAddresses_getRemainingIPsCount

Responses

200
GET /ips/remaining
GET /ips/{ip_address}

This endpoint allows you to see which IP pools a particular IP address has been added to.

The same IP address can be added to multiple IP pools.

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.

operationId: IpAddresses_getIpPoolsByAddress

Parameters

Name In Required Type Description
ip_address path required string

The IP address you are retrieving the IP pools for.

Responses

200
GET /ips/{ip_address}

Ippools 7 endpoints

GET /ips/pools

This endpoint allows you to get all of your IP pools.

operationId: IpPools_getAll

Responses

200
GET /ips/pools
POST /ips/pools

This endpoint allows you to create an IP pool.

Before you can create an IP pool, you need to activate the IP in your SendGrid account:

  1. Log into your SendGrid account.
  2. Navigate to Settings and then select IP Addresses.
  3. Find the IP address you want to activate and then click Edit.
  4. Check Allow my account to send mail using this IP address.
  5. Click Save.
operationId: IpPools_createPool

Request Body

application/json
schema IpPoolsCreatePoolRequest
Property Type Required
name string required

Responses

200
POST /ips/pools
DELETE /ips/pools/{pool_name}

This endpoint allows you to delete an IP pool.

operationId: IpPools_deletePool

Parameters

Name In Required Type Description
pool_name path required string

The name of the IP pool that you want to retrieve the IP addresses for.

Responses

204
404
DELETE /ips/pools/{pool_name}
GET /ips/pools/{pool_name}

This endpoint allows you to get all of the IP addresses that are in a specific IP pool.

operationId: IpPools_getPoolIps

Parameters

Name In Required Type Description
pool_name path required string

The name of the IP pool that you want to retrieve the IP addresses for.

Responses

200
404
GET /ips/pools/{pool_name}
PUT /ips/pools/{pool_name}

This endpoint allows you to update the name of an IP pool.

operationId: IpPools_updateName

Parameters

Name In Required Type Description
pool_name path required string

The name of the IP pool that you want to retrieve the IP addresses for.

Request Body

application/json
schema IpPoolsUpdateNameRequest
Property Type Required
name string optional

Responses

200
404
PUT /ips/pools/{pool_name}
POST /ips/pools/{pool_name}/ips

This endpoint allows you to add an IP address to an IP pool.

You can add the same IP address to multiple pools. It may take up to 60 seconds for your IP address to be added to a pool after your request is made.

Before you can add an IP to a pool, you need to activate it in your SendGrid account:

  1. Log into your SendGrid account.
  2. Navigate to Settings and then select IP Addresses.
  3. Find the IP address you want to activate and then click Edit.
  4. Check Allow my account to send mail using this IP address.
  5. Click Save.

You can retrieve all of your available IP addresses from the “Retrieve all IP addresses” endpoint.

operationId: IpPools_addIpAddressToPool

Parameters

Name In Required Type Description
pool_name path required string

The name of the IP pool you want to add the address to. If the name contains spaces, they must be URL encoded (e.g., “Test Pool” becomes “Test%20Pool”).

Request Body

application/json
schema IpPoolsAddIpAddressToPoolRequest
Property Type Required
ip string optional

Responses

201
404
POST /ips/pools/{pool_name}/ips
DELETE /ips/pools/{pool_name}/ips/{ip}

This endpoint allows you to remove an IP address from an IP pool.

operationId: IpPools_removeIpAddressFromPool

Parameters

Name In Required Type Description
pool_name path required string

The name of the IP pool that you are removing the IP address from.

ip path required string

The IP address that you wish to remove.

Responses

204
404
DELETE /ips/pools/{pool_name}/ips/{ip}

Ipwarmup 4 endpoints

GET /ips/warmup

This endpoint allows you to retrieve all of your IP addresses that are currently warming up.

operationId: IpWarmup_getAllIpsWarmup

Responses

200
GET /ips/warmup
POST /ips/warmup

This endpoint allows you to put an IP address into warmup mode.

operationId: IpWarmup_startIpAddressWarmup

Request Body

application/json
schema IpWarmupStartIpAddressWarmupRequest
Property Type Required
ip string optional

Responses

200
404
POST /ips/warmup
DELETE /ips/warmup/{ip_address}

This endpoint allows you to remove an IP address from warmup mode.

Your request will return a 204 status code if the specified IP was successfully removed from warmup mode. To retrieve details of the IP’s warmup status before removing it from warmup mode, call the “Retrieve the warmpup status for a specific IP address” endpoint.

operationId: IpWarmup_stopIpAddressWarmup

Parameters

Name In Required Type Description
ip_address path required string

The IP address that you want to retrieve the warmup status for.

Responses

204
404
DELETE /ips/warmup/{ip_address}
GET /ips/warmup/{ip_address}

This endpoint allows you to retrieve the warmup status for a specific IP address.

You can retrieve all of your warming IPs using the “Retrieve all IPs currently in warmup” endpoint.

operationId: IpWarmup_getWarmupStatusForIpAddress

Parameters

Name In Required Type Description
ip_address path required string

The IP address that you want to retrieve the warmup status for.

Responses

200
404
GET /ips/warmup/{ip_address}

Invalidemailsapi 4 endpoints

DELETE /suppression/invalid_emails

This endpoint allows you to remove email addresses from your invalid email address list.

There are two options for deleting invalid email addresses:

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.

operationId: InvalidEmailsApi_deleteInvalidEmails

Parameters

Name In Required Type Description
on-behalf-of header optional string

Request Body

application/json
schema InvalidEmailsApiDeleteInvalidEmailsRequest
Property Type Required
emails array optional
delete_all boolean optional

Responses

204
DELETE /suppression/invalid_emails
GET /suppression/invalid_emails

This endpoint allows you to retrieve a list of all invalid email addresses.

operationId: InvalidEmailsApi_getAllInvalidEmails

Parameters

Name In Required Type Description
start_time query optional integer

Refers start of the time range in unix timestamp when an invalid email was created (inclusive).

end_time query optional integer

Refers end of the time range in unix timestamp when an invalid email was created (inclusive).

limit query optional integer

Limit the number of results to be displayed per page.

offset query optional integer

Paging offset. The point in the list to begin displaying results.

on-behalf-of header optional string

Responses

200
GET /suppression/invalid_emails
DELETE /suppression/invalid_emails/{email}

This endpoint allows you to remove a specific email address from the invalid email address list.

operationId: InvalidEmailsApi_removeSpecificEmail

Parameters

Name In Required Type Description
email path required string

The specific email address of the invalid email entry that you want to retrieve.

on-behalf-of header optional string

Responses

204
DELETE /suppression/invalid_emails/{email}
GET /suppression/invalid_emails/{email}

This endpoint allows you to retrieve a specific invalid email addresses.

operationId: InvalidEmailsApi_getSpecificInvalidEmail

Parameters

Name In Required Type Description
email path required string

The specific email address of the invalid email entry that you want to retrieve.

on-behalf-of header optional string

Responses

200
GET /suppression/invalid_emails/{email}

Linkbranding 3 endpoints

GET /whitelabel/links

This endpoint allows you to retrieve all branded links.

You can submit this request as one of your subusers if you include their ID in the on-behalf-of header in the request.

operationId: LinkBranding_getBrandedLinks

Parameters

Name In Required Type Description
limit query optional integer

Limits the number of results returned per page.

on-behalf-of header optional string

Responses

200
GET /whitelabel/links
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.

operationId: LinkBranding_createBrandedLink

Parameters

Name In Required Type Description
on-behalf-of header optional string

Request Body

application/json
schema LinkBrandingCreateBrandedLinkRequest
Property Type Required
domain string required
default boolean optional
subdomain string optional

Responses

201
POST /whitelabel/links
GET /whitelabel/links/default

This endpoint allows you to retrieve the default branded link.

The default branded link is the actual URL to be used when sending messages. If you have more than one branded link, the default is determined by the following order:

  • The validated branded link marked as default (set when you call the “Create a branded link” endpoint or by calling the “Update a branded link” endpoint on an existing link)
  • Legacy branded links (migrated from the whitelabel wizard)
  • Default SendGrid-branded links (i.e., 100.ct.sendgrid.net)

You can submit this request as one of your subusers if you include their ID in the on-behalf-of header in the request.

operationId: LinkBranding_getDefaultBrandedLink

Parameters

Name In Required Type Description
domain query optional string

The domain to match against when finding the default branded link.

on-behalf-of header optional string

Responses

200
GET /whitelabel/links/default
Load more endpoints