---
search:
  tags:
    - checkpoints
    - POST
seo:
  description: >-
    Discards every change to the disk since the checkpoint, and the… Reference
    for the POST /v1/sandboxes/{sandbox}/rollback endpoint in the pols.so API.
sidebar:
  label: Roll the sandbox's disk back to a checkpoint, discarding everything newer
  badge: POST
title: Roll the sandbox's disk back to a checkpoint, discarding everything newer
type: openapi-operation
---
Discards every change to the disk since the checkpoint, and the
checkpoints taken after it, which are deleted; the checkpoint
rolled back to is kept, so it can be rolled back to again. The
sandbox's users (`.../users`) become the ones it had at the
checkpoint, whose accounts its disk holds; API keys limited to a
user that was removed since stay ended.

Asynchronous, like a resize: the response comes at once with
`rollback_to` set. A running sandbox (or one in standby) is shut
down, rolled back and booted again from the checkpoint's disk, so
its processes stop; a stopped one is rolled back and stays
stopped. `rollback_to` is null again once it is done. If it could
not be done, the sandbox keeps its disk and checkpoints, and
`last_error` and the timeline say why.

Refused (409) while the sandbox is being created, deleted, resized
or rolled back, while a fork of it or a template from it is being
copied, for a fork or template made from it after the checkpoint
that still exists (newer disk state is theirs; delete them first),
when its disk was resized since the checkpoint, and for a sandbox
polsd runs a site or database in. Sandbox-scoped API keys may roll
back their sandbox unless their limits leave out `checkpoint` (403
`key_limit`); keys limited to one user of it may not (403).

`POST /v1/sandboxes/{sandbox}/rollback`
