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

# Update contract

> Updates a contract with the provided fields. Only the fields provided in the request body will be updated.



## OpenAPI

````yaml /openapi-2025-01-15.init.json patch /contracts/{id}
openapi: 3.0.0
info:
  title: Tomorro API
  description: >
    The Tomorro Public API enables you to programmatically manage contracts,
    members, and counterparties. Build powerful integrations that automate your
    contract management workflows.


    ## API Version: 2025-01-15.init


    This documentation is for API version `2025-01-15.init`.


    > **Warning:** This version is deprecated. This version is deprecated.
    Please upgrade to 2025-01-29.alpha.


    ### Using this version

    ```

    curl -X GET https://api.tomorro.com/members \
      -H "x-api-key: YOUR_API_KEY" \
      -H "tomorro-version: 2025-01-15.init"
    ```
  version: 2025-01-15.init
  contact: {}
servers:
  - url: https://api.tomorro.com/v2
    description: Production
  - url: https://api.demo.tomorro.com/v2
    description: Demo
  - url: http://localhost:3015
    description: Local Development
security: []
tags: []
paths:
  /contracts/{id}:
    patch:
      tags:
        - Contracts
      summary: Update contract
      description: >-
        Updates a contract with the provided fields. Only the fields provided in
        the request body will be updated.
      operationId: ContractController_updateContract
      parameters:
        - name: id
          required: true
          in: path
          description: The unique identifier (UUID) of the contract
          schema:
            example: 550e8400-e29b-41d4-a716-446655440000
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractUpdateDto'
      responses:
        '200':
          description: Contract updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractResponseDto'
        '401':
          description: Unauthorized - Invalid or missing API key
        '403':
          description: Forbidden - Insufficient permissions
        '429':
          description: Too Many Requests - Rate limit exceeded
      security:
        - X-API-KEY: []
components:
  schemas:
    ContractUpdateDto:
      type: object
      properties:
        name:
          type: string
          description: The name or title of the contract.
          example: Service Agreement - Acme Corp
        status:
          type: string
          description: |-
            The status of the contract.

            - `draft`: The contract is being created or edited.
            - `negotiating`: The contract is being reviewed with counterparties.
            - `canceled`: The contract has been canceled.
          enum:
            - draft
            - negotiating
            - signing
            - signed
            - canceled
          example: draft
        folderId:
          type: string
          description: ID of the folder to move the contract to.
          example: 550e8400-e29b-41d4-a716-446655440005
        counterparty:
          description: >-
            Counterparty for the contract. Can reference an existing
            counterparty by ID or update with a new name.
          example:
            name: Acme Corporation
          allOf:
            - $ref: '#/components/schemas/UpdateCounterpartyDto'
        signatureDate:
          type: string
          description: >-
            The date when the contract was signed. Formatted as an ISO 8601
            date-time string.
          format: date-time
          nullable: true
          example: '2024-06-01T00:00:00.000Z'
        signatories:
          description: List of internal and external signatories for the contract
          additionalProperties: false
          example:
            internalSignatoryMemberIds:
              - mem_550e8400-e29b-41d4-a716-446655440004
            externalSignatoryEmailList:
              - signatory@example.com
          allOf:
            - $ref: '#/components/schemas/UpdateSignatoriesDto'
        fields:
          description: >-
            Field values to set on the contract. Use field IDs and values
            (option labels for select fields).
          example:
            - fieldId: 550e8400-e29b-41d4-a716-446655440008
              value: Technology
          type: array
          items:
            $ref: '#/components/schemas/UpdateFieldDto'
        contractMembersIds:
          description: List of members to add to the contract
          example:
            - 550e8400-e29b-41d4-a716-446655440004
          type: array
          items:
            type: string
        contractGuestsEmails:
          description: List of guests to add to the contract
          example:
            - guest@example.com
            - guest2@example.com
          type: array
          items:
            type: string
        integration:
          description: >-
            Integration parameters. When provided, field values will be resolved
            using integration-specific option mappings.
          additionalProperties: false
          example:
            type: salesforce
          allOf:
            - $ref: '#/components/schemas/UpdateIntegrationDto'
    ContractResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the contract.
          example: ctr_550e8400-e29b-41d4-a716-446655440000
        name:
          type: string
          description: The name or title of the contract.
          example: Service Agreement - Acme Corp
        status:
          type: string
          description: |-
            The current status of the contract.

            - `draft`: The contract is being created or edited.
            - `negotiating`: The contract is being reviewed with counterparties.
            - `signing`: The contract is in the signature process.
            - `signed`: All parties have signed the contract.
            - `canceled`: The contract has been canceled.
          example: draft
        counterparty:
          description: The counterparty associated with this contract.
          nullable: true
          example:
            id: 550e8400-e29b-41d4-a716-446655440001
            name: Acme Corporation
          type: object
          allOf:
            - $ref: '#/components/schemas/ContractCounterpartyDto'
        contractType:
          description: The type of  the contract, it is composed of many templates.
          nullable: true
          example:
            id: 550e8400-e29b-41d4-a716-446655440002
            name: Service Agreement
          type: object
          allOf:
            - $ref: '#/components/schemas/ContractTypeDto'
        templateId:
          type: string
          description: The template used to create this contract.
          nullable: true
          example: 550e8400-e29b-41d4-a716-446655440003
        author:
          description: The member who created this contract.
          example:
            id: 550e8400-e29b-41d4-a716-446655440004
            email: john.doe@example.com
          allOf:
            - $ref: '#/components/schemas/ContractMemberDto'
        fields:
          description: The fields associated with this contract.
          example:
            - attributeDefinitionId: 123e4567-e89b-12d3-a456-426614174000
              name: Department
              value: John Doe
          type: array
          items:
            $ref: '#/components/schemas/ContractFieldsDto'
        signatories:
          description: The signatories associated with this contract.
          example:
            - id: sig_550e8400-e29b-41d4-a716-446655440005
              name: John Doe
              email: john.doe@example.com
              type: member
          type: array
          items:
            $ref: '#/components/schemas/ContractSignatoryDto'
        integration:
          description: >-
            The third-party system this contract is linked to, when it was
            created via an integration (currently Salesforce or HubSpot). The
            shape mirrors the `integration` payload accepted on `POST
            /contracts`, so you can use this to look up the originating record
            in your CRM. `null` when the contract has no external link or was
            created from the Tomorro web app.
          nullable: true
          example:
            type: salesforce
            externalId: sf-123456
            externalEntity: Opportunity
            externalUrl: https://my-crm.example.com/opportunities/sf-123456
          type: object
          allOf:
            - $ref: '#/components/schemas/ContractIntegrationDto'
        contractMembers:
          description: The list of participants with this contract.
          example:
            - id: 550e8400-e29b-41d4-a716-446655440004
              email: john.doe@example.com
          type: array
          items:
            $ref: '#/components/schemas/ContractMemberDto'
        createdAt:
          format: date-time
          type: string
          description: >-
            Time at which the contract was created. Formatted as an ISO 8601
            date-time string.
          example: '2024-01-15T10:30:00.000Z'
        updatedAt:
          format: date-time
          type: string
          description: >-
            Time at which the contract was last updated. Formatted as an ISO
            8601 date-time string.
          example: '2024-02-20T14:45:00.000Z'
      required:
        - id
        - name
        - status
        - counterparty
        - contractType
        - templateId
        - author
        - fields
        - signatories
        - integration
        - createdAt
        - updatedAt
    UpdateCounterpartyDto:
      type: object
      properties:
        id:
          type: string
          description: >-
            ID of an existing counterparty. If provided, the counterparty will
            be linked to the contract.
          example: 550e8400-e29b-41d4-a716-446655440001
        name:
          type: string
          description: Name of the counterparty. Required when creating a new counterparty.
          example: Acme Corporation
    UpdateSignatoriesDto:
      type: object
      properties:
        internalSignatoryMemberIds:
          description: List of internal signatories
          example:
            - 550e8400-e29b-41d4-a716-446655440004
          type: array
          items:
            type: string
        externalSignatoryEmailList:
          description: List of email addresses of the signatories
          example:
            - signatory@example.com
            - signatory2@example.com
          type: array
          items:
            type: string
    UpdateFieldDto:
      type: object
      properties:
        fieldId:
          type: string
          description: ID of the field to set
          example: 550e8400-e29b-41d4-a716-446655440000 or startAt
        value:
          type: string
          description: >-
            Value for the field. For select fields, use the option label. Use
            null to clear the field. Empty strings are accepted.
          example: Technology
          nullable: true
      required:
        - fieldId
        - value
    UpdateIntegrationDto:
      type: object
      properties:
        type:
          type: string
          description: >-
            Integration provider type. Used to resolve field values with
            integration-specific option mappings.
          enum:
            - api
            - app
            - outlook
            - gmail
            - zapier
            - salesforce
            - hubspot
            - import
            - generation
            - mailImport
          example: salesforce
      required:
        - type
    ContractCounterpartyDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the counterparty.
          example: cp_550e8400-e29b-41d4-a716-446655440001
        name:
          type: string
          description: The display name of the counterparty (company or individual name).
          example: Acme Corporation
      required:
        - id
        - name
    ContractTypeDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the contract type.
          example: type_550e8400-e29b-41d4-a716-446655440002
        name:
          type: string
          description: The name of the contract type.
          example: Service Agreement
          nullable: true
      required:
        - id
        - name
    ContractMemberDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the member.
          example: mem_550e8400-e29b-41d4-a716-446655440004
        email:
          type: string
          description: The email address of the member.
          example: john.doe@example.com
      required:
        - id
        - email
    ContractFieldsDto:
      type: object
      properties:
        attributeDefinitionId:
          type: string
          description: Unique identifier for the attribute definition.
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          description: The display name of the attribute definition.
          example: Department
        value:
          type: string
          description: The value of the attribute.
          example: Marketing
          nullable: true
      required:
        - attributeDefinitionId
        - name
        - value
    ContractSignatoryDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the signatory.
          example: sig_550e8400-e29b-41d4-a716-446655440005
        name:
          type: string
          description: The name of the signatory.
          example: John Doe
        email:
          type: string
          description: The email address of the signatory.
          example: john.doe@example.com
        type:
          type: string
          description: The type of the signatory.
          enum:
            - member
            - guest
            - external
          example: member
      required:
        - id
        - name
        - email
        - type
    ContractIntegrationDto:
      type: object
      properties:
        type:
          type: string
          description: >-
            The third-party system the contract is linked to. Currently one of
            `salesforce` or `hubspot`; new values may be added as Tomorro ships
            support for additional integrations.
          enum:
            - salesforce
            - hubspot
          example: salesforce
        externalId:
          type: string
          description: >-
            External identifier of the linked record in the third-party system
            (e.g. the Salesforce Opportunity ID).
          example: sf-123456
        externalEntity:
          type: string
          description: >-
            External entity type the contract is linked to (e.g. `Opportunity`
            for Salesforce, `Deal` for HubSpot).
          nullable: true
          example: Opportunity
        externalUrl:
          type: string
          description: >-
            Deep link to the linked record in the third-party system, when one
            is available.
          nullable: true
          example: https://my-crm.example.com/opportunities/sf-123456
      required:
        - type
        - externalId
        - externalEntity
        - externalUrl
  securitySchemes:
    X-API-KEY:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Get your key at
        https://app.tomorro.com/settings/integrations?integration=api-key

````