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

# Update Opportunity

> Update opportunity fields. Moving to a new pipeline auto-assigns the first stage. If `status` is omitted while `pipeline_id` or `stage_id` change, status is re-derived from the new stage.



## OpenAPI

````yaml PATCH /crm/opportunities/{opportunity_id}/
openapi: 3.1.0
info:
  title: Outbox AI API
  description: API for managing AI agents (chatbots and voicebots) on the Outbox platform
  version: 1.0.0
servers:
  - url: https://api.getoutbox.ai
security: []
paths:
  /crm/opportunities/{opportunity_id}/:
    patch:
      tags:
        - crm
      summary: Update Opportunity
      description: >-
        Update opportunity fields. Moving to a new pipeline auto-assigns the
        first stage. If `status` is omitted while `pipeline_id` or `stage_id`
        change, status is re-derived from the new stage.
      operationId: crm_opportunities_partial_update
      parameters:
        - in: path
          name: opportunity_id
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedOpportunityUpdateRequestRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedOpportunityUpdateRequestRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedOpportunityUpdateRequestRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Updated opportunity.
        '400':
          description: >-
            Empty name, invalid `value`/`score`/`status`, or pipeline has no
            stages.
        '404':
          description: Opportunity, pipeline, stage, or contact not found.
      security:
        - jwtAuth: []
        - {}
components:
  schemas:
    PatchedOpportunityUpdateRequestRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        pipeline_id:
          type: string
          format: uuid
        stage_id:
          type: string
          format: uuid
        contact_id:
          type: string
          format: uuid
          nullable: true
          description: Pass null to unlink the contact.
        status:
          $ref: '#/components/schemas/Status1c7Enum'
        score:
          type: integer
          nullable: true
        value:
          type: string
          format: decimal
          pattern: ^-?\d{0,16}(?:\.\d{0,2})?$
          nullable: true
        notes:
          type: string
    Status1c7Enum:
      enum:
        - open
        - won
        - lost
      type: string
      description: |-
        * `open` - open
        * `won` - won
        * `lost` - lost
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````