Connect WPForms to Any API: Send WPForms Submissions to Any CRM or API Instantly

WPForms is one of the most popular WordPress form builder plugins, known for its intuitive drag-and-drop interface and flexibility. But while WPForms excels at collecting user data, businesses often want more than just data capture—they want seamless integrations with their CRMs, marketing automation platforms, and custom APIs.
In this blog, we’ll show you how to connect WPForms to any API, so you can instantly send form submissions to tools like HubSpot, Salesforce, Zoho CRM, Mailchimp, or even your custom-built system.
Why Connect WPForms to an API?
WPForms by default stores form data in your WordPress database and sends email notifications. However, manually exporting this data or using limited integrations slows down your workflow.
By connecting WPForms to an API, you can:
Automatically **push leads to your CRM
**
Trigger **automated email or SMS sequences
**
Update **user records or custom databases
**
Send data to **Google Sheets, Slack, or Airtable
**
Integrate with **custom internal tools
**
The possibilities are endless when you unlock WPForms' full potential through API integration.
Use Case Scenarios
Let’s quickly look at some real-world scenarios:
Business Type | Use Case |
Real Estate Agency | Send property inquiry form data to Zoho CRM instantly |
SaaS Company | Feed trial signup form to HubSpot and trigger an onboarding sequence |
eCommerce Store | Submit customer service requests to a helpdesk platform like Zendesk |
Healthcare Provider | Sync patient contact forms to a secure internal API for booking follow-ups |
Education Portal | Push registration data to Google Sheets and CRM in real-time |
Methods to Connect WPForms to Any API
There are two main ways to send WPForms submissions to any third-party API:
1. Use a WPForms to API Plugin (Recommended for Non-Developers)
If you want an easy, no-code or low-code solution, the best approach is using a plugin like:
✅ Contact Form to API
This plugin allows you to send WPForms submissions to any external API in real-time—without writing any code.
Features:
- Supports WPForms and other major form plugins
- Simple setup using API URL & headers
- Supports JSON, Form Data, and more
- Conditional logic to trigger specific APIs
- Debugging and logging support
How it works:
- Install the plugin
- Go to WPForms > Settings > Contact Form to API
- Paste your API endpoint URL
- Map form fields to the API parameters
- Save and test the submission
This is the easiest and most scalable way to connect WPForms with any service like Salesforce, Zapier, or a custom webhook.
2. Custom PHP Code with wpforms_process Hook (For Developers)
If you’re comfortable with coding, you can write custom functions using the wpforms_process_complete hook to call APIs.
Here’s a basic example:
add_action( 'wpforms_process_complete', 'send_wpform_to_api', 10, 4 );
function send_wpform_to_api( $fields, $entry, $form_data, $entry_id ) {
$data = array(
'name' => $fields[1]['value'], // Adjust field IDs accordingly
'email' => $fields[2]['value']
);
$response = wp_remote_post( 'https://your-api-endpoint.com/api/leads', array(
'method' => 'POST',
'headers' => array(
'Content-Type' => 'application/json',
'Authorization' => 'Bearer your-token'
),
'body' => json_encode( $data )
));
if ( is_wp_error( $response ) ) {
error_log( 'API Error: ' . $response->get_error_message() );
}
}
This method gives you complete control but requires careful error handling, authentication logic, and security best practices.
Best Practices When Connecting WPForms to APIs
To ensure a smooth and secure integration, keep the following in mind:
- Use authentication: Most APIs require secure headers (API keys, bearer tokens, etc.)
- Validate & sanitize data: Always clean form inputs before sending them to an external server
- Use error logging: Log failed API calls to debug issues quickly
- Test before going live: Use tools like RequestBin to inspect API requests
- Don’t expose secrets: Use environment variables or the WordPress configuration file for secure storage
WPForms + Any API = Workflow Superpowers
Connecting WPForms to any API empowers your business to streamline processes, automate lead flows, and improve customer response time—all without manual data entry.
Whether you want to send submissions to a major CRM or a niche API endpoint, you now have two solid ways to do it:
- Use a plugin like Contact Form to API – the easiest and fastest route
- Write your own code – perfect for custom logic and unique API structures
Need Help Setting This Up?
If you’re unsure which integration method is best for your site or need help with complex workflows, our team offers custom WordPress API integration services. We can build secure, scalable bridges between WPForms and any tool in your stack.
Subscribe to my newsletter
Read articles from steve jacob directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
