Skip to main content

Get Version

GET /v1/documents/{document_id}/versions/{version_number}
Get a specific version of a document with its full content and blocks.

Request

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key

Path Parameters

ParameterTypeRequiredDescription
document_idstringYesThe document ID
version_numberintegerYesThe version number

Example

curl https://api.surfacedocs.dev/v1/documents/doc_abc123/versions/1 \
  -H "X-API-Key: sd_live_..."

Response

Status: 200 OK
{
  "version": 1,
  "title": "Daily Report — Feb 13",
  "content_type": "markdown",
  "metadata": {"generated_at": "2026-02-13"},
  "blocks": [
    {
      "id": "blk_001",
      "order": 0,
      "type": "heading",
      "content": "Summary",
      "metadata": {"level": 1}
    },
    {
      "id": "blk_002",
      "order": 1,
      "type": "paragraph",
      "content": "Revenue: $38,000",
      "metadata": null
    }
  ],
  "created_at": "2026-02-13T10:00:00Z"
}