Skip to main content

What an event is

An event is any operation, alert or notification your system needs to deliver reliably, whatever the state of the network. It is the core primitive of wede: you send an event, and wede delivers it through the channel that the zone state and your continuity mode allow. An event can come from anywhere in your system: a dispatcher, a field team, a payment terminal or a request from one of your own customers.

Send an event

POST /v1/events
Unknown top-level fields are ignored. Set metadata.zone_id to the code of one of your zones: wede uses that zone’s connectivity state to decide how the event is delivered. Only zones linked to your organisation are resolved: a zone code that is not yours is ignored and the event is stored without a zone. An event without a zone is handled as online. Response 202:
channel_selected is how the event reached wede, which is always rest_full for API submissions. The channel that actually delivered the event is channel_used on the event and channel in the event.delivered webhook.

Event types

An event’s type is an event type of your catalog: your organisation’s own vocabulary, organised by vertical and category, with lowercase codes such as cardiac_arrest or delivery_confirmed. wede pre-loads a starting catalog for each of your verticals; your administrators keep what fits, add their own types and deactivate the rest, in the dashboard (Catalog). Each type says whether the event needs a field team (requires_teams), which equipment or qualifications resolve it, and its default priority. Types that need nobody are delivered and recorded; types that need a team enter dispatch. Read the catalog with GET /v1/catalog. wede looks for an active type with that code in your catalog for the event’s vertical. Anything else returns 422 unknown_event_type, with the accepted codes in known_types. The response of POST /v1/events carries dispatch.status: queued or manual when the type sends a team, not_dispatchable with reason: type_does_not_require_teams when it does not, off when your organisation has no teams module, sandbox in sandbox. wede staff roles never see your types, categories, payload or metadata: only the vertical, priority, channel, timestamps and whether the type sends a team.

Priorities

Priority is also used when wede scores teams for a dispatch. See Score engine.

Statuses

The event status is the delivery status. If you use the optional teams and dispatch module, the outcome of a mission is tracked on the mission itself and never changes the status of the event. Every change is written to the event lifecycle, returned by GET /v1/events/:event_id as lifecycle entries with status, channel, note and timestamp.

Channels

channel_used is one of rest_full, rest_compressed, sms, voice, satellite, lora, edge or queued_offline. See offline-first architecture for what each channel means. Delivery outcomes are also sent as webhooks: event.delivered carries { event_id, status: "completed", channel, attempts }, event.failed carries the same fields with status: "failed" and error, and event.status_changed is sent with status: "pending" when an event is queued for store-and-forward.

Idempotency

idempotency_key is required. Sending the same key again returns 409 duplicate_event and never creates a second event, so retries are always safe. Choose keys that identify the operation, not the API call:
  • Your internal ID: order-29841-confirmed
  • Entity, date and sequence: amb07-2026-09-26-0001
  • A UUID generated when the operation is created: 550e8400-e29b-41d4-a716-446655440000
The same key is also checked against events received through Sync, so an operation sent online and later in a batch is stored once.

Payload minimisation

When an event becomes completed, wede clears the stored payload ({}) and keeps only identifiers, type, channel and lifecycle. Keep in your own systems any payload data you need after delivery.

Environments

Every event is stored with the environment of the credential that created it: production for wede_live_ keys and sessions, sandbox for wede_test_ keys. Sandbox events are never sent to a real provider: delivery is simulated with the same channel decision as production and recorded on the event with lifecycle notes that start with sandbox:. A simulated delivery ends completed (with its payload cleared), exactly as in production. Sandbox events never count toward usage or billing. An API key only reads events of its own environment. A session reads production by default and can pass environment=sandbox. The same idempotency_key can exist once in each environment.

Validation errors

Examples by vertical

The types below are examples of codes from a tenant’s catalog; the first of each vertical is pre-loaded by wede, the others show what a tenant adds.

List and read events

Filters: status, type, category (the code of a category of your catalog), vertical, zone_id, undispatched, legacy_type, limit (default 50, maximum 200) and cursor (the opaque next_cursor of the previous page). Sessions can also pass environment. undispatched=true returns only events whose type sends a team and that have no active mission (no mission, or only missions that ended FAILED): this is the dispatch queue used by the optional teams module. legacy_type=true returns open events sent before 8 October 2026 with a type that is not in your catalog. The response is { data, next_cursor, total_count }, where each item has event_id, type, category, category_name, requires_teams, vertical, priority, status, channel_used, created_at, updated_at, zone_id and environment. GET /v1/events/:event_id returns the event with its lifecycle.