Formidable Forms

Formidable Forms

  • Features
  • Templates
  • Pricing
  • Resources
    • Docs & Support
    • Blog
    • Community
  • Solutions
    • Web Applications
    • Calculators
    • Surveys
    • Directories
    • Payments
    • Contact forms
  • Login
  • Get Formidable Forms

How to Add Contacts in Brevo (Sendinblue)

Knowledge Base → Form Webhooks API → How to Add Contacts in Brevo (Sendinblue)

Send your contacts to Brevo, formerly SendinBlue, when an entry is created or updated in your Formidable Form.

Get Better Forms FREE!
 
Subscribe on YouTube

Step 1: Create your Brevo API Key

  1. If you don’t have an account, create a new Brevo account.
  2. Go to the Profile settings and select SMTP & API from the dropdown options.
    Form Webhooks API - SendinBlue Brevo settings
  3. Select the API Keys tab and click the Generate a new API Key button to generate your API Key.
    Form Webhooks API - SendinBlue Brevo Create Key
  4. Once you have generated your API key, make sure to save a copy of it right away. For security reasons, Brevo will not show you this key again.
    Form Webhooks API - SendinBlue Brevo Key

Step 2: Create your Formidable form

  1. If you do not already have a Formidable form to collect your leads, create a form.
  2. Include an Email field, Phone field, or both.
  3. If you are sending a phone number to Brevo, the number must include the country code. e.g. 91xxxxxxxxxx, +91xxxxxxxxxx, 0091xxxxxxxxxx.

Step 3: Setup your API form action

  1. In your form Settings → Actions & Notifications, select the Send API data action. If you have not installed the Form Webhooks API add-on yet, you will be prompted to install it.
    Form Webhooks API - SendinBlue Brevo Form Action
  2. To add the notification URL, paste https://api.brevo.com/v3/contacts/ in the Notification URL box.
    Form Webhooks API - SendinBlue Brevo Form Action Settings
  3. Leave the basic Auth field empty. We will be using another Formidable hook to add our API Keys to the header.
  4. Set the Data Format to Raw.
  5. Set the Method to Post.
  6. Under Raw Data, add the formatted data below.
    {
        "updateEnabled": true,  
        "email": "[190]",  
        "emailBlacklisted": false, 
        "smsBlacklisted": false,  
    	 
        "attributes": {
            "FIRSTNAME": "[200]",  
            "LASTNAME": "[210]",   
            "SMS": "[220]"         
        },
        "listIds": [4]   
    }
    • Set updateEnabled to true if you want to enable updates for existing data.
    • Replace 190 with the ID of your email field in the form.
    • Set emailBlacklisted to true to blacklist the contact for emails. The default value is set to false.
    • Set smsBlacklisted to true to blacklist the contact for SMS. The default value is set to false.
    • Replace 200 with the ID of the first name field in your form.
    • If you are using a Name field in your form, it will only retrieve the first name. You can create two single line text fields instead and assign it as your First and Last name fields.
    • Replace 210 with the ID of the last name field in your form.
    • Replace 220 with the ID of the Phone number field in your form.
    • Replace 4 with the ID of your Brevo contact list. You can use comma-separated values if you want to add multiple list, e.g. [4, 6, 8].

      If you need to find the contact list ID in Brevo, go to the Contacts → Lists page and look for the ID column.
      Form Webhooks API - SendinBlue Brevo List ID

  7. Add your API Keys to the request header using the code snippet below. Learn more about where to put this code.
    add_filter( 'frm_api_request_args', 'my_custom_frm_api_request_header', 10, 2 );
        function my_custom_frm_api_request_header( $arg_array, $args ) {
            if ( $args['url'] == 'https://api.brevo.com/v3/contacts/' ) { // the full url where the request is being sent
                 $arg_array['headers']['api-key'] = 'Your-API-Key-Here'; //Replace Your-API-Key-Here with your Brevo API key
            }
        return $arg_array;
    }
  8. You are all set! Go ahead and submit an entry in your form to add a new contact to your Brevo list.
  • Step 1: Create your Brevo API Key
  • Step 2: Create your Formidable form
  • Step 3: Setup your API form action
Categories
×

Categories

  • Installation & Getting Started
  • Account Management
  • Forms
  • Entries
  • Views
  • Styles
  • Importing & Exporting
  • Add-Ons
  • Extend Formidable Forms

Using WordPress and want to get Formidable Forms for free?

Get Formidable Forms Lite Now

Submit doc feedback
Was this article helpful? *
What did you find most unhelpful? *
If you need help from our support team, please create a ticket at our helpdesk.

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

Take on bigger projects Right Now

Get the tools you need to revolutionize your workflow and architect a masterpiece. Build the most advanced WordPress forms and actually use the data you collect in meaningful ways.

Get the most advanced WordPress form plugin and the only form builder with integrated Views.

Get Formidable Forms Now

Resources

  • Community
  • Affiliates
  • Contact
  • Free Online Form Builder

Top Features

  • Application Builder
  • Calculator Plugin
  • Surveys & Polls
  • Quiz Maker
  • Form Templates
  • Application Templates
  • Directory Plugin
  • Donation Plugin

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • WP Tasty
  • Nutrifox

Copyright © 2023 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.
Privacy Policy | Terms of Service | Sitemap

Join 300,000+ using Formidable Forms to create form-focused solutions fast. Get Started See User Reviews