Skip to main content

Upsert Opportunity

Snapshot Catalog Entry

This page is generated from broker tools/list snapshot data.

POSTghl.upsert_opportunity

Create or update an opportunity based on contact and pipeline (smart merge)

Request Body

{
"jsonrpc": "2.0",
"id": "ghl-upsert-opportunity-example",
"method": "tools/call",
"params": {
"name": "ghl.upsert_opportunity",
"arguments": {
"pipelineId": "pipelineId_123",
"contactId": "contactId_123",
"tenantId": "tenantId_123",
"name": "name_example",
"status": "open",
"pipelineStageId": "pipelineStageId_123",
"monetaryValue": 1,
"assignedTo": "assignedTo_example"
}
}
}

Arguments Schema

{
"type": "object",
"properties": {
"tenantId": {
"type": "string"
},
"name": {
"type": "string"
},
"pipelineId": {
"type": "string"
},
"contactId": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"open",
"won",
"lost",
"abandoned"
]
},
"pipelineStageId": {
"type": "string"
},
"monetaryValue": {
"type": "number"
},
"assignedTo": {
"type": "string"
}
},
"required": [
"pipelineId",
"contactId"
]
}

Code Examples

curl -X POST 'https://madpanda3d.com/lab/mad-mcps/portal/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "ghl-upsert-opportunity-example",
"method": "tools/call",
"params": {
"name": "ghl.upsert_opportunity",
"arguments": {
"pipelineId": "pipelineId_123",
"contactId": "contactId_123",
"tenantId": "tenantId_123",
"name": "name_example",
"status": "open",
"pipelineStageId": "pipelineStageId_123",
"monetaryValue": 1,
"assignedTo": "assignedTo_example"
}
}
}'

Example Responses

{
"ok": true,
"message": "Tool ghl.upsert_opportunity executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}