Skip to main content
Sends events that were captured while the device had no connectivity. wede checks each event on its own: a problem with one event never rejects the others. Accepted events follow exactly the same delivery path as events sent with POST /v1/events.
The wede SDKs capture events with the right checksum and send them for you. See SDKs. Without an SDK, compute the checksum as described below.

Authentication

API key or session token with the sync:write permission. API keys have it. Events are stored in the environment of the credential.

Request body

object[]
required
1 to 500 events.

Integrity checksum

The checksum proves the event was not changed between capture and sync. Compute it once, when you capture the event, and store the event unchanged:
wede recomputes the checksum from the JSON it receives, with JSON.stringify semantics: no spaces, keys in the order you sent them. Any difference in serialisation (key order, spacing, number formatting, escaping) produces a different hash and the event is rejected with integrity_check_failed. This is why the SDKs are the safest way to capture events.

Example

Response

200 OK, even when some events are rejected. Check summary and each entry of results.
object
object[]
One entry per event, in the order you sent them.

Results

Every integrity_check_failed is recorded as a security incident and your tenant administrators are alerted. Only that event is rejected: the rest of the batch, the device and the session are unaffected.

After the batch

For each accepted event, wede emits event.created with "origin": "sync" and delivers the event exactly as it delivers online events: once delivered, the event is completed and its stored payload is cleared (kept until the event is closed when its type sends a team). When the batch is processed, wede emits sync.completed with the summary. See Webhook events.

Errors