Skip to main content

Endpoint

GET /server/clickwrap/{slug}

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

ParameterTypeRequiredDescription
slugstringYesUnique identifier for the clickwrap

Request Example

curl -X GET "https://platform.chamelio.ai/server/clickwrap/privacy-policy" \
  -H "X-API-Key: ca_your_api_key_here"
import requests

slug = "privacy-policy"

url = f"https://platform.chamelio.ai/server/clickwrap/{slug}"
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}`,
  {
    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",
  "title": "Privacy Policy",
  "clickwrap_type": "click_to_accept",
  "content": "By clicking Accept, you agree to our Privacy Policy...",
  "content_html": "<p>By clicking Accept, you agree to our Privacy Policy...</p>",
  "clickwrap_version_id": 42,
  "version_number": 3
}

Response Fields

FieldTypeDescription
slugstringUnique clickwrap identifier
titlestringHuman-readable title of the clickwrap
clickwrap_typestringPresentation type: click_to_accept or scroll_and_accept
contentstringPlain-text content of the active version
content_htmlstring or nullSanitized HTML content of the active version
clickwrap_version_idintegerInternal identifier for the active version
version_numberintegerSequential version number of the active 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

This endpoint only returns the active (published) version. Draft versions are never exposed on API-key-authenticated endpoints.
Use the clickwrap_version_id returned here when calling Check Clickwrap Status or Capture Clickwrap Event to correlate acceptances with specific versions.

Use Cases

This endpoint is useful for:
  • Headless consent flows - Fetch clickwrap content server-side and render it in your own UI before capturing acceptance
  • Version awareness - Read the current version_number to decide whether a returning user needs to re-accept
  • Content display - Render content_html in embedded forms or modal dialogs