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

# Update an opportunity

A potential business deal within a company, typically with an associated revenue value and sales details like stage, owner, probability, and expected close date.


## OpenAPI

````yaml openapi.json PATCH /opportunities/{id}
openapi: 3.1.0
info:
  title: Ruddr API
  version: '1.0'
  license:
    name: Proprietary
    url: https://www.ruddr.com/master-subscription-agreement
servers:
  - url: https://www.ruddr.io/api/workspace
security:
  - bearerAuth: []
tags:
  - name: Allocations
    description: Manage resource allocations for scheduling team members to projects.
  - name: Availability Periods
    description: Manage member availability periods for capacity planning.
  - name: Business Units
    description: >-
      Manage business units for organizing invoice settings and grouping clients
      and projects.
  - name: Client Roles
    description: Manage client roles and their billing terms.
  - name: Client Tags
    description: Manage tags for categorizing clients.
  - name: Clients
    description: Manage clients and their billing settings.
  - name: Companies
    description: Manage companies in the CRM pipeline.
  - name: Company Spend Tiers
    description: Manage spend tier classifications for companies.
  - name: Company Types
    description: Manage type classifications for companies.
  - name: Contact Tags
    description: Manage tags for categorizing contacts.
  - name: Contacts
    description: Manage contacts associated with clients, companies, and opportunities.
  - name: Cost Periods
    description: Manage member cost rate periods for profitability tracking.
  - name: Credit Notes
    description: View credit notes issued against invoices.
  - name: Disciplines
    description: Manage disciplines for classifying member skill areas.
  - name: Exchange Rate
    description: Get exchange rates for multi-currency workspaces.
  - name: Exchange Rate Periods
    description: Manage custom exchange rate periods for currency conversion.
  - name: Expense Categories
    description: Manage expense categories for tracking and reporting.
  - name: Expense Items
    description: Manage individual expense line items.
  - name: Expense Reports
    description: Manage expense reports submitted by members.
  - name: Holiday Schedules
    description: Manage holiday schedules for capacity and availability planning.
  - name: Holidays
    description: Manage individual holidays within holiday schedules.
  - name: Industries
    description: Manage industry classifications for clients and companies.
  - name: Invoice Items
    description: Manage invoice line item types for billing.
  - name: Invoices
    description: View invoices and their line items.
  - name: Job Titles
    description: Manage job title classifications for members.
  - name: Locations
    description: Manage office locations for members and projects.
  - name: Member Certifications
    description: Manage certification types that can be assigned to members.
  - name: Member Levels
    description: Manage member level classifications for career tracking.
  - name: Member Tags
    description: Manage tags for categorizing members.
  - name: Members
    description: Manage workspace members and their profiles.
  - name: Opportunities
    description: Manage sales opportunities in the CRM pipeline.
  - name: Opportunity Pipelines
    description: Manage pipelines for tracking opportunity stages.
  - name: Opportunity Lead Sources
    description: Manage lead source classifications for opportunities.
  - name: Opportunity Stages
    description: Manage pipeline stage definitions for opportunities.
  - name: Opportunity Tags
    description: Manage tags for categorizing opportunities.
  - name: Opportunity Types
    description: Manage type classifications for opportunities.
  - name: Payment Methods
    description: Manage payment method options for invoices.
  - name: Payments
    description: View payments received against invoices.
  - name: Pipeline Activities
    description: >-
      Manage pipeline activities associated with companies, contacts, members,
      and opportunities.
  - name: Pipeline Activity Types
    description: Manage activity type classifications for pipeline activities.
  - name: Practices
    description: Manage practice area classifications for organizing projects and members.
  - name: Project Budget Expenses
    description: Manage expense budget line items on projects.
  - name: Project Budget Other Items
    description: Manage other budget line items on projects.
  - name: Project Budget Product Items
    description: Manage product budget line items on projects.
  - name: Project Budget Service Items
    description: Manage additional service budget line items on projects.
  - name: Project Expenses
    description: Manage project-level expense line items.
  - name: Project Groups
    description: View project groups for organizing related projects.
  - name: Project Health Reports
    description: Manage project health status reports.
  - name: Project Invoice Milestones
    description: Manage invoice milestones for fixed-fee project billing.
  - name: Project Members
    description: Manage team member assignments on projects.
  - name: Project Monthly Budget Expenses
    description: Manage monthly expense budget line items on projects.
  - name: Project Monthly Budget Other Items
    description: Manage monthly other budget line items on projects.
  - name: Project Monthly Budget Product Items
    description: Manage monthly product budget line items on projects.
  - name: Project Monthly Budget Service Items
    description: Manage monthly additional service budget line items on projects.
  - name: Project Other Items
    description: Manage project-level other item line items.
  - name: Project Product Items
    description: Manage project-level product line items.
  - name: Project Revenue Adjustments
    description: Manage earned revenue adjustments for projects.
  - name: Project Revenue Recognition Entries
    description: Manage revenue recognition entries for projects.
  - name: Project Roles
    description: Manage roles defined on projects for billing and staffing.
  - name: Project Service Items
    description: Manage project-level additional service line items.
  - name: Project Tags
    description: Manage tags for categorizing projects.
  - name: Project Tasks
    description: Manage tasks on projects for time tracking and planning.
  - name: Project Types
    description: Manage type classifications for projects.
  - name: Projects
    description: Manage projects and their settings.
  - name: Resource Placeholders
    description: Manage placeholder resources for allocation planning.
  - name: Security Roles
    description: View security roles for assigning member permissions.
  - name: Skills
    description: Manage skill classifications for members and resource planning.
  - name: Task Categories
    description: Manage task category classifications for project tasks.
  - name: Task Tags
    description: Manage tags for categorizing project tasks.
  - name: Task Templates
    description: Manage reusable task templates for projects.
  - name: Tax Rates
    description: Manage tax rates for invoicing.
  - name: Time Entries
    description: Manage time entries for tracking hours on projects.
  - name: Time Off Types
    description: Manage time off type classifications.
  - name: Timesheet Attestations
    description: Manage attestation statements members sign when submitting timesheets.
  - name: Timesheets
    description: Manage timesheet submissions for tracking hours across a period.
  - name: Utilization Target Periods
    description: Manage member utilization target periods for capacity planning.
  - name: Workspace Roles
    description: Manage workspace-level roles for billing rate configuration.
paths:
  /opportunities/{id}:
    patch:
      tags:
        - Opportunities
      summary: Update an opportunity
      operationId: update-an-opportunity
      parameters:
        - name: id
          in: path
          description: The opportunity `uuid`
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the opportunity. Max 255 characters.
                description:
                  type:
                    - string
                    - 'null'
                  description: A description of the opportunity. Max 5000 characters.
                nextSteps:
                  type:
                    - string
                    - 'null'
                  description: The next steps for the opportunity. Max 255 characters.
                amount:
                  type:
                    - number
                    - 'null'
                  description: The monetary amount of the opportunity.
                probability:
                  type: number
                  description: >-
                    The probability of the opportunity closing successfully.
                    Accepts a value of 0 to 1 using a maximum of four decimals.
                priorityId:
                  type:
                    - string
                    - 'null'
                  description: The priority of the opportunity.
                  enum:
                    - high
                    - medium
                    - low
                openDate:
                  type:
                    - string
                    - 'null'
                  format: date
                  description: The open date of the opportunity in `YYYY-MM-DD` format.
                closeDate:
                  type:
                    - string
                    - 'null'
                  format: date
                  description: >-
                    The expected close date of the opportunity in `YYYY-MM-DD`
                    format.
                currency:
                  type: string
                  description: The 3-letter currency code for the opportunity.
                cloudFolderUrl:
                  type:
                    - string
                    - 'null'
                  description: >-
                    A URL to a cloud folder associated with the opportunity. Max
                    1024 characters.
                ownerId:
                  type:
                    - string
                    - 'null'
                  description: The member ID (`uuid`) of the owner of the opportunity.
                opportunityLeadSourceId:
                  type:
                    - string
                    - 'null'
                  description: The ID (`uuid`) of the lead source for the opportunity.
                opportunityTypeId:
                  type:
                    - string
                    - 'null'
                  description: The ID (`uuid`) of the opportunity type.
                tagIds:
                  type: array
                  description: >-
                    A list of opportunity tag IDs (`uuid`) to associate with the
                    opportunity.
                  items:
                    type: string
                practiceId:
                  type:
                    - string
                    - 'null'
                  description: >-
                    The ID (`uuid`) of the practice associated with the
                    opportunity.
                companyId:
                  type: string
                  description: >-
                    The ID (`uuid`) of the company associated with the
                    opportunity.
                projects:
                  type: array
                  description: A list of projects to associate with the opportunity.
                  items:
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        type: string
                        description: The ID (`uuid`) of the project.
                      amount:
                        type:
                          - number
                          - 'null'
                        description: >-
                          The amount allocated to this project. The total across
                          all projects must not exceed the opportunity `amount`.
                opportunityStageId:
                  type: string
                  description: The ID (`uuid`) of the opportunity stage.
                opportunityPipelineId:
                  type: string
                  description: The ID (`uuid`) of the opportunity pipeline.
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Opportunity'
              examples:
                Result:
                  value:
                    id: 6739fb0c-d986-4eee-a427-3fbd68f66f76
                    name: Acme Corp - Mobile App
                    description: Proposal for a new mobile application.
                    nextSteps: Follow up with client on proposal.
                    amount: 50000
                    probability: 0.75
                    priorityId: high
                    createdAt: '2025-01-15T20:47:03.284Z'
                    openDate: '2025-01-15'
                    closeDate: '2025-06-30'
                    modifiedAt: '2025-01-15T20:47:03.284Z'
                    currency: USD
                    cloudFolderUrl: https://drive.google.com/drive/folders/abc123
                    weightedAmount: 37500
                    owner:
                      id: 94bc043d-95cb-4f4b-8a9f-8e74cd3dd0db
                      name: John Davis
                    opportunityLeadSource:
                      id: 1df022a4-0e91-463f-a88c-b6149c322abd
                      name: Referral
                    opportunityType:
                      id: 8ab56d67-b2f1-40b0-be44-f99556b4aae9
                      name: New Business
                    tags:
                      - id: dbdf3703-1fa6-419c-957e-ff427b39d1e6
                        name: Enterprise
                    practice:
                      id: 65935388-b0a1-49ed-97e0-6f0d909af05e
                      name: Consulting
                    company:
                      id: a961cced-0689-4951-9929-9760057618fd
                      name: Acme Corp
                      client:
                        id: aa39afdb-e168-4956-b061-41c7c62e8c2e
                        key: acme-corp
                        name: Acme Corp
                    projects:
                      - id: 8274644a-2b50-46ac-b84d-ade1cefa3b4f
                        name: Mobile App Development
                        amount: 50000
                    opportunityStage:
                      id: 5fa87e8d-a60f-402e-b9dc-2fd33626cbd9
                      name: Proposal
                      statusId: open
                    opportunityPipeline:
                      id: b9c85ac3-1a1d-4f31-a0c5-6e7d3d8ee0b2
                      name: Sales
                    timeSpent: 120
                    salesforceId: 0060b00000BkFxAAAV
                    hubspotId: '12345678'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
              examples:
                InvalidId:
                  value:
                    status: 400
                    message: Parameter 'id' is not a valid UUID.
                Validation:
                  value:
                    status: 400
                    message: >-
                      There was a problem processing your request. See errors
                      for more details.
                    errors:
                      - '''name'' must be a string'
                InvalidData:
                  value:
                    status: 400
                    message: >-
                      'ownerId' 'd82a874c-e87e-432e-a4c3-9d8636725414' does not
                      match a valid member.
                SyncedPipeline:
                  value:
                    status: 400
                    message: >-
                      'opportunityPipelineId' references a synced pipeline that
                      cannot be used directly.
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Feature:
                  value:
                    status: 403
                    message: Feature 'Pipeline' is not enabled.
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                NotFound:
                  value:
                    status: 404
                    message: >-
                      Object with id 'b7e2c4f1-8a3d-4e5f-9c6b-1d2e3f4a5b6c' not
                      found.
        '409':
          description: '409'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Duplicate:
                  value:
                    status: 409
                    message: An Opportunity with the same name already exists.
      deprecated: false
components:
  schemas:
    Opportunity:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the object.
        name:
          type: string
          description: The name of the opportunity.
        description:
          type:
            - string
            - 'null'
          description: A description of the opportunity.
        nextSteps:
          type:
            - string
            - 'null'
          description: The next steps for the opportunity.
        amount:
          type:
            - number
            - 'null'
          description: The monetary amount of the opportunity.
        probability:
          type: number
          description: >-
            The probability of the opportunity closing successfully, expressed
            as a decimal between 0 and 1.
        priorityId:
          type:
            - string
            - 'null'
          description: The priority level of the opportunity.
          enum:
            - high
            - medium
            - low
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the object was created.
        openDate:
          type: string
          format: date
          description: The date the opportunity was opened. Will be in the form YYYY-MM-DD.
        closeDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            The expected close date for the opportunity. Will be in the form
            YYYY-MM-DD.
        modifiedAt:
          type: string
          format: date-time
          description: The timestamp when the object was last modified.
        currency:
          type: string
          description: The 3-letter currency code for the opportunity.
        cloudFolderUrl:
          type:
            - string
            - 'null'
          description: A URL to a cloud folder associated with the opportunity.
        weightedAmount:
          type:
            - number
            - 'null'
          description: >-
            The probability-weighted amount, calculated as `amount` multiplied
            by `probability`.
        owner:
          type:
            - object
            - 'null'
          description: The owner of the opportunity.
          properties:
            id:
              type: string
              description: The unique identifier for the object.
            name:
              type: string
              description: The name of the member.
        opportunityLeadSource:
          type:
            - object
            - 'null'
          description: The lead source for the opportunity.
          properties:
            id:
              type: string
              description: The unique identifier for the object.
            name:
              type: string
              description: The name of the lead source.
        opportunityType:
          type:
            - object
            - 'null'
          description: The type of the opportunity.
          properties:
            id:
              type: string
              description: The unique identifier for the object.
            name:
              type: string
              description: The name of the opportunity type.
        tags:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: The unique identifier for the object.
              name:
                type: string
                description: The name of the tag.
          description: The tags associated with the opportunity.
        practice:
          type:
            - object
            - 'null'
          description: The practice associated with the opportunity.
          properties:
            id:
              type: string
              description: The unique identifier for the object.
            name:
              type: string
              description: The name of the practice.
        company:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier for the object.
            name:
              type: string
              description: The name of the company.
            client:
              oneOf:
                - type: object
                  properties:
                    id:
                      type: string
                      description: The unique identifier for the object.
                    key:
                      type: string
                      description: The client key.
                    name:
                      type: string
                      description: The name of the client.
                - type: 'null'
              description: The client associated with the company.
          description: The company associated with the opportunity.
        projects:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: The unique identifier for the object.
              name:
                type: string
                description: The name of the project.
              amount:
                type:
                  - number
                  - 'null'
                description: The amount allocated to this project from the opportunity.
          description: The projects associated with the opportunity.
        opportunityStage:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier for the object.
            name:
              type: string
              description: The name of the opportunity stage.
            statusId:
              type: string
              enum:
                - open
                - won
                - lost
              description: The status of the opportunity stage.
          description: The current stage of the opportunity.
        opportunityPipeline:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier for the object.
            name:
              type: string
              description: The name of the pipeline.
          description: The pipeline the opportunity belongs to.
        timeSpent:
          type: integer
          description: Total time spent in minutes across all pipeline activities.
        salesforceId:
          type:
            - string
            - 'null'
          description: >-
            The Salesforce opportunity ID. Will be `null` unless synced via the
            Salesforce integration.
        hubspotId:
          type:
            - string
            - 'null'
          description: >-
            The HubSpot deal ID. Will be `null` unless synced via the HubSpot
            integration.
    ValidationErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: The HTTP status code.
        message:
          type: string
          description: A human-readable error message.
        errors:
          type: array
          description: A list of validation error messages.
          items:
            type: string
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: The HTTP status code.
        message:
          type: string
          description: A human-readable error message.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````