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

# Upload new contract version

> Creates a new contract version on the contract from a previously uploaded file. First call `POST /files/upload-url` to obtain a pre-signed URL, `PUT` the file body to S3, then call this endpoint with the returned `key`.



## OpenAPI

````yaml /openapi-2025-01-29.alpha.json post /contracts/{id}/versions
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:
  /contracts/{id}/versions:
    post:
      tags:
        - Contracts
      summary: Upload new contract version
      description: >-
        Creates a new contract version on the contract from a previously
        uploaded file. First call `POST /files/upload-url` to obtain a
        pre-signed URL, `PUT` the file body to S3, then call this endpoint with
        the returned `key`.
      operationId: ContractController_createVersion
      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/ContractCreateVersionDto'
      responses:
        '201':
          description: New contract version created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractVersionResponseDto'
        '401':
          description: Unauthorized - Invalid or missing API key
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Contract or previous document not found
        '429':
          description: Too Many Requests - Rate limit exceeded
      security:
        - X-API-KEY: []
components:
  schemas:
    ContractCreateVersionDto:
      type: object
      properties:
        key:
          type: string
          description: Storage key returned by `POST /files/upload-url`.
          example: >-
            signedFiles/550e8400-e29b-41d4-a716-446655440000/files/b3b7bd7b-85f9-49e7-843d-71f656df5ca5
        name:
          type: string
          description: Original filename of the uploaded file, including extension.
          example: amendment-v2.docx
        contentType:
          type: string
          description: MIME content type of the uploaded file.
          example: application/pdf
      required:
        - key
        - name
        - contentType
    ContractVersionResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the contract version.
          example: 550e8400-e29b-41d4-a716-446655440000
        contractId:
          type: string
          description: The contract this contract version belongs to.
          example: 550e8400-e29b-41d4-a716-446655440010
        version:
          type: number
          description: Version number within the contract.
          example: 3
        status:
          type: string
          description: Current status of the contract version.
          enum:
            - draft
            - sent
            - negotiation
            - accepted
            - reviewing
            - reviewedByExternalParty
            - signed
          example: draft
        contentType:
          type: string
          description: MIME content type of the contract version content.
          nullable: true
          example: application/pdf
        createdAt:
          format: date-time
          type: string
          description: >-
            Time at which the contract version was created. Formatted as an ISO
            8601 date-time string.
          example: '2024-01-15T10:30:00.000Z'
      required:
        - id
        - contractId
        - version
        - status
        - contentType
        - createdAt
  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

````