The HTTP API that TapCub currently makes public is for data collection: writing behavior from web pages, servers and logs into your project. Reporting, exports and other features are available in the console, and more public endpoints will follow once they are stable.
Endpoints
| API | What it does | Credential |
|---|---|---|
| Collect (browser) | The web script sends pageviews and events | Public site ID, no key |
| Server events | Send orders, sign-ins and other events from your server | A project-bound wck_ key |
| Log import | Bulk-import access logs from a gateway or server | A project-bound wck_ key |
Every endpoint lives under /api/v1. The v1 in the path is the version; there is no separate version header.
Start with an SDK
Most integrations never call these endpoints directly:
- For websites, use JavaScript (w.js). Pageviews, sessions and sources are captured automatically.
- On the server, prefer the Server SDKs. They already handle batching, retries and dedupe.
Call the API yourself only when there is no SDK for your language, or when you push data straight from a gateway.
Getting set up
Create a key
Create an API key in your project settings and grant only the collection scopes you need. See Authentication.
Send a test event
Send one event in debug mode and check that the response has no errors or warnings.
Check the realtime report
Open the realtime page in the console, confirm the event arrived, then switch on production traffic.
Request format, error codes and rate limits are in Conventions, errors & rate limits.