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

# PublicApiUpdateDeal

> PATCH /api/v1/organizations/{orgId}/workspaces/{wsId}/deals/{dealId}

Use this endpoint through the Developer API or the matching `firstsales` CLI command when available. Responses use the stable FirstSales public error envelope.


## OpenAPI

````yaml PATCH /api/v1/organizations/{orgId}/workspaces/{wsId}/deals/{dealId}
openapi: 3.1.0
info:
  title: FirstSales Developer API
  version: 1.0.0
  description: >-
    Public v1 developer API for FirstSales.io. Generated from live step
    definitions — do not hand-edit.
servers:
  - url: https://sandbox.api.app.firstsales.io
  - url: https://api.app.firstsales.io
security:
  - bearerAuth: []
tags:
  - name: Activities
  - name: Alerts
  - name: API Keys
  - name: Authentication
  - name: Billing
  - name: Campaigns
  - name: Companies
  - name: Connectors
  - name: Contacts
  - name: Copilot
  - name: Dashboard
  - name: Deals
  - name: Email Authentication
  - name: Inbox
  - name: Knowledge Bases
  - name: Learning
  - name: Offerings
  - name: Organizations
  - name: Sequence Library
  - name: Team
  - name: Tracking Domains
  - name: Warmup
paths:
  /api/v1/organizations/{orgId}/workspaces/{wsId}/deals/{dealId}:
    patch:
      tags:
        - Deals
      summary: PublicApiUpdateDeal
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdDealsDealId
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: dealId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contactId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                companyId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                value:
                  type: number
                  minimum: 0
                currency:
                  type: string
                  minLength: 1
                  maxLength: 10
                expectedClose:
                  type: string
                  format: date-time
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                ownerId:
                  type: string
                  minLength: 1
                labels:
                  maxItems: 20
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 50
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
            - requestId
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Legacy compatibility bearer scheme for generated consumers.

````