Live streaming
Delete a Live Stream
Delete a live-stream configuration when its ingest destination and playback entry should be retired. Stop the encoder first, preserve any recording videos you need, and update applications or event pages before sending the account-scoped delete request.
Request
HTTP
DELETE https://api.dyntube.com/v1/live-streams/{id}
Authorization: Bearer YOUR_API_KEY| Name | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | Live-stream ID owned by the authenticated account |
Prepare the retirement
- Stop the encoder and confirm the broadcast is no longer live.
- Get the stream and verify its ID, name, stream key, and intended account.
- Retrieve and preserve recording videos required for replay or compliance.
- Update embeds, schedules, applications, monitoring, and automation that reference the stream.
- Create and test a replacement stream first when the event workflow must continue.
Server-side JavaScript example
JavaScript
const streamId = encodeURIComponent(input.streamId);
const response = await fetch(
`https://api.dyntube.com/v1/live-streams/${streamId}`,
{
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.DYNTUBE_API_KEY}` },
},
);
if (response.status === 404) {
throw new Error("Live stream was not found for this account");
}
if (!response.ok) {
throw new Error(`Live-stream deletion failed: ${response.status}`);
}
console.log("Live-stream deletion accepted");Verify the result
- 200 OK with an empty body means the matching live-stream record was marked deleted.
- 404 Not Found means no matching live stream was visible to the authenticated account.
- Refresh the stream list and request the ID again after a successful response.
- Open affected event pages and applications to confirm they use the intended replacement or replay.
- Record the stream ID, actor, request time, response, and preserved recording identifiers.
Something missing or wrong here? Tell us and we will correct it. New to DynTube? Start with uploading and embedding.