Upsert Opportunity
Upsert Opportunity
POST
/
opportunities
/
upsert
Upsert Opportunity
curl --request POST \
--url https://services.leadconnectorhq.com/opportunities/upsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"pipelineId": "bCkKGpDsyPP4peuKowkG",
"locationId": "CLu7BaljjqrEjBGKTNNe",
"followers": "LiKJ2vnRg5ETM8Z19K7",
"isRemoveAllFollowers": true,
"followersActionType": "add",
"id": "yWQobCRIhRguQtD2llvk",
"name": "opportunity name",
"pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
"monetaryValue": 220,
"assignedTo": "082goXVW3lIExEQPOnd3",
"lostReasonId": "CLu7BaljjqrEjBGKTNNe"
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
pipelineId: 'bCkKGpDsyPP4peuKowkG',
locationId: 'CLu7BaljjqrEjBGKTNNe',
followers: 'LiKJ2vnRg5ETM8Z19K7',
isRemoveAllFollowers: true,
followersActionType: 'add',
id: 'yWQobCRIhRguQtD2llvk',
name: 'opportunity name',
pipelineStageId: '7915dedc-8f18-44d5-8bc3-77c04e994a10',
monetaryValue: 220,
assignedTo: '082goXVW3lIExEQPOnd3',
lostReasonId: 'CLu7BaljjqrEjBGKTNNe'
})
};
fetch('https://services.leadconnectorhq.com/opportunities/upsert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/opportunities/upsert"
payload = {
"pipelineId": "bCkKGpDsyPP4peuKowkG",
"locationId": "CLu7BaljjqrEjBGKTNNe",
"followers": "LiKJ2vnRg5ETM8Z19K7",
"isRemoveAllFollowers": True,
"followersActionType": "add",
"id": "yWQobCRIhRguQtD2llvk",
"name": "opportunity name",
"pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
"monetaryValue": 220,
"assignedTo": "082goXVW3lIExEQPOnd3",
"lostReasonId": "CLu7BaljjqrEjBGKTNNe"
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"opportunity": {},
"new": true
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}Authorizations
Body
application/json
Last modified on March 8, 2026
Was this page helpful?
Upsert Opportunity
curl --request POST \
--url https://services.leadconnectorhq.com/opportunities/upsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"pipelineId": "bCkKGpDsyPP4peuKowkG",
"locationId": "CLu7BaljjqrEjBGKTNNe",
"followers": "LiKJ2vnRg5ETM8Z19K7",
"isRemoveAllFollowers": true,
"followersActionType": "add",
"id": "yWQobCRIhRguQtD2llvk",
"name": "opportunity name",
"pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
"monetaryValue": 220,
"assignedTo": "082goXVW3lIExEQPOnd3",
"lostReasonId": "CLu7BaljjqrEjBGKTNNe"
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
pipelineId: 'bCkKGpDsyPP4peuKowkG',
locationId: 'CLu7BaljjqrEjBGKTNNe',
followers: 'LiKJ2vnRg5ETM8Z19K7',
isRemoveAllFollowers: true,
followersActionType: 'add',
id: 'yWQobCRIhRguQtD2llvk',
name: 'opportunity name',
pipelineStageId: '7915dedc-8f18-44d5-8bc3-77c04e994a10',
monetaryValue: 220,
assignedTo: '082goXVW3lIExEQPOnd3',
lostReasonId: 'CLu7BaljjqrEjBGKTNNe'
})
};
fetch('https://services.leadconnectorhq.com/opportunities/upsert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/opportunities/upsert"
payload = {
"pipelineId": "bCkKGpDsyPP4peuKowkG",
"locationId": "CLu7BaljjqrEjBGKTNNe",
"followers": "LiKJ2vnRg5ETM8Z19K7",
"isRemoveAllFollowers": True,
"followersActionType": "add",
"id": "yWQobCRIhRguQtD2llvk",
"name": "opportunity name",
"pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
"monetaryValue": 220,
"assignedTo": "082goXVW3lIExEQPOnd3",
"lostReasonId": "CLu7BaljjqrEjBGKTNNe"
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"opportunity": {},
"new": true
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}