Skip to contentSkip to navigationSkip to topbar
Rate this page:
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

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>>
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-worker

email-dns-records-to-a-co-worker page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
curl

_24
const client = require('@sendgrid/client');
_24
client.setApiKey(process.env.SENDGRID_API_KEY);
_24
_24
const data = {
_24
"link_id": 29719392,
_24
"domain_id": 46873408,
_24
"email": "my_colleague@example.com",
_24
"message": "DNS Record for verification"
_24
};
_24
_24
const request = {
_24
url: `/v3/whitelabel/dns/email`,
_24
method: 'POST',
_24
body: data
_24
}
_24
_24
client.request(request)
_24
.then(([response, body]) => {
_24
console.log(response.statusCode);
_24
console.log(response.body);
_24
})
_24
.catch(error => {
_24
console.error(error);
_24
});


Rate this page: