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

# Atualizar Oportunidade

> Atualiza os atributos de oportunidade existente.



## OpenAPI

````yaml PUT /deals/{dealId}
openapi: 3.1.0
info:
  title: Pingback Connect API
  description: Public API v2 for managing contacts in Pingback Connect.
  version: 2.0.0
  license:
    name: MIT
servers:
  - url: https://connect.pingback.com/v2
security:
  - apiKeyAuth: []
tags:
  - name: Contacts
    description: >-
      Operations related to contact management, including creation, retrieval,
      update, deletion, and listing of contacts.
  - name: Deals
    description: >-
      Operations related to deals, including creation, update, retrieval,
      deletion, and listing of deals.
  - name: Segments
    description: >-
      Operations related to segmentation lists, including listing segments and
      associating or removing contacts from segments.
  - name: Notes
    description: Operations related to notes, including creation and listing notes.
  - name: Email Verification
    description: >-
      Operations related to email verification, including validating email
      addresses and returning verification results.
paths:
  /deals/{dealId}:
    put:
      tags:
        - Deals
      summary: Update deal
      description: Updates an existing deal.
      parameters:
        - $ref: '#/components/parameters/DeveloperMode'
        - $ref: '#/components/parameters/ApiKey'
        - name: dealId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealUpdate'
      responses:
        '200':
          description: Deal updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealUpdateResponse'
              examples:
                success:
                  value:
                    message: Deal updated
                    data:
                      id: ea8a2a47-2a05-4a43-b284-35df0ea46333
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Deal not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                deal_not_found:
                  summary: Deal not found
                  value:
                    error: Deal not found
                    requestId: 6795d530-07c4-43b6-8b85-dfc2cfceceb5
                    errorCode: DEAL_NOT_FOUND
        '409':
          description: Contact associated with a deal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                contact_associated_with_a_deal:
                  summary: Contact associated with a deal
                  value:
                    error: Contact associated with a deal
                    requestId: 6795d530-07c4-43b6-8b85-dfc2cfceceb5
                    errorCode: CONTACT_ASSOCIATED_WITH_A_DEAL
        '422':
          description: Deal ID is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                deal_id_is_necessary:
                  summary: Deal ID is missing
                  value:
                    error: Deal ID is missing
                    requestId: 6795d530-07c4-43b6-8b85-dfc2cfceceb5
                    errorCode: DEAL_ID_IS_NECESSARY
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    DeveloperMode:
      name: x-developer-mode
      in: header
      required: false
      schema:
        type: boolean
    ApiKey:
      name: x-api-key
      in: header
      required: true
      schema:
        type: string
  schemas:
    DealUpdate:
      type: object
      properties:
        contactId:
          type: string
          format: uuid
        stageId:
          type: string
          format: uuid
        attributes:
          type: object
          properties:
            pb_name:
              type: string
            pb_amount:
              type: string
            pb_closingDate:
              type: string
              format: date-time
          additionalProperties: false
    DealUpdateResponse:
      type: object
      properties:
        message:
          type: string
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
    Error:
      type: object
      required: []
      properties:
        error:
          type: string
          description: Error description
        requestId:
          type: string
          description: Request ID
        errorCode:
          type: string
          description: Error code
  responses:
    BadRequest:
      description: Request body missing or malformed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing_body:
              summary: Missing request body
              value:
                error: Body is necessary.
                requestId: 6795d530-07c4-43b6-8b85-dfc2cfceceb5
                errorCode: MISSING_BODY
    Forbidden:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            forbidden:
              summary: Access denied
              value:
                error: >-
                  User is not authorized to access this resource with an
                  explicit deny in an identity-based policy.
                requestId: 6795d530-07c4-43b6-8b85-dfc2cfceceb5
                errorCode: FORBIDDEN
    InternalServerError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            internal_error:
              summary: Internal server error
              value:
                error: An unexpected error occurred.
                requestId: 6795d530-07c4-43b6-8b85-dfc2cfceceb5
                errorCode: INTERNAL_SERVER_ERROR
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````