POST
your-webhook-endpoint
Deal 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>",
  "deal": {
    "uuid": "<string>",
    "created_at": 123,
    "updated_at": 123,
    "label": "<string>",
    "deal_value": 123,
    "total_commission_value": 123,
    "commission_calculation": {
      "type": "<string>",
      "value": "<string>",
      "option": "<string>",
      "percentage": 123,
      "split": {},
      "recurring_period": "<string>",
      "number_of_occurrences": 123
    },
    "currency_code": "<string>",
    "currency_label": "<string>",
    "lead_uuid": "<string>",
    "stage_uuid": "<string>",
    "stage_phase": "<string>",
    "payment_stage_uuid": "<string>",
    "partnership_uuid": "<string>",
    "partner_company_name": "<string>",
    "partner_company_domain": "<string>",
    "deal_owned_by_reseller": true,
    "custom_fields": [
      {
        "uuid": "<string>",
        "label": "<string>",
        "type": "<string>",
        "value": {},
        "custom_field_value_uuid": "<string>",
        "options": [
          {}
        ]
      }
    ],
    "tags": [
      {
        "uuid": "<string>",
        "label": "<string>",
        "background_color": "<string>",
        "text_color": "<string>"
      }
    ],
    "assigned_users": [
      {
        "id": 123,
        "email": "<string>",
        "first_name": "<string>",
        "last_name": "<string>",
        "profile_image_id": 123,
        "profile_image_uuid": "<string>"
      }
    ],
    "payments": [
      {
        "uuid": "<string>",
        "created_at": 123,
        "payment_date": 123,
        "payment_value": 123,
        "payment_processing": true,
        "payment_completed": true,
        "approved": true
      }
    ]
  },
  "configuration": [
    {
      "id": "<string>",
      "selected": [
        {
          "id": "<string>",
          "value": "<string>"
        }
      ]
    }
  ]
}

Webhook Details

Event IDs: deal_created, deal_updated, deal_deleted
Content-Type: application/json
Method: POST

Event Types

  • deal_created - New deal created
  • deal_updated - Deal information or stage changed
  • deal_deleted - Deal archived/deleted

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); // 'deal_created', 'deal_updated', or 'deal_deleted'
    console.log('Company:', decoded.company_uuid);
    
    const { deal, configuration } = req.body;
    // Process deal 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 created the deal
user_uuid
string
UUID of the user who created the deal
event_id
string
Event type: deal_created, deal_updated, or deal_deleted
api_key
string
Your integration’s API key

Webhook Payload Schema

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

Example Payload

{
  "deal": {
    "uuid": "deal_ee436d2b-77a4-4951-9dbf-264ed117ba22",
    "created_at": 1716214515227,
    "updated_at": 1716214515227,
    "label": "Prospect Company - Enterprise Software License",
    "deal_value": 75000,
    "total_commission_value": 7500,
    "commission_calculation": {
      "type": "oneOff",
      "split": null,
      "value": "7500",
      "option": "percentage",
      "percentage": 10,
      "recurring_period": null,
      "number_of_occurrences": null
    },
    "currency_code": "USD",
    "currency_label": "US Dollar",
    "lead_uuid": "lead_5336ba48-2ee0-4565-bbf7-f938d51042c1",
    "stage_uuid": "stage_96cea904-da45-416b-8d5f-f4fbe027a164",
    "stage_phase": "negotiation",
    "payment_stage_uuid": null,
    "partnership_uuid": "partnership_9bb9aa55-6407-482a-9236-f755e72c20e5",
    "partner_company_name": "TechCorp Solutions",
    "partner_company_domain": "techcorp.com",
    "deal_owned_by_reseller": false,
    "custom_fields": [
      {
        "uuid": "cf_deal_priority",
        "label": "Deal Priority",
        "type": "select",
        "value": { "select": 2 },
        "options": [
          { "id": 0, "label": "Low" },
          { "id": 1, "label": "Medium" },
          { "id": 2, "label": "High" },
          { "id": 3, "label": "Critical" }
        ],
        "custom_field_value_uuid": "cfv_priority_high"
      }
    ],
    "tags": [
      {
        "uuid": "tag_enterprise",
        "label": "Enterprise",
        "background_color": "#10B981",
        "text_color": "#FFFFFF"
      }
    ],
    "assigned_users": [
      {
        "id": 456,
        "email": "john.manager@company.com",
        "first_name": "John",
        "last_name": "Manager",
        "profile_image_id": 789,
        "profile_image_uuid": "asset_87654321-4321-8765-2109-876543210987"
      }
    ],
    "payments": []
  },
  "configuration": [
    {
      "id": "deal_integration_settings",
      "selected": [
        {
          "id": "unique_field_deal",
          "value": "label"
        }
      ]
    }
  ]
}

Notes

  • Webhooks are sent when deals are created, updated, or deleted in JourneyBee
  • JWT token contains the specific event type in the event_id field
  • JWT token must be verified using your Integration UUID as the secret
  • The deal payload structure is the same for all event types
  • Commission calculations include both percentage and fixed amount options
  • deal_owned_by_reseller indicates if a reseller partner owns this deal
  • For deal_created events, payments array will typically be empty
  • For deal_deleted events, the deal data represents the final state before deletion