> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revyops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Opportunity

> Opportunities created here accept every field. Synced ones accept only custom_fields; edit the rest in the CRM. contact_ids and company_ids replace the current links. Fields: name (required on create), amount, currency (USD), stage, status_type (active/won/lost), stage_normalized, pipeline, confidence (0-100), value_period, dealtype, note, close_date (YYYY-MM-DD), lost_reason and lost_reason_class (only with status_type lost), contact_ids, company_ids, custom_fields. null clears a field.



## OpenAPI

````yaml PATCH /public/v2/opportunities/{opportunity_id}
openapi: 3.0.3
info:
  title: RevyOps API
  version: 1.0.0
servers:
  - url: https://app.revyops.com/api
security:
  - ApiKeyAuth: []
paths:
  /public/v2/opportunities/{opportunity_id}:
    patch:
      tags:
        - public
      description: >-
        Opportunities created here accept every field. Synced ones accept only
        custom_fields; edit the rest in the CRM. contact_ids and company_ids
        replace the current links. Fields: name (required on create), amount,
        currency (USD), stage, status_type (active/won/lost), stage_normalized,
        pipeline, confidence (0-100), value_period, dealtype, note, close_date
        (YYYY-MM-DD), lost_reason and lost_reason_class (only with status_type
        lost), contact_ids, company_ids, custom_fields. null clears a field.
      operationId: Update opportunity (v2)
      parameters:
        - in: path
          name: opportunity_id
          schema:
            type: integer
          required: true
      responses:
        '200':
          description: No response body
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.