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

# Retry main sandbox update

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

Builds the main branch's latest commit again, with the failed update's setup, and, if it now passes its health checks, switches the preview to it. That is the commit that failed unless a newer one was pushed since. Use it when the failure wasn't caused by the code, for example a temporary problem or a changed environment variable. To fix the code itself, push a new commit and call [Check for main sandbox updates](/api-reference/check-for-main-sandbox-updates) instead.

Only the app's current failure can be retried. The request returns before the build runs, so poll [Get main sandbox update status](/api-reference/get-main-sandbox-update-status) to follow it.

This endpoint is limited to 10 requests per minute per user, shared with [Investigate main sandbox update failure](/api-reference/investigate-main-sandbox-update-failure), and 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. A read-only key is refused, and workspace API keys are not accepted. 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/failures/{failure_id}/retry
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/failures/{failure_id}/retry:
    post:
      summary: Retry main sandbox update
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Builds the main branch's latest commit again, with the failed update's
        setup, and, if it now passes its health checks, switches the preview to
        it. That is the commit that failed unless a newer one was pushed since.
        Use it when the failure wasn't caused by the code, for example a
        temporary problem or a changed environment variable. To fix the code
        itself, push a new commit and call [Check for main sandbox
        updates](/api-reference/check-for-main-sandbox-updates) instead.


        Only the app's current failure can be retried. The request returns
        before the build runs, so poll [Get main sandbox update
        status](/api-reference/get-main-sandbox-update-status) to follow it.


        This endpoint is limited to 10 requests per minute per user, shared with
        [Investigate main sandbox update
        failure](/api-reference/investigate-main-sandbox-update-failure), and
        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. A read-only key is
        refused, and workspace API keys are not accepted. Send credentials in a
        header: an `api_key` query parameter is refused.</Note>
      operationId: >-
        retry_api_apps__app_id__imported_main_update_failures__failure_id__retry_post
      parameters:
        - name: failure_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the failure, as `failure.id` in [Get main sandbox update
              status](/api-reference/get-main-sandbox-update-status).
            title: Failure Id
          description: >-
            ID of the failure, as `failure.id` in [Get main sandbox update
            status](/api-reference/get-main-sandbox-update-status).
          example: 0d4c2b1a9e8f7a6b5c4d3e2f1a0b9c8d
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the imported app whose main sandbox update failed.
            title: App Id
          description: ID of the imported app whose main sandbox update failed.
          example: 6820f3a4e7b91d003c45a1f2
      responses:
        '202':
          description: The retry was accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
              example:
                accepted: true
        '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, your API key
            is read-only, or you used a workspace API key.
          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, isn't an imported app, or main
            sandbox updates aren't enabled for it. `failure_not_found`:
            `failure_id` isn't the app's current failure.
          content:
            application/json:
              examples:
                failure_not_found:
                  summary: failure_not_found
                  value:
                    error:
                      code: failure_not_found
                      message: >-
                        This isn't the app's current update failure. Read the
                        status again.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '429':
          description: >-
            `rate_limited`: More than 10 requests in a minute. Retry after
            `Retry-After` seconds.
          content:
            application/json:
              examples:
                rate_limited:
                  summary: rate_limited
                  value:
                    error:
                      code: rate_limited
                      message: Rate limit exceeded.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
      security:
        - PersonalAccessTokenAuth:
            - 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`.

````

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