﻿<head><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4357510538660394"
     crossorigin="anonymous"></script></head>> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy an app

> Deploys your app to production, publishing your latest changes so they go live for its users. By default the app's current version is deployed. To deploy a specific saved version instead, pass its ID in the request body. For an app whose source code you manage, pass the commit of a build uploaded with the Base44 CLI instead. Deploying works on main only, so naming a branch in `branch_id` returns a 409.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/deploy
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/deploy:
    post:
      summary: Deploy an app
      description: >-
        Deploys your app to production, publishing your latest changes so they
        go live for its users. By default the app's current version is deployed.
        To deploy a specific saved version instead, pass its ID in the request
        body. For an app whose source code you manage, pass the commit of a
        build uploaded with the Base44 CLI instead. Deploying works on main
        only, so naming a branch in `branch_id` returns a 409.
      operationId: deploy_api_apps__app_id__deploy_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app to deploy.
            title: App Id
          description: ID of the app to deploy.
          example: 6820f3a4e7b91d003c45a1f2
        - name: branch_id
          in: query
          required: false
          schema:
            type: string
            description: >-
              ID of the branch to work on, as returned by [List
              branches](/api-reference/list-branches). Omit it to work on the
              app's main branch.
            title: Branch Id
          description: >-
            ID of the branch to work on, as returned by [List
            branches](/api-reference/list-branches). Omit it to work on the
            app's main branch.
          example: 68f1a2b3c4d5e6f708192a3b
        - name: X-Active-Branch-Id
          in: header
          required: false
          schema:
            type: string
            description: >-
              ID of the branch the editor shows. Used when `branch_id` is
              omitted, for users who work on protected-main branches.
            title: X-Active-Branch-Id
          description: >-
            ID of the branch the editor shows. Used when `branch_id` is omitted,
            for users who work on protected-main branches.
          example: 68f1a2b3c4d5e6f708192a3b
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/DeployRequest'
                - type: 'null'
              title: Payload
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeployResponse'
        '400':
          description: >-
            The app cannot be published, for example a native mobile app. A
            saved version whose functions no longer compile uses error.code
            checkpoint_source_no_longer_compiles, with the failing functions and
            compiler output in error.details. A `git_commit_hash` for an app
            whose source Base44 manages uses error.code
            git_commit_hash_not_supported. An MCP configuration too large to
            publish uses error.code mcp_config_too_large.
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            App is blocked, or the caller can't publish it. Personal GitHub
            access refusals use error.code github_write_access_required. A
            workspace before-publish rule that refused the publish uses
            error.code hook_rejected, with the rule's reason as the message and
            `hook_workflow_id`, `hook_run_id` and `reason_given` (`false` when
            the rule gave none and the message is the default text) in
            error.details; nothing was published, and retrying the same publish
            meets the same rule.
        '404':
          description: >-
            App not found, or no branch you can see has this `branch_id`. A
            `git_commit_hash` with no uploaded build uses error.code
            build_not_found.
        '409':
          description: >-
            App is processing, the target is a branch checkpoint, or `branch_id`
            names a branch (`extra_data.reason` is
            `operation_blocked_on_branch`). A saved version published while the
            app is processing that isn't fully saved yet uses error.code
            checkpoint_not_ready; retry shortly. A saved version whose code is
            not available yet uses error.code checkpoint_source_not_ready, with
            its commit hash in error.details.git_commit_hash; retry shortly.
            Another deployment of the app still in progress uses error.code
            deploy_in_progress; retry shortly. A `git_commit_hash` for an app
            served from a recorded version uses error.code
            served_from_recorded_version, and one for an app that changes only
            when you create a new version and publish it uses
            changes_through_versions. A publish whose app secrets couldn't be
            synced to the deployment it would serve uses error.code
            publish_secrets_conflict. A saved version missing the source of
            functions it deploys uses error.code checkpoint_source_missing, with
            their names in error.details.functions. Backend functions saved
            while the publish was being prepared use error.code
            functions_changed_during_publish; publish again. Nothing was
            published. Retry it, and contact support if it repeats.
        '422':
          description: >-
            A build with more than 1000 files uses error.code too_many_files,
            with the limit in error.details.limit. `checkpoint_id` is not a
            string, `git_commit_hash` is not a commit hash, or both were passed.
            A saved version whose code is too large to read uses error.code
            checkpoint_too_large. A saved version with more backend functions
            than an app can hold uses error.code
            backend_function_limit_exceeded, with the count and the limit in
            error.details.function_count and error.details.limit. A workspace
            before-publish rule that couldn't check this publish uses error.code
            hook_input_invalid or hook_payload_too_large; nothing was published.
        '429':
          description: >-
            Syncing the app's secrets to the deployment this publish would serve
            was rate limited, so nothing was published. Uses error.code
            publish_rate_limited. Wait the number of seconds in the
            `Retry-After` header, then try again.
        '502':
          description: >-
            Syncing the app's secrets to the deployment this publish would serve
            didn't complete, so nothing was published. Uses error.code
            publish_provider_unavailable. Try again. When production couldn't be
            switched to the new version, the publish is rolled back and uses
            error.code publish_incomplete. Try again.
        '503':
          description: >-
            `publish_unavailable`: the sandbox, the git checkout or the upload
            of this publish's build, or the copy to production, did not
            complete. Publish again. When GitHub refused Base44 the app's
            repository because of an IP allow list, `error.details.reason` is
            `ip_allow_list` and `error.details.static_egress_enabled` says
            whether the workspace has Static outbound IPs on.
            `hook_unavailable`: the workspace's rule for this operation could
            not be evaluated, so nothing changed; try again.
            `database_unavailable`: the data cluster did not answer in time.
            Retry after the `Retry-After` seconds when the header is present.
          content:
            application/json:
              examples:
                publish_unavailable:
                  summary: publish_unavailable
                  value:
                    error:
                      code: publish_unavailable
                      message: Publishing did not complete. Try again in a minute.
                      details: {}
                hook_unavailable:
                  summary: hook_unavailable
                  value:
                    error:
                      code: hook_unavailable
                      message: An app rule could not be evaluated. Try again.
                      details: {}
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - apps:deploy
        - WorkspaceApiKeyBearerAuth:
            - apps:deploy
