Skip to main content
Accepts an event and returns 202 Accepted at once. wede then delivers it in the background according to your continuity mode, the connectivity of the event’s zone and your channel cascade. Follow the outcome with webhooks or GET /v1/events/:event_id.

Authentication

API key or session token with the events:write permission. API keys have it. The event is stored in the environment of the credential: sandbox for wede_test_ keys, production for wede_live_ keys and session tokens.

Request body

string
required
Event type: an active type of your catalog for this vertical, lowercase codes such as cardiac_arrest (see GET /v1/catalog). Otherwise the request fails with 422 unknown_event_type, and known_types lists accepted codes.
string
required
Vertical of the operation, for example healthcare. Must be a vertical active in wede, otherwise 422 unknown_vertical.
string
One of low, normal, high, critical. Without it, the default priority of the event type applies (normal when the type has none).
string
required
1 to 128 characters. Identifies the operation. The same key again in the same environment returns 409 duplicate_event. See Idempotency.
object
required
Your operation data, any JSON object. wede delivers it and clears the stored copy once a channel confirms delivery.
object
Optional context about where and how the event was produced.
object
Optional one-off recipient for this event, used for this delivery only. When the delivery goes through the fallback channels, wede keeps it encrypted with your organisation’s key while the delivery runs and removes it when it ends. It is never kept with the event.
Unknown top-level fields are ignored.

Example

Response

202 Accepted
string
Event ID (UUID).
string
The key you sent.
string
Always pending at this point.
string
production or sandbox.
string
How the event reached wede. Always rest_full for events submitted to this endpoint. The channel used to deliver the event is channel_used, returned by GET /v1/events/:event_id and sent in the event.delivered webhook.
string
Request identifier.
The response also contains estimated_delivery_ms. Do not rely on it: it is not a measurement of the delivery.
object
What the optional teams module will do with this event: status is queued (automatic dispatch), manual (an operator decides), not_dispatchable with reason: type_does_not_require_teams (the type sends nobody), off (no teams module) or sandbox.

What happens next

  1. wede emits event.created to your webhooks.
  2. wede picks the delivery path:
    • In store-and-forward mode, the event is queued for delivery when connectivity returns (channel_used: "queued_offline").
    • When the zone is online or degraded, the event is delivered over the internet path and becomes completed: rest_full, or rest_compressed for high and critical events in a degraded zone.
    • When the zone is sms_only, voice_only or offline, wede follows your channel cascade (SMS, voice, satellite, LoRa, edge) in the order you configured. The first channel that delivers makes the event completed. If no channel in the cascade delivers, the event stays pending and is queued (queued_offline) rather than dropped.
  3. wede emits event.delivered (status completed), event.failed or event.status_changed (queued, status pending) with the result. See Webhook events.
  4. Once the event is completed, wede clears its stored payload.
In sandbox the same decision runs against the simulated state of the zone, no message leaves wede, and a simulated delivery also ends completed.

Errors