Historical Card Versions
This guide explains how to use the Guru Cards API to retrieve current and historical versions of a card. This is useful if you need to audit changes, display previous content, or analyze how a card has evolved over time. By the end of this article, you’ll know how to fetch the current version of a card, identify which version is current, list all historical versions, and retrieve a specific past version of a card.
Understanding Card Versions
Every time a card is updated and published, Guru increments its version number:
- Version numbers start at
1 - The highest version number is always the current version
- Historical versions remain accessible via the Versions API
The version field is the key link between the current card and its revision history.
Step 1: Get the Current Version of a Card
To retrieve the current state of a card, call:
GET https://api.getguru.com/api/v1/cards/{cardId}
Example Response (Redacted)
{
"id": "70e1b31c-8f3e-419f-ab03-b7a86dda1243",
"version": 3,
"preferredPhrase": "US Company Holidays",
"content": "<p>...</p>",
"verificationState": "TRUSTED",
"lastModified": "2025-12-19T16:41:28.565+0000"
}Key Fields
| Field | Description |
|---|---|
id | Unique identifier for the card |
version | Current version number of the card |
preferredPhrase | The card’s title |
content | The card’s rendered HTML content |
verificationState | Indicates whether the card is trusted |
lastModified | Timestamp of the most recent update |
Note: Many fields returned by this endpoint have been intentionally redacted in this documentation to focus on versioning behavior. Additional fields may be present in the full API response.
Step 2: List All Versions of a Card
To retrieve all historical versions of a card, use:
GET https://api.getguru.com/api/v1/cards/{cardId}/versions
Example Response (Redacted)
[
{
"id": "70e1b31c-8f3e-419f-ab03-b7a86dda1243",
"version": 3,
"lastModified": "2025-12-19T16:41:28.565+0000"
},
{
"id": "70e1b31c-8f3e-419f-ab03-b7a86dda1243",
"version": 2,
"lastModified": "2025-12-19T16:39:40.086+0000"
},
{
"id": "70e1b31c-8f3e-419f-ab03-b7a86dda1243",
"version": 1,
"lastModified": "2025-12-11T23:25:23.877+0000"
}
]What This Endpoint Is Best For
- Determining how many versions exist for a card
- Identifying the first version of a card
- Finding the most recent previous version
- Supporting auditing, change history, and compliance workflows
Step 3: Retrieve a Specific Card Version
Once you know the version number you want, fetch that exact version using:
GET https://api.getguru.com/api/v1/cards/{cardId}/versions/{version}
Example: Get Version 2
GET https://api.getguru.com/api/v1/cards/70e1b31c-8f3e-419f-ab03-b7a86dda1243/versions/2
Example Response (Redacted)
{
"id": "70e1b31c-8f3e-419f-ab03-b7a86dda1243",
"version": 2,
"preferredPhrase": "US Company Holidays",
"content": "<p>...</p>",
"verificationState": "TRUSTED",
"lastModified": "2025-12-19T16:39:40.086+0000"
}This response uses the same structure as the current card endpoint, but reflects the card exactly as it existed at the specified version.
Common Use Cases
View the Previous Version of a Card
- Retrieve the current card using
GET /cards/{cardId} - Read the
versionfield from the response - Subtract
1from that value - Fetch the previous version using
GET /cards/{cardId}/versions/{version}
Retrieve the Original Card Content
- List all versions using
GET /cards/{cardId}/versions - Identify the entry with
version: 1 - Fetch that version directly
Compare Changes Over Time
- Retrieve multiple versions of the same card
- Compare the
contentfield across versions (avoid diffing raw HTML when possible) - Track how the card’s information has changed
Summary
| Goal | Endpoint |
|---|---|
| Get the current card | GET /api/v1/cards/{cardId} |
| List all versions | GET /api/v1/cards/{cardId}/versions |
| Get a specific version | GET /api/v1/cards/{cardId}/versions/{version} |
The version field is the bridge between a card’s current state and its historical revisions, enabling transparency, auditing, and advanced content workflows.
Updated about 4 hours ago
