---
title: "Update an opportunity"
method: PUT
path: "/opportunity/{id}/"
tags: ["opportunities"]
---

# Update an opportunity

`PUT /opportunity/{id}/`

**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" }
```

## Path parameters

- `id` string, required

## Request body

- UpdateOpportunity
  - `attachments` AttachmentIn[]
    - `content_type` string
    - `filename` string, required
    - `url` string, required
  - `confidence` integer
  - `contact_id` string, nullable
  - `date_won` string, date-time, nullable — 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.
  - `note` string — Plaintext/markdown version of the note. If `note_html` is also provided in the same request, this value is ignored and `note` is derived from the HTML instead.
  - `note_html` string, nullable — Rich-text HTML version of the note. When set, `note` is automatically populated with the plaintext version (tags become markdown), overriding any `note` value passed in the same request. Pass `null` to clear `note_html`; `note` is cleared as well.
  - `status` string
  - `status_id` string — 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_id` string, nullable
  - `value` integer
  - `value_period` 'one_time' | 'monthly' | 'annual'

## Response `200`

Successful response

- Opportunity
  - `annualized_expected_value` integer, nullable, required
  - `annualized_value` integer, nullable, required
  - `attachments` Attachment[]
    - `content_type` string, nullable, required
    - `filename` string, nullable, required
    - `size` integer, nullable, required
    - `thumbnail_url` string, nullable
    - `url` string, required
  - `comment_summary` CommentSummary
    - `comment_count` integer, required
    - `thread_id` string, required
  - `confidence` integer, required
  - `contact_id` string, nullable, required
  - `contact_name` string, nullable
  - `created_by` string, nullable, required
  - `created_by_name` string, nullable
  - `date_created` string, date-time, required
  - `date_lost` string, date-time, nullable, required
  - `date_updated` string, date-time, required
  - `date_won` string, date, nullable, required
  - `expected_value` integer, nullable, required
  - `id` string, required
  - `integration_links` RenderedIntegrationLink[]
    - `name` string, required
    - `url` string, required
  - `is_stalled` boolean
  - `lead_id` string, required
  - `lead_name` string, nullable
  - `lead_primary_email` ContactEmail
    - `email` string, required
    - `is_unsubscribed` boolean, required
    - `type` string, required
  - `lead_primary_phone` ContactPhone[], nullable
    - `country` string, nullable
    - `outbound_sms_blocked` boolean
    - `phone` string, required
    - `phone_formatted` string
    - `type` string, required
    - `tz_ids` string[]
  - `note` string, nullable, required
  - `note_html` string, nullable, required
  - `organization_id` string, required
  - `pipeline_id` string, nullable
  - `pipeline_name` string, nullable
  - `stall_status` StalledOpportunityActionItems
    - `communication_issue` 'no_issue' | 'cant_get_in_touch' | 'no_communication_attempts', required
    - `next_action` ActionItem, required
      - `action` 'mark_as_lost' | 'change_status' | 'follow_up' | 'adjust_close_date' | 'ask_someone_else_to_reach_out' | 'change_communication_method', required
      - `justification` string, required — A short justification for the recommended action in the sales pipeline. Maximum 2 sentences.
  - `status_display_name` string
  - `status_id` string, required
  - `status_label` string
  - `status_type` 'won' | 'lost' | 'active'
  - `suggested_action` OpportunitySuggestedAction
    - `action` 'change_status' | 'adjust_close_date' | 'follow_up_email' | 'follow_up_call' | 'follow_up_sms', required
    - `details` union, required
      - OpportunityChangeStatusActionDetails
        - `status_id` string, required
      - OpportunityFollowUpEmailActionDetails
        - `contact_id` string, required
        - `message_draft` string, required
        - `subject_draft` string, required
      - OpportunityFollowUpSMSActionDetails
        - `contact_id` string, required
        - `message_draft` string, required
      - OpportunityFollowUpCallActionDetails
        - `call_plan` string, required
        - `contact_id` string, required
      - OpportunityAdjustCloseDateActionDetails
        - `close_date` string, date, required
    - `justification` string, required
  - `updated_by` string, nullable, required
  - `updated_by_name` string, nullable
  - `user_id` string, required
  - `user_name` string, nullable
  - `value` integer, nullable, required
  - `value_currency` string, nullable
  - `value_formatted` string, nullable
  - `value_period` 'one_time' | 'monthly' | 'annual', required

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found

---

[API](https://skmtc.net/close/apis/close-api.md) · [All operations](https://skmtc.net/close/apis/close-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/close/close-api/revisions/0dcf3303e9d7/schema)
