For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
      • GETGet the list of all sender domains
      • POSTCreate a new sender domain
      • DELDelete a sender domain
      • GETGet a sender domain configuration
      • PUTAuthenticate a sender domain
  • Sales CRM
  • Conversations
  • Ecommerce
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
Accounts and SettingsDomains

Create a new sender domain

POST
https://api.brevo.com/v3/senders/domains
POST
/v3/senders/domains
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.domains.createDomain({
8 name: "mycompany.com",
9 });
10}
11main();
1{
2 "id": 5,
3 "domain_name": "mycompany.com",
4 "message": "Domain added successfully. To authenticate it, add following DNS records",
5 "domain_provider": "Cloudflare",
6 "dns_records": {
7 "brevo_code": {
8 "host_name": "@",
9 "type": "TXT",
10 "value": "brevo-code=abc123def456",
11 "status": false
12 },
13 "dkim_record": {
14 "host_name": "mail._domainkey",
15 "type": "TXT",
16 "value": "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...",
17 "status": false
18 },
19 "dmarc_record": {
20 "host_name": "_dmarc",
21 "type": "TXT",
22 "value": "v=DMARC1; p=none; rua=mailto:dmarc@mycompany.com",
23 "status": false
24 }
25 }
26}
Creates a new domain in Brevo. Use this to: - Add new domains for sending emails - Set up domain authentication for better deliverability - Configure DNS records for email authentication - Establish domain-based sender identities Key information returned: - Created domain ID and configuration - Required DNS records for authentication - Domain provider detection results - Setup instructions and next steps
Was this page helpful?
Previous

Delete a sender domain

Next
Built with

Creates a new domain in Brevo.

Use this to:

  • Add new domains for sending emails
  • Set up domain authentication for better deliverability
  • Configure DNS records for email authentication
  • Establish domain-based sender identities

Key information returned:

  • Created domain ID and configuration
  • Required DNS records for authentication
  • Domain provider detection results
  • Setup instructions and next steps

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Request

Domain configuration
namestringRequiredformat: "hostname"
Domain name to be added

Response

Domain created successfully
idlong
ID of the Domain created
domain_namestring
Domain name
messagestring
Success message with next steps
domain_providerstring
Detected domain provider
dns_recordsobject
DNS records required for domain authentication

Errors

400
Bad Request Error