curl --request PATCH \
--url https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"rejected_reason": "<string>",
"accepted_reason": "<string>",
"custom_field_values": [
{
"customFieldId": "<string>",
"value": {
"text": "<string>",
"textarea": "<string>",
"number": 123,
"date": "<string>",
"boolean": true,
"select": 123,
"multi_select": [
123
]
}
}
]
}
'import requests
url = "https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId}"
payload = {
"company_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"rejected_reason": "<string>",
"accepted_reason": "<string>",
"custom_field_values": [
{
"customFieldId": "<string>",
"value": {
"text": "<string>",
"textarea": "<string>",
"number": 123,
"date": "<string>",
"boolean": True,
"select": 123,
"multi_select": [123]
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
company_name: '<string>',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone_number: '<string>',
rejected_reason: '<string>',
accepted_reason: '<string>',
custom_field_values: [
{
customFieldId: '<string>',
value: {
text: '<string>',
textarea: '<string>',
number: 123,
date: '<string>',
boolean: true,
select: 123,
multi_select: [123]
}
}
]
})
};
fetch('https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'company_name' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'phone_number' => '<string>',
'rejected_reason' => '<string>',
'accepted_reason' => '<string>',
'custom_field_values' => [
[
'customFieldId' => '<string>',
'value' => [
'text' => '<string>',
'textarea' => '<string>',
'number' => 123,
'date' => '<string>',
'boolean' => true,
'select' => 123,
'multi_select' => [
123
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId}"
payload := strings.NewReader("{\n \"company_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"rejected_reason\": \"<string>\",\n \"accepted_reason\": \"<string>\",\n \"custom_field_values\": [\n {\n \"customFieldId\": \"<string>\",\n \"value\": {\n \"text\": \"<string>\",\n \"textarea\": \"<string>\",\n \"number\": 123,\n \"date\": \"<string>\",\n \"boolean\": true,\n \"select\": 123,\n \"multi_select\": [\n 123\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"company_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"rejected_reason\": \"<string>\",\n \"accepted_reason\": \"<string>\",\n \"custom_field_values\": [\n {\n \"customFieldId\": \"<string>\",\n \"value\": {\n \"text\": \"<string>\",\n \"textarea\": \"<string>\",\n \"number\": 123,\n \"date\": \"<string>\",\n \"boolean\": true,\n \"select\": 123,\n \"multi_select\": [\n 123\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"rejected_reason\": \"<string>\",\n \"accepted_reason\": \"<string>\",\n \"custom_field_values\": [\n {\n \"customFieldId\": \"<string>\",\n \"value\": {\n \"text\": \"<string>\",\n \"textarea\": \"<string>\",\n \"number\": 123,\n \"date\": \"<string>\",\n \"boolean\": true,\n \"select\": 123,\n \"multi_select\": [\n 123\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"uuid": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"source": "<string>",
"status": "new",
"company_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"direction": "sent",
"rejected_reason": "<string>",
"accepted_reason": "<string>",
"partnership_id": "<string>",
"campaign_id": "<string>",
"campaign_title": "<string>",
"partnership": {
"id": "<string>",
"uuid": "<string>",
"name": "<string>",
"partner_type": "referral",
"logo_square_id": 123,
"logo_square_uuid": "<string>",
"partnership_distributors_id": "<string>",
"distributor_name": "<string>",
"distributor_logo_square_id": 123,
"distributor_logo_square_uuid": "<string>"
},
"tags": [
{
"id": "<string>",
"label": "<string>",
"background_color": "<string>",
"text_color": "<string>"
}
],
"assigned_users": [
{
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"profile_image_id": 123,
"profile_image_uuid": "<string>"
}
],
"assigned_contacts": [
{
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"profile_image_id": 123,
"profile_image_uuid": "<string>"
}
],
"lead_deals": [
{
"id": "<string>",
"uuid": "<string>",
"label": "<string>",
"deal_value": 123,
"stage_id": "<string>",
"stage_label": "<string>",
"stage_series": 123,
"stage_phase": "new",
"currency_code": "<string>",
"created_at": "<string>",
"total_commission_value": 123,
"lead_deal_payments": [
{
"payment_completed": true,
"payment_value": 123
}
]
}
],
"custom_fields": [
{
"id": "<string>",
"label": "<string>",
"type": "text",
"value": {
"text": "<string>",
"textarea": "<string>",
"number": 123,
"date": "<string>",
"boolean": true,
"select": 123,
"multi_select": [
123
]
},
"options": [
{
"id": 123,
"label": "<string>"
}
],
"custom_field_value_id": "<string>"
}
],
"has_quote": true,
"status_form_fields": [
{
"id": "<string>",
"label": "<string>",
"type": "text",
"value": {
"text": "<string>",
"textarea": "<string>",
"number": 123,
"date": "<string>",
"boolean": true,
"select": 123,
"multi_select": [
123
]
},
"options": [
{
"id": 123,
"label": "<string>"
}
],
"custom_field_value_id": "<string>"
}
],
"id": "<string>",
"lock_lead_status": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>",
"label": "<string>",
"reason": "<string>"
}
]
}
}Update a partnership lead
Custom fields may be required or rule-controlled — call getPartnerLeadRequirements first to learn the field/rule constraints. Validation failures return per-field details with machine-readable reason codes. Moving a lead to converted (Accepted) or rejected applies that status’s form (getPartnerLeadRequirements status_forms): send its shared fields in custom_field_values and its reason in accepted_reason / rejected_reason with the status change; a Required form refuses a missing required field or reason with 400 validation_error naming it. When the partnership’s lock_lead_status is true, changing status, rejected_reason or accepted_reason returns 403 forbidden with a locked_by_partnership detail reason and nothing in the request is saved; re-sending the current values is allowed.
curl --request PATCH \
--url https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"rejected_reason": "<string>",
"accepted_reason": "<string>",
"custom_field_values": [
{
"customFieldId": "<string>",
"value": {
"text": "<string>",
"textarea": "<string>",
"number": 123,
"date": "<string>",
"boolean": true,
"select": 123,
"multi_select": [
123
]
}
}
]
}
'import requests
url = "https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId}"
payload = {
"company_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"rejected_reason": "<string>",
"accepted_reason": "<string>",
"custom_field_values": [
{
"customFieldId": "<string>",
"value": {
"text": "<string>",
"textarea": "<string>",
"number": 123,
"date": "<string>",
"boolean": True,
"select": 123,
"multi_select": [123]
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
company_name: '<string>',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone_number: '<string>',
rejected_reason: '<string>',
accepted_reason: '<string>',
custom_field_values: [
{
customFieldId: '<string>',
value: {
text: '<string>',
textarea: '<string>',
number: 123,
date: '<string>',
boolean: true,
select: 123,
multi_select: [123]
}
}
]
})
};
fetch('https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'company_name' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'phone_number' => '<string>',
'rejected_reason' => '<string>',
'accepted_reason' => '<string>',
'custom_field_values' => [
[
'customFieldId' => '<string>',
'value' => [
'text' => '<string>',
'textarea' => '<string>',
'number' => 123,
'date' => '<string>',
'boolean' => true,
'select' => 123,
'multi_select' => [
123
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId}"
payload := strings.NewReader("{\n \"company_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"rejected_reason\": \"<string>\",\n \"accepted_reason\": \"<string>\",\n \"custom_field_values\": [\n {\n \"customFieldId\": \"<string>\",\n \"value\": {\n \"text\": \"<string>\",\n \"textarea\": \"<string>\",\n \"number\": 123,\n \"date\": \"<string>\",\n \"boolean\": true,\n \"select\": 123,\n \"multi_select\": [\n 123\n ]\n }\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"company_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"rejected_reason\": \"<string>\",\n \"accepted_reason\": \"<string>\",\n \"custom_field_values\": [\n {\n \"customFieldId\": \"<string>\",\n \"value\": {\n \"text\": \"<string>\",\n \"textarea\": \"<string>\",\n \"number\": 123,\n \"date\": \"<string>\",\n \"boolean\": true,\n \"select\": 123,\n \"multi_select\": [\n 123\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/partner/{partnershipId}/leads/{leadId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_name\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"rejected_reason\": \"<string>\",\n \"accepted_reason\": \"<string>\",\n \"custom_field_values\": [\n {\n \"customFieldId\": \"<string>\",\n \"value\": {\n \"text\": \"<string>\",\n \"textarea\": \"<string>\",\n \"number\": 123,\n \"date\": \"<string>\",\n \"boolean\": true,\n \"select\": 123,\n \"multi_select\": [\n 123\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"uuid": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"source": "<string>",
"status": "new",
"company_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"direction": "sent",
"rejected_reason": "<string>",
"accepted_reason": "<string>",
"partnership_id": "<string>",
"campaign_id": "<string>",
"campaign_title": "<string>",
"partnership": {
"id": "<string>",
"uuid": "<string>",
"name": "<string>",
"partner_type": "referral",
"logo_square_id": 123,
"logo_square_uuid": "<string>",
"partnership_distributors_id": "<string>",
"distributor_name": "<string>",
"distributor_logo_square_id": 123,
"distributor_logo_square_uuid": "<string>"
},
"tags": [
{
"id": "<string>",
"label": "<string>",
"background_color": "<string>",
"text_color": "<string>"
}
],
"assigned_users": [
{
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"profile_image_id": 123,
"profile_image_uuid": "<string>"
}
],
"assigned_contacts": [
{
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"profile_image_id": 123,
"profile_image_uuid": "<string>"
}
],
"lead_deals": [
{
"id": "<string>",
"uuid": "<string>",
"label": "<string>",
"deal_value": 123,
"stage_id": "<string>",
"stage_label": "<string>",
"stage_series": 123,
"stage_phase": "new",
"currency_code": "<string>",
"created_at": "<string>",
"total_commission_value": 123,
"lead_deal_payments": [
{
"payment_completed": true,
"payment_value": 123
}
]
}
],
"custom_fields": [
{
"id": "<string>",
"label": "<string>",
"type": "text",
"value": {
"text": "<string>",
"textarea": "<string>",
"number": 123,
"date": "<string>",
"boolean": true,
"select": 123,
"multi_select": [
123
]
},
"options": [
{
"id": 123,
"label": "<string>"
}
],
"custom_field_value_id": "<string>"
}
],
"has_quote": true,
"status_form_fields": [
{
"id": "<string>",
"label": "<string>",
"type": "text",
"value": {
"text": "<string>",
"textarea": "<string>",
"number": 123,
"date": "<string>",
"boolean": true,
"select": 123,
"multi_select": [
123
]
},
"options": [
{
"id": 123,
"label": "<string>"
}
],
"custom_field_value_id": "<string>"
}
],
"id": "<string>",
"lock_lead_status": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"field": "<string>",
"label": "<string>",
"reason": "<string>"
}
]
}
}Authorizations
API key authentication. Use "Bearer <api_key>" or "Api-Key <api_key>".
Path Parameters
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Body
The Rejected form's reason, saved only with the move to rejected and only when the company shows it to partners. Sent at any other time (or when hidden) it is refused with 400 not_accessible, unless it equals the value you can already read for the lead (null when hidden or not rejected), which is a no-op.
2000The Accepted form's reason, saved only with the move to converted (Accepted) and only when the company shows it to partners. Sent at any other time (or when hidden) it is refused with 400 not_accessible, unless it equals the value you can already read for the lead (null when hidden or not converted), which is a no-op.
2000Moving a lead to converted (Accepted) or rejected applies that status's form (see status_forms in getPartnerLeadRequirements). Its shared fields go in custom_field_values and its reason in accepted_reason / rejected_reason, in the same request. When the form is Required, a missing required shared field or required reason is refused with 400 validation_error naming it. Leaving Accepted or Rejected clears that form's answers and reason.
new, converted, rejected Show child attributes
Show child attributes
Shared lead custom field values, by field uuid. Also carries the answers to a status form's shared fields (lead_acceptance with the move to converted, lead_rejection with the move to rejected); any other status-form field is refused with not_accessible.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Default Response
new, converted, rejected sent, received The Rejected form's reason: set only while the lead is rejected and the company shows it to partners, else null.
The Accepted form's reason: set only while the lead is converted (Accepted) and the company shows it to partners, else null.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Answers to the shared fields of the current status's form: lead_acceptance while converted (Accepted), lead_rejection while rejected, empty otherwise.
Show child attributes
Show child attributes
True when the calling partnership may not change this lead's status, rejected_reason or accepted_reason; updatePartnerLead returns 403 for such a change.