Skip to content

Read-only developer access

Developer mode is an owner-only switch for server-to-server analytics access. It is intentionally separate from the browser SDK and its ingestion credentials: a developer key can never collect an event, edit a rule, change a member, or mutate an app.

Open Console → Settings → Developer mode, enable the master switch, then enable API access. Turning either switch off makes every developer key for that app unusable immediately. It does not delete those keys, so an owner can resume a known integration without creating a surprise pile of duplicates.

Keys are scoped to exactly one app and can expire after 1 hour, 24 hours, 7 days, or remain valid until revoked. OwlEye returns the secret once and stores only its salted hash. Choose one or both scopes:

  • events:read reads a privacy-safe, bounded event export.
  • ai:prompt submits one prompt against the app owner’s enabled AI allowance.

events:write is not a developer scope. SDK/API ingestion keys use a separate store and security path.

GET /v1/developer/sites/{siteId}/events

Authenticate with Authorization: Bearer YOUR_KEY or x-owleye-api-key: YOUR_KEY. The tracking ID or internal app ID can fill {siteId}, but the key must belong to that exact app.

Terminal window
curl --get 'https://api.example.com/v1/developer/sites/owl_example/events' \
--header 'Authorization: Bearer YOUR_KEY' \
--data-urlencode 'days=7' \
--data-urlencode 'limit=500'

days is capped at 90 and limit at 5,000. The response contains pagination.next_before and pagination.next_event_id; pass them as before and before_event_id for the next stable page. Returned fields exclude raw IPs, query strings, URL fragments, and full custom payloads.

POST /v1/developer/sites/{siteId}/prompt
Terminal window
curl 'https://api.example.com/v1/developer/sites/owl_example/prompt' \
--header 'Authorization: Bearer YOUR_KEY' \
--header 'Content-Type: application/json' \
--data '{"prompt":"Summarise checkout events"}'

The key needs ai:prompt, AI mode must be enabled, and the owner’s member/app allowance must have a prompt remaining. This phase performs quota accounting and returns acceptance without model output. OwlEye never stores the prompt body.

The Settings page can download a real JSON control-plane backup while developer mode is enabled. It contains app metadata, allowed domains, tracking rules, settings, and Pro View dashboard definitions. It deliberately excludes analytics facts, users, sessions, TOTP secrets, API keys, credential hashes, and other authentication material.

Settings also provides an owner-authenticated NDJSON event download:

GET /v1/sites/{siteId}/developer/events-export?days=30&limit=10000

The download requires developer mode but not a developer key. It is capped at 90 days and 10,000 rows, selects bounded privacy-safe fields, and excludes raw IPs, URL query strings/fragments, and full custom payloads. For repeatable automation or larger pagination, use the separately scoped events:read API. Neither path loads an unbounded ClickHouse result into API memory.