POST
your-webhook-endpoint
Lead Events
curl --request POST \
  --url https://app.journeybee.io/api/v1/your-webhook-endpoint \
  --header 'Authorization: Bearer <token>'
{
  "company_uuid": "<string>",
  "user_uuid": "<string>",
  "event_id": "<string>",
  "api_key": "<string>",
  "lead": {
    "uuid": "<string>",
    "created_at": 123,
    "updated_at": 123,
    "company_name": "<string>",
    "email": "<string>",
    "phone_number": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "created_by_user_uuid": "<string>",
    "created_by_user_email": "<string>",
    "created_by_user_first_name": "<string>",
    "created_by_user_last_name": "<string>",
    "custom_fields": [
      {
        "uuid": "<string>",
        "label": "<string>",
        "type": "<string>",
        "value": {},
        "custom_field_value_uuid": "<string>",
        "options": [
          {}
        ]
      }
    ],
    "tags": [
      {
        "uuid": "<string>",
        "label": "<string>"
      }
    ],
    "assigned_users": [
      {
        "uuid": "<string>",
        "email": "<string>",
        "first_name": "<string>",
        "last_name": "<string>"
      }
    ],
    "received_from_company": [
      {
        "partnership_uuid": "<string>",
        "company_name": "<string>",
        "company_domain": "<string>",
        "sent_date": 123,
        "sent_by_user_email": "<string>",
        "sent_by_user_first_name": "<string>",
        "sent_by_user_last_name": "<string>",
        "partner_type": "<string>"
      }
    ],
    "sent_to_companies": [
      {}
    ]
  },
  "configuration": [
    {
      "id": "<string>",
      "selected": [
        {
          "id": "<string>",
          "value": "<string>"
        }
      ]
    }
  ]
}

Event Types

  • lead_created - New lead received
  • lead_updated - Lead information changed
  • lead_deleted - Lead archived/deleted

Webhook Details

Event IDs: lead_created, lead_updated, lead_deleted
Content-Type: application/json
Method: POST

Authentication

All webhooks include JWT authentication in the Authorization header:
const jwt = require('jsonwebtoken');

app.post('/webhook', (req, res) => {
  const token = req.headers.authorization?.split('Bearer ')[1];
  
  try {
    const decoded = jwt.verify(token, process.env.INTEGRATION_UUID);
    console.log('Event:', decoded.event_id); // 'lead_created'
    console.log('Company:', decoded.company_uuid);
    
    const { lead, configuration } = req.body;
    // Process lead data...
    
    res.status(200).send('OK');
  } catch (error) {
    res.status(401).send('Invalid token');
  }
});

JWT Token Payload

company_uuid
string
UUID of the company that received the lead
user_uuid
string
UUID of the user who created the lead
event_id
string
Always lead_created for this event
api_key
string
Your integration’s API key

Webhook Payload Schema

lead
object
The created lead object
configuration
array
Integration configuration settings for field mapping

Example Payload

{
  "lead": {
    "uuid": "lead_5336ba48-2ee0-4565-bbf7-f938d51042c1",
    "created_at": 1716214515227,
    "updated_at": 1716214515227,
    "company_name": "Prospect Company Inc",
    "email": "contact@prospect.com",
    "phone_number": "+1-555-123-4567",
    "first_name": "Jane",
    "last_name": "Doe",
    "created_by_user_uuid": "user_12345678-1234-5678-9012-123456789abc",
    "created_by_user_email": "sales@journeybee.io",
    "created_by_user_first_name": "Sales",
    "created_by_user_last_name": "Team",
    "custom_fields": [
      {
        "uuid": "cf_lead_industry",
        "label": "Industry",
        "type": "select",
        "value": { "select": 2 },
        "custom_field_value_uuid": "cfv_industry_tech",
        "options": [
          { "id": 0, "label": "Healthcare" },
          { "id": 1, "label": "Finance" },
          { "id": 2, "label": "Technology" },
          { "id": 3, "label": "Retail" }
        ]
      }
    ],
    "tags": [
      {
        "uuid": "tag_hot_lead",
        "label": "Hot Lead"
      }
    ],
    "assigned_users": [
      {
        "uuid": "user_87654321-4321-8765-2109-876543210987",
        "email": "john.manager@company.com",
        "first_name": "John",
        "last_name": "Manager"
      }
    ],
    "received_from_company": [
      {
        "partnership_uuid": "partnership_12345678-1234-5678-9012-123456789abc",
        "company_name": "TechCorp Solutions",
        "company_domain": "techcorp.com",
        "sent_date": 1716214515227,
        "sent_by_user_email": "partner@techcorp.com",
        "sent_by_user_first_name": "Partner",
        "sent_by_user_last_name": "User",
        "partner_type": "referral"
      }
    ],
    "sent_to_companies": []
  },
  "configuration": [
    {
      "id": "lead_integration_settings",
      "selected": [
        {
          "id": "unique_field_lead",
          "value": "email"
        }
      ]
    }
  ]
}

Notes

  • Webhook is sent when a new lead is created in JourneyBee
  • JWT token must be verified using your Integration UUID as the secret
  • received_from_company array indicates if lead came from a partner
  • sent_to_companies array shows if lead was forwarded to partners
  • Custom fields and tags arrays may be empty if none are configured