Historical Card Versions
Retrieve current and historical versions of a card for auditing and comparison.
Every time a card is updated and published, Guru increments its version number. The Versions API lets you retrieve current and historical versions of a card, which is useful for auditing changes, displaying previous content, or analyzing how a card has evolved over time.
A few rules govern versions:
- 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 link between the current card and its revision history.
| Endpoint | Purpose |
|---|---|
GET /api/v1/cards/{cardId} | Get the current card |
GET /api/v1/cards/{cardId}/versions | List all versions |
GET /api/v1/cards/{cardId}/versions/{version} | Get a specific version |
Step 1: Get the current version of a card
curl -u $GURU_USER:$GURU_TOKEN https://api.getguru.com/api/v1/cards/{cardId}Response
Redacted to the fields relevant to versioning; the full response contains many more.
{
"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"
}| 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 | Whether the card is trusted. |
lastModified | Timestamp of the most recent update. |
Step 2: List all versions of a card
curl -u $GURU_USER:$GURU_TOKEN https://api.getguru.com/api/v1/cards/{cardId}/versionsResponse
[
{
"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"
}
]This endpoint is best for determining how many versions exist, identifying the first version, finding the most recent previous version, and supporting auditing or compliance workflows.
Step 3: Retrieve a specific card version
Once you know the version number you want:
curl -u $GURU_USER:$GURU_TOKEN https://api.getguru.com/api/v1/cards/{cardId}/versions/{version}For example, to get version 2:
curl -u $GURU_USER:$GURU_TOKEN https://api.getguru.com/api/v1/cards/70e1b31c-8f3e-419f-ab03-b7a86dda1243/versions/2Response
{
"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"
}The response uses the same structure as the current card endpoint, but reflects the card exactly as it existed at that version.
Common use cases
View the previous version of a card. Retrieve the current card, read its version field, subtract 1, and fetch that version.
Retrieve the original card content. List all versions, find the entry with version: 1, and fetch it directly.
Compare changes over time. Retrieve multiple versions of the same card and compare the content field across them. Avoid diffing raw HTML when possible.
Updated 25 days ago

