Skip to main content
Missions belong to the optional teams, dispatch and missions module, used by operational verticals that send people to the field. A mission is one team’s assignment to one event. wede creates it when you dispatch a team or when automatic dispatch picks a team. Your apps then move it through its statuses and attach field feedback.

Authentication

All mission endpoints need a session token (Authorization: Bearer <token>).
The integration API key (x-wede-api-key) has no missions:* permission. Calls with an API key return 403 forbidden. Subscribe to the mission.created and mission.status_updated webhooks to follow missions from your server.

Mission statuses

Your apps set every status after CREATED with Update mission status. wede records each status with its timestamp and enforces the lifecycle:
  • A mission only moves forward in the order above. It can skip steps, for example from SENT straight to ON_SITE.
  • FAILED can be set from any status that is not final.
  • COMPLETED and FAILED are final: a mission in either status cannot change again.
  • Any other change returns 409 invalid_transition.
When a mission reaches COMPLETED or FAILED, wede sets the team back to available. The mission outcome never changes the status of the event, which is always its delivery status (see Events).

Substitution when a team does not acknowledge

Your tenant has an acknowledgement timeout, reinforcement_timeout_min in the dispatch settings (set to 0 to turn substitution off). If a mission is still CREATED or SENT when the timeout passes, wede substitutes the team:
  1. The mission is set to FAILED with "feedback": { "reason": "no_acknowledgement" }, and its team becomes available again. You receive mission.status_updated.
  2. wede ranks the free teams that have not yet been called for this event and dispatches the best one. This creates a new mission and sends team.dispatched with substitution: true, mission_id, replaced_team_id and replaced_mission_id.
  3. If no team is free, the event goes back to the dispatch queue (GET /v1/events?undispatched=true) so a dispatcher can handle it.
The replaced team is never called again for the same event, so each substitution moves to a new team.

The mission object

string
Mission UUID.
string
Your tenant.
string
Event the mission responds to.
string
Assigned team.
string | null
Dispatch record that created the mission.
string | null
UUID of the team member in charge.
string
Current status.
string
Channel recorded for reaching the team: internet, sms or voice.
string | null
Vertical of the mission.
string | null
Priority label.
object | null
Operational data for the team. When wede creates the mission (dispatch, automatic dispatch, substitution), this is a snapshot of the event fields marked Show to team in the parser the event was written with, keyed by field name with the field codes as values. Fields the organisation did not mark for the team, and keys outside the parser, are never copied. The snapshot is cleared when the mission ends (COMPLETED, FAILED, REFUSED, SUBSTITUTED, STOOD_DOWN).
object
Labels of the payload fields, keyed by field name: { "label": "Incident type", "value_label": "Cardiac arrest" }. value_label is present for enumerated fields. Absent when the event has no parser. Returned by GET /v1/missions/my and GET /v1/missions/{id}.
array
Every team called to the same event, so a team knows who else is involved and where they stand: { mission_id, team_id, team_name, role, status, dispatched_at, updated_at, channel_used }. role is primary or reinforcement. Never includes team members. Returned by GET /v1/missions/my and GET /v1/missions/{id}.
object | null
Latest feedback sent with a status update.
string | null
Notes for the team.
number | null
Incident latitude.
number | null
Incident longitude.
string
When the mission was created.
string | null
When the mission last received each status.
string
ISO 8601 timestamp.
string
ISO 8601 timestamp.

List missions

Returns missions of your tenant, most recently dispatched first.
string
One of the mission statuses.
string
Only missions of this team.
string
Only missions assigned to this team member.
integer
default:"50"
Maximum number of missions, from 1 to 200.
Response 200

List my missions

For field apps. Returns the missions of every team the signed-in user is a member of, most recently dispatched first, up to 50. Each mission includes parser_schema, labels and event_teams, as in Get a mission. The response is { data, count }. Needs missions:receive (field_operator). This is what a field team works from: payload holds the values of the fields marked Show to team, labels their human labels, parser_schema the field definitions, and event_teams the other teams on the same event with their current state. A field operator reading the event itself (GET /v1/events/{id}) sees the same reduced payload; see Get an event.

Get a mission

Returns the mission object plus parser_schema (the fields marked Show to team of the parser the event was written with, or of the active model of its vertical whose type field maps to the event type; an empty array when there is none), labels and event_teams. Your field app can use parser_schema to build the feedback form.

Create a mission

Creates a mission without a dispatch. It does not change the team’s status and does not record a dispatch: to send a team, use Dispatch a team.
string
required
Event identifier, at least 1 character.
string
required
Team UUID.
string
UUID of a dispatch record.
string
UUID of the team member in charge.
string
default:"internet"
internet, sms or voice.
string
Vertical code.
string
Priority label.
object
Operational data for the team.
string
Up to 1000 characters.
number
Incident latitude.
number
Incident longitude.
team_id must be a team of your tenant, otherwise wede returns 404 team_not_found. Returns 201 with the mission object. If the team already has a mission for this event_id, wede returns that mission with "already_existed": true instead of creating a second one. wede sends the mission.created webhook with { mission_id, event_id, team_id, status: "CREATED" }.

Update mission status

string
required
Mission UUID.
string
required
One of the mission statuses.
object
Structured feedback from the field, for example the fields of your parser. Replaces the stored feedback.
Returns 200 with the updated mission object. wede sends the mission.status_updated webhook with { mission_id, status, feedback }. A user who only has missions:receive (field_operator) can update only missions of a team they are a member of; any other mission returns 403 forbidden. A change that breaks the lifecycle returns 409 invalid_transition.

Errors

SDKs

listMissions, getMission and updateMissionStatus in JavaScript; list_missions, get_mission and update_mission_status in Python.