Skip to content

HighLevel: Update Opportunity

HighLevel opportunities.updateOpportunity: arguments, response, policy and SDK examples.

← Opportunities operations · Get started

Operation gohighlevel.update_opportunity

Provider route: PUT /opportunities/{id}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/gohighlevel with npm, or alter-sdk-gohighlevel with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { HighLevelIntegration } from "@alter-ai/gohighlevel";
async function execute(input: Parameters<HighLevelIntegration["opportunities"]["updateOpportunity"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new HighLevelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.opportunities.updateOpportunity(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_gohighlevel import HighLevelIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = HighLevelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.opportunities.update_opportunity(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.idstringRequired within parent
bodyModelRequired within parentExpand Update Opportunity — request body — body

Referenced models: Update Opportunity — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Get Opportunity — response body

Referenced models: Get Opportunity — response body

1 more schema is linked from the tables above, on the schema pages.

Get Opportunity — response body
FieldTypePresenceDescription and constraints
$objectRoot
opportunityJSONOptionalThe created or retrieved opportunity object
opportunity (allOf 1)ModelAll variants applyExpand Search Opportunity — response body — opportunities item

Referenced models: Search Opportunity — response body — opportunities item

Update Opportunity — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
assignedTostringOptionalIdentifier of the user the opportunity is assigned to
customFieldsarrayOptionalUpdate custom fields to opportunities.
customFields[]JSONEach item
customFields[] (anyOf 1)ModelAlternativeExpand Create Opportunity — request body — body custom Fields item field Value, id, key — custom Fields Input String Schema V3
customFields[] (anyOf 2)ModelAlternativeExpand Create Opportunity — request body — body custom Fields item field Value, id, key — custom Fields Input Array Schema V3
customFields[] (anyOf 3)ModelAlternativeExpand Create Opportunity — request body — body custom Fields item field Value, id, key — custom Fields Input Object Schema V3
forecastExpectedCloseDatestringOptionalExpected close date. Supported formats: YYYY/MM/DD, MM/DD/YYYY, YYYY-MM-DD, MM-DD-YYYY, YYYY.MM.DD, MM.DD.YYYY, or ISO 8601
forecastProbabilitynumberOptionalForecast probability
monetaryValuenumberOptionalMonetary value of the opportunity
namestringOptionalName of the opportunity
pipelineIdstringOptionalpipeline Id
pipelineStageIdstringOptionalIdentifier of the pipeline stage
statusstringOptionalCurrent status of the opportunity
One of: open, won, lost, abandoned, all

Referenced models: Create Opportunity — request body — body custom Fields item field Value, id, key — custom Fields Input Array Schema V3, Create Opportunity — request body — body custom Fields item field Value, id, key — custom Fields Input Object Schema V3, Create Opportunity — request body — body custom Fields item field Value, id, key — custom Fields Input String Schema V3

Search Opportunity — response body — opportunities item
FieldTypePresenceDescription and constraints
$objectRoot
assignedTostringOptionalIdentifier of the user the opportunity is assigned to
calendarEventsarrayOptionalCalendar events attached to the opportunity
calendarEvents[]arrayEach item
contactJSONOptionalContact details associated with the opportunity
contact (allOf 1)ModelAll variants applyExpand Search Opportunity — response body — opportunities item contact company Name, email, id, name, phone, tags
contactIdstringOptionalIdentifier of the contact linked to the opportunity
createdAtstringOptionalISO 8601 timestamp when the opportunity was created
customFieldsarrayOptionalCustom fields associated with the opportunity
customFields[]ModelEach itemExpand Search Opportunity — response body — opportunities item custom Fields item
effectiveProbabilityJSONOptional
effectiveProbability (anyOf 1)numberAlternativeEffective win probability after stage and forecast adjustments (0–100)
effectiveProbability (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
externalObjectIdstringOptionalExternal object identifier for integrations
followersarrayOptionalUser IDs following this opportunity
followers[]arrayEach item
forecastDaysSlippedJSONOptional
forecastDaysSlipped (anyOf 1)numberAlternativeTotal days the close date has slipped
forecastDaysSlipped (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
forecastExpectedCloseDatestringOptionalExpected close date for the forecast (YYYY-MM-DD)
forecastLastSlippedAtstringOptionalISO 8601 timestamp of the last close-date slip
forecastOriginalCloseDatestringOptionalOriginal forecast close date before any slippage (YYYY-MM-DD)
forecastProbabilityJSONOptional
forecastProbability (anyOf 1)numberAlternativeForecast win probability percentage (0–100)
forecastProbability (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
forecastSlippageCountJSONOptional
forecastSlippageCount (anyOf 1)numberAlternativeNumber of times the close date has slipped
forecastSlippageCount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
idstringOptionalUnique identifier of the opportunity
indexVersionstringOptionalIndex version of the opportunity record
lastActionDatestringOptionalISO 8601 timestamp of the last action on the opportunity
lastStageChangeAtstringOptionalISO 8601 timestamp of the last stage change
lastStatusChangeAtstringOptionalISO 8601 timestamp of the last status change
locationIdstringOptionalIdentifier of the location (sub-account) the opportunity belongs to
lostReasonIdstringOptionalIdentifier of the lost reason if the opportunity was marked lost
monetaryValueJSONOptional
monetaryValue (anyOf 1)numberAlternativeMonetary value of the opportunity
monetaryValue (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringOptionalName of the opportunity
notesarrayOptionalNotes attached to the opportunity
notes[]arrayEach item
pipelineIdstringOptionalIdentifier of the pipeline the opportunity belongs to
pipelineStageIdstringOptionalIdentifier of the pipeline stage the opportunity is in
sourcestringOptionalSource of the opportunity
statusstringOptionalCurrent status of the opportunity
tasksarrayOptionalTasks attached to the opportunity
tasks[]arrayEach item
updatedAtstringOptionalISO 8601 timestamp when the opportunity was last updated

Referenced models: Search Opportunity — response body — opportunities item custom Fields item, Search Opportunity — response body — opportunities item contact company Name, email, id, name, phone, tags

Create Opportunity — request body — body custom Fields item field Value, id, key — custom Fields Input Array Schema V3
FieldTypePresenceDescription and constraints
$objectRoot
fieldValuearrayOptionalValue of the custom field
fieldValue[]stringEach item
idstringRequired within parentPass either `id` or `key` of custom field
keystringOptionalPass either `id` or `key` of custom field
Create Opportunity — request body — body custom Fields item field Value, id, key — custom Fields Input Object Schema V3
FieldTypePresenceDescription and constraints
$objectRoot
fieldValueobjectOptionalValue of the custom field
idstringRequired within parentPass either `id` or `key` of custom field
keystringOptionalPass either `id` or `key` of custom field
Create Opportunity — request body — body custom Fields item field Value, id, key — custom Fields Input String Schema V3
FieldTypePresenceDescription and constraints
$objectRoot
fieldValuestringOptionalValue of the custom field
idstringOptionalPass either `id` or `key` of custom field
keystringOptionalPass either `id` or `key` of custom field
Search Opportunity — response body — opportunities item custom Fields item
FieldTypePresenceDescription and constraints
$objectRoot
fieldValueJSONRequired within parentThe value of the custom field
fieldValue (anyOf 1)stringAlternative
fieldValue (anyOf 2)objectAlternative
fieldValue (anyOf 3)arrayAlternative
fieldValue (anyOf 3)[]stringEach item
fieldValue (anyOf 4)arrayAlternative
fieldValue (anyOf 4)[]objectEach item
idstringRequired within parentUnique identifier of the custom field

SDK function policy ID: gohighlevel.update_opportunity. Catalog operation: update-opportunity. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["opportunities.write"]

Pinned headers: {"Version": "v3"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.