Create Opportunity
Create Opportunity
POST
/
opportunities
Create Opportunity
curl --request POST \
--url https://services.leadconnectorhq.com/opportunities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"pipelineId": "VDm7RPYC2GLUvdpKmBfC",
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "First Opps",
"contactId": "mTkSCb1UBjb5tk4OvB69",
"pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
"monetaryValue": 220,
"assignedTo": "082goXVW3lIExEQPOnd3",
"customFields": [
{
"id": "6dvNaf7VhkQ9snc5vnjJ",
"key": "my_custom_field",
"field_value": "9039160788"
}
]
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
pipelineId: 'VDm7RPYC2GLUvdpKmBfC',
locationId: 've9EPM428h8vShlRW1KT',
name: 'First Opps',
contactId: 'mTkSCb1UBjb5tk4OvB69',
pipelineStageId: '7915dedc-8f18-44d5-8bc3-77c04e994a10',
monetaryValue: 220,
assignedTo: '082goXVW3lIExEQPOnd3',
customFields: [
{id: '6dvNaf7VhkQ9snc5vnjJ', key: 'my_custom_field', field_value: '9039160788'}
]
})
};
fetch('https://services.leadconnectorhq.com/opportunities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/opportunities"
payload = {
"pipelineId": "VDm7RPYC2GLUvdpKmBfC",
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "First Opps",
"contactId": "mTkSCb1UBjb5tk4OvB69",
"pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
"monetaryValue": 220,
"assignedTo": "082goXVW3lIExEQPOnd3",
"customFields": [
{
"id": "6dvNaf7VhkQ9snc5vnjJ",
"key": "my_custom_field",
"field_value": "9039160788"
}
]
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"opportunity": {
"id": "yWQobCRIhRguQtD2llvk",
"name": "testing",
"monetaryValue": 500,
"pipelineId": "VDm7RPYC2GLUvdpKmBfC",
"pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69",
"assignedTo": "zT46WSCPbudrq4zhWMk6",
"status": "open",
"source": "",
"lastStatusChangeAt": "2021-08-03T04:55:17.355Z",
"lastStageChangeAt": "2021-08-03T04:55:17.355Z",
"lastActionDate": "2021-08-03T04:55:17.355Z",
"indexVersion": 1,
"createdAt": "2021-08-03T04:55:17.355Z",
"updatedAt": "2021-08-03T04:55:17.355Z",
"contactId": "zT46WSCPbudrq4zhWMk6",
"locationId": "zT46WSCPbudrq4zhW",
"contact": {
"id": "byMEV0NQinDhq8ZfiOi2",
"name": "John Deo",
"companyName": "Tesla Inc",
"email": "john@deo.com",
"phone": "+1202-555-0107",
"tags": [
"<string>"
]
},
"notes": [
"<array>"
],
"tasks": [
"<array>"
],
"calendarEvents": [
"<array>"
],
"lostReasonId": "zT46WSCPbudrq4zhWMk6",
"customFields": [
{
"id": "MgobCB14YMVKuE4Ka8p1",
"fieldValue": "<string>"
}
],
"followers": [
"<array>"
]
}
}{
"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
Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.
Headers
API Version
Available options:
2021-07-28 Body
application/json
pipeline Id
Example:
"VDm7RPYC2GLUvdpKmBfC"
Example:
"ve9EPM428h8vShlRW1KT"
Example:
"First Opps"
Available options:
open, won, lost, abandoned, all Example:
"mTkSCb1UBjb5tk4OvB69"
Example:
"7915dedc-8f18-44d5-8bc3-77c04e994a10"
Example:
220
Example:
"082goXVW3lIExEQPOnd3"
Add custom fields to opportunities.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Response
Successful response
Show child attributes
Show child attributes
Last modified on March 8, 2026
Was this page helpful?
⌘I
Create Opportunity
curl --request POST \
--url https://services.leadconnectorhq.com/opportunities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"pipelineId": "VDm7RPYC2GLUvdpKmBfC",
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "First Opps",
"contactId": "mTkSCb1UBjb5tk4OvB69",
"pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
"monetaryValue": 220,
"assignedTo": "082goXVW3lIExEQPOnd3",
"customFields": [
{
"id": "6dvNaf7VhkQ9snc5vnjJ",
"key": "my_custom_field",
"field_value": "9039160788"
}
]
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
pipelineId: 'VDm7RPYC2GLUvdpKmBfC',
locationId: 've9EPM428h8vShlRW1KT',
name: 'First Opps',
contactId: 'mTkSCb1UBjb5tk4OvB69',
pipelineStageId: '7915dedc-8f18-44d5-8bc3-77c04e994a10',
monetaryValue: 220,
assignedTo: '082goXVW3lIExEQPOnd3',
customFields: [
{id: '6dvNaf7VhkQ9snc5vnjJ', key: 'my_custom_field', field_value: '9039160788'}
]
})
};
fetch('https://services.leadconnectorhq.com/opportunities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/opportunities"
payload = {
"pipelineId": "VDm7RPYC2GLUvdpKmBfC",
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "First Opps",
"contactId": "mTkSCb1UBjb5tk4OvB69",
"pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
"monetaryValue": 220,
"assignedTo": "082goXVW3lIExEQPOnd3",
"customFields": [
{
"id": "6dvNaf7VhkQ9snc5vnjJ",
"key": "my_custom_field",
"field_value": "9039160788"
}
]
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"opportunity": {
"id": "yWQobCRIhRguQtD2llvk",
"name": "testing",
"monetaryValue": 500,
"pipelineId": "VDm7RPYC2GLUvdpKmBfC",
"pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69",
"assignedTo": "zT46WSCPbudrq4zhWMk6",
"status": "open",
"source": "",
"lastStatusChangeAt": "2021-08-03T04:55:17.355Z",
"lastStageChangeAt": "2021-08-03T04:55:17.355Z",
"lastActionDate": "2021-08-03T04:55:17.355Z",
"indexVersion": 1,
"createdAt": "2021-08-03T04:55:17.355Z",
"updatedAt": "2021-08-03T04:55:17.355Z",
"contactId": "zT46WSCPbudrq4zhWMk6",
"locationId": "zT46WSCPbudrq4zhW",
"contact": {
"id": "byMEV0NQinDhq8ZfiOi2",
"name": "John Deo",
"companyName": "Tesla Inc",
"email": "john@deo.com",
"phone": "+1202-555-0107",
"tags": [
"<string>"
]
},
"notes": [
"<array>"
],
"tasks": [
"<array>"
],
"calendarEvents": [
"<array>"
],
"lostReasonId": "zT46WSCPbudrq4zhWMk6",
"customFields": [
{
"id": "MgobCB14YMVKuE4Ka8p1",
"fieldValue": "<string>"
}
],
"followers": [
"<array>"
]
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}