Webhooks

Receive events from Myra, or trigger workflows from external systems.

Webhooks are the digital glue that connects Myra to the rest of your tech stack. They allow for real-time, event-driven communication, ensuring that your data stays synchronized across all your platforms without the need for constant, resource-heavy polling.

Outgoing Webhooks (Notifications)

Outgoing webhooks allow Myra to "push" data to your server or a third-party service (like Zapier, Make, or a custom internal tool) whenever a specific event occurs.

Configuration Process

Navigate to Settings → Webhooks to create a new endpoint.

  1. Endpoint URL: The destination URL that will receive the POST requests. This must be a publicly accessible HTTPS URL.
  2. Event Selection: Choose which events should trigger this webhook. You can select "All Events" or subscribe to specific triggers:
    • contact.created / contact.updated / contact.deleted
    • deal.stage_changed
    • booking.confirmed / booking.cancelled
    • form.submitted
    • call.completed
    • esignature.signed
  3. Secret Key: Myra generates a unique secret for each webhook. Use this key to verify that the incoming data is authentic and hasn't been tampered with.

The Webhook Payload

All payloads are delivered as a JSON object. A typical payload includes:

  • event_id: A unique UUID for the event.
  • event_type: The string representing the trigger (e.g., contact.created).
  • timestamp: An ISO 8601 formatted string of when the event occurred.
  • data: The full JSON representation of the object involved (e.g., the complete contact record).

Security: Signature Verification

To protect your endpoint, always verify the X-PulsePost-Signature header. This header contains an HMAC-SHA256 hash of the raw request body, using your secret key.

Node.js Example:

const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const hmac = crypto.createHmac('sha256', secret);
  const digest = hmac.update(payload).digest('hex');
  return signature === digest;
}

Incoming Webhooks (Triggers)

Incoming webhooks allow external systems to start a workflow inside Myra. This is powerful for integrating custom-coded forms, legacy databases, or proprietary internal tools.

Setting Up an Incoming Trigger

  1. Create a new Automation.
  2. Select Incoming Webhook as the trigger.
  3. Myra will generate a unique "Trigger URL" (e.g., https://api.pulsepost.ai/v1/webhooks/in/abc-123).
  4. Send a sample POST request to this URL. Myra will automatically parse the JSON and allow you to use those keys as "Variables" in subsequent workflow steps.

Use Case Example

  • External E-commerce: When a purchase happens in your custom shop, send a webhook to Myra to create the contact, tag them as "Customer," and start a "Post-Purchase Review" sequence.

Reliability and Error Handling

Myra is designed for mission-critical reliability:

  • Exponential Backoff: If your server is down (returns a non-2xx status code), we will retry the delivery up to 12 times over 24 hours.
  • Timeout: We expect a response within 10 seconds. If your processing takes longer, we recommend responding with a 202 Accepted immediately and processing the data asynchronously.
  • Manual Replay: In the Webhook Logs tab, you can see every delivery attempt. If a webhook failed during a server outage, you can click "Replay" to resend the exact same payload.

Developer Best Practices

  • Idempotency: Since webhooks may occasionally be delivered more than once (e.g., if a retry happens during a network flicker), ensure your server handles duplicate event_ids gracefully.
  • Whitelisting: If your server is behind a strict firewall, you can find our list of static outgoing IP addresses in the Developer Settings.
  • Testing: Use tools like webhook.site or ngrok during development to inspect payloads before pointing them to your production server.

FAQs

What is the rate limit for webhooks? Outgoing webhooks are not strictly rate-limited, but we recommend your server be capable of handling bursts of traffic. Incoming webhooks are limited to 100 requests per second per workspace by default.

Do you support custom headers? Yes, when configuring an outgoing webhook, you can specify additional HTTP headers (e.g., Authorization: Bearer YOUR_TOKEN) to be included in every request.