Everything smashsend.com publishes
S

smashsend.com

SMASHSEND Flow Webhooks - Trigger Automations with HTTP Requests

/docs/flows/webhooks

docs
Words
641
Reading time
3 min
Last crawled
2026-09-27
Language
EN
cat smashsend.com/docs/flows/webhooks.md
1.  [        Home        ](https://smashsend.com/) / 3.  [        Docs        ](https://smashsend.com/docs) / 5.  [        Flows        ](https://smashsend.com/docs/flows) / 7.  [        Webhooks        ](https://smashsend.com/docs/flows/webhooks) Flow webhooks allow you to trigger SMASHSEND automation flows from external applications using simple HTTP POST requests. This enables you to integrate SMASHSEND with any system that can make HTTP requests, creating powerful automated workflows. When you create a webhook trigger in your flow, SMASHSEND generates a unique URL that you can call to start the automation with custom data. Watch How to Use Flow Webhooks ![](https://www.youtube.com/watch?v=dQw4w9WgXcQ) ## Getting Started 1 #### Create a Webhook Trigger Flow In your SMASHSEND workspace, create a new automation flow and select "Webhook" as your trigger. This will generate a unique webhook URL for your flow. 2 #### Copy Your Webhook URL Your webhook URL will look like this: https://api.smashsend.com /v1/flows/flw\_EXAMPLE123/wrk\_EXAMPLE456/call 3 #### Send HTTP POST Requests Make POST requests to your webhook URL with JSON data to trigger your flow. The 'email' field is required, but you can include any additional data. ## Code Examples ## cURL Example ```curl -X POST "https://api.smashsend.com/v1/flows/YOUR_FLOW_ID/YOUR_WORKSPACE_ID/call" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com",    "firstName": "John",    "lastName": "Doe",    "company": "Acme Corp",    "customField": "any value"  }'``` ## JavaScript Example ```// Using fetch APIconst webhookUrl = "https://api.smashsend.com/v1/flows/YOUR_FLOW_ID/YOUR_WORKSPACE_ID/call";const payload = {  email: "user@example.com",  firstName: "John",  lastName: "Doe",  company: "Acme Corp",  customField: "any value"}; fetch(webhookUrl, {  method: "POST",  headers: {    "Content-Type": "application/json",  },  body: JSON.stringify(payload)}).then(response => response.json()).then(data => console.log("Success:", data)).catch(error => console.error("Error:", error)); // Using axiosconst axios = require('axios'); axios.post(webhookUrl, payload)  .then(response => {    console.log("Success:", response.data);  })  .catch(error => {    console.error("Error:", error);  });``` ## Python Example ```import requestsimport json # Webhook URL from your SMASHSEND flowwebhook_url = "https://api.smashsend.com/v1/flows/YOUR_FLOW_ID/YOUR_WORKSPACE_ID/call" # Data to send to the flowpayload = {    "email": "user@example.com",    "firstName": "John",    "lastName": "Doe",    "company": "Acme Corp",    "customField": "any value"} response = requests.post(webhook_url, json=payload) if response.status_code == 200:    print("Success:", response.json())else:    print("Error:", response.status_code, response.text)``` ## PHP Example ```<?php$webhookUrl = "https://api.smashsend.com/v1/flows/YOUR_FLOW_ID/YOUR_WORKSPACE_ID/call"; $payload = [    "email" => "user@example.com",    "firstName" => "John",    "lastName" => "Doe",    "company" => "Acme Corp",    "customField" => "any value"]; $options = [    'http' => [        'header' => "Content-Type: application/json\r\n",        'method' => 'POST',        'content' => json_encode($payload)    ]]; $context = stream_context_create($options);$result = file_get_contents($webhookUrl, false, $context); if ($result === false) {    echo "Error calling webhook";} else {    echo "Success: " . $result;}?>``` ## Key Features #### 🔒 Secure & Reliable All webhook URLs are unique and secure. SMASHSEND handles retries and error handling automatically. #### 📨 Email Required Every webhook request must include an 'email' field to identify the contact for the automation. #### 🎯 Custom Data Include any additional fields in your request. All data will be available throughout your automation flow. #### 🔄 Multiple Formats Webhooks accept JSON, form-data, and URL-encoded payloads for maximum compatibility. ## Common Use Cases -   **E-commerce Integration:** Trigger welcome emails when customers sign up on your website-   **Form Submissions:** Start nurture sequences when users submit contact forms-   **CRM Integration:** Sync new leads from your CRM to SMASHSEND automatically-   **Event Tracking:** Trigger targeted emails based on user behavior in your app-   **Third-party Tools:** Connect SMASHSEND with Zapier, Make, or custom applications ## Response Format Successful webhook calls return a 200 status code with a JSON response: ```{  "success": true,  "flowRunId": "run_ABC123",  "message": "Flow triggered successfully"}``` If there's an error, you'll receive an appropriate HTTP status code with error details: ```{  "error": "Validation failed",  "message": "Email field is required",  "statusCode": 400}``` ## Troubleshooting **Common Issues:** -   **400 Bad Request:** Missing required 'email' field or invalid JSON format-   **404 Not Found:** Invalid flow ID or workspace ID in the URL-   **405 Method Not Allowed:** Make sure you're using POST, not GET-   **500 Server Error:** Flow configuration issue - check your automation setup **Testing Tips:** -   Use tools like Postman or curl to test your webhook URLs-   Check your flow's run history to see if triggers are being received-   Validate your JSON payload format before sending-   Ensure your flow is published and active **Need Help?** Check out our video tutorial or contact support for assistance with your webhook integration.