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

# Check for main sandbox updates on an imported app

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Asks Base44 to check the branch the app was imported from and update the main sandbox if it moved. The request returns before the update runs, so poll [Get main sandbox update status on an imported app](/api-reference/get-main-sandbox-update-status-on-an-imported-app) to follow it.

Base44 reads the branch at most once a minute for each app, and the checks the app editor makes while the app is open count too. A check that arrives within a minute of the last read is accepted and doesn't read the branch again, so it can miss a commit that landed after that read. Retrying the same check is safe. If the commit you merged isn't the one `active_generation` shows after a minute, call this endpoint again. A check made while the app's first setup is still running is also accepted and does nothing. An update already in progress isn't interrupted, and the newest commit is built after it.

This endpoint is limited to 30 requests per minute per user, reported in the `X-RateLimit-*` headers.

<Note>This endpoint accepts a personal API key or personal access token belonging to a user with editor access to the app, or a workspace API key, which acts as the workspace owner. A read-only key is refused. Send credentials in a header: an `api_key` query parameter is refused.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/imported/main-update/check
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}/imported/main-update/check:
    post:
      summary: Check for main sandbox updates on an imported app
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Asks Base44 to check the branch the app was imported from and update the
        main sandbox if it moved. The request returns before the update runs, so
        poll [Get main sandbox update status on an imported
        app](/api-reference/get-main-sandbox-update-status-on-an-imported-app)
        to follow it.


        Base44 reads the branch at most once a minute for each app, and the
        checks the app editor makes while the app is open count too. A check
        that arrives within a minute of the last read is accepted and doesn't
        read the branch again, so it can miss a commit that landed after that
        read. Retrying the same check is safe. If the commit you merged isn't
        the one `active_generation` shows after a minute, call this endpoint
        again. A check made while the app's first setup is still running is also
        accepted and does nothing. An update already in progress isn't
        interrupted, and the newest commit is built after it.


        This endpoint is limited to 30 requests per minute per user, reported in
        the `X-RateLimit-*` headers.


        <Note>This endpoint accepts a personal API key or personal access token
        belonging to a user with editor access to the app, or a workspace API
        key, which acts as the workspace owner. A read-only key is refused. Send
        credentials in a header: an `api_key` query parameter is refused.</Note>
      operationId: check_api_apps__app_id__imported_main_update_check_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the imported app whose main sandbox to read or update.
            title: App Id
          description: ID of the imported app whose main sandbox to read or update.
          example: 6820f3a4e7b91d003c45a1f2
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
        '401':
          description: >-
            `unauthenticated`: Missing or invalid credentials, or credentials
            sent as an `api_key` query parameter.
          content:
            application/json:
              examples:
                unauthenticated:
                  summary: unauthenticated
                  value:
                    error:
                      code: unauthenticated
                      message: 'Use Authorization: Bearer credentials.'
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '403':
          description: >-
            `forbidden`: You don't have editor access to this app, or your API
            key is read-only.
          content:
            application/json:
              examples:
                forbidden:
                  summary: forbidden
                  value:
                    error:
                      code: forbidden
                      message: You don't have editor access to this app.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '404':
          description: '`not_found`: The app doesn''t exist or isn''t an imported app.'
          content:
            application/json:
              examples:
                not_found:
                  summary: not_found
                  value:
                    error:
                      code: not_found
                      message: Not found
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '429':
          description: >-
            `rate_limited`: More than 30 requests in a minute. Retry after
            `Retry-After` seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
components:
  schemas:
    AcceptedResponse:
      properties:
        accepted:
          type: boolean
          title: Accepted
          description: 'Always `true`: the check was accepted.'
          default: true
          example: true
      type: object
      title: AcceptedResponse
    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.

````

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