DNS

Whenever you register a new sender or metasender address with a new domain name, a new DNS object is created for this domain. Use the resources below to retrieve the DNS records you need to complete a successful domain validation and SPF / DKIM authentication.

get

Get the SPF and DKIM settings for all sender domains

get

Get the SPF and DKIM settings for a specific sender domain

get

/dns

Retrieve the SPF and DKIM settings for all sender domains on this API Key. The information will help you configure your SPF and DKIM settings on the respective domain, before running a DNS check with `/dns/{dns_id}/check` to validate it and complete the SPF and DKIM authentication.

Full API path

https://api.mailjet.com/v3/REST/dns

Query string parameters

IsCheckInProgress

boolean

When true, will retrieve only DNS records, where a validation check was initiated and is in progress. When false, DNS records where a check is in progress will be excluded from the response.

IsSenderIdentified

boolean

Retrieves DNS records where IsSenderIdentified matches the specified value.

IsYahooFBL

boolean

Retrieves only DNS records where a Yahoo Feedback loop has been setup. Contact the Mailjet Support team to set up the feedback loop.

MaxLastCheckAt

string

Retrieves only DNS records where the last check was performed before this timestamp.

MinLastCheckAt

string

Retrieves only DNS records where the last check was performed after this timestamp.

SPFStatus

string

Retrieves only DNS records where the last domain SPF configuration check resulted in the specified status.

Possible values:

  • OK
  • Error
  • Not checked
  • Not found

Limit

integer

Limit the response to a select number of returned objects.

Default value: 10. Maximum value: 1000

Offset

integer

Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects.

Default value: 0

countOnly

boolean

Set the value of this query parameter to 1 to retrieve the overall number of objects returned by this request for your API Key. No list of results will be returned - the objects will simply be counted.

Default value: 0

Note: When you send a request without the countOnly query parameter, Count and Total will only return the number of extracted elements and not the overall number.

Sort

string

Specify a property name for this query parameter to sort the objects in Data. By default the sorting is ascending. When a property name is postfixed with DESC (i.e. property_name DESC), the sort order will be descending.

Note: Both the Sort query parameter and the option to select a descending order are not available for every property.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

DKIMRecordName

string

Name of the DNS DKIM record to insert for this domain.

DKIMRecordValue

string

Value to insert in the DNS DKIM record for this domain.

DKIMStatus

string

The status of the last domain DKIM configuration check.

Possible values:

  • OK
  • Error
  • Not checked

Domain

string

The name of the domain linked to this DNS record.

ID

integer

Unique numeric ID for this DNS record.

IsCheckInProgress

boolean

Indicates whether there is a check in progress for this domain or not.

LastCheckAt

string

Timestamp for the last check performed for this domain.

OwnerShipToken

string

Value of the token to verify the ownership of the domain.

OwnerShipTokenRecordName

string

Value to use when configuring the TXT record (DNS) verification for the domain.

SPFRecordValue

string

Value to insert in the DNS SPF record for this domain.

SPFStatus

string

SPF status.

Possible values:

  • OK
  • Error
  • Not checked
  • Not found

Total

integer

get

/dns/{dns_ID or dns_domain}

Retrieve the SPF and DKIM settings for a specific sender domain on this API Key. The information will help you configure your SPF and DKIM settings on the respective domain, before running a DNS check with `/dns/{dns_id}/check` to validate it.

Full API path

https://api.mailjet.com/v3/REST/dns/{dns_ID}

Path parameters

dns_ID

integer, required

Unique numeric ID of the domain settings object you want to retrieve.

dns_domain

The name of the domain settings object you want to retrieve - e.g. mailjet.com.

Responses

Note: You can find all the errors related to API in the error page

Count

integer

Data

array

DKIMRecordName

string

Name of the DNS DKIM record to insert for this domain.

DKIMRecordValue

string

Value to insert in the DNS DKIM record for this domain.

DKIMStatus

string

The status of the last domain DKIM configuration check.

Possible values:

  • OK
  • Error
  • Not checked

Domain

string

The name of the domain linked to this DNS record.

ID

integer

Unique numeric ID for this DNS record.

IsCheckInProgress

boolean

Indicates whether there is a check in progress for this domain or not.

LastCheckAt

string

Timestamp for the last check performed for this domain.

OwnerShipToken

string

Value of the token to verify the ownership of the domain.

OwnerShipTokenRecordName

string

Value to use when configuring the TXT record (DNS) verification for the domain.

SPFRecordValue

string

Value to insert in the DNS SPF record for this domain.

SPFStatus

string

SPF status.

Possible values:

  • OK
  • Error
  • Not checked
  • Not found

Total

integer