π Connect your Contact Form 7 forms to any API effortlessly!
Transform your WordPress contact forms into powerful data collection tools that automatically send submissions to your favorite CRM, email marketing service, or any external API endpoint.
π’ Trademark Notice: This plugin extends the functionality of Contact Form 7. "Contact Form 7" is a trademark of Rock Lobster, LLC. This plugin is an independent extension and is not affiliated with, endorsed by, or sponsored by the Contact Form 7 project or Rock Lobster, LLC. We use "CF7" (an unofficial abbreviated form) in our plugin name in compliance with the Contact Form 7 trademark policy.
CF7 to API seamlessly connects your existing Contact Form 7 forms with external APIs. No coding required β just configure, map your fields, and you're ready to go!
- CRM Integration: Send leads directly to Salesforce, HubSpot, Pipedrive, etc.
- Email Marketing: Add subscribers to Mailchimp, ConvertKit, ActiveCampaign
- Custom Applications: Connect to your own business applications and databases
- Third-Party Services: Integrate with Slack, Zapier, webhooks, and more
- No Code Required: Configure everything through a simple interface
- Form-Specific Settings: Each form can have its own API configuration
- Global Settings: Configure plugin-wide retry limits, logging, and data retention
- Live Testing: Test your API connections before going live
- Field Mapping: Map any Contact Form 7 field to any API parameter
- Multiple Formats: Send data as JSON, XML, or form parameters
- Custom Headers: Add authentication tokens, API keys, and custom headers
- Multiple HTTP Methods: Support for GET, POST, PUT, PATCH requests
- Retry Logic: Automatic retries if API calls fail
- Manual Retry: Retry failed requests directly from the admin interface
- Error Handling: Graceful handling of API errors without breaking your forms
- API Request Logs: Complete history of all API requests with status, response times, and data
- Dashboard Widget: At-a-glance statistics on your WordPress dashboard
- Date Range Filters: Filter logs by today, yesterday, last 7/30 days, or custom ranges
- Export Logs: Export your API logs to CSV or JSON for analysis
- Debug Mode: See exactly what data is being sent to your APIs
- Retry Configuration: Set maximum retries per request and hourly rate limits
- Sensitive Data Protection: Configure patterns for automatic data anonymization
- Logging Control: Enable/disable API logging globally
- Log Retention: Automatic cleanup of old logs (7, 14, 30, 60, or 90 days)
- Install the plugin from WordPress admin or upload manually
- Make sure Contact Form 7 is installed and activated
- Activate CF7 to API
- Edit your Contact Form 7 form
- Click on the "API Integration" tab
- Add your API endpoint URL
- Choose HTTP method (usually POST)
- Add headers (like Authorization tokens)
- Select form fields you want to send
- Map them to API parameters
- Set data format (JSON, XML, or form data)
- Use the test feature to verify everything works
- Save your configuration
- Your form is now connected! π
Once activated, a CF7 to API Statistics widget appears on your WordPress dashboard showing:
- Total Requests: Number of API calls in the last 24 hours
- Success Rate: Percentage of successful submissions
- Avg Response Time: Average API response time
Access detailed logs at Settings β Silver Assist β CF7 to API β API Logs:
- View all API requests with status (success, error, pending)
- Filter by date range (today, last 7 days, custom range)
- See full request/response data for debugging
- Retry failed requests with one click
- Export logs to CSV or JSON
Configure plugin-wide settings at Settings β Silver Assist β CF7 to API:
| Setting | Description | Default |
|---|---|---|
| Max Retries per Entry | Maximum retry attempts for a single request | 3 |
| Max Retries per Hour | Global hourly rate limit for retries | 10 |
| Sensitive Patterns | Field patterns to anonymize (password, token, etc.) | Built-in list |
| Enable Logging | Turn API logging on/off | Enabled |
| Log Retention | Auto-delete logs older than X days | 30 days |
Form Fields β API Parameters
-----------------------------
[your-name] β customer_name
[your-email] β email_address
[your-phone] β phone_number
[your-message] β inquiry_details
API Endpoint: https://api.mailchimp.com/3.0/lists/{list-id}/members
Method: POST
Headers: Authorization: apikey your-api-key
Field Mapping:
[your-email] β email_address
[your-name] β merge_fields.FNAME
API Endpoint: https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
Method: POST
Field Mapping:
Static: "New contact form submission" β text
[your-name] β attachments.fields.title
[your-message] β attachments.fields.value
- Salesforce
- HubSpot
- Pipedrive
- Zoho CRM
- Custom CRM APIs
- Mailchimp
- ConvertKit
- ActiveCampaign
- Constant Contact
- AWeber
- Slack
- Discord
- Microsoft Teams
- Custom webhooks
- Zapier
- Integromat/Make
- IFTTT
- Custom applications
- WordPress: 6.5 or higher
- PHP: 8.2 or higher
- Contact Form 7: Latest version
- SSL/HTTPS: Recommended for secure API communications
- Go to Plugins β Add New in your WordPress admin
- Search for "CF7 to API"
- Click Install Now β Activate
- Download the plugin ZIP file
- Go to Plugins β Add New β Upload Plugin
- Choose the ZIP file and click Install Now
- Activate the plugin
- Go to Contact β Contact Forms in WordPress admin
- Edit the form you want to connect to an API
- Click on the "API Integration" tab
β
API Endpoint URL: https://your-api.com/endpoint
β
HTTP Method: POST (most common)
β
Data Format: JSON (recommended)
For Bearer Token:
Header Name: Authorization
Header Value: Bearer your-token-here
For API Key:
Header Name: X-API-Key
Header Value: your-api-key-here
| Contact Form Field | API Parameter | Example |
|---|---|---|
[your-name] |
name |
John Doe |
[your-email] |
email |
john@example.com |
[your-phone] |
phone |
+1234567890 |
[your-message] |
message |
Hello world! |
- Use the "Test Connection" button
- Fill out and submit your form
- Check the debug logs if something doesn't work
- Verify data reaches your API
Connect leads directly to your CRM system
Popular CRMs:
- Salesforce: Use REST API with OAuth authentication
- HubSpot: Simple API key authentication
- Pipedrive: REST API with personal token
- Zoho CRM: OAuth 2.0 integration
Typical Setup:
Endpoint: https://api.hubspot.com/contacts/v1/contact
Method: POST
Auth: X-API-KEY header
Add subscribers automatically
Popular Services:
- Mailchimp: Add to audience lists
- ConvertKit: Create subscribers and add tags
- ActiveCampaign: Add contacts and trigger automations
Typical Setup:
Endpoint: https://your-account.api.mailchimp.com/3.0/lists/{list-id}/members
Method: POST
Auth: Authorization: apikey your-key
Get instant alerts about new submissions
Popular Services:
- Slack: Webhook notifications to channels
- Discord: Bot messages to servers
- Microsoft Teams: Connector webhooks
Typical Setup:
Endpoint: https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
Method: POST
Format: JSON with text and attachments
- β Check your API endpoint URL (copy-paste from API docs)
- β Verify your API credentials are correct
- β Make sure your server can reach the external API
- β Check if the API requires specific headers
- β Verify field mapping (form field names must match exactly)
- β Check data format (JSON vs form parameters)
- β Review API documentation for required fields
- β Enable debug mode to see what's being sent
- β Reduce API timeout settings
- β Check if API server is responding slowly
- β Consider using asynchronous processing
- β Monitor API response times
Enable detailed logging to troubleshoot issues:
- Go to the API Integration tab
- Enable "Debug Mode"
- Submit a test form
- Review the debug log for detailed information
Before asking for help:
- β Check this README file
- β Review API documentation
- β Test with debug mode enabled
- β Try with a simple test API first
Where to get help:
- Test First: Always test with a sample API before going live
- Use HTTPS: Secure API endpoints protect sensitive data
- Monitor Logs: Regularly check for failed submissions
- Backup Settings: Export your configuration before making changes
- Multiple APIs: Send the same form to multiple services
- Conditional Logic: Send to different APIs based on form values
- Custom Fields: Map static values and computed fields
- Error Handling: Set up fallback actions for failed API calls
After setting up your first integration:
- π Monitor Performance: Check success rates and response times
- π Add More Integrations: Connect to additional services
- βοΈ Optimize Settings: Fine-tune timeouts and retry logic
- π± Test Mobile: Ensure forms work on all devices
- π Review Security: Verify API credentials are secure
- No coding required
- Visual configuration interface
- Built-in testing tools
- Clear documentation
- Automatic retries on failures
- Comprehensive error logging
- Performance monitoring
- Secure data handling
- Works with any API
- Multiple data formats
- Custom authentication methods
- Conditional processing
- Regular updates
- Community support
- Detailed documentation
- Open source
"Contact Form 7" is a registered trademark of Rock Lobster, LLC., the company behind the development of the Contact Form 7 WordPress plugin.
This plugin (CF7 to API) is an independent extension that adds API integration functionality to Contact Form 7. We comply with the Contact Form 7 trademark policy as follows:
β Plugin Name: We use "CF7" (an unofficial abbreviated form permitted by the policy) instead of "Contact Form 7" in our plugin name β No Affiliation: We clearly state that this plugin is not affiliated with, endorsed by, or sponsored by Contact Form 7 or Rock Lobster, LLC β Documentation: We mention "Contact Form 7" only for reference and compatibility information β No Confusion: We avoid any suggestion of official endorsement or partnership
- What we are: An independent extension plugin that enhances Contact Form 7 with API connectivity features
- What we are NOT: An official Contact Form 7 product, affiliate, or endorsed extension
- Our purpose: To provide additional functionality to Contact Form 7 users who need API integrations
We are grateful to Rock Lobster, LLC and the Contact Form 7 development team for creating and maintaining the excellent Contact Form 7 plugin that makes this extension possible.
If you use Contact Form 7, please consider supporting its development.
This project is licensed under the Polyform Noncommercial License 1.0.0.
You are free to use, modify, and share this code for noncommercial purposes only.
Commercial use of any kind is not permitted without explicit permission from the author.
See the LICENSE file for the full license text.
Made with β€οΈ by Silver Assist