POST /api/update

Push new content to one or more running activities.

Only send the fields that changed. The state merges into the current state on the device, so a call carrying just primaryText leaves everything else alone.

By activity id

Target a single activity by its activityId.

1
2
3
4
5
6
7
8
9
10
11
12
13
curl -X POST https://api.webliveactivity.com/api/update \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: wla_your_key' \
  -d '{
  "activityId": "act-8f2c1a",
  "widgetContainerId": "acme-orders",
  "state": {
    "primaryText": "Out for delivery",
    "stage": "On the way",
    "progress": 0.7,
    "estimatedMinutes": 8
  }
}'

By multiple activity ids

Pass an array of ids to push the same state to several activities at once.

1
2
3
4
5
6
7
8
9
10
11
12
13
curl -X POST https://api.webliveactivity.com/api/update \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: wla_your_key' \
  -d '{
  "activityIds": [
    "act-8f2c1a",
    "act-9k4d2b"
  ],
  "widgetContainerId": "acme-orders",
  "state": {
    "secondaryText": "Running behind schedule"
  }
}'

By group

Target a group to push the same state to every activity in it.

1
2
3
4
5
6
7
8
9
10
curl -X POST https://api.webliveactivity.com/api/update \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: wla_your_key' \
  -d '{
  "group": "order-tracker",
  "widgetContainerId": "acme-orders",
  "state": {
    "secondaryText": "Kitchen is busy tonight"
  }
}'

Response

Returns { ok, targeted, unknown }: how many activities were pushed, and any ids that did not resolve.

1
2
3
4
5
{
  "ok": true,
  "targeted": 3,
  "unknown": []
}

Examples

Update with an alert

Set priority: 10 to deliver immediately and play a sound; a countdown sends one on its own when it reaches countdownTo. Leave it out (or send 5) for a silent refresh.

1
2
3
4
5
6
7
8
9
10
11
12
13
curl -X POST https://api.webliveactivity.com/api/update \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: wla_your_key' \
  -d '{
  "activityId": "act-8f2c1a",
  "widgetContainerId": "acme-orders",
  "priority": 10,
  "state": {
    "primaryText": "Your driver is arriving",
    "progress": 0.95,
    "estimatedMinutes": 1
  }
}'

Advance segmented steps

Send the full segments array with updated complete values. The array is replaced, not merged.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
curl -X POST https://api.webliveactivity.com/api/update \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: wla_your_key' \
  -d '{
  "activityId": "act-8f2c1a",
  "widgetContainerId": "pizza-tracker",
  "state": {
    "primaryText": "On the way",
    "segments": [
      {
        "label": "Cooking",
        "complete": true
      },
      {
        "label": "On the way",
        "complete": false
      },
      {
        "label": "Delivered",
        "complete": false
      }
    ]
  }
}'

Update a versus score

The versus object merges one level down, so only send what changed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
curl -X POST https://api.webliveactivity.com/api/update \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: wla_your_key' \
  -d '{
  "activityId": "act-8f2c1a",
  "widgetContainerId": "csgo-scores",
  "state": {
    "versus": {
      "leftScore": "16",
      "rightScore": "14",
      "activeSide": "left",
      "leftStatus": "Winner"
    }
  }
}'

Swap the layout live

Change the layout on an update to switch the activity's type mid-flight.

1
2
3
4
5
6
7
8
9
10
11
12
13
curl -X POST https://api.webliveactivity.com/api/update \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: wla_your_key' \
  -d '{
  "activityId": "act-8f2c1a",
  "widgetContainerId": "acme-orders",
  "state": {
    "layout": "picture",
    "primaryText": "Delivered",
    "headerIconUrl": "https://acme.example/delivered-photo.jpg",
    "accessoryText": "Just now"
  }
}'

Restart an expired activity

When restart is true (or when the activity is no longer on screen), the activity restarts instead of updating in place.

