Backfill historical events (synchronous, up to 1000)
Bulk-loads historical events. Same batch shapes as /api/v1/t but the cap is 1000 (over → 400). Processing is synchronous and always returns processed:true.
Metering (conversion) events MUST carry a client-provided eventId (format ^[A-Za-z0-9_.-]{8,64}$) so the ledger can deduplicate; any missing one fails the whole request with 400 MISSING_EVENT_ID and the 0-based affectedIndices.
Auth: X-API-Key (also ?_ak / ?key), no extra scope gate.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Single event, array, or { "events": [...] } wrapper (max 1000).
A single tracking event. eventName is required; everything else is optional. Every field accepts both camelCase and snake_case aliases (e.g. visitorId/visitor_id). Unknown top-level keys are preserved as part of the raw envelope, except the internal derived-event provenance fields (source, derivedRuleId, derivationDepth) which are hard-stripped from external payloads.
object
Event name (aliases event / event_name). Envelope validation expects ^[a-z0-9_]{1,100}$; a non-matching name is a warn-level error (still processed). A missing eventName marks the event invalid.
Device/browser-level ID (alias visitor_id). Defaults to "anon" if omitted (warn-level).
Logged-in user ID (alias user_id).
Session ID (alias session_id). Tier-1 attribution key.
Custom key-value payload. Monetary amounts go in amount (or value) in minor units (cents). currency defaults to CNY. Max ~32 KB serialized (warn-level properties_too_large over the limit).
object
Event time, ISO 8601 (aliases client_timestamp / timestamp). Unparseable values are a warn-level error.
Optional client-supplied idempotency/dedup key (alias event_id). Must match ^[A-Za-z0-9_.-]{8,64}$; otherwise it is ignored (with a warning) and the server generates one. REQUIRED for metering events on the backfill endpoint.
Short-link ID for explicit attribution (alias short_link_id).
Short code for direct-landing attribution (aliases _tk / short_link_code).
Recommended unified Click ID map covering all 29 ad platforms, e.g. { "bd_vid": "...", "gclid": "..." }. Alternatives: a top-level click_id, or legacy strongly-typed top-level fields (bdVid, gclid, fbclid, … — cover only the earlier ~15 platforms).
object
Full page URL; Click IDs are auto-extracted from its query string.
Alias utm_source
Alias utm_medium
Alias utm_campaign
Alias utm_term
Alias utm_content
A single tracking event. eventName is required; everything else is optional. Every field accepts both camelCase and snake_case aliases (e.g. visitorId/visitor_id). Unknown top-level keys are preserved as part of the raw envelope, except the internal derived-event provenance fields (source, derivedRuleId, derivationDepth) which are hard-stripped from external payloads.
object
Event name (aliases event / event_name). Envelope validation expects ^[a-z0-9_]{1,100}$; a non-matching name is a warn-level error (still processed). A missing eventName marks the event invalid.
Device/browser-level ID (alias visitor_id). Defaults to "anon" if omitted (warn-level).
Logged-in user ID (alias user_id).
Session ID (alias session_id). Tier-1 attribution key.
Custom key-value payload. Monetary amounts go in amount (or value) in minor units (cents). currency defaults to CNY. Max ~32 KB serialized (warn-level properties_too_large over the limit).
object
Event time, ISO 8601 (aliases client_timestamp / timestamp). Unparseable values are a warn-level error.
Optional client-supplied idempotency/dedup key (alias event_id). Must match ^[A-Za-z0-9_.-]{8,64}$; otherwise it is ignored (with a warning) and the server generates one. REQUIRED for metering events on the backfill endpoint.
Short-link ID for explicit attribution (alias short_link_id).
Short code for direct-landing attribution (aliases _tk / short_link_code).
Recommended unified Click ID map covering all 29 ad platforms, e.g. { "bd_vid": "...", "gclid": "..." }. Alternatives: a top-level click_id, or legacy strongly-typed top-level fields (bdVid, gclid, fbclid, … — cover only the earlier ~15 platforms).
object
Full page URL; Click IDs are auto-extracted from its query string.
Alias utm_source
Alias utm_medium
Alias utm_campaign
Alias utm_term
Alias utm_content
object
A single tracking event. eventName is required; everything else is optional. Every field accepts both camelCase and snake_case aliases (e.g. visitorId/visitor_id). Unknown top-level keys are preserved as part of the raw envelope, except the internal derived-event provenance fields (source, derivedRuleId, derivationDepth) which are hard-stripped from external payloads.
object
Event name (aliases event / event_name). Envelope validation expects ^[a-z0-9_]{1,100}$; a non-matching name is a warn-level error (still processed). A missing eventName marks the event invalid.
Device/browser-level ID (alias visitor_id). Defaults to "anon" if omitted (warn-level).
Logged-in user ID (alias user_id).
Session ID (alias session_id). Tier-1 attribution key.
Custom key-value payload. Monetary amounts go in amount (or value) in minor units (cents). currency defaults to CNY. Max ~32 KB serialized (warn-level properties_too_large over the limit).
object
Event time, ISO 8601 (aliases client_timestamp / timestamp). Unparseable values are a warn-level error.
Optional client-supplied idempotency/dedup key (alias event_id). Must match ^[A-Za-z0-9_.-]{8,64}$; otherwise it is ignored (with a warning) and the server generates one. REQUIRED for metering events on the backfill endpoint.
Short-link ID for explicit attribution (alias short_link_id).
Short code for direct-landing attribution (aliases _tk / short_link_code).
Recommended unified Click ID map covering all 29 ad platforms, e.g. { "bd_vid": "...", "gclid": "..." }. Alternatives: a top-level click_id, or legacy strongly-typed top-level fields (bdVid, gclid, fbclid, … — cover only the earlier ~15 platforms).
object
Full page URL; Click IDs are auto-extracted from its query string.
Alias utm_source
Alias utm_medium
Alias utm_campaign
Alias utm_term
Alias utm_content
Example
{ "events": [ { "eventName": "user_paid", "visitorId": "vid_abc123", "eventId": "order-2026-0001", "properties": { "amount": 9900, "currency": "CNY" }, "clientTimestamp": "2026-06-01T08:00:00Z" } ]}Responses
Section titled “Responses”Backfill processed.
object
Invalid JSON, batch over 1000, or metering events missing eventId.
object
Human-readable error message.
Seconds to wait before retrying (present on 429/503).
400 returned when metering events in a backfill batch lack eventId.
object
0-based indices of the offending events.
Examples
{ "error": "单次最多提交 1000 个事件"}{ "error": "MISSING_EVENT_ID", "affectedIndices": [ 0, 3 ], "message": "计量级事件 backfill 必须提供 eventId"}Missing or invalid API key.
object
Human-readable error message.
Seconds to wait before retrying (present on 429/503).
Examplegenerated
{ "error": "example", "retryAfter": 1, "message": "example", "affectedIndices": [ 1 ]}Metering-selector lookup failed (fail-closed). Retry after 30s.
503 transient error with a suggested retry delay.
object
Suggested seconds to wait before retrying (30 or 60).
Example
{ "error": "SELECTOR_LOOKUP_FAILED", "retryAfter": 30}