> ## 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 data to checkpoint

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

Starts putting the entities you name back the way they were at a checkpoint, and returns the restore's ID.

The checkpoint marks a moment, so one checkpoint can restore any of the app's entities, not only the one it belongs to. For each entity, Base44 puts changed records back to their earlier values, brings back records deleted since, and moves records created since to the entity's trash.

The restore runs in the background, and a successful call only means it started. Poll [Get data restore status](/api-reference/get-data-restore-status) with `batch_id` until every entity's `status` is `succeeded` or `failed`. While an entity is being restored, writes to its records are refused. A restore doesn't trigger the app's webhooks, automations, or workflows.

A restore can be undone. Base44 saves a backup of each entity just before rewriting it, and restoring the same entities from `undo_checkpoint_id` in the status response puts them back the way they were.

An entity that another restore is already running on is left out and listed in `skipped_entities`. The call is rejected when none of the entities changed after the checkpoint.

The call has no retry protection. A retry is refused while the first restore is running, and starts a second one after it finishes. If a response is lost, look for `restore` backups in [List data checkpoints](/api-reference/list-data-checkpoints) before you send it again.

<Note>This endpoint accepts a personal API key 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.</Note>

Runs as your user in this app, so the app's access rules decide which records you can read or change.



## OpenAPI

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


        Starts putting the entities you name back the way they were at a
        checkpoint, and returns the restore's ID.


        The checkpoint marks a moment, so one checkpoint can restore any of the
        app's entities, not only the one it belongs to. For each entity, Base44
        puts changed records back to their earlier values, brings back records
        deleted since, and moves records created since to the entity's trash.


        The restore runs in the background, and a successful call only means it
        started. Poll [Get data restore
        status](/api-reference/get-data-restore-status) with `batch_id` until
        every entity's `status` is `succeeded` or `failed`. While an entity is
        being restored, writes to its records are refused. A restore doesn't
        trigger the app's webhooks, automations, or workflows.


        A restore can be undone. Base44 saves a backup of each entity just
        before rewriting it, and restoring the same entities from
        `undo_checkpoint_id` in the status response puts them back the way they
        were.


        An entity that another restore is already running on is left out and
        listed in `skipped_entities`. The call is rejected when none of the
        entities changed after the checkpoint.


        The call has no retry protection. A retry is refused while the first
        restore is running, and starts a second one after it finishes. If a
        response is lost, look for `restore` backups in [List data
        checkpoints](/api-reference/list-data-checkpoints) before you send it
        again.


        <Note>This endpoint accepts a personal API key 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.</Note>


        Runs as your user in this app, so the app's access rules decide which
        records you can read or change.
      operationId: >-
        start_bulk_restore_api_apps__app_id__entities_versions_checkpoints__checkpoint_id__restore_post
      parameters:
        - name: checkpoint_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the checkpoint, as `checkpoint_id` from [List data
              checkpoints](/api-reference/list-data-checkpoints).
            title: Checkpoint Id
          description: >-
            ID of the checkpoint, as `checkpoint_id` from [List data
            checkpoints](/api-reference/list-data-checkpoints).
          example: 68a1c2d3e4f5a6b7c8d9e0f1
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app.
            title: App Id
          description: ID of the app.
          example: 6820f3a4e7b91d003c45a1f2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkRestoreRequest'
      responses:
        '202':
          description: The restore started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkRestoreStartResponse'
        '400':
          description: >-
            `entity_names` is empty, names more than 300 entities or one the app
            doesn't have, or none of the entities changed after the checkpoint.
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You don't have editor access to this app, your API key is read-only,
            or version history isn't on for the app. Read `state` from [Get data
            version history
            status](/api-reference/get-data-version-history-status) to see why.
        '404':
          description: >-
            App not found, or the app has no checkpoint with this ID that's
            still within the history.
        '409':
          description: >-
            A restore or a data import is already running in the app, or recent
            changes are still being saved to the history. Retry once it
            finishes.
        '422':
          description: The body is missing, or `entity_names` isn't a list of strings.
        '429':
          description: >-
            Rate limit exceeded. The base limit is 10 requests per minute. See
            [Rate
            limits](/developers/references/apps-api/get-started/rate-limits) for
            the multiplier your plan gets.
        '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:
    BulkRestoreRequest:
      properties:
        entity_names:
          items:
            type: string
          type: array
          title: Entity Names
          description: >-
            Entities to restore, as [List entity
            schemas](/api-reference/list-entity-schemas) reports them. Name at
            least one and at most 300. They don't have to include the entity the
            checkpoint belongs to.
          example:
            - Invoice
            - Customer
      type: object
      required:
        - entity_names
      title: BulkRestoreRequest
      description: Which entities to restore to the checkpoint.
    BulkRestoreStartResponse:
      properties:
        batch_id:
          type: string
          title: Batch Id
          description: >-
            ID of the restore. Pass it to [Get data restore
            status](/api-reference/get-data-restore-status) to follow it.
          example: 3f1c9a52-7b4e-4d2a-9c61-5e8f0b7a2d14
        launched:
          items:
            $ref: '#/components/schemas/LaunchedRestore'
          type: array
          title: Launched
          description: >-
            The entities whose restore started, each with the ID of its own part
            of the restore.
          example:
            - entity_name: Invoice
              operation_id: 68a1c2f0e4f5a6b7c8d9e1a2
        skipped_entities:
          items:
            type: string
          type: array
          title: Skipped Entities
          description: >-
            Entities you asked for that didn't start, because another restore
            was already running on them. Try them again once it finishes.
          example: []
      type: object
      required:
        - batch_id
        - launched
        - skipped_entities
      title: BulkRestoreStartResponse
      description: The restore that started, and which entities it covers.
    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.
    LaunchedRestore:
      properties:
        entity_name:
          type: string
          title: Entity Name
          description: Entity being restored.
          example: Invoice
        operation_id:
          type: string
          title: Operation Id
          description: >-
            ID of this entity's part of the restore, as `operation_id` in Get
            data restore status.
          example: 68a1c2f0e4f5a6b7c8d9e1a2
      type: object
      required:
        - entity_name
        - operation_id
      title: LaunchedRestore
      description: One entity whose restore started.
    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.