Compliance API
The Compliance API lets you fetch your published compliance page content (privacy policy, terms of service, etc.) directly from within your app. Use it to display always-up-to-date policies natively — without hardcoding content or redeploying.
Plan requirement: The Compliance API requires a paid plan.
When to use this vs. Embed
| Compliance API | Embed Script | |
|---|---|---|
| Best for | Native mobile apps | Websites & web apps |
| Rendering | You control it | Injected as unstyled HTML |
| Integration | HTTP request | <script> tag |
If you're building a native iOS, Android, React Native, or Flutter app, use the Compliance API with the markdown format and render the content using your app's own markdown renderer. This gives you full control over typography, dark mode, and styling.
If you're embedding policies on a website, use the Embed Script instead.
Endpoints
Fetch a single page
GET https://votli.app/api/v1/{token}/compliance/{type}
Returns a single published compliance page.
Path parameters
| Parameter | Description |
|---|---|
token |
Your app's public token, found on the Compliance API page in the dashboard. |
type |
The page type: privacy, terms, cookie, eula, or refund. |
Query parameters
| Parameter | Default | Description |
|---|---|---|
format |
markdown |
Response format for content. Use html to receive rendered HTML instead. |
List all compliance pages
GET https://votli.app/api/v1/{token}/compliance
Returns all published compliance pages that have content, in a single request.
Accepts the same format query parameter as the single-page endpoint.
Response format
Both endpoints return JSON. The single-page endpoint returns a data object; the list endpoint returns a data array.
{
"data": {
"type": "privacy",
"title": "Privacy Policy",
"content": "## Privacy Policy\n\nWe respect your privacy...",
"published_at": "2026-04-06T12:00:00+00:00"
}
}
| Field | Description |
|---|---|
type |
Page type identifier. |
title |
Human-readable page title. |
content |
Page content in markdown (default) or HTML. |
published_at |
ISO 8601 timestamp of the last publish. |
Authentication
All endpoints are public — no API key or authentication is required. Your app's public token acts as the identifier.
Recommended mobile renderers
When using format=markdown (the default), you'll need a markdown renderer in your app. Here are well-maintained options per platform:
| Platform | Library |
|---|---|
| React Native | react-native-markdown-display |
| Flutter | flutter_markdown |
| iOS (Swift) | swift-markdown-ui |
| Android (Kotlin) | Markwon |
Caching
The API does not set cache headers. We recommend caching responses in your app for a reasonable duration (e.g. 1 hour) to avoid unnecessary requests on every screen load.