API Reference
REST API endpoints for the Revme ad platform.
Base URL: https://revme.io/api/v1
Authentication: Authenticated endpoints require a JWT token via the Authorization: Bearer <token> header.
Ad Serving
Public endpoints for fetching and tracking ads. No auth required.
/adsFetch a text ad filtered by geo, scoped to the API key's owner.
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Yes | API key identifying the publisher |
lang | string | No | Browser language (e.g. "en-US") |
tz | string | No | Timezone (e.g. "America/New_York") |
{ "ad": { "text": "Build faster with Cursor AI", "url": "https://cursor.sh", "sponsor": "Cursor", "adId": "ad_abc123" }, "nextPollMs": 300000 }/ads/:adId/impressionRecord an impression event for an ad.
{ "lang": "en-US", "tz": "America/New_York" }{ "ok": true }/ads/:adId/clickRecord a click event for an ad.
{ "lang": "en-US", "tz": "America/New_York" }{ "ok": true }Ads Management
CRUD operations for your text ads. Requires authentication.
/my/adsList all ads owned by the authenticated user.
{ "ads": [{ "id": "ad_abc123", "text": "Build faster with Cursor AI", "url": "https://cursor.sh", "sponsor": "Cursor", "target_languages": ["en"], "target_timezones": [], "weight": 1.0, "active": true, "created_at": "2026-01-15T10:00:00Z" }] }/my/adsCreate a new text ad.
{ "text": "Build faster with Cursor AI", "url": "https://cursor.sh", "sponsor": "Cursor", "target_languages": ["en"], "target_timezones": ["America/New_York"], "weight": 1.0, "active": true }{ "ad": { "id": "ad_xyz", "text": "..." } }/my/ads/:idUpdate an existing ad. Only include fields you want to change.
{ "text": "Updated ad text", "active": false }{ "ad": { "id": "ad_abc123", "text": "Updated ad text", "active": false } }/my/ads/:idDelete an ad permanently.
{ "ok": true }Analytics
View impressions, clicks, and trends for your ads.
/my/statsAggregated stats across all ads.
{ "total_impressions": 1250, "total_clicks": 89, "click_rate": 0.0712 }/my/stats/dailyDaily breakdown of impressions and clicks.
| Name | Type | Required | Description |
|---|---|---|---|
days | number | No | Number of days to look back (default: 7, max: 30) |
{ "daily": [{ "date": "2026-01-15", "impressions": 180, "clicks": 12 }] }/my/stats/daily-by-adPer-ad daily stats.
| Name | Type | Required | Description |
|---|---|---|---|
days | number | No | Number of days (default: 30, max: 365) |
/my/stats/by-adAggregated stats broken down by individual ad.
API Keys
Manage API keys used by the SDK to fetch ads.
/my/keysList all API keys.
{ "keys": [{ "id": "key_abc", "name": "Production", "key": "ad_live_...", "created_at": "2026-01-10T08:00:00Z" }] }/my/keysCreate a new API key.
{ "name": "Production" }{ "key": { "id": "key_xyz", "name": "Production", "key": "ad_live_..." } }/my/keys/:idRevoke and delete an API key.
{ "ok": true }