Authentication
curl -X POST "https://app.journeybee.io/api/v1/lead-deals" \
-H "Authorization: Bearer your-api-key-uuid" \
-H "Content-Type: application/json" \
-d '{"lead_id": 789, "deal_value": 50000, "label": "Enterprise Deal"}'
Request Body Schema
The ID of the lead this deal is associated with
The value of the deal in the company’s default currency
Deal name/title (auto-generated from lead info if not provided)
Alternative field name for deal title (legacy support)
Stage & Pipeline Configuration
UUID of the initial stage to assign this deal to
Partnership ID if this is a partnership deal (enables commission calculations)
Array of tag IDs to assign to this deal
Array of custom field values for this deal
Field type: text
, textarea
, number
, date
, boolean
, select
, multi_select
Field value object matching the field typeShow Value Object Examples
For date fields (ISO format)
For select fields (option ID)
For multi-select fields (array of option IDs)
Array of custom field values for the partner’s copy of the dealShow Partner Custom Field Object
Field type: text
, textarea
, number
, date
, boolean
, select
, multi_select
Field value object matching the field type
Integration Support
Name of the integration that created this deal. Options: Salesforce
, Hubspot
, Pipedrive
, Slack
Custom fields from external integrationsShow Integration Custom Field Object
Custom field UUID from integration
Field value from integration
Integration-specific data (e.g., CRM IDs)
Pipedrive integration data
Pipedrive organization ID
Response Schema
Example Request
curl -X POST "https://app.journeybee.io/api/v1/lead-deals" \
-H "Authorization: Bearer jb_api_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"lead_id": 789,
"deal_value": 150000,
"label": "TechCorp Enterprise Solution",
"partnership_id": 456,
"stage_uuid": "stage-uuid-789",
"tags": [15, 16],
"customFields": [
{
"customFieldId": 8,
"type": "select",
"value": {
"select": 3
}
},
{
"customFieldId": 9,
"type": "text",
"value": {
"text": "High-priority enterprise deal with fast-track timeline"
}
}
],
"integrationName": "Salesforce",
"powerups": {
"salesforce": {
"opportunity_id": "0061234567890ABC",
"account_id": "0011234567890DEF"
}
}
}'
Example Response
{
"id": 456,
"uuid": "deal-uuid-456"
}
Error Responses
{
"error": "Lead ID is required or invalid field values"
}
{
"error": "Invalid API key or insufficient permissions"
}
{
"error": "Write access required for this operation"
}
{
"error": "Lead not found or partnership does not exist"
}
{
"error": "Duplicate deal or unique constraint violation"
}
Notes
- Requires API key with
write_access
permission
- Triggers webhook events for external systems