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

# Restore deleted app

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

Takes an app out of the trash, up to 30 days after [Delete app](/api-reference/delete-app) put it there.

You can restore an app you own, and a workspace admin can restore any app in the workspace. You must still be a member of the app's workspace, and the workspace must have room under its plan's app limit.

The app comes back with its entity records. If its owner left the workspace while it was in the trash, the workspace owner becomes its owner, and collaborators who left don't get their access back. If another app took its slug, it moves to a free one, returned as `new_slug`. Its backend functions are deployed again, and an app that was published goes live again.

<Warning>Restoring doesn't reconnect the resources the delete released, such as custom domains and OAuth connections. Read `reconnect_needed` to see what to set up again.</Warning>

The whole restore runs before you get a response, so the call takes longer on an app with many backend functions. A restore can't be repeated: once the app is out of the trash, calling this again returns a `409`.

This is limited to 10 requests per minute. A signed-in session has its own limit, and every personal access token for the workspace shares one, and each workspace API key has its own. Some workspaces have a different limit.

<Note>This endpoint accepts a personal API key or a workspace API key, which acts as the workspace owner. Read-only tokens and keys are refused.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps-trash/{app_id}/restore
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-trash/{app_id}/restore:
    post:
      summary: Restore deleted app
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Takes an app out of the trash, up to 30 days after [Delete
        app](/api-reference/delete-app) put it there.


        You can restore an app you own, and a workspace admin can restore any
        app in the workspace. You must still be a member of the app's workspace,
        and the workspace must have room under its plan's app limit.


        The app comes back with its entity records. If its owner left the
        workspace while it was in the trash, the workspace owner becomes its
        owner, and collaborators who left don't get their access back. If
        another app took its slug, it moves to a free one, returned as
        `new_slug`. Its backend functions are deployed again, and an app that
        was published goes live again.


        <Warning>Restoring doesn't reconnect the resources the delete released,
        such as custom domains and OAuth connections. Read `reconnect_needed` to
        see what to set up again.</Warning>


        The whole restore runs before you get a response, so the call takes
        longer on an app with many backend functions. A restore can't be
        repeated: once the app is out of the trash, calling this again returns a
        `409`.


        This is limited to 10 requests per minute. A signed-in session has its
        own limit, and every personal access token for the workspace shares one,
        and each workspace API key has its own. Some workspaces have a different
        limit.


        <Note>This endpoint accepts a personal API key or a workspace API key,
        which acts as the workspace owner. Read-only tokens and keys are
        refused.</Note>
      operationId: restore_api_apps_trash__app_id__restore_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the app to restore, as returned by [Delete
              app](/api-reference/delete-app).
            title: App Id
          description: >-
            ID of the app to restore, as returned by [Delete
            app](/api-reference/delete-app).
          example: 6820f3a4e7b91d003c45a1f2
      responses:
        '200':
          description: The app is back, and what still needs reconnecting.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestoreResult'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You neither own the app nor administer its workspace, you're no
            longer a member of its workspace, or your API key is read-only.
        '404':
          description: >-
            App not found, or it's outside the workspace or the apps your
            credential is allowed to reach.
        '409':
          description: >-
            The app can't be restored right now. It isn't in the trash, it was
            deleted more than 30 days ago or before restoring was available, the
            workspace is at its app limit, no free slug was found, or another
            restore or deploy of the app is in progress. The error message says
            which. Only the last case is worth retrying.
        '429':
          description: >-
            Rate limit exceeded. The base limit is 10 requests per minute. Wait
            the number of seconds in the `Retry-After` header before you retry.
        '503':
          description: >-
            Database temporarily unavailable (`database_unavailable`): the data
            cluster did not answer in time. Retry after the `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
              examples:
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
components:
  schemas:
    RestoreResult:
      properties:
        app_id:
          type: string
          title: App Id
          description: ID of the restored app.
          example: 6820f3a4e7b91d003c45a1f2
        entities_undeleted:
          type: integer
          title: Entities Undeleted
          description: Number of entity records brought back with the app.
          default: 0
          example: 128
        new_slug:
          anyOf:
            - type: string
            - type: 'null'
          title: New Slug
          description: >-
            The app's new slug when another app took its old one while it was in
            the trash, or `null` when the app kept its slug.
          example: acme-crm-6820f3a4
        functions_redeployed:
          type: boolean
          title: Functions Redeployed
          description: >-
            Whether the app's backend functions were deployed again. When
            `false`, `reconnect_needed` includes `functions`. `true` for an app
            with no functions.
          default: true
          example: true
        reconnect_needed:
          items:
            type: string
          type: array
          title: Reconnect Needed
          description: >-
            What you still need to do. It has the `deleted_resources` values
            from [Delete app](/api-reference/delete-app), which the restore
            doesn't rebuild, plus `functions` when the backend functions didn't
            deploy, `republish` when the published app needs a new
            [deploy](/api-reference/deploy-an-app) to run its functions, and
            `runtime` when the published app isn't reachable yet. Base44 retries
            that last one in the background.
          default: []
          example:
            - domains
      type: object
      required:
        - app_id
      title: RestoreResult
    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.