CRM
Update an opportunity
Updates an opportunity (send only the fields to change).
crm:writeResult
generated from the schema
version is REQUIRED: copy it from the previous read. If someone moved it between your read and your write, the request is rejected instead of overwriting their change. To move stage or close, use their own endpoints.
Arguments
Opportunity identifier.
Limits: min length 1
Short name.
Limits: min length 1, max length 200
Free-text description.
Amount as a decimal string, with at most two decimals. E.g.: "12500.00".
Limits: pattern ^\d+(\.\d{1,2})?$
Uppercase ISO 4217 code. E.g.: "EUR".
Limits: pattern ^[A-Z]{3}$
Own probability, as a percentage.
Limits: min 0, max 100
Expected close date, in ISO 8601 with offset.
Contact (person).
Contact (company).
Sales owner.
Lead source channel: inbound_email, website_form, referral, cold_outreach, event, social, existing_customer, partner or other.
Available options: inbound_email, website_form, referral, cold_outreach, event, social, existing_customer, partner, other
Free-text detail of the channel.
Limits: max length 200
Idempotency key chosen by the client (a UUID is recommended). Repeating the same key with the same arguments within 24 h returns the stored response without executing again; with different arguments it responds 422. It is the safe way to retry after a network failure.
Limits: min length 1, max length 255
Optimistic locking: the meta.etag you got from the detail read of this resource (or "*"). If the resource changed since, the call fails with 412 precondition_failed before writing anything; read it again and retry. Omit it to write unconditionally.
Limits: min length 1
Result
On success the result carries structuredContent with data and meta. These are the attributes of data.
Show the attributes of data
Available options: open, won, lost
Available options: open, won, lost
Available options: inbound_email, website_form, referral, cold_outreach, event, social, existing_customer, partner, other
Limits: min 1
Show child attributesHide child attributes
An error is a result with isError: true and the problem in content[0].; there is no structuredContent. See Errors.
The same operation by REST
This tool runs PATCH /api/v1/crm/opportunities/{opportunityId}.
Related pages
Link to this section: Related pagesCRM
Update an opportunity
Updates an opportunity (send only the fields to change).
Guides
Safe writes
An assistant that can write can also write the wrong thing. Decide which tools need a person, retry without duplicating, and know what a write sets in motion.
Guides
Errors
A tool error is a result with
isError: trueand the problem in the first text block. Branch on itscode.
Was this page helpful?