GET
/
api
/
v1
/
leads
Get Leads
curl --request GET \
  --url https://app.journeybee.io/api/v1/leads \
  --header 'Authorization: Bearer <token>'
[
  {
    "total": 1,
    "id": 789,
    "uuid": "lead-uuid-789",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T12:45:00Z",
    "source": "partnership",
    "company_name": "TechCorp Solutions",
    "email": "contact@techcorp.com",
    "phone_number": "+1-555-123-4567",
    "first_name": "John",
    "last_name": "Smith",
    "status": "new",
    "partner_type": "referral",
    "company_id": 123,
    "created_by_user_id": 456,
    "campaign_id": null,
    "campaign_title": null,
    "tags": [
      {
        "id": 10,
        "label": "High Priority",
        "background_color": "#EF4444",
        "text_color": "#FFFFFF"
      }
    ],
    "assigned_users": [
      {
        "id": 456,
        "email": "jane@company.com",
        "first_name": "Jane",
        "last_name": "Doe",
        "color": "#3B82F6",
        "profile_image_id": 789,
        "profile_image_uuid": "profile-uuid-456"
      }
    ],
    "partnership_leads": [
      {
        "id": 123,
        "created_at": "2024-01-15T10:30:00Z",
        "partnership_id": 456,
        "sent_by_company_id": 234,
        "sent_by_company_name": "Partner Corp",
        "sent_by_company_logo_id": 567,
        "sent_by_company_logo_uuid": "logo-uuid-567",
        "received_by_company_id": 123,
        "received_by_company_name": "Your Company",
        "received_by_company_logo_id": 890,
        "received_by_company_logo_uuid": "logo-uuid-890",
        "partner_type": "referral",
        "direction": "received",
        "fallback_data": null
      }
    ],
    "campaign_partners": [],
    "lead_deals": [
      {
        "id": 345,
        "label": "TechCorp Deal",
        "deal_value": 50000,
        "currency_code": "USD",
        "stage_id": 2,
        "stage_label": "Proposal",
        "stage_series": 2,
        "stage_phase": "negotiation"
      }
    ]
  }
]

Authentication

curl -X GET "https://app.journeybee.io/api/v1/leads?userId={userId}" \
  -H "Authorization: Bearer your-api-key-uuid" \
  -H "Content-Type: application/json"

Query Parameters

userId
number
required
The ID of the user making the request (for authorization)
cursor
string
Pagination cursor (ISO timestamp) for fetching the next set of results
Search leads by company name, email, phone, first name, last name, assigned users, or partner companies
view
string
Filter by lead source/type. Options: received, sent, reseller, campaigns
assigned
number
Filter by assignment status. Use 1 to show only assigned leads
unassigned
number
Filter by assignment status. Use 1 to show only unassigned leads
status
string
Comma-separated list of lead statuses to filter by. Options: new, contacted, qualified, converted, lost
tags
string
Comma-separated list of tag IDs to filter by
users
string
Comma-separated list of user IDs to filter by assigned users
customFields
string
JSON string of custom field filters with format: [{"id": 123, "value": {"text": "search"}}]
sort
string
JSON string of sort options with format: [{"type": "status", "asc": true}]. Types: status

Response Schema

leads
array
Array of lead objects

Example Request

curl -X GET "https://app.journeybee.io/api/v1/leads?userId=456&view=received&search=tech&status=new,contacted" \
  -H "Authorization: Bearer jb_api_1234567890abcdef" \
  -H "Content-Type: application/json"

Example Response

[
  {
    "total": 1,
    "id": 789,
    "uuid": "lead-uuid-789",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T12:45:00Z",
    "source": "partnership",
    "company_name": "TechCorp Solutions",
    "email": "contact@techcorp.com",
    "phone_number": "+1-555-123-4567",
    "first_name": "John",
    "last_name": "Smith",
    "status": "new",
    "partner_type": "referral",
    "company_id": 123,
    "created_by_user_id": 456,
    "campaign_id": null,
    "campaign_title": null,
    "tags": [
      {
        "id": 10,
        "label": "High Priority",
        "background_color": "#EF4444",
        "text_color": "#FFFFFF"
      }
    ],
    "assigned_users": [
      {
        "id": 456,
        "email": "jane@company.com",
        "first_name": "Jane",
        "last_name": "Doe",
        "color": "#3B82F6",
        "profile_image_id": 789,
        "profile_image_uuid": "profile-uuid-456"
      }
    ],
    "partnership_leads": [
      {
        "id": 123,
        "created_at": "2024-01-15T10:30:00Z",
        "partnership_id": 456,
        "sent_by_company_id": 234,
        "sent_by_company_name": "Partner Corp",
        "sent_by_company_logo_id": 567,
        "sent_by_company_logo_uuid": "logo-uuid-567",
        "received_by_company_id": 123,
        "received_by_company_name": "Your Company",
        "received_by_company_logo_id": 890,
        "received_by_company_logo_uuid": "logo-uuid-890",
        "partner_type": "referral",
        "direction": "received",
        "fallback_data": null
      }
    ],
    "campaign_partners": [],
    "lead_deals": [
      {
        "id": 345,
        "label": "TechCorp Deal",
        "deal_value": 50000,
        "currency_code": "USD",
        "stage_id": 2,
        "stage_label": "Proposal",
        "stage_series": 2,
        "stage_phase": "negotiation"
      }
    ]
  }
]

Error Responses

{
  "error": "Invalid API key or insufficient permissions"
}
{
  "error": "Read access required for this operation"
}
{
  "error": "Company not found or user not authorized"
}

Notes

  • Requires API key with read_access permission
  • User ID must match the authenticated user
  • Results are paginated using cursor-based pagination (timestamp-based)