Skip to main content
Snapshotify registers its endpoints under the snapshotify/v1 namespace. They serve the plugin’s own admin screen, so treat them as an internal API rather than a versioned public contract.

Endpoints

Backups

endpoint
The paginated backup list: title, contents, size, location, date, and kind. Kind distinguishes manual, automatic, and uploaded backups.
endpoint
Starts a backup. Takes a title, an exclusions array, and a location.Returns immediately with an ID. The job runs in ticks and is not finished when this responds.
An empty exclusions array means a full-site backup. Excluding all five categories is refused with a nothing_to_backup error.
endpoint
Progress for a running job. Polling this also advances the job, which is one of the three things that drive the pipeline. See how backups run.
endpoint
Stops a running job and removes its working files. Cancelled jobs never send a notification.
endpoint
The activity log for one backup: each stage, and any warning that did not stop the job. This is where a cloud upload’s fallback reason is recorded.
endpoint
Deletes a backup and its archive, including the cloud copy where there is one. Permanent.
endpoint
Downloads an archive, served in chunks so large files do not depend on one long response.

Uploading an archive

Two endpoints, because a backup archive is usually far larger than a single request allows.
endpoint
Starts an upload session and returns a handle.
endpoint
Sends one chunk. Repeat until the archive is complete, then it appears in the backup list like any other.

Restore

endpoint
Begins a restore from a backup ID.
This is destructive and there is no undo. From the database step onward the site is in maintenance mode and is being replaced. Take a backup of the current state before calling it.
endpoint
Exchanges a short-lived token for a session, so you land back in wp-admin after the users table has been replaced.This is the one endpoint without a capability check, and it cannot have one: the user it authenticates may not have existed a moment earlier. It is gated on a single-use token valid for 30 minutes instead.

Settings

endpoint
Merges the supplied values over the stored settings. Send only the keys you want to change.
Fires snapshotify_settings_update:before and :after. There is no GET counterpart. Read settings in PHP with get_option('snapshotify_settings').

Backing up from a deploy script

The usual reason to touch this API: take a backup before a release.
This returns as soon as the job starts, not when it finishes. If your deploy must wait for a completed backup, poll /backup/progress until it reports completion, and remember that polling also drives the job forward.
Application passwords need a user with manage_options, which is administrator-level access. Create a dedicated user for automation rather than reusing your own account.