components:
  schemas:
    DeployRequest:
      properties:
        checkpoint_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Checkpoint Id
          description: >-
            ID of a specific saved version of the app to deploy. If omitted, the
            app's current version is deployed.
          example: 6886b8d390dc7e2f4a2c91b3
        git_commit_hash:
          anyOf:
            - type: string
              pattern: ^[a-fA-F0-9]{7,64}$
            - type: 'null'
          title: Git Commit Hash
          description: >-
            For an app whose source code you manage, the commit of a build
            already uploaded with the Base44 CLI. That build is deployed instead
            of a saved version. Cannot be combined with `checkpoint_id`.
          example: a1b2c3d4e5f67890abcdef1234567890abcdef12
      type: object
      title: DeployRequest
    DeployResponse:
      properties:
        app_id:
          type: string
          title: App Id
          description: ID of the app that was deployed.
          example: 6820f3a4e7b91d003c45a1f2
        checkpoint_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Checkpoint Id
          description: >-
            ID of the saved version associated with this deploy, or `null` if
            the app has no saved versions. The git commit hash identifies the
            exact code that was deployed.
          example: 6886b8d390dc7e2f4a2c91b3
        git_commit_hash:
          type: string
          title: Git Commit Hash
          description: Git commit hash of the code that was deployed.
          example: a1b2c3d4e5f67890abcdef1234567890abcdef12
        deployed_at:
          type: string
          format: date-time
          title: Deployed At
          description: Time the app was deployed, as a UTC timestamp in ISO 8601 format.
          example: '2026-08-02T14:30:00'
        app_url:
          anyOf:
            - type: string
            - type: 'null'
          title: App Url
          description: >-
            Public URL the app is now served at, built from its slug, or `null`
            if the app has no slug yet. A custom domain the app is also served
            on isn't returned. To link to the app, use `share_url`.
          example: https://my-crm-3c45a1f2.base44.app
        share_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Share Url
          description: >-
            The URL to link to the app, the one its publish dialog shows: its
            own custom domain once that domain serves the app, else its address
            on the workspace's company domain while one is active, else the same
            as `app_url`.
          example: https://crm.acme.com
      type: object
      required:
        - app_id
        - checkpoint_id
        - git_commit_hash
        - deployed_at
        - app_url
      title: DeployResponse
      description: The version of an app that was published, and when.
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

## Related topics

- [Automations](https://docs.base44.com/developers/backend/resources/backend-functions/automations.md)
- [Building an app](https://docs.base44.com/Getting-Started/Quick-start-guide.md)
- [Base44 developer tools](https://docs.base44.com/documentation/building-your-app/developer-tools.md)
- [deploy](https://docs.base44.com/developers/references/cli/commands/deploy.md)
- [Connecting Slack to your app](https://docs.base44.com/Integrations/slack-connectors.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.