> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete or disable a live stream

export const MethodSection = ({children}) => children ?? null;

export const MethodSwitch = ({children}) => {
  const tabs = React.Children.toArray(children).map(c => {
    if (!c || !c.props) return null;
    if (c.props.id) return c;
    const inner = c.props.children;
    if (inner && inner.props && inner.props.id) return inner;
    return null;
  }).filter(Boolean);
  const firstId = tabs.length > 0 ? tabs[0].props.id : "";
  const [active, setActive] = React.useState(firstId);
  React.useEffect(() => {
    try {
      const saved = localStorage.getItem("gcore_docs_method");
      if (saved && tabs.find(t => t.props.id === saved)) {
        setActive(saved);
      }
    } catch (_) {}
  }, []);
  React.useEffect(() => {
    try {
      document.querySelectorAll("h2[id], h3[id]").forEach(heading => {
        const visible = heading.offsetParent !== null;
        document.querySelectorAll(`a[href="#${heading.id}"]`).forEach(link => {
          if (link.closest("h1,h2,h3,h4,h5,h6")) return;
          const li = link.closest("li");
          if (li) li.style.display = visible ? "" : "none";
        });
      });
    } catch (_) {}
    window.dispatchEvent(new Event("scroll"));
  }, [active]);
  const handleClick = id => {
    setActive(id);
    try {
      localStorage.setItem("gcore_docs_method", id);
    } catch (_) {}
  };
  return <div>
      <div className="not-prose flex gap-0 border-b border-zinc-200 dark:border-zinc-800 mb-8 mt-2" role="tablist">
        {tabs.map(tab => {
    const isActive = active === tab.props.id;
    return <button key={tab.props.id} role="tab" aria-selected={isActive} onClick={() => handleClick(tab.props.id)} className={["px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors cursor-pointer", isActive ? "border-primary text-primary" : "border-transparent text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200"].join(" ")}>
              {tab.props.label}
            </button>;
  })}
      </div>

      {tabs.map(tab => <div key={tab.props.id} style={{
    display: active === tab.props.id ? "" : "none"
  }}>
          {tab.props.children}
        </div>)}
    </div>;
};

<MethodSwitch>
  <MethodSection id="portal" label="Customer Portal">
    <p>Disable a live stream to stop ingest and playback temporarily, or delete the stream entity when its settings and statistics are no longer needed.</p>

    <p>An enabled live stream can receive a master stream and deliver playback links to viewers. A disabled live stream cannot process ingest, so the player has no video to show even if the embed remains on a page.</p>

    ## Stream disabling

    <p>Use disabling when the stream may be needed again later.</p>

    1. Log in to the [Gcore Customer Portal](https://portal.gcore.com) and navigate to **Streaming** > **Live Streaming**.

    2. Open the required live stream.

    3. Turn off **Enable live stream** and click **Save**.

    <Frame>
      <img src="https://mintcdn.com/gcore/fSo1lTf73j7iZ9KF/images/docs/streaming-platform/live-streaming/create-a-live-stream/live-stream-disable.png?fit=max&auto=format&n=fSo1lTf73j7iZ9KF&q=85&s=08ca03f41ef8c524b5772cd42b23078b" alt="Turn off enable live stream toggle" width="1432" height="572" data-path="images/docs/streaming-platform/live-streaming/create-a-live-stream/live-stream-disable.png" />
    </Frame>

    <p>To restore stream availability, turn on **Enable live stream** and save the settings.</p>

    ## Stream deletion

    <p>Delete a live stream only when the live stream entity must be removed from the account.</p>

    <Warning>
      Live stream deletion is irreversible. It removes stream settings, ingest and playback links, and stream statistics.
    </Warning>

    1. On the **Live Streaming** page, find the stream to remove.

    2. Click **Delete**.

    3. Confirm the deletion.

    <Frame>
      <img src="https://mintcdn.com/gcore/fSo1lTf73j7iZ9KF/images/docs/streaming-platform/live-streaming/create-a-live-stream/live-stream-delete.png?fit=max&auto=format&n=fSo1lTf73j7iZ9KF&q=85&s=c08a0863fefaae1ae1977c38a679de58" alt="Live stream settings UI" width="1431" height="561" data-path="images/docs/streaming-platform/live-streaming/create-a-live-stream/live-stream-delete.png" />
    </Frame>

    <p>Saved recordings are not deleted with the live stream. If a recording was created before deletion, it remains available as a separate VOD video in Video Hosting.</p>
  </MethodSection>

  <MethodSection id="api" label="REST API">
    <p>Disable or delete live streams with the Streams API. All requests authenticate with an [API token](/account-settings/api-tokens).</p>

    <p>Set the API token and live stream ID before running the examples:</p>

    ```bash theme={null}
    export GCORE_API_KEY="{YOUR_API_KEY}"
    export STREAM_ID="{STREAM_ID}"
    ```

    ## Stream disabling

    <p>Set `stream.active` to `false` with the [Change stream](/api-reference/streaming/streams/change-live-stream) endpoint to stop ingest and playback without removing the stream entity.</p>

    ```bash theme={null}
    curl -X PATCH "https://api.gcore.com/streaming/streams/$STREAM_ID" \
      -H "Authorization: APIKey $GCORE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"stream":{"active":false}}'
    ```

    <p>The API returns the updated stream object with `active` set to `false`.</p>

    ## Stream enabling

    <p>Set `stream.active` to `true` when the stream should accept ingest and serve playback links again.</p>

    ```bash theme={null}
    curl -X PATCH "https://api.gcore.com/streaming/streams/$STREAM_ID" \
      -H "Authorization: APIKey $GCORE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"stream":{"active":true}}'
    ```

    <p>The API returns the updated stream object with `active` set to `true`.</p>

    ## Stream deletion

    <p>Use the [Delete stream](/api-reference/streaming/streams/delete-live-stream) endpoint only when the stream entity must be removed permanently.</p>

    <Warning>
      Live stream deletion is irreversible. It removes stream settings, ingest and playback links, and stream statistics.
    </Warning>

    ```bash theme={null}
    curl -X DELETE "https://api.gcore.com/streaming/streams/$STREAM_ID" \
      -H "Authorization: APIKey $GCORE_API_KEY"
    ```

    <p>A successful delete request returns no response body. Saved recordings are not deleted with the live stream, and recordings created before deletion remain available as separate VOD videos in Video Hosting.</p>
  </MethodSection>
</MethodSwitch>
