POST
/
api
/
v1
/
lead-deals
Create Deal
curl --request POST \
  --url https://app.journeybee.io/api/v1/lead-deals \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "lead_id": 123,
  "deal_value": 123,
  "label": "<string>",
  "deal_label": "<string>",
  "stage_uuid": "<string>",
  "partnership_id": 123,
  "tags": [
    {}
  ],
  "customFields": [
    {
      "customFieldId": 123,
      "type": "<string>",
      "value": {
        "text": "<string>",
        "number": 123,
        "date": "<string>",
        "boolean": true,
        "select": 123,
        "multi_select": [
          {}
        ]
      }
    }
  ],
  "partnerCustomFields": [
    {
      "customFieldId": 123,
      "type": "<string>",
      "value": {}
    }
  ],
  "integrationName": "<string>",
  "integrationCustomFields": [
    {
      "uuid": "<string>",
      "value": "<any>"
    }
  ],
  "powerups": {
    "pipedrive": {
      "deal_id": 123,
      "person_id": 123,
      "organization_id": 123
    }
  }
}'
{
  "id": 456,
  "uuid": "deal-uuid-456"
}

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

Basic Deal Information

lead_id
number
required
The ID of the lead this deal is associated with
deal_value
number
The value of the deal in the company’s default currency
label
string
Deal name/title (auto-generated from lead info if not provided)
deal_label
string
Alternative field name for deal title (legacy support)

Stage & Pipeline Configuration

stage_uuid
string
UUID of the initial stage to assign this deal to
partnership_id
number
Partnership ID if this is a partnership deal (enables commission calculations)

Tags & Custom Fields

tags
array
Array of tag IDs to assign to this deal
customFields
array
Array of custom field values for this deal
partnerCustomFields
array
Array of custom field values for the partner’s copy of the deal

Integration Support

integrationName
string
Name of the integration that created this deal. Options: Salesforce, Hubspot, Pipedrive, Slack
integrationCustomFields
array
Custom fields from external integrations
powerups
object
Integration-specific data (e.g., CRM IDs)

Response Schema

id
number
The created deal ID
uuid
string
The created deal UUID

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