Skip to main content
DELETE
/
live-activity
/
stream
/
{stream_key}
Node
import ActivitySmith from "activitysmith";

const activitysmith = new ActivitySmith({
  apiKey: process.env.ACTIVITYSMITH_API_KEY,
});

await activitysmith.liveActivities.endStream("prod-web-1", {
  content_state: {
    title: "Server Health",
    subtitle: "prod-web-1",
    type: "metrics",
    metrics: [
      { label: "CPU", value: 7, unit: "%" },
      { label: "MEM", value: 38, unit: "%" },
    ],
  },
});
{
  "success": true,
  "operation": "ended",
  "stream_key": "linode-vps",
  "activity_id": "h8QmSyYFTuwOIF6Wh3YcZlzHLhUcr034",
  "devices_queued": 1,
  "timestamp": "2025-08-12T12:10:00.000Z"
}

Documentation Index

Fetch the complete documentation index at: https://activitysmith.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Use this endpoint when the process you are tracking is finished and you want to dismiss the managed Live Activity stream.
  • Call it with the same stream_key you used for stream updates.
  • You can include optional content_state with final values.
  • By default, iOS removes the Live Activity after two minutes.
  • Set auto_dismiss_minutes to choose a different dismissal time, including 0 for immediate dismissal.

Authorizations

Authorization
string
header
required

Required. Include Authorization: Bearer ask_123456789 in every request. Replace ask_123456789 with your API key.

Path Parameters

stream_key
string
required

Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens.

Maximum string length: 255
Pattern: ^[A-Za-z0-9_-]+$

Body

application/json

Optional payload for ending a managed stream. When omitted, ActivitySmith ends the stream using the latest known state when possible.

content_state
object

Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, metrics, stats, and alert types.

action
object

Optional single action button shown in the Live Activity UI.

alert
object

Response

Managed stream ended

Returned after a managed stream is ended and removed.

success
boolean
required
operation
enum<string>
required
Available options:
ended
stream_key
string
required
timestamp
string<date-time>
required
activity_id
string | null
devices_queued
integer
devices_notified
integer