Skip to contentSkip to navigationSkip to topbar
On this page

Email DNS records to a co-worker



API Overview

api-overview page anchor

If you don't have access to modify your companies DNS records, you can email the records to a co-worker who does to complete Domain Authentication and/or Link Branding setups. This email includes a direct link to the DNS records. The link does expire, but the recipient doesn't need login access to your Twilio SendGrid account.


POST/v3/whitelabel/dns/email

Base url: https://api.sendgrid.com (for global users and subusers)

Base url: https://api.eu.sendgrid.com (for EU regional subusers)

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.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
Encoding type:application/json
SchemaExample
Property nameTypeRequiredDescriptionChild properties
link_idintegerrequired

The ID of the branded link.

Minimum: 0

domain_idintegerrequired

The ID of your SendGrid domain record.

Minimum: 0

emailstring<email>required

The email address to send the DNS information to.


messagestringOptional

A custom text block to include in the email body sent with the records.

Default: Please set these DNS records in our hosting solution.
204400
No response body.
Email DNS records to a co-workerLink to code sample: Email DNS records to a co-worker
1
const client = require('@sendgrid/client');
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const data = {
5
"link_id": 29719392,
6
"domain_id": 46873408,
7
"email": "my_colleague@example.com",
8
"message": "DNS Record for verification"
9
};
10
11
const request = {
12
url: `/v3/whitelabel/dns/email`,
13
method: 'POST',
14
body: data
15
}
16
17
client.request(request)
18
.then(([response, body]) => {
19
console.log(response.statusCode);
20
console.log(response.body);
21
})
22
.catch(error => {
23
console.error(error);
24
});