---
title: "Get Checkpoint Download Urls"
method: POST
path: "/api/v1/workspaces/{workspace_id}/sync/checkpoint-download-url"
tags: ["workspaces"]
---

# Get Checkpoint Download Urls

`POST /api/v1/workspaces/{workspace_id}/sync/checkpoint-download-url`

Get presigned download URLs for checkpoint restoration.

Used when restoring a checkpoint that doesn't exist locally (e.g., after
cloning a repo on a new machine). Returns URLs for both the HEAD bundle
(if the checkpoint was based on a HEAD commit) and the checkpoint bundle.

Supports two checkpoint formats:
1. Regular checkpoints: Returns HEAD bundle URL + checkpoint bundle URL
2. Base checkpoints (base:{sha}): Returns only base_ref bundle URL as checkpoint_bundle_url

The checkpoint metadata is looked up from the database (stored when the
checkpoint was originally synced). If head_sha is present, both bundles
are needed; otherwise only the checkpoint bundle.

## Path parameters

- `workspace_id` string, required

## Request body

- CheckpointDownloadUrlRequest — Request for presigned download URLs to restore a checkpoint. The checkpoint_id is used to look up the checkpoint metadata from the database (worktree.checkpoint_metadata), which contains the head_sha needed to download the HEAD bundle.
  - `checkpoint_id` string, required

## Response `200`

Successful Response

- CheckpointDownloadUrlResponse — Response containing presigned download URLs for checkpoint restoration. To restore a checkpoint remotely: 1. Download and apply head_bundle_url (if provided) - contains commits up to HEAD 2. Download and apply checkpoint_bundle_url - contains incremental checkpoint data For checkpoints created in empty repos (no HEAD), head_bundle_url will be null.
  - `head_bundle_url` string, nullable, required
  - `checkpoint_bundle_url` string, nullable, required
  - `head_sha` string, nullable, required
  - `exists` boolean, required
  - `error` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/omnara/apis/omnara-api.md) · [All operations](https://skmtc.dev/omnara/apis/omnara-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/omnara/omnara-api/revisions/624048e40cad/schema)
