Delete Scheduled Stream
curl --request DELETE \
--url https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Scheduled stream deleted successfully",
"schedule_id": "schedule_12345"
}
Streams
Delete Scheduled Stream
Remove a scheduled stream if its status is WAITING and api key matches
DELETE
/
v1
/
scheduled_streams
/
{schedule_id}
Delete Scheduled Stream
curl --request DELETE \
--url https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://streaming.lingopal.ai/v1/scheduled_streams/{schedule_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Scheduled stream deleted successfully",
"schedule_id": "schedule_12345"
}
This endpoint allows you to delete a scheduled stream that is in WAITING status. Only streams that haven’t started yet can be deleted.
Overview
The Delete Scheduled Stream endpoint allows you to remove a scheduled stream from the system. This is useful when you need to cancel a stream that hasn’t started yet.Endpoint Details
- Method:
DELETE - Endpoint:
/v1/scheduled_streams/{schedule_id} - Authentication: Required (API Key)
- Content-Type:
application/json
Parameters
string
required
The unique identifier of the scheduled stream to delete. This ID is returned when you create a scheduled stream.
Request Example
curl -X DELETE "https://streaming.lingopal.ai/v1/scheduled_streams/schedule_12345" \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json"
import requests
url = "https://streaming.lingopal.ai/v1/scheduled_streams/schedule_12345"
headers = {
"X-API-Key": "your-api-key-here",
"Content-Type": "application/json"
}
response = requests.delete(url, headers=headers)
print(response.json())
const scheduleId = 'schedule_12345';
const apiKey = 'your-api-key-here';
fetch(`https://streaming.lingopal.ai/v1/scheduled_streams/${scheduleId}`, {
method: 'DELETE',
headers: {
'X-API-Key': apiKey,
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Response
Success Response (200)
{
"message": "Scheduled stream deleted successfully",
"schedule_id": "schedule_12345"
}
string
A success message confirming the deletion
string
The ID of the deleted scheduled stream
Error Responses
Validation Error (422)
{
"detail": [
{
"loc": ["schedule_id", 0],
"msg": "Invalid schedule ID format",
"type": "value_error"
}
]
}
array
Array of validation error details
array
Location of the error in the request
string
Error message describing the validation issue
string
Type of validation error
Use Cases
- Cancel Future Streams: Remove scheduled streams that are no longer needed
- Clean Up: Delete test or outdated scheduled streams
- Resource Management: Free up system resources by removing unused scheduled streams
Important Notes
Only scheduled streams with status “WAITING” can be deleted. Streams that are already running or completed cannot be deleted.
The schedule_id is returned when you create a scheduled stream using the POST /v1/scheduled_streams endpoint.
Related Endpoints
- List Scheduled Streams - Get all scheduled streams
- Schedule Stream - Create a new scheduled stream
- List Streams - Get all active streams