1
2
3
4
5
6
7
8
9
10
11
12
curl -X POST https://api.webliveactivity.com/api/update \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: wla_your_key' \
  -d '{
  "activityId": "act-8f2c1a",
  "widgetContainerId": "acme-orders",
  "restart": true,
  "state": {
    "primaryText": "New update available",
    "progress": 0.5
  }
}'

Ready To Start Building Live Activities Without “Building Them”?

Ready To Start Building Today?

No App Store submission, no native codebase to maintain. A link gets your activity onto your users’ screens, and an easy to use API keeps it live.

Includes: 10,000 Free Requests per Month

Movistar RidersMovistar RidersTerrorist9
MapOverpass
12HeroicHeroicCounter TerroristCSGOCSGO EsportsWatch Live
8 PM
Doing LaundryComplete This Task By 8:00 PM
Do LaundryClean FloorEat Lunch
Domino'sCooking
912
Movistar RidersMovistar RidersTerrorist9
MapOverpass
12HeroicHeroicCounter TerroristCSGOCSGO EsportsWatch Live
Live
View LiveMoly’s Cat CamUpdated 3 Seconds AgoCat cam
In The Oven NowMat has your order in the oven.Domino's
CookingOn The WayDelivered
Thinking
Researching API EndpointPreparing changes to Foodscout
ThinkingWorkingComplete
Delivery in 30 MinutesMat is racing your way.Domino's
On The WayDelivered
GTA00:00
GTA00:00:00GTA VI
San Francisco ShockHome1
MapMidtown
3
Dallas FuelAwayOverwatch LeagueWatch Live
United 1423Gate B22 · Seat 14C · SFO → JFK
BoardingIn AirArrived
Boarding
Arriving in 6 MinutesMarcus · Toyota CamryToyota Camry
On The WayArrived
6 Min
Movistar RidersMovistar RidersTerrorist9
MapOverpass
12HeroicHeroicCounter TerroristCSGOCSGO EsportsWatch Live
8 PM
Doing LaundryComplete This Task By 8:00 PM
Do LaundryClean FloorEat Lunch
Domino'sCooking
912
Movistar RidersMovistar RidersTerrorist9
MapOverpass
12HeroicHeroicCounter TerroristCSGOCSGO EsportsWatch Live
Live
View LiveMoly’s Cat CamUpdated 3 Seconds AgoCat cam
In The Oven NowMat has your order in the oven.Domino's
CookingOn The WayDelivered
Thinking
Researching API EndpointPreparing changes to Foodscout
ThinkingWorkingComplete
Delivery in 30 MinutesMat is racing your way.Domino's
On The WayDelivered
GTA00:00
GTA00:00:00GTA VI
San Francisco ShockHome1
MapMidtown
3
Dallas FuelAwayOverwatch LeagueWatch Live
United 1423Gate B22 · Seat 14C · SFO → JFK
BoardingIn AirArrived
Boarding
Arriving in 6 MinutesMarcus · Toyota CamryToyota Camry
On The WayArrived
6 Min
Movistar RidersMovistar RidersTerrorist9
MapOverpass
12HeroicHeroicCounter TerroristCSGOCSGO EsportsWatch Live
8 PM
Doing LaundryComplete This Task By 8:00 PM
Do LaundryClean FloorEat Lunch
Domino'sCooking
912
Movistar RidersMovistar RidersTerrorist9
MapOverpass
12HeroicHeroicCounter TerroristCSGOCSGO EsportsWatch Live
Live
View LiveMoly’s Cat CamUpdated 3 Seconds AgoCat cam
In The Oven NowMat has your order in the oven.Domino's
CookingOn The WayDelivered
Thinking
Researching API EndpointPreparing changes to Foodscout
ThinkingWorkingComplete
Delivery in 30 MinutesMat is racing your way.Domino's
On The WayDelivered
GTA00:00
GTA00:00:00GTA VI
San Francisco ShockHome1
MapMidtown
3
Dallas FuelAwayOverwatch LeagueWatch Live
United 1423Gate B22 · Seat 14C · SFO → JFK
BoardingIn AirArrived
Boarding
Arriving in 6 MinutesMarcus · Toyota CamryToyota Camry
On The WayArrived
6 Min