S
Sendexy
Try Brevo Free →
Brevo Integrations

Brevo API Guide for Beginners: A Friendly Introduction

Understand what the Brevo API is, what it can do, and how to make your first API call — written for non-developers and early-stage developers who want to automate Brevo programmatically.

S
Sendexy Team
7 min read

The Brevo API unlocks capabilities that go far beyond what's possible through the dashboard interface. For developers building applications, and for non-developers curious about what the API can do, this guide provides a clear, jargon-light introduction.

What is an API?

An API (Application Programming Interface) is a way for two software systems to communicate. Think of it as a waiter at a restaurant: you (your application) give the waiter (the API) your order, and the waiter takes it to the kitchen (Brevo) and brings back your food (the response).

The Brevo API lets your application — whether that's a custom website, a mobile app, or a business tool — talk directly to Brevo. You can create contacts, send emails, retrieve campaign statistics, manage lists, and more, all programmatically.

What Can You Do with the Brevo API?

The Brevo API supports nearly everything the dashboard does, plus some capabilities exclusive to the API:

Contact management:

  • Create, update, or delete contacts
  • Add contacts to lists
  • Retrieve contact attributes and history

Email sending:

  • Send transactional emails (order confirmations, password resets)
  • Send emails using templates created in Brevo
  • Send plain-text or HTML emails without a template

Campaign management:

  • Create, schedule, and send email campaigns
  • Retrieve campaign statistics (open rates, clicks, bounces)

Automation:

  • Add contacts to Brevo workflows programmatically

Webhook configuration:

  • Subscribe to Brevo events (email opened, clicked, bounced) and receive real-time notifications in your application

Getting Your API Key

To use the Brevo API, you need an API key that authenticates your requests.

  1. Log into your Brevo account
  2. Click your account name (top right) → SMTP & API
  3. Go to the API Keys tab
  4. Click Generate a New API Key
  5. Name it descriptively (e.g., "My Website" or "Mobile App") and copy the key

Keep this key secure. Never publish it in public code repositories. Use environment variables to store it in your application.

Making Your First API Call

The Brevo API uses standard HTTP requests. Here's an example using cURL (a command-line tool) to add a contact:

curl --request POST \
  --url https://api.brevo.com/v3/contacts \
  --header 'accept: application/json' \
  --header 'api-key: YOUR_API_KEY_HERE' \
  --header 'content-type: application/json' \
  --data '{
    "email": "test@example.com",
    "attributes": {
      "FIRSTNAME": "Test",
      "LASTNAME": "User"
    },
    "listIds": [5],
    "updateEnabled": true
  }'

Replace YOUR_API_KEY_HERE with your actual key and 5 with the ID of the list you want to add the contact to (find list IDs in Brevo under Contacts → Lists).

Sending a Transactional Email via API

The most common API use case is sending transactional emails from an application. Here's a basic example:

curl --request POST \
  --url https://api.brevo.com/v3/smtp/email \
  --header 'accept: application/json' \
  --header 'api-key: YOUR_API_KEY_HERE' \
  --header 'content-type: application/json' \
  --data '{
    "sender": {"name": "Sendexy", "email": "support@sendexy.online"},
    "to": [{"email": "customer@example.com", "name": "Customer Name"}],
    "subject": "Your order is confirmed",
    "htmlContent": "<html><body><h1>Order confirmed!</h1><p>Thank you for your purchase.</p></body></html>"
  }'

For real applications, use a template ID instead of inline HTML — it keeps your email design separate from your code.

Using Official SDKs

Brevo provides official SDK libraries for popular programming languages so you don't have to write raw HTTP requests:

  • Node.js: npm install @getbrevo/brevo
  • Python: pip install brevo-python
  • PHP: composer require brevo/brevo-php
  • Ruby, Go, C#, Java — also available

Using an SDK simplifies your code significantly. The Brevo documentation at developers.brevo.com includes code examples in all supported languages.

Rate Limits

Brevo API rate limits vary by plan:

  • Free and Starter: ~300 requests per minute
  • Business and Enterprise: Higher limits available

For bulk operations (importing thousands of contacts), use Brevo's batch import endpoint rather than individual create calls.

Where to Learn More

The Brevo API documentation at developers.brevo.com is comprehensive and includes an interactive API explorer where you can test calls directly in your browser — no code required.

Ready to build with Brevo?
The free plan includes API access. Create your account and generate your first API key.

Brevo Pricing at a Glance

Plan Price Emails/Month Key Features
Free $0 9,000 (300/day) Unlimited contacts, basic automation, SMTP
Starter From $9/mo 5,000–100,000 No daily limit, no Brevo logo
Business From $18/mo 5,000–1M+ Advanced automation, A/B testing, multi-user
Enterprise Custom Custom Dedicated IP, SLA, custom onboarding

All plans include unlimited contact storage. See full pricing on Brevo →

Ready to apply this in Brevo?

Brevo's free plan gets you started with 300 emails/day — no credit card required.

Try Brevo Free →
← Back to all Brevo articles