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

# Publish content from a draft App (v1)

> Publishes content from the draft App identified by `{appId}` into either a brand-new published App (publish-as-new) or an existing published App (publish-into-existing). The mode is selected implicitly by the request body: `targetAppId` present selects publish-into-existing, absent selects publish-as-new.
Both branches read the draft's *last-run* `AppVersion` (the version referenced by the most recent `AppInstance` on the draft) as the publish base, optionally apply content (reproducibility) overrides via `versionOverrides`, then write the result onto the destination App. For publish-as-new the destination is a new App with `isDraft=false` and `vanityUrlNamespace=Apps`; for publish-into-existing the destination is the target App identified by `targetAppId`. The draft App and its version history are NOT touched -- the draft persists post-publish so the same workspace can publish again.
Validation:
- The draft must exist and the caller must have publish permission on it. - The draft (and target App, when publishing into an existing app) must have
  configurationType=Standard.
- When publishing into an existing app, the draft and target must agree on
  configurationType and entryScript.
- If the draft has never been previewed and `versionOverrides` does not supply
  the required content fields (commitId, entryScript, environmentId,
  hardwareTierId), returns 422. Clients can use `versionOverrides` to publish
  without first previewing.
- If neither `versionOverrides.entryScript` nor the publish base supplies an
  entryScript, the published version uses `app.sh`.

Bundle continuity:
- Publish-as-new: the new version's `bundleId` is whatever the caller supplies,
  otherwise unset.
- Publish-into-existing: the new version inherits the target App's last
  `bundleId` unless the caller supplies a different one.




## OpenAPI

