POST
/
api
/
v1
/
leads
Create Lead
curl --request POST \
  --url https://app.journeybee.io/api/v1/leads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "company_name": "<string>",
  "email": "<string>",
  "phone_number": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "source": "<string>",
  "associationType": "<string>",
  "companyCampaignId": 123,
  "partnershipLead": {
    "partnership_id": 123,
    "partners_company_id": 123,
    "company_partnerships_id": 123,
    "sendToPartner": true,
    "assignedFromPartnerLead": true,
    "formSubmissionLead": true,
    "formDirection": "<string>",
    "partners_company_name": "<string>",
    "partnerUsers": [
      {}
    ],
    "sentBy": {
      "userId": 123,
      "email": "<string>",
      "companyName": "<string>"
    }
  },
  "tags": [
    {}
  ],
  "customFields": [
    {
      "customFieldId": 123,
      "type": "<string>",
      "value": {}
    }
  ],
  "partnerCustomFields": [
    {
      "customFieldId": 123,
      "type": "<string>",
      "value": {}
    }
  ],
  "attributions": [
    {
      "id": 123,
      "attributedDate": "<string>"
    }
  ],
  "integrationName": "<string>",
  "integrationCustomFields": [
    {
      "uuid": "<string>",
      "value": "<any>"
    }
  ],
  "powerups": {
    "pipedrive": {
      "person_id": 123,
      "organization_id": 123,
      "deal_id": 123
    }
  }
}'
{
  "id": 789,
  "uuid": "lead-uuid-789",
  "partnershipLeadId": 123
}

Authentication

curl -X POST "https://app.journeybee.io/api/v1/leads" \
  -H "Authorization: Bearer your-api-key-uuid" \
  -H "Content-Type: application/json" \
  -d '{"email": "lead@company.com", "company_name": "Lead Company"}'

Request Body Schema

Basic Lead Information

company_name
string
Lead company name
email
string
Lead contact email address
phone_number
string
Lead contact phone number
first_name
string
Lead contact first name
last_name
string
Lead contact last name
source
string
Lead source. Options: manual, campaign, partnership, integration, lead_submission_form

Association & Partnership Configuration

associationType
string
required
Type of lead association. Options: referral, reseller, campaigns
companyCampaignId
number
Campaign ID if creating a campaign lead
partnershipLead
object
Partnership configuration for referral/reseller leads

Tags & Custom Fields

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

Attribution & Analytics

attributions
array
Array of attribution data for lead tracking

Integration Support

integrationName
string
Name of the integration that created this lead. 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 lead ID
uuid
string
The created lead UUID
partnershipLeadId
number
The partnership lead ID (if partnership lead was created)

Example Request

curl -X POST "https://app.journeybee.io/api/v1/leads" \
  -H "Authorization: Bearer jb_api_1234567890abcdef" \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "TechCorp Solutions",
    "email": "contact@techcorp.com",
    "phone_number": "+1-555-123-4567",
    "first_name": "John",
    "last_name": "Smith",
    "source": "partnership",
    "associationType": "referral",
    "partnershipLead": {
      "partnership_id": 456,
      "partners_company_id": 234,
      "company_partnerships_id": 789,
      "sendToPartner": true,
      "partnerUsers": [567, 890]
    },
    "tags": [10, 11],
    "customFields": [
      {
        "customFieldId": 5,
        "type": "number",
        "value": {
          "number": 100000
        }
      },
      {
        "customFieldId": 6,
        "type": "text",
        "value": {
          "text": "High-value prospect from referral"
        }
      }
    ],
    "attributions": [
      {
        "id": 3,
        "attributedDate": "2024-01-15T10:30:00Z"
      }
    ]
  }'

Example Response

{
  "id": 789,
  "uuid": "lead-uuid-789",
  "partnershipLeadId": 123
}

Error Responses

{
  "error": "Invalid field values or missing required association"
}
{
  "error": "Invalid API key or insufficient permissions"
}
{
  "error": "Write access required for this operation"
}
{
  "error": "Missing required fields or invalid association type"
}
{
  "error": "Duplicate lead or unique constraint violation"
}

Notes

  • Requires API key with write_access permission
  • Triggers real-time notifications and webhook events