Skip to content

Remove Template ​

DELETEhttps://api.repliz.com/public/template/{templateId}

Permanently delete an automation template so it will no longer be available for configuring automations.

Endpoint Details ​

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey))
  • Access Tier: Gold+

Parameters ​

ParameterTypeRequiredDescription
templateIdstringYesID of the template to remove, the _id from Get Template. Schedules that already use it keep their copy of the configuration.

Example Request ​

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

const templateId = '6a912e6c8133bfb870b220d3';

const response = await axios.delete(`https://api.repliz.com/public/template/${templateId}`, {
  auth: {
    username: 'YOUR_ACCESS_KEY',
    password: 'YOUR_SECRET_KEY',
  },
});

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

const templateId = '6a912e6c8133bfb870b220d3';

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

const data = await response.json();
console.log(data);

Response ​

json
// No content returned on success
json
{
  "code": 404,
  "message": "template not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}