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

# Create App Version and Start (v1)

> Compound endpoint that creates a new version and initiates a run of it in a single request. The version is always persisted; if the start initiation fails the response still returns the persisted version with a `warnings` array describing the failure and the caller can retry via the regular start endpoint.
Stop-previous: if a different version of the same App is already running, it is stopped before the new version starts (uniform one-running-instance-per-App invariant; not draft-specific).
Draft-specific defaulting: when the parent App is a draft AND a previous running version exists on it, omitted content reference fields (`dfsCommitId`, `gitRef`, `entryScript`, `environmentId`, `environmentRevisionId`, `hardwareTierId`, `externalVolumeMountIds`, `netAppVolumeIds`) default to the previous running version's values. On the very first call (no previous running version) all required content fields must be supplied.
Governance only starts when a draft is published.




## OpenAPI

````yaml /api-specs/cloud/public-api.yaml post /api/apps/v1/apps/{appId}/versions/createAndStart
openapi: 3.0.3
info:
  title: Domino Public API
  description: Domino Public API Endpoints
  version: cloud
servers: []
security:
  - DominoApiKey: []
  - BearerAuthentication: []
tags:
  - name: AIGateway
  - name: AppInstances
  - name: AppVersions
  - name: Apps
  - name: AsyncPredictions
  - name: AuditTrail
  - name: BillingTag
  - name: BillingTagSettings
  - name: Cost
  - name: CustomMetrics
  - name: DataSource
  - name: DatasetRw
  - name: DeploymentTargets
  - name: Environments
  - name: Extensions
  - name: GenAI
  - name: HardwareTier
  - name: Jobs
  - name: ModelAPI
  - name: ModelAPIVersion
  - name: ModelDeployment
  - name: Organizations
  - name: PPM
  - name: PersonalAccessToken
  - name: ProjectSharedDatasets
  - name: ProjectTemplates
  - name: Projects
  - name: ProjectsCommits
  - name: ProjectsFiles
  - name: RegisteredModels
  - name: ServiceAccounts
  - name: Users
  - name: Workspaces
paths:
  /api/apps/v1/apps/{appId}/versions/createAndStart:
    post:
      tags:
        - AppVersions
      summary: Create App Version and Start (v1)
      description: >
        Compound endpoint that creates a new version and initiates a run of it
        in a single request. The version is always persisted; if the start
        initiation fails the response still returns the persisted version with a
        `warnings` array describing the failure and the caller can retry via the
        regular start endpoint.

        Stop-previous: if a different version of the same App is already
        running, it is stopped before the new version starts (uniform
        one-running-instance-per-App invariant; not draft-specific).

        Draft-specific defaulting: when the parent App is a draft AND a previous
        running version exists on it, omitted content reference fields
        (`dfsCommitId`, `gitRef`, `entryScript`, `environmentId`,
        `environmentRevisionId`, `hardwareTierId`, `externalVolumeMountIds`,
        `netAppVolumeIds`) default to the previous running version's values. On
        the very first call (no previous running version) all required content
        fields must be supplied.

        Governance only starts when a draft is published.
      operationId: createAndStartAppVersionV1
      parameters:
        - in: path
          name: appId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAndStartAppVersionRequestV1'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVersionCreateAndStartResponseV1'
          description: >-
            Version persisted and start initiated. If start initiation failed,
            the response carries the durable version plus a `warnings` array.
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    CreateAndStartAppVersionRequestV1:
      description: >
        Request body for POST /apps/{appId}/versions/createAndStart and the
        optional initialVersion sub-flow on POST /apps/drafts.

        Content (reproducibility) fields (commits, refs, environment, mounts)
        and deployment (execution) fields (hardwareTier, autoscaling) are
        accepted on the new version. Run-time overrides for the initiated
        instance (vanityUrl, autoscalingSpecification, etc.) are carried
        separately under `startOverrides`.

        Draft-specific defaulting: when the parent App is a draft AND a previous
        running version exists, omitted content reference fields default to the
        previous running version's values (commitId, mainRepoGitRef,
        entryScript, environmentId, environmentRevisionId, hardwareTierId,
        externalVolumeMountIds, netAppVolumeIds).

        Governance only starts when a draft is published.
      properties:
        autoscalingSpecification:
          $ref: '#/components/schemas/AppAutoscalingSpecification'
        bundleId:
          description: Guardrails bundle ID. Not applicable on drafts.
          type: string
        dataPlaneId:
          type: string
        description:
          type: string
        dfsCommitId:
          type: string
        entryScript:
          description: Effective entry point for the App version.
          type: string
        environmentId:
          type: string
        environmentRevisionId:
          type: string
        extendedIdentityPropagationToAppsEnabled:
          default: false
          type: boolean
        externalVolumeMountIds:
          items:
            type: string
          type: array
        gitRef:
          $ref: '#/components/schemas/GitRef'
        hardwareTierId:
          type: string
        mountDatasets:
          description: >
            Optional. If supplied, overrides the App's default for this version.
            If omitted, inherits from the parent App.
          type: boolean
        netAppVolumeIds:
          items:
            type: string
          type: array
        resolvedDfsCommitId:
          type: string
        resolvedGitCommitId:
          type: string
        resolvedImportedGitRepos:
          items:
            $ref: '#/components/schemas/ImportedGitRepoSnapshot'
          type: array
        resolvedImportedProjects:
          items:
            $ref: '#/components/schemas/ImportedProjectSnapshot'
          type: array
        startOverrides:
          $ref: '#/components/schemas/StartAppVersionRequestV1'
          description: >
            Optional deployment-only run-time overrides for the initiated
            instance (`deployment.hardwareTierId`,
            `deployment.autoscalingSpecification`, `deployment.vanityUrl`,
            `deployment.renderIFrame`). Content fields are supplied at the top
            level of the request body for the version snapshot.
        tags:
          items:
            $ref: '#/components/schemas/AppVersionTag'
          type: array
      type: object
    AppVersionCreateAndStartResponseV1:
      description: >
        Response body for POST /apps/{appId}/versions/createAndStart. `version`
        is always present (the version is durably persisted before start
        initiation). `instance` is populated when start initiation succeeds; if
        it fails the response carries the version with a `warnings` array
        describing the failure and the caller can retry via the regular start
        endpoint.
      properties:
        instance:
          $ref: '#/components/schemas/AppInstanceSummaryResponseV1'
          description: Present only when start initiation succeeded.
        version:
          $ref: '#/components/schemas/AppVersionResponseV1'
        warnings:
          description: Non-fatal warnings (e.g., start initiation failure).
          items:
            type: string
          type: array
      required:
        - version
      type: object
    AppAutoscalingSpecification:
      properties:
        enabled:
          type: boolean
        maxReplicas:
          maximum: 30
          minimum: 1
          type: integer
        minReplicas:
          maximum: 30
          minimum: 1
          type: integer
        scaleDownStabilizationWindowSeconds:
          maximum: 3600
          minimum: 0
          type: integer
        scaleUpStabilizationWindowSeconds:
          maximum: 3600
          minimum: 0
          type: integer
        targetCpuAvgUtilizationPct:
          maximum: 100
          minimum: 1
          type: integer
        targetMemoryAvgUtilizationPct:
          maximum: 100
          minimum: 1
          type: integer
        useSessionAffinity:
          type: boolean
      required:
        - enabled
      type: object
    GitRef:
      properties:
        type:
          enum:
            - head
            - commitId
            - branches
            - tags
            - custom
          type: string
        value:
          type: string
      required:
        - type
      type: object
    ImportedGitRepoSnapshot:
      properties:
        ref:
          type: string
        repoId:
          type: string
        repoName:
          type: string
      required:
        - repoId
        - repoName
        - ref
      type: object
    ImportedProjectSnapshot:
      properties:
        commitId:
          type: string
        directoryName:
          type: string
        ownerId:
          type: string
        projectId:
          type: string
        projectName:
          type: string
        release:
          type: string
      required:
        - projectId
        - projectName
        - ownerId
        - directoryName
        - commitId
      type: object
    StartAppVersionRequestV1:
      description: >
        Deployment overrides applied at launch. `deployment.hardwareTierId` and
        `deployment.autoscalingSpecification` are mirrored back to the version
        so it always reflects the last launch. `deployment.vanityUrl` and
        `deployment.renderIFrame` write back to the App on published starts and
        are rejected with 422 on draft starts.
      properties:
        deployment:
          $ref: '#/components/schemas/AppVersionDeploymentUpdate'
          description: |
            Deployment overrides for this launch.
      type: object
    AppVersionTag:
      properties:
        key:
          type: string
        value:
          type: string
      required:
        - key
        - value
      type: object
    AppInstanceSummaryResponseV1:
      properties:
        createdAt:
          format: epoch
          type: number
        describeUrl:
          type: string
        dfsCommitId:
          description: The DFS commit ID that was used for this instance's execution.
          type: string
        gitCommitId:
          description: The git commit SHA that was used for this instance's execution.
          type: string
        id:
          type: string
        publisher:
          allOf:
            - $ref: '#/components/schemas/AppUserResponse'
          description: User who started this run.
          nullable: true
        status:
          type: string
      required:
        - id
        - createdAt
        - status
      type: object
    AppVersionResponseV1:
      properties:
        bundle:
          $ref: '#/components/schemas/AppVersionBundle'
        content:
          $ref: '#/components/schemas/AppVersionContent'
        createdAt:
          format: epoch
          type: number
        currentInstance:
          $ref: '#/components/schemas/AppInstanceSummaryResponseV1'
        deployment:
          $ref: '#/components/schemas/AppVersionDeployment'
        description:
          type: string
        id:
          type: string
        tags:
          items:
            $ref: '#/components/schemas/AppVersionTag'
          type: array
        updatedAt:
          format: epoch
          type: number
        versionNumber:
          description: Monotonically increasing version number derived from creationOrder.
          format: int64
          type: integer
      required:
        - id
        - createdAt
        - updatedAt
        - tags
      type: object
    FailureEnvelopeV1:
      properties:
        errors:
          description: Errors that caused a request to fail
          items:
            type: string
          type: array
        requestId:
          description: Id used to correlate a request with server actions.
          example: bbd78579-93c4-45ee-a983-0d5c8da6d5b1
          type: string
      required:
        - requestId
        - errors
      type: object
    AppVersionDeploymentUpdate:
      description: >
        Execution settings for the version. All fields are optional; omitted
        fields fall back to App-level defaults or the previous version's values
        depending on context. Mirrors the response-side AppVersionDeployment
        shape.
      properties:
        autoscalingSpecification:
          $ref: '#/components/schemas/AppAutoscalingSpecification'
        hardwareTierId:
          type: string
        renderIFrame:
          description: >
            Deployment-field override for App-level renderIFrame. Only valid
            when starting a published App version: the override is written back
            to the App alongside launch (mirrors the vanityUrl writeback) so the
            value reflects the running version. Returns 422 when supplied on a
            draft start, since drafts rebaseline renderIFrame from the draft App
            on publish and any override would be silently lost.
          type: boolean
        vanityUrl:
          type: string
      type: object
    AppUserResponse:
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
      type: object
    AppVersionBundle:
      properties:
        id:
          description: Guardrails bundle ID. Immutable after creation.
          type: string
        name:
          type: string
      type: object
    AppVersionContent:
      description: Reproducibility fields that define the version's content.
      properties:
        dataPlaneId:
          nullable: true
          type: string
        dfsCommitId:
          type: string
        entryScript:
          description: Effective entry point for the App version.
          type: string
        environmentId:
          type: string
        environmentRevisionId:
          type: string
        extendedIdentityPropagationToAppsEnabled:
          type: boolean
        externalVolumeMountIds:
          items:
            type: string
          type: array
        gitRef:
          $ref: '#/components/schemas/GitRef'
        mountDatasets:
          description: >-
            Whether to mount Domino Datasets into the App's runtime for this
            version.
          type: boolean
        netAppVolumeIds:
          items:
            type: string
          type: array
        resolvedCommits:
          $ref: '#/components/schemas/ResolvedCommits'
      required:
        - mountDatasets
      type: object
    AppVersionDeployment:
      description: Execution settings for the version.
      properties:
        autoscalingSpecification:
          $ref: '#/components/schemas/AppAutoscalingSpecification'
        hardwareTierId:
          type: string
        vanityUrl:
          type: string
      type: object
    ResolvedCommits:
      description: >-
        Resolved commit and import snapshot information captured at version
        creation time.
      properties:
        dfsCommitId:
          description: The DFS commit ID resolved at version creation time.
          type: string
        gitCommitId:
          description: The git commit SHA resolved at version creation time.
          type: string
        importedGitRepos:
          description: Imported git repo snapshots resolved at version creation time.
          items:
            $ref: '#/components/schemas/ImportedGitRepoSnapshot'
          type: array
        importedProjects:
          description: Imported project snapshots resolved at version creation time.
          items:
            $ref: '#/components/schemas/ImportedProjectSnapshot'
          type: array
      type: object
  responses:
    '400':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Bad Request
    '401':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: >-
        The current user cannot perform this operation because they are not
        logged in
    '403':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: The current user is not authorized to perform this operation
    '404':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Not Found
    '422':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: >-
        The server understands the content type of the request entity, and the
        syntax of the request entity is correct, but it was unable to process
        the contained instructions.
    '500':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Internal Server Error
  securitySchemes:
    DominoApiKey:
      in: header
      name: X-Domino-Api-Key
      type: apiKey
    BearerAuthentication:
      in: header
      name: Authorization
      type: apiKey

````