````yaml /api-specs/cloud/public-api.yaml post /api/apps/v1/apps/{appId}/publish
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}/publish:
    post:
      tags:
        - Apps
      summary: Publish content from a draft App (v1)
      description: >
        Publishes content from the draft App identified by `{appId}` into either
        a brand-new published App (publish-as-new) or an existing published App
        (publish-into-existing). The mode is selected implicitly by the request
        body: `targetAppId` present selects publish-into-existing, absent
        selects publish-as-new.

        Both branches read the draft's *last-run* `AppVersion` (the version
        referenced by the most recent `AppInstance` on the draft) as the publish
        base, optionally apply content (reproducibility) overrides via
        `versionOverrides`, then write the result onto the destination App. For
        publish-as-new the destination is a new App with `isDraft=false` and
        `vanityUrlNamespace=Apps`; for publish-into-existing the destination is
        the target App identified by `targetAppId`. The draft App and its
        version history are NOT touched -- the draft persists post-publish so
        the same workspace can publish again.

        Validation:

        - The draft must exist and the caller must have publish permission on
        it. - The draft (and target App, when publishing into an existing app)
        must have
          configurationType=Standard.
        - When publishing into an existing app, the draft and target must agree
        on
          configurationType and entryScript.
        - If the draft has never been previewed and `versionOverrides` does not
        supply
          the required content fields (commitId, entryScript, environmentId,
          hardwareTierId), returns 422. Clients can use `versionOverrides` to publish
          without first previewing.
        - If neither `versionOverrides.entryScript` nor the publish base
        supplies an
          entryScript, the published version uses `app.sh`.

        Bundle continuity:

        - Publish-as-new: the new version's `bundleId` is whatever the caller
        supplies,
          otherwise unset.
        - Publish-into-existing: the new version inherits the target App's last
          `bundleId` unless the caller supplies a different one.
      operationId: publishAppV1
      parameters:
        - in: path
          name: appId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishAppRequestV1'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishAppResponseV1'
          description: >
            Publish succeeded. Returns the resulting App (newly inserted for
            publish-as-new, the target App for publish-into-existing) plus the
            newly inserted version. When `start=true` the started instance is
            also returned (or a warning if start initiation failed; the version
            is durably persisted in either case).
        '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:
    PublishAppRequestV1:
      description: >
        Request body for POST /apps/{appId}/publish. The mode is implicit: the
        presence of `targetAppId` selects publish-into-existing, absence selects
        publish-as-new. `vanityUrl` is consumed only on publish-as-new
        (publish-into- existing inherits the target App's vanity);
        `versionOverrides` is consumed by both branches and lets the caller
        override content (reproducibility) fields on a copy of the draft's
        last-run version before it is written to the destination App.
        `start=true` optionally launches the resulting App's newest version
        after the publish persists, with `startOverrides` carrying deployment
        (run-time) overrides.
      properties:
        sendNotifications:
          description: >
            Publish-as-new only. When true and the draft carried accessStatuses,
            the granted users

            on the newly-published App receive an email notification (the
            published App is a fresh

            insert, so every Allowed entry is treated as a new grant). Ignored
            on

            publish-into-existing, which doesn't touch the target App's
            accessStatuses.

            Defaults to false when omitted.
          type: boolean
        start:
          default: false
          description: >
            When true, the resulting App's newest version is started after the
            publish persists. Start initiation failures are surfaced as warnings
            on the response rather than rolling back the publish.
          type: boolean
        startOverrides:
          $ref: '#/components/schemas/StartAppVersionRequestV1'
          description: >
            Deployment-only run-time overrides for the optional start initiation
            (`deployment.hardwareTierId`, `deployment.autoscalingSpecification`,
            `deployment.vanityUrl`, `deployment.renderIFrame`). Consumed only
            when `start=true`.
        targetAppId:
          description: >
            Optional. Present -> publish-into-existing (new version added to the
            target App; `vanityUrl` is ignored). Absent -> publish-as-new (a
            brand- new published App is inserted).
          type: string
        vanityUrl:
          description: >
            Publish-as-new only. The new published App's vanity in the `Apps`
            namespace. If omitted, a random fallback is generated server-side.
            Ignored when `targetAppId` is present.
          type: string
        versionOverrides:
          $ref: '#/components/schemas/VersionOverridesV1'
      type: object
    PublishAppResponseV1:
      description: >
        Response body for POST /apps/{appId}/publish. `app` is the resulting
        destination App (newly inserted for publish-as-new, the target App for
        publish-into- existing). `version` is the newly inserted `AppVersion`.
        `instance` is populated only when `request.start=true` AND start
        initiation succeeded; if the version was persisted but start initiation
        failed, the response carries `version` plus a non-empty `warnings`
        array. The draft App itself is unchanged and is not returned in this
        response -- clients that still need it can read it via `GET
        /apps/{draftId}`.
      properties:
        app:
          $ref: '#/components/schemas/AppResponseV1'
        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:
        - app
        - version
      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
    VersionOverridesV1:
      description: >
        Content (reproducibility) version-field overrides applied to a copy of
        the draft's last-run `AppVersion` during publish. Consumed only by
        `PublishAppRequestV1`. Override semantics is field-by-field
        `orElse(publishBase.value)`; an unset override falls back to whatever
        the draft's last-run version carries.

        `bundleId` interplay with publish flows:

        - Publish-as-new: new version's `bundleId =
        versionOverrides.bundleId.orElse(null)`. - Publish-into-existing: new
        version's
          `bundleId = versionOverrides.bundleId.orElse(targetApp.latestVersion.bundleId)`,
          matching the legacy update path's carry-forward semantic so governance
          continuity is preserved across republishes. Explicit override wins.

        A supplied `bundleId` is validated via the Guardrails API; missing
        bundle -> 404.
      properties:
        autoscalingSpecification:
          $ref: '#/components/schemas/AppAutoscalingSpecification'
        bundleId:
          description: >
            Guardrails bundle to attach to the published version. See schema
            description for branch-specific carry-forward semantics.
          type: string
        dataPlaneId:
          type: string
        description:
          type: string
        dfsCommitId:
          type: string
        entryScript:
          description: >
            Override for the version's entryScript (effective entry point).
            Persisted as the new App's `entryPoint` on publish-as-new; must
            match the target's `entryPoint` on publish-into-existing.
          type: string
        environmentId:
          type: string
        environmentRevisionId:
          type: string
        extendedIdentityPropagationToAppsEnabled:
          type: boolean
        externalVolumeMountIds:
          items:
            type: string
          type: array
        gitRef:
          $ref: '#/components/schemas/GitRef'
        hardwareTierId:
          type: string
        mountDatasets:
          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
        tags:
          items:
            $ref: '#/components/schemas/AppVersionTag'
          type: array
      type: object
    AppResponseV1:
      properties:
        accessControl:
          $ref: '#/components/schemas/AppAccessControl'
        authorship:
          $ref: '#/components/schemas/AppAuthorship'
        configurationType:
          $ref: '#/components/schemas/AppConfigurationType'
        currentVersion:
          $ref: '#/components/schemas/AppVersionResponseV1'
        customFields:
          description: Custom field values assigned to this app, grouped by group name.
          items:
            $ref: '#/components/schemas/CustomFieldValueGroup'
          type: array
        description:
          type: string
        entryPoint:
          type: string
        id:
          type: string
        mountDatasets:
          description: >-
            App-level default for whether to mount Domino Datasets into the
            App's runtime.
          type: boolean
        name:
          type: string
        project:
          $ref: '#/components/schemas/AppProjectResponse'
        renderIFrame:
          type: boolean
        taxonomyTags:
          description: >-
            Taxonomy tags assigned to this app. Omitted when the taxonomy
            feature is disabled.
          items:
            $ref: '#/components/schemas/TaxonomyTag'
          type: array
        thumbnailEtag:
          type: string
        updatedAt:
          format: epoch
          type: number
        url:
          type: string
        vanityUrl:
          type: string
        views:
          type: number
      required:
        - id
        - name
        - project
        - entryPoint
        - renderIFrame
        - url
        - views
        - configurationType
        - authorship
        - accessControl
        - mountDatasets
      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
    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
    AppVersionTag:
      properties:
        key:
          type: string
        value:
          type: string
      required:
        - key
        - value
      type: object
    AppAccessControl:
      description: Visibility and access-grant settings for an App.
      properties:
        accessStatuses:
          items:
            $ref: '#/components/schemas/AppAccessStatus'
          type: array
        discoverable:
          type: boolean
        visibility:
          enum:
            - AUTHENTICATED
            - GRANT_BASED
            - GRANT_BASED_STRICT
            - PUBLIC
          type: string
      required:
        - visibility
        - accessStatuses
        - discoverable
      type: object
    AppAuthorship:
      description: >-
        Identity metadata for an App: whether it is a draft and the user who
        created it.
      properties:
        author:
          allOf:
            - $ref: '#/components/schemas/AppUserResponse'
          description: User who created this App.
          nullable: true
        isDraft:
          description: >-
            True when this App is a workspace-scoped draft. Always false for
            published Apps.
          type: boolean
      required:
        - isDraft
      type: object
    AppConfigurationType:
      default: STANDARD
      description: >-
        Type of configuration for the app which determines different deployment
        resources and settings.
      enum:
        - STANDARD
        - AISYSTEM
      type: string
    CustomFieldValueGroup:
      properties:
        fields:
          items:
            $ref: '#/components/schemas/CustomFieldValue'
          type: array
        groupName:
          description: Group name. "Ungrouped" for fields with no group.
          type: string
      required:
        - groupName
        - fields
      type: object
    AppProjectResponse:
      properties:
        id:
          type: string
        name:
          type: string
        ownerId:
          type: string
        ownerUsername:
          type: string
        projectType:
          enum:
            - Analytic
            - Dataset
            - Template
          type: string
      required:
        - id
        - projectType
        - name
        - ownerId
        - ownerUsername
      type: object
    TaxonomyTag:
      properties:
        description:
          type: string
        fullPath:
          description: >-
            Ancestor labels from root to direct parent. Empty for root-level
            tags.
          items:
            type: string
          type: array
        id:
          type: string
        label:
          type: string
        namespaceId:
          type: string
        namespaceLabel:
          type: string
      required:
        - id
        - label
        - namespaceId
      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
    AppAccessStatus:
      properties:
        status:
          enum:
            - ALLOWED
            - DENIED
            - PENDING
          type: string
        userId:
          type: string
      required:
        - userId
        - status
      type: object
    CustomFieldValue:
      properties:
        customFieldId:
          type: string
        customFieldLabel:
          type: string
        status:
          enum:
            - active
            - deprecated
          type: string
        type:
          enum:
            - text
            - number
            - date
            - boolean
            - url
            - user
            - organization
            - user_or_org
          type: string
        updatedAt:
          format: epoch
          type: number
        updatedBy:
          $ref: '#/components/schemas/CustomFieldUpdatedBy'
        value:
          description: >-
            Encoded scalar value as stored upstream; encoding depends on type.
            Absent when no value is set.
          type: string
      required:
        - customFieldId
        - customFieldLabel
        - type
        - status
      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
    CustomFieldUpdatedBy:
      properties:
        userId:
          type: string
        username:
          type: string
      required:
        - userId
      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

````