Audio Streams
Stop a Specific Audio Stream
Stop a single Vobiz audio stream by stream ID without affecting other active forks on the same call - triggers a Stream stopped status callback on close.
DELETE
/
api
/
v1
/
Account
/
{auth_id}
/
Call
/
{call_uuid}
/
Stream
/
{stream_id}
/
Stop a stream
curl --request DELETE \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/Call/{call_uuid}/Stream/{stream_id}/ \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>'import requests
url = "https://api.vobiz.ai/api/v1/Account/{auth_id}/Call/{call_uuid}/Stream/{stream_id}/"
headers = {
"X-Auth-ID": "<api-key>",
"X-Auth-Token": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-Auth-ID': '<api-key>', 'X-Auth-Token': '<api-key>'}
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/Call/{call_uuid}/Stream/{stream_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));DELETE https://api.vobiz.ai/api/v1/Account/{auth_id}/Call/{call_uuid}/Stream/{stream_id}/
stream_id without affecting other streams that may be running on the same call. Once stopped, Vobiz closes the WebSocket connection for that stream and sends an Event=StopStream status callback if status_callback_url was configured.
This is the REST equivalent of sending a
stop WebSocket event from your server. Both close the stream’s WebSocket. The difference: a server-side stop event also advances the call to the next XML element (or hangs up). This REST DELETE ends the fork; the call itself continues unless it has nothing else keeping it alive.Authentication required:
X-Auth-ID- Your account Auth IDX-Auth-Token- Your account Auth Token
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
auth_id | string | Yes | Your account ID. |
call_uuid | string | Yes | UUID of the call. |
stream_id | string | Yes | ID of the stream to stop. |
Response
Returns HTTP 204 No Content on success. The body is empty. A404 Not Found is returned if the stream_id is unknown, already stopped, or belongs to a different call. Treat stopping an already-stopped stream as idempotent in your code - the WebSocket may have already closed via caller hangup before your DELETE arrived.
Response - 404 Not Found
{
"api_id": "correlation-id-uuid",
"error": "Stream not found"
}
Example
cURL
curl -X DELETE 'https://api.vobiz.ai/api/v1/Account/{auth_id}/Call/{call_uuid}/Stream/{stream_id}/' \
-H 'X-Auth-ID: {auth_id}' \
-H 'X-Auth-Token: {auth_token}'
Was this page helpful?
⌘I
Stop a stream
curl --request DELETE \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/Call/{call_uuid}/Stream/{stream_id}/ \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>'import requests
url = "https://api.vobiz.ai/api/v1/Account/{auth_id}/Call/{call_uuid}/Stream/{stream_id}/"
headers = {
"X-Auth-ID": "<api-key>",
"X-Auth-Token": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-Auth-ID': '<api-key>', 'X-Auth-Token': '<api-key>'}
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/Call/{call_uuid}/Stream/{stream_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));