English
English
Appearance
English
English
Appearance
https://api.repliz.com/public/broadcast/{broadcastId}/cancelStop a broadcast that is still sending. The chats that haven't got it yet are skipped with reason canceled, and the messages already sent stay in the chats.
Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Replizbroadcast:write| Parameter | Type | Required | Description |
|---|---|---|---|
broadcastId | string | Yes | ID of the broadcast, the _id from Get Broadcast or the broadcastId from Create Broadcast. |
curl -X PUT "https://api.repliz.com/public/broadcast/6927e1c2e4b0a1f2c3d4e5f6/cancel" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
-H "Content-Type: application/json" \
-d '{}'import axios from 'axios';
const response = await axios.put(
'https://api.repliz.com/public/broadcast/6927e1c2e4b0a1f2c3d4e5f6/cancel',
{},
{
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
},
);
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const response = await fetch('https://api.repliz.com/public/broadcast/6927e1c2e4b0a1f2c3d4e5f6/cancel', {
method: 'PUT',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
console.log(response.status);// No content returned on success{
"code": 400,
"message": "broadcast is not running"
}{
"code": 404,
"message": "broadcast not found"
}{
"code": 401,
"message": "unauthorized"
}