---
title: "Update Opportunity"
method: PUT
path: "/sales/opportunities/{id}"
tags: ["Sales::Opportunity"]
---

# Update Opportunity

`PUT /sales/opportunities/{id}`

Update Opportunity

## Path parameters

- `id` string, required

## Request body

- object
  - `sales_opportunity` SalesOpportunityParametersUpdate — Opportunities
    - `name` string — Name
    - `pipelines_stage_id` integer — Pipeline Stage ID
    - `primary_contact_id` integer — Primary Contact ID
    - `value` number, nullable — The potential value of this opportunity in the default currency of the workspace
    - `closed_at` string, date-time, nullable — Close date
    - `assignee_id` integer — The ID of the Team `Membership` to assign the Opportunity to. An Opportunity can be assigned to any Team member since they have access to all your workspaces. You can get a list of available Memberships and their `id` via the `Team` resource's `memberships` property. If the opportunity is already assigned to a team member, the assignee will be updated. You can unset the assignee by passing a `null` value for `assignee_id`.

## Response `200`

OK

- SalesOpportunityAttributes — Opportunities
  - `id` integer — Opportunity ID
  - `public_id` string, nullable — Opportunity public ID
  - `name` string — Name
  - `workspace_id` integer — Workspace ID
  - `pipeline_id` string, nullable — Pipeline ID
  - `pipelines_stage_id` integer — Pipeline Stage
  - `primary_contact_id` integer — Primary Contact
  - `value` number, nullable — The potential value of this opportunity in the default currency of the workspace
  - `sort_order` integer, nullable — The position of the opportunity in its pipeline stage
  - `closed_at` string, date-time, nullable — Close date
  - `created_at` string, date-time, nullable — Added
  - `updated_at` string, date-time, nullable — Updated
  - `pipeline` object — Pipeline Details
    - `id` integer — Pipeline public ID
    - `public_id` string — Pipeline Stage Public ID
    - `name` string — The name of the pipeline
  - `pipelines_stage` object — Pipeline Stage Details
    - `id` integer — Pipeline Stage ID
    - `public_id` string — Pipeline Stage public ID
    - `name` string — Name
  - `primary_contact` object — Contact
    - `id` integer — Contact ID
    - `public_id` string, nullable — Contact public ID
    - `workspace_id` integer — Workspace ID
    - `anonymous` integer, nullable — Anonymous
    - `email_address` string, nullable — Email address
    - `first_name` string, nullable — First name
    - `last_name` string, nullable — Last name
    - `phone_number` string, nullable — Phone number
    - `time_zone` string, nullable — The human-readable time zone, usually set dynamically by the app for the contact, for example, during opt-in. Read more about time zones and how to map them back to the TZ standard in [our Time Zones guide.](https://dash.readme.com/project/cf2/v2/docs/timezones).
    - `uuid` string — UUID
    - `unsubscribed_at` string, nullable — Unsubscribed
    - `last_notification_email_sent_at` string, nullable — Last notification email sent
    - `fb_url` string, nullable — Facebook URL
    - `twitter_url` string, nullable — Twitter URL
    - `instagram_url` string, nullable — Instagram URL
    - `linkedin_url` string, nullable — LinkedIn URL
    - `website_url` string, nullable — Website URL
    - `created_at` string, nullable — Date added
    - `updated_at` string, nullable — Last updated
    - `tags` unknown
    - `custom_attributes` object, nullable — A dynamic key-value pair object where both the key and value are strings. Custom attributes are usually added to the contact when they submit forms that contain custom contact attributes. But you can also add them via the API using the modifying endpoints like Create/Update/Upsert Contact.
      - `CustomKey` string — Custom Attribute Key
    - `visits` VisitsAttributes — Collection of visit tracking records for a contact, including first visit, last visit, and last visit with UTM parameters
      - `first_visit` VisitAttributes — Visit tracking information including UTM parameters and device data
        - `uuid` string — Unique identifier for the visit
        - `utm_source` string, nullable — UTM source parameter from the visit URL
        - `utm_medium` string, nullable — UTM medium parameter from the visit URL
        - `utm_campaign` string, nullable — UTM campaign parameter from the visit URL
        - `utm_term` string, nullable — UTM term parameter from the visit URL
        - `utm_content` string, nullable — UTM content parameter from the visit URL
        - `ip` string, nullable — IP address of the visitor
        - `user_agent` string, nullable — User agent string from the visitor's browser
        - `referrer` string, nullable — HTTP referrer URL
        - `referring_domain` string, nullable — Domain extracted from the referrer URL
        - `landing_page` string, nullable — The first page URL visited in this session
        - `browser` string, nullable — Browser name detected from user agent
        - `os` string, nullable — Operating system detected from user agent
        - `device_type` string, nullable — Device type (e.g., desktop, mobile, tablet)
        - `started_at` string, date-time, nullable — Timestamp when the visit session started
        - `created_at` string, date-time — Timestamp when the visit record was created
        - `updated_at` string, date-time — Timestamp when the visit record was last updated
      - `last_visit` VisitAttributes — Visit tracking information including UTM parameters and device data
        - `uuid` string — Unique identifier for the visit
        - `utm_source` string, nullable — UTM source parameter from the visit URL
        - `utm_medium` string, nullable — UTM medium parameter from the visit URL
        - `utm_campaign` string, nullable — UTM campaign parameter from the visit URL
        - `utm_term` string, nullable — UTM term parameter from the visit URL
        - `utm_content` string, nullable — UTM content parameter from the visit URL
        - `ip` string, nullable — IP address of the visitor
        - `user_agent` string, nullable — User agent string from the visitor's browser
        - `referrer` string, nullable — HTTP referrer URL
        - `referring_domain` string, nullable — Domain extracted from the referrer URL
        - `landing_page` string, nullable — The first page URL visited in this session
        - `browser` string, nullable — Browser name detected from user agent
        - `os` string, nullable — Operating system detected from user agent
        - `device_type` string, nullable — Device type (e.g., desktop, mobile, tablet)
        - `started_at` string, date-time, nullable — Timestamp when the visit session started
        - `created_at` string, date-time — Timestamp when the visit record was created
        - `updated_at` string, date-time — Timestamp when the visit record was last updated
      - `last_visit_with_utm` VisitAttributes — Visit tracking information including UTM parameters and device data
        - `uuid` string — Unique identifier for the visit
        - `utm_source` string, nullable — UTM source parameter from the visit URL
        - `utm_medium` string, nullable — UTM medium parameter from the visit URL
        - `utm_campaign` string, nullable — UTM campaign parameter from the visit URL
        - `utm_term` string, nullable — UTM term parameter from the visit URL
        - `utm_content` string, nullable — UTM content parameter from the visit URL
        - `ip` string, nullable — IP address of the visitor
        - `user_agent` string, nullable — User agent string from the visitor's browser
        - `referrer` string, nullable — HTTP referrer URL
        - `referring_domain` string, nullable — Domain extracted from the referrer URL
        - `landing_page` string, nullable — The first page URL visited in this session
        - `browser` string, nullable — Browser name detected from user agent
        - `os` string, nullable — Operating system detected from user agent
        - `device_type` string, nullable — Device type (e.g., desktop, mobile, tablet)
        - `started_at` string, date-time, nullable — Timestamp when the visit session started
        - `created_at` string, date-time — Timestamp when the visit record was created
        - `updated_at` string, date-time — Timestamp when the visit record was last updated
  - `assignee_id` string, nullable — The ID of the Team-`Membership` to whom the opportunity is assigned.
  - `notes` object[], nullable — Notes
    - `id` integer — Note ID
    - `public_id` string, nullable — Note public ID
    - `content` string — Content
    - `created_by_id` integer, nullable — The ID of the Team-`Membership` that created the note. For notes created via the API, this defaults to the ClickFunnels API default User.
    - `created_at` string, date-time, nullable — Note creation date
    - `updated_at` string, date-time, nullable — Note last updated date

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found

---

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