Domain authentication and validation

After creating and managing your domains, you can authenticate and validate them. You need a valid domain name to authenticate. For the public endpoints, see API reference > Domains.

1. Validate domain configuration

Send a GET request to https://api.brevo.com/v3/senders/domains/{domainName} to validate your domain. Use the cURL request below:

$curl --request GET \
> --url https://api.brevo.com/v3/senders/domains/mycompany.com \
> --header 'accept: application/json' \
> --header 'api-key: '

This endpoint returns the configuration of a specific domain. The only attribute is domainName, which you append to the URL in the cURL request:

AttributeDatatypeDescriptionValue
domainNameStringName of the domainmycompany.com

Response

Sample response:

1{
2 "domain": "mycompany.com",
3 "verified": false,
4 "authenticated": false,
5 "dns_records": {
6 "dkim_record": {
7 "type": "TXT",
8 "value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDeMVIzrCa3T14JsNY0IRv5/2V1/v2itlviLQBwXsa7shBD6TrBkswsFUToPyMRWC9tbR/5ey0nRBH0ZVxp+lsmTxid2Y2z+FApQ6ra2VsXfbJP3HE6wAO0YTVEJt1TmeczhEd2Jiz/fcabIISgXEdSpTYJhb0ct0VJRxcg4c8c7wIDAQAB",
9 "host_name": "mail._domainkey.",
10 "status": false
11 },
12 "brevo_code": {
13 "type": "TXT",
14 "value": "brevo-code:e760f020e6d438149540cfc757e99b5a",
15 "host_name": "",
16 "status": false
17 }
18 }
19}

The JSON response shows the domain configuration along with verification and authentication status. Response codes:

Response codeMessageDescription
200Domain configurationReturns the verification and authentication status of the domain.
400Bad requestRequest fails due to incorrect or missing parameters.
404Domain does not existRequest fails because the domain does not exist.

2. Authenticate a domain

Send a PUT request to https://api.brevo.com/v3/senders/domains/{domainName}/authenticate to authenticate a domain. Use the cURL request below:

$curl --request PUT \
> --url https://api.brevo.com/v3/senders/domains/mycompany.com/authenticate \
> --header 'accept: application/json' \
> --header 'api-key: '

Add the domainName attribute to the URL as in https://api.brevo.com/v3/senders/domains/{domainName}/authenticate. The attribute:

AttributeDatatypeDescriptionValue
domainNameStringName of the domainmycompany.com

How to get your domain verified?

Three ways to authenticate your domain:

  1. DNS records: Add the Brevo record to verify your domain, then configure the remaining DNS records to authenticate it.
  2. Host a file: Host a file in the root directory of the domain.
  3. Send an email: Send an email containing a verification code to confirm the domain is authentic.

Response

Sample response:

1{
2 "domain_name": "mycompany.com",
3 "message": "Domain has been authenticated successfully."
4}

Response codes:

Response codeMessageDescription
200Domain authenticatedThe domain is authenticated.
400Bad requestInvalid or missing parameters, or a value mismatch between DKIM records and the Brevo code.
404Domain does not existDomain does not exist in the database.