Endpoint
GET /server/clickwrap/{slug}/history
Authentication
This endpoint requires authentication via API key. Include your API key in the X-API-Key header:
X-API-Key: ca_your_api_key_here
Path Parameters
| Parameter | Type | Required | Description |
|---|
slug | string | Yes | Unique identifier for the clickwrap |
Request Example
curl -X GET "https://platform.chamelio.ai/server/clickwrap/privacy-policy/history" \
-H "X-API-Key: ca_your_api_key_here"
import requests
slug = "privacy-policy"
url = f"https://platform.chamelio.ai/server/clickwrap/{slug}/history"
headers = {
"X-API-Key": "ca_your_api_key_here"
}
response = requests.get(url, headers=headers)
print(response.json())
const slug = "privacy-policy";
const response = await fetch(
`https://platform.chamelio.ai/server/clickwrap/${slug}/history`,
{
method: 'GET',
headers: {
'X-API-Key': 'ca_your_api_key_here'
}
}
);
const data = await response.json();
console.log(data);
Response
Success Response
Status Code: 200 OK
{
"slug": "privacy-policy",
"versions": [
{
"clickwrap_version_id": 42,
"clickwrap_id": 7,
"version": 3,
"content": "By clicking Accept, you agree to our updated Privacy Policy...",
"content_html": "<p>By clicking Accept, you agree to our updated Privacy Policy...</p>",
"is_draft": false,
"archived_at": null,
"created_at": "2026-05-01T09:00:00Z",
"updated_at": "2026-05-01T09:00:00Z"
},
{
"clickwrap_version_id": 31,
"clickwrap_id": 7,
"version": 2,
"content": "By clicking Accept, you agree to our Privacy Policy...",
"content_html": "<p>By clicking Accept, you agree to our Privacy Policy...</p>",
"is_draft": false,
"archived_at": "2026-05-01T09:00:00Z",
"created_at": "2026-01-15T08:00:00Z",
"updated_at": "2026-05-01T09:00:00Z"
}
]
}
Response Fields
| Field | Type | Description |
|---|
slug | string | Unique clickwrap identifier |
versions | array | All published (non-draft) versions, newest first |
Version Object Fields
| Field | Type | Description |
|---|
clickwrap_version_id | integer | Internal identifier for this version |
clickwrap_id | integer | Internal identifier for the parent clickwrap |
version | integer | Sequential version number |
content | string | Plain-text content of this version |
content_html | string or null | Sanitized HTML content of this version |
is_draft | boolean | Always false — this endpoint only returns published versions |
archived_at | string or null | ISO 8601 timestamp when this version was superseded, or null if it is the current active version |
created_at | string | ISO 8601 timestamp when this version was created |
updated_at | string | ISO 8601 timestamp of the last update to this version |
Error Responses
401 Unauthorized
Returned when authentication fails. See the authentication errors section for details.
{
"detail": "Invalid API key"
}
404 Not Found
Returned when no active clickwrap exists for the given slug.
{
"detail": "Clickwrap 'privacy-policy' not found"
}
500 Internal Server Error
Returned when the request fails due to a server error.
{
"detail": "Internal server error"
}
Notes
Draft versions are never included in this response. Only versions that have been published (activated) are returned.
Use archived_at to distinguish the currently active version (where archived_at is null) from older superseded versions.
Use Cases
This endpoint is useful for:
- Compliance auditing - Retrieve the exact text a user accepted at a given
clickwrap_version_id
- Re-consent detection - Compare the user’s last accepted
version_number against the full history to determine if they need to re-accept
- Change logging - Display a changelog of terms updates to end users