For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomepageProduct HelpLog inTry for Free
Developers HomeAPI ReferenceMCP
Developers HomeAPI ReferenceMCP
  • Getting Started
    • Introduction
    • Authentication with API Keys
    • Authentication with OAuth
    • API Clients
    • Pagination
    • Specifying Fields
    • Filter Parameters
    • HTTP Response Codes
    • Rate Limits
    • Timezone Offsets
    • Rich Text Fields
    • Changelog
  • CRM Core
    • Leads
    • Contacts
    • Opportunities
      • GETList or filter opportunities
      • POSTCreate an opportunity
      • GETRetrieve an opportunity
      • PUTUpdate an opportunity
      • DELDelete an opportunity
    • Tasks
    • Files
    • Custom Objects
    • Comments
  • Activities
    • Activities
    • Notes
    • Calls
    • Emails
    • Email Threads
    • WhatsApp Messages
    • Meetings
    • Custom Activities
    • Creations
    • Form Submissions
    • Lead Status Changes
    • Opportunity Status Changes
    • Lead Merges
    • Task Completions
  • Events & Webhooks
    • Webhooks
    • Events
  • Search & Reporting
    • Advanced Filtering
    • Smart Views
    • Reporting
  • Automation & Bulk Actions
    • Sequences (Workflows)
    • Bulk Actions
    • Exports
    • AI Field Enrichment
  • CRM Configuration
    • Custom Fields
    • Custom Activity Types
    • Custom Object Types
    • Pipelines
    • Opportunity Statuses
    • Lead Statuses
    • Integration Links
    • Forms
  • Communication Configuration
    • Email Templates
    • SMS Templates
    • Outcomes
    • Playbooks
    • Scheduling Links Guide
    • Scheduling Links
    • Connected Accounts
    • Send As
    • Unsubscribed Emails
    • Phone Numbers
    • Blocked Phone Numbers
    • Dialers
  • Users & Organizations
    • Users
    • Organizations
    • Memberships
    • Roles
    • Groups
Close

Product

OverviewCommunicationAutomationIntegrationsReportingSMSCallingSecurityForms

Pricing & Use Cases

PricingClose vs Other CRMsCustomer Stories

Resources

Sales BlogSales ResourcesSales GuidesWebinarsOn-Demand DemoSales Tools

Company

AboutCareersPartner with CloseBrand GuidelinesTermsPrivacyGDPRCCPA

Get Help

+1-833-GO-CLOSEHelp CenterDownload the Close AppProduct UpdatesSystem Status
LogoLogo
HomepageProduct HelpLog inTry for Free
CRM CoreOpportunities

Update an opportunity

||View as Markdown|
PUT
https://api.close.com/api/v1/opportunity/:id/
PUT
/api/v1/opportunity/:id/
$curl -X PUT https://api.close.com/api/v1/opportunity/id/ \
> -H "Content-Type: application/json" \
> -u "<CLOSE_API_KEY>:" \
> -d '{
> "status_id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk"
>}'
1{
2 "annualized_expected_value": 37500,
3 "annualized_value": 50000,
4 "confidence": 75,
5 "contact_id": null,
6 "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
7 "date_created": "2013-02-01T00:54:51.337000+00:00",
8 "date_lost": null,
9 "date_updated": "2013-02-20T10:06:25.248000+00:00",
10 "date_won": "2013-02-20",
11 "expected_value": 37500,
12 "id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt",
13 "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
14 "note": "Bruce needs new software for the Bat Cave.",
15 "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
16 "status_id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
17 "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
18 "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
19 "value": 50000,
20 "value_period": "one_time",
21 "lead_name": "Wayne Enterprises (Sample Lead)",
22 "pipeline_id": "pipe_04fC628PVB0HjK2Qq5EqEf",
23 "pipeline_name": "Sales",
24 "status_label": "Won",
25 "status_type": "won",
26 "user_name": "John Doe",
27 "value_currency": "USD",
28 "value_formatted": "$500"
29}
**custom.FIELD_ID** (optional) - See description for `custom.FIELD_ID` in `POST /opportunity/` above. - Additionally, you can unset a single field by using `{ "custom.FIELD_ID": null }`, e.g.: ``` { "custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c": null } ``` If you're trying to update a custom field and that custom field accepts multiple values, you can also specify `.add` or `.remove` as part of the field key to add/remove a single value to/from a list of values, e.g.: ``` { "custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c.add": "Wednesday" } ```
Was this page helpful?
Previous

Retrieve an opportunity

Next

Delete an opportunity

Built with

custom.FIELD_ID (optional)

  • See description for custom.FIELD_ID in POST /opportunity/ above.
  • Additionally, you can unset a single field by using { "custom.FIELD_ID": null }, e.g.:
{ "custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c": null }

If you’re trying to update a custom field and that custom field accepts multiple values, you can also specify .add or .remove as part of the field key to add/remove a single value to/from a list of values, e.g.:

{ "custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c.add": "Wednesday" }

Authentication

AuthorizationBasic
Use your API key as the username and leave the password empty.
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

idstringRequired

Request

This endpoint expects an object.
attachmentslist of objectsOptional
confidenceintegerOptional
contact_idstring or nullOptional
custom_fieldsmap from strings to anyOptional
date_wondatetime or nullOptional

If not set on the resource or in the request, date_won will be set automatically to today’s date when setting status_id to a status with type won. The x-tz-offset header, used to pass your timezone’s UTC offset, will be taken into account.

notestringOptional
statusstringOptional
status_idstringOptional

Setting the status_id to a status with a type of won will automatically set the date_won field if it is not already set or provided in the request. Reverting it from a won status to an active or lost will not automatically change date_won.

user_idstring or nullOptional
valueintegerOptional
value_periodenumOptional
Allowed values:

Response

Successful response
annualized_expected_valueinteger or null
annualized_valueinteger or null
confidenceinteger
contact_idstring or null
created_bystring or null
date_createddatetime
date_lostdatetime or null
date_updateddatetime
date_wondate or null
expected_valueinteger or null
idstring
lead_idstring
notestring or null
organization_idstring
status_idstring
updated_bystring or null
user_idstring
valueinteger or null
value_periodenum
Allowed values:
attachmentslist of objects
comment_summaryobject or null
contact_namestring or null
created_by_namestring or null
integration_linkslist of objects
is_stalledboolean
lead_namestring or null
lead_primary_emailobject or null
lead_primary_phonelist of objects or null
pipeline_idstring or null
pipeline_namestring or null
stall_statusobject or null
status_display_namestring
status_labelstring
status_typeenum
Allowed values:
suggested_actionobject or null
updated_by_namestring or null
user_namestring or null
value_currencystring or null
value_formattedstring or null

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error