Connect with the API

Send WordPress form leads to GuardenerAI.

WordPress form entries can land in GuardenerAI as leads through the public API. This is a connection you build yourself, not a native integration, and there is no GuardenerAI WordPress plugin: a webhook add-on for your form plugin posts each entry to your workspace with a write key in the request header.

Not a native integration. Each form entry is sent from your WordPress server to the GuardenerAI API and becomes a lead. Nothing is sent back to WordPress.

What you need

  • A GuardenerAI API key with the Member role and Read and write scope, created by an admin under Settings, API keys.
  • A form plugin that can send a webhook with a custom header and a JSON body: the Gravity Forms Webhooks Add-On (Elite and Nonprofit licenses), the WPForms Webhooks addon (Elite license), the Fluent Forms webhook (Fluent Forms Pro), or the free CF7 to Webhook plugin for Contact Form 7.
  • Form fields for at least first name, last name and email, which GuardenerAI requires on every lead.

Step by step

  1. Create a key that can write

    In GuardenerAI open Settings, API keys and create a key with Role Member (read and write records) and Scope Read and write. Copy it when it is shown; it is shown once.

  2. Add a webhook to the form

    In your form plugin’s webhook settings, set the request URL to https://YOUR-ORG.guardenerai.com/api/leads, the method to POST and the format to JSON. Add a request header named X-Api-Key with your key as its value. Gravity Forms and WPForms call this Request Headers; CF7 to Webhook adds a tab to the Contact Form 7 editor where you set the URL and headers.

  3. Map the form fields

    Map your fields to the lead’s field names: firstName, lastName, email, phone, company and message for the visitor’s note. Add a fixed sourceMedium of website form, and sourceCampaign if you want to tell forms apart. Leave source out unless an admin has added a matching code to your lead source list.

    The body your form should send
    {
      "firstName": "Dana",
      "lastName": "Whitlock",
      "email": "dana@fernhill.example",
      "phone": "+1 555 0142",
      "company": "Fernhill Dental",
      "message": "Can we book a call next week?",
      "sourceMedium": "website form",
      "sourceCampaign": "contact page"
    }
  4. Submit a test entry

    Fill in the form yourself and check the new lead under Leads in GuardenerAI. If nothing arrives, the add-on’s log will show the answer: 401 means the key is wrong, 403 api_key_read_only means it cannot write, and 400 lists the fields that failed.

Before you rely on it

What to know about this connection.

With WordPress

  • A form webhook can only create. It cannot search first, so a returning visitor is sent as a new lead. If one of your duplicate rules matches, the API answers 409 and the repeat is not saved, which is usually what you want. When you need to update the existing lead instead, send the entry to Zapier, Make or n8n and search there before you write.
  • Keep the key on the server. The webhook add-ons send from WordPress itself, so the key never reaches the visitor’s browser. Never put it in page JavaScript.
  • Formidable Forms’ API add-on has no setting for custom headers. Sending X-Api-Key from it needs a small PHP snippet using its frm_api_request_args filter.
  • GuardenerAI’s own public lead form endpoint needs a reCAPTCHA token from the visitor’s browser, so it is not the endpoint for a server-side webhook. Use /api/leads with a key.

With every API connection

  • The key must have the Member role and Read and write scope. A Read only key gets a 403 on every write.
  • There is no upsert. Search for the record by email first, then create it or update the one you found.
  • There are no outbound webhooks. Data flows into GuardenerAI; nothing tells the other tool when a record changes, so anything reading back has to ask on a schedule.
  • Each key allows 10 requests per second. Above that the API answers 429 with Retry-After: 1, so wait a second and retry.
  • An update with PUT replaces the whole record. Send every field you want to keep, not only the one that changed.
  • If one of your duplicate rules blocks it, a create answers 409 duplicate_blocked with the matching records. Update the match instead of forcing a second copy.

Checked against WordPress’s own documentation: Gravity Forms Webhooks Add-On, WPForms Webhooks addon, Fluent Forms webhook, CF7 to Webhook, Formidable API request filter. Their plans and features change, so confirm the current details there.

Where it lands

The modules this feeds.

FAQ

Fair questions.

Is there a GuardenerAI plugin for WordPress?
No. This is a connection you build with the public API and your form plugin’s webhook feature. GuardenerAI does not ship a WordPress plugin.
Which form plugins can do this without code?
Any that can send a JSON webhook with a custom header. Gravity Forms (Webhooks Add-On, Elite and Nonprofit licenses), WPForms (Webhooks addon, Elite), Fluent Forms Pro, and Contact Form 7 with the free CF7 to Webhook plugin all can. Check your plugin’s current plan details, since they change.
What happens if the same person fills in the form twice?
The webhook sends a second create. If a duplicate rule in GuardenerAI matches, the second one is refused with a 409 and the first lead stays as it is. To update the first lead instead, route the form through an automation tool that can search by email first.
Does GuardenerAI email the visitor or my team when a lead arrives?
No. The lead is saved and nothing is sent. Your form plugin’s own notifications still work as before.