> ## 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.

# Upsert contract records

> Creates or updates contract records for a given custom object. Requires contract membership.



## OpenAPI

````yaml /openapi-2025-01-29.alpha.json put /custom-objects/{customObjectId}/contract/{contractId}/records
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-29.alpha


    This documentation is for API version `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-29.alpha"
    ```
  version: 2025-01-29.alpha
  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:
  /custom-objects/{customObjectId}/contract/{contractId}/records:
    put:
      tags:
        - Custom Objects
      summary: Upsert contract records
      description: >-
        Creates or updates contract records for a given custom object. Requires
        contract membership.
      operationId: CustomObjectController_upsertContractRecords
      parameters:
        - name: customObjectId
          required: true
          in: path
          description: The unique identifier (UUID) of the custom object
          schema:
            example: 550e8400-e29b-41d4-a716-446655440000
            type: string
        - name: contractId
          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/UpsertContractRecordsDto'
      responses:
        '204':
          description: Contract records upserted successfully
        '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:
    UpsertContractRecordsDto:
      type: object
      properties:
        records:
          description: The records to create or update.
          example:
            - id: null
              fromCatalogRecordId: null
              fields:
                - smartFieldId: 550e8400-e29b-41d4-a716-446655440000
                  value: INV-2026-001
          type: array
          items:
            $ref: '#/components/schemas/UpsertContractRecordItemDto'
      required:
        - records
    UpsertContractRecordItemDto:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier of an existing record to update. Null for new
            records.
          format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
          nullable: true
        fromCatalogRecordId:
          type: string
          description: The catalog record id this record was created from.
          format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
          nullable: true
        fields:
          description: The field values for this record.
          example:
            - smartFieldId: 550e8400-e29b-41d4-a716-446655440000
              value: INV-2026-001
          type: array
          items:
            $ref: '#/components/schemas/UpsertContractRecordFieldDto'
      required:
        - fields
    UpsertContractRecordFieldDto:
      type: object
      properties:
        smartFieldId:
          type: string
          description: The unique identifier of the smart field.
          example: 550e8400-e29b-41d4-a716-446655440000
        value:
          type: string
          description: The value of the field. Null to clear the field.
          example: INV-2026-001
          nullable: true
      required:
        - smartFieldId
  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

````