Skip to content

Remove Broadcast ​

DELETEhttps://api.repliz.com/public/broadcast/{broadcastId}

Delete a broadcast that is done or canceled, with its list of recipients. The messages already sent stay in the chats.

Endpoint Details ​

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Repliz
  • Scope (Bearer only): broadcast:write
  • Access Tier: Premium+

Parameters ​

ParameterTypeRequiredDescription
broadcastIdstringYesID of the broadcast, the _id from Get Broadcast or the broadcastId from Create Broadcast.

Example Request ​

bash
curl -X DELETE "https://api.repliz.com/public/broadcast/6927e1c2e4b0a1f2c3d4e5f6" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"
javascript
import axios from 'axios';

const response = await axios.delete('https://api.repliz.com/public/broadcast/6927e1c2e4b0a1f2c3d4e5f6', {
  auth: {
    username: 'YOUR_ACCESS_KEY',
    password: 'YOUR_SECRET_KEY',
  },
});

console.log(response.status);
javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');

const response = await fetch('https://api.repliz.com/public/broadcast/6927e1c2e4b0a1f2c3d4e5f6', {
  method: 'DELETE',
  headers: {
    Authorization: `Basic ${credentials}`,
  },
});

console.log(response.status);

Response ​

json
// No content returned on success
json
{
  "code": 400,
  "message": "cancel the broadcast before deleting it"
}
json
{
  "code": 404,
  "message": "broadcast not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}