Retrieve a document version
In the Esign Comply API, GET /v1/documents/{id}/versions/{version_id} retrieves one version of a document by ID, or the version in effect now when the ID is current. Use it to read a version's label, language, hashes and effective date without fetching its content.
GET /v1/documents/{id}/versions/{version_id} · API version 2026-11-21
Authentication
Send a secret key in the Authorization header: Bearer $ESIGNCOMPLY_API_KEY. The key needs any permission. Test keys and live keys both work, and each reads and writes the objects of its own environment. Call it from your server: a secret key never goes to a browser. Keys and permissions are described under Authentication.
Request example
cURL
curl https://esigncomply.com/v1/documents/doc_8Hq2/versions/dv_3kT9 \
-H "Authorization: Bearer $ESIGNCOMPLY_API_KEY"
Node SDK
import { EsignComply } from "esigncomply";
const esc = new EsignComply(process.env.ESIGNCOMPLY_API_KEY);
const { data, error } = await esc.documents.versions.get("doc_8Hq2", "dv_3kT9");
This request ran against the API on November 26, 2026, and the response below is what came back. IDs are example values, and long values are shortened with ....
What it does
version_id is a version ID or the word current. With current, the optional query parameter locale (for example de-DE) selects the translation, as a session would.
The body is the document_version object that Publish a document version returns, without warnings.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | ID of the document. |
version_id |
path | string | Yes | ID of the document version, or "current" for the version in effect now. |
locale |
query | string | No | With version_id "current": prefer the translation for this locale. |
Headers: Esign-Comply-Version (optional, a dated API version). See API conventions.
Response
200 OK with a DocumentVersion object.
{
"object": "document_version",
"id": "dv_3kT9",
"document_id": "doc_8Hq2",
"livemode": false,
"version_label": "2026-11-21",
"language": "en",
"format": "markdown",
"content_hash": "sha256:4e712fcc...",
"render_hash": "sha256:56dbea58...",
"size": 187,
"material_change": true,
"summary_of_changes": null,
"effective_at": "2026-11-26T00:15:41.723Z",
"published_at": "2026-11-26T00:15:41.724Z"
}
Response fields
| Field | Type | Description |
|---|---|---|
object |
string | |
id |
string | |
document_id |
string | |
livemode |
boolean | |
version_label |
string | |
language |
string | |
format |
string | markdown, html, text, pdf or hash_only. |
content_hash |
string | SHA-256 of the exact stored bytes. For hash_only: the hash you registered. |
render_hash |
string | SHA-256 of the normalized visible text; what the browser SDK compares. null for a PDF, and for hash_only without render_sha256. |
size |
integer | |
material_change |
boolean | |
summary_of_changes |
string | |
effective_at |
datetime | |
published_at |
datetime | |
warnings |
array of string |
Errors
| Code | HTTP | When |
|---|---|---|
not_found |
404 | When the version does not exist, belongs to another document, or no version is in effect for current. |
Like every call made with a secret key, it can also return missing_api_key, invalid_api_key, domain_not_verified, insufficient_permission, region_mismatch, rate_limit_exceeded and internal_error.
Every error has the same body: error.type, error.code, error.message, error.doc_url and error.request_id. See Errors.
Questions about GET /v1/documents/{id}/versions/{version_id}
Which credential does GET /v1/documents/{id}/versions/{version_id} need?
A secret key with any permission. Send it as a Bearer token in the Authorization header, from your server only. A session client token is refused with insufficient_permission.
Does GET /v1/documents/{id}/versions/{version_id} work with a test key?
Yes. It works with test keys and live keys. A test key reads and writes test objects only, and a live key works once the domain is verified.
Does GET /v1/documents/{id}/versions/{version_id} count as a signature event?
No. A signature event is counted when a live record is written, by completing a session or by submitting a deferred acceptance. This call writes no record.
Is GET /v1/documents/{id}/versions/{version_id} idempotent?
It is a read, so it is safe to repeat. It takes no Idempotency-Key header.
What is the rate limit for GET /v1/documents/{id}/versions/{version_id}?
The limit is counted for each key and depends on the plan: 2 requests per second on Free, 10 on Starter, 50 on Unlimited and 100 on Enterprise. Past the limit the API answers 429 rate_limit_exceeded with a Retry-After header.
Does the Node SDK have a method for GET /v1/documents/{id}/versions/{version_id}?
Yes: esc.documents.versions.get() in the esigncomply package. It resolves to { data, error } and does not throw.
Related
- Documents: the overview of the resource and all of its operations.
- Fetch document version content:
GET /v1/documents/{id}/versions/{version_id}/content - Create a document:
POST /v1/documents - List documents:
GET /v1/documents - Retrieve a document:
GET /v1/documents/{id} - Re-acceptance of a new version
- Errors: every error code, with what to do.
- API conventions: authentication, idempotency, rate limits and versioning.
Last updated · API version 2026-11-21