Domain authentication and validation
You can authenticate and validate your domains after creating and managing them. You need a domain name which is valid so that it can be authenticated. To check out the public endpoints, you can go to API reference > Domains.
1. Validate domain configuration
You can use the endpoint https://api.brevo.com/v3/senders/domains/{domainName} with the GET method to validate your domain. You can use the cURL request below to send a request to the endpoint.
This endpoint shows the configurations of a specific domain. There is only one attribute for this endpoint domainName which you have to append with the URL in the cURL request. It is defined below in the table:
Response
A sample response for the request would be something like:
In the JSON format, the domains configurations are shown and if the domain is verified and authenticated. You can find some response codes below and their description.
2. Authenticate a domain
You can use the endpoint https://api.brevo.com/v3/senders/domains/{domainName}/authenticate with the PUT method to authenticate a domain. The cURL request below can be utilised to send a request to the endpoint.
You can put the attribute domainName in the url of the cURL request as mentioned here https://api.brevo.com/v3/senders/domains/{domainName}/authenticate. The attribute is mentioned in the table below:
How to get your domain verified?
There are three ways to authenticate your domain:
- DNS records: You need the Brevo record to verify your domain. To authenticate the domain, configure your domain with other remaining DNS records.
- Host a file: You can host a file in the root directory of the domain.
- Send an email: You can send email for a verification code which will verify the domain is authentic.
Response
A sample response would be something like:
A few response codes and their descriptions are mentioned below in the table: