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

# Update deal

> Update an existing deal by its ID.

<Info>Replace `{your-subdomain}` with your workspace's subdomain. <br /> Learn how to find your subdomain in [Workspace subdomain](/getting-started/workspace-subdomain).</Info>


## OpenAPI

````yaml /bundled/deals.yaml PATCH /deals/{id}
openapi: 3.0.3
info:
  title: NeetoCRM Deals APIs
  version: 2.0.0
servers:
  - description: NeetoCRM APIs
    url: https://{your-subdomain}.neetocrm.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/getting-started/workspace-subdomain).
security: []
tags:
  - name: Deals
    description: APIs to manage deals in your workspace.
paths:
  /deals/{id}:
    patch:
      tags:
        - Deals
      summary: Update deal
      description: Update an existing deal by its ID.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - name: id
          in: path
          required: true
          description: >-
            The ID of the deal to update. You can get the deal `id` by listing
            all deals using our [List all deals](/api-reference/deals/list) API.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/deal_request'
      responses:
        '200':
          description: Deal updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deal_response'
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/getting-started/authentication) for more information.
      required: true
      schema:
        type: string
  schemas:
    deal_request:
      type: object
      properties:
        deal:
          type: object
          required:
            - name
          properties:
            name:
              type: string
              description: Deal name.
              example: Eve Enterprise Deal
            value:
              type: number
              description: Monetary value of the deal.
              example: 10000
            status:
              type: string
              enum:
                - in_progress
                - won
                - lost
              description: Deal status.
              example: in_progress
            owner_id:
              type: string
              description: Unique identifier of the owner.
              example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
            stage_id:
              type: string
              description: Stage ID.
              example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
            pipeline_id:
              type: string
              description: Pipeline ID.
              example: b2c3d4e5-f6a7-8901-bcde-f12345678901
            position:
              type: integer
              description: Position in pipeline.
              example: 1
            tag_ids:
              type: array
              items:
                type: string
              description: Array of tag IDs.
              example:
                - a1b2c3d4-e5f6-7890-abcd-ef1234567890
                - b2c3d4e5-f6a7-8901-bcde-f12345678901
    deal_response:
      type: object
      properties:
        deal:
          $ref: '#/components/schemas/deal'
      example:
        deal:
          id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          name: Eve Enterprise Deal
          status: in_progress
          value: 10000
          currency: USD
          price: $ 10000
          unique_number: D-001
          contact:
            id: c1d2e3f4-a5b6-7890-cdef-123456789012
            name: Eve
          company:
            id: d2e3f4a5-b6c7-8901-def0-234567890123
            name: Eve Corp
          owner: null
          pipeline: null
          stage: null
          tags: []
          created_at: '2025-03-15T10:30:00.000Z'
          updated_at: '2025-03-15T10:30:00.000Z'
    deal:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the deal.
        name:
          type: string
          description: Name of the deal.
        status:
          type: string
          enum:
            - in_progress
            - won
            - lost
          description: Current status of the deal.
        value:
          type: number
          description: Monetary value of the deal.
        currency:
          type: string
          description: Currency code for the deal value.
        price:
          type: string
          description: Formatted price string (e.g. "$ 10000").
        unique_number:
          type: string
          description: Auto-generated unique number for the deal.
        contact:
          type: object
          nullable: true
          description: Associated contact.
          properties:
            id:
              type: string
              description: Unique identifier of the contact.
            name:
              type: string
              description: Name of the contact.
        company:
          type: object
          nullable: true
          description: Associated company.
          properties:
            id:
              type: string
              description: Unique identifier of the company.
            name:
              type: string
              description: Name of the company.
        owner:
          type: string
          nullable: true
          description: Owner of the deal.
        pipeline:
          type: object
          nullable: true
          description: Pipeline the deal belongs to.
          properties:
            id:
              type: string
              description: Unique identifier of the pipeline.
            name:
              type: string
              description: Name of the pipeline.
        stage:
          type: object
          nullable: true
          description: Current stage of the deal within the pipeline.
          properties:
            id:
              type: string
              description: Unique identifier of the stage.
            name:
              type: string
              description: Name of the stage.
        tags:
          type: array
          items:
            $ref: '#/components/schemas/tag'
          description: Tags associated with the deal.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the deal was created.
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the deal was last updated.
    tag:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the tag.
        name:
          type: string
          description: Name of the tag.
        style:
          type: string
          description: Style/color of the tag.

````