curl --request DELETE \
--url https://client-api.salesfinity.co/v2/sequencer/templates/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"user_id": "507f1f77bcf86cd799439011"
}
'import requests
url = "https://client-api.salesfinity.co/v2/sequencer/templates/{id}"
payload = { "user_id": "507f1f77bcf86cd799439011" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_id: '507f1f77bcf86cd799439011'})
};
fetch('https://client-api.salesfinity.co/v2/sequencer/templates/{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://client-api.salesfinity.co/v2/sequencer/templates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'user_id' => '507f1f77bcf86cd799439011'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://client-api.salesfinity.co/v2/sequencer/templates/{id}"
payload := strings.NewReader("{\n \"user_id\": \"507f1f77bcf86cd799439011\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://client-api.salesfinity.co/v2/sequencer/templates/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"507f1f77bcf86cd799439011\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.salesfinity.co/v2/sequencer/templates/{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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"507f1f77bcf86cd799439011\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"message": "Invalid ObjectId",
"error": "Bad Request",
"statusCode": 400,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Only the template owner can modify this template",
"error": "Forbidden",
"statusCode": 403,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Template not found",
"error": "Not Found",
"statusCode": 404,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Template is used by 2 sequence step(s). Archive it instead.",
"error": "Conflict",
"statusCode": 409,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Rate limit of 300 requests per minute exceeded. Retry in 12s.",
"error": "Too Many Requests",
"statusCode": 429,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Internal server error",
"error": "Internal Server Error",
"statusCode": 500,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Sequencer service unreachable",
"error": "Bad Gateway",
"statusCode": 502,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Sequencer service timed out",
"error": "Gateway Timeout",
"statusCode": 504,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}Delete an email template
Permanently deletes a template. Refused with 409 while any step on the team uses it, in any sequence, enabled or not. Take it off those steps first, or archive it instead with PATCH /v2/sequencer/templates/{id} and archived: true.
This DELETE takes a JSON body carrying user_id, who must be the template’s author; anyone else, a team admin included, gets 403. A retry after a success returns 404. Counts toward the Sequencer writes rate limit.
curl --request DELETE \
--url https://client-api.salesfinity.co/v2/sequencer/templates/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"user_id": "507f1f77bcf86cd799439011"
}
'import requests
url = "https://client-api.salesfinity.co/v2/sequencer/templates/{id}"
payload = { "user_id": "507f1f77bcf86cd799439011" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({user_id: '507f1f77bcf86cd799439011'})
};
fetch('https://client-api.salesfinity.co/v2/sequencer/templates/{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://client-api.salesfinity.co/v2/sequencer/templates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'user_id' => '507f1f77bcf86cd799439011'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://client-api.salesfinity.co/v2/sequencer/templates/{id}"
payload := strings.NewReader("{\n \"user_id\": \"507f1f77bcf86cd799439011\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://client-api.salesfinity.co/v2/sequencer/templates/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"507f1f77bcf86cd799439011\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.salesfinity.co/v2/sequencer/templates/{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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"507f1f77bcf86cd799439011\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"message": "Invalid ObjectId",
"error": "Bad Request",
"statusCode": 400,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Only the template owner can modify this template",
"error": "Forbidden",
"statusCode": 403,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Template not found",
"error": "Not Found",
"statusCode": 404,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Template is used by 2 sequence step(s). Archive it instead.",
"error": "Conflict",
"statusCode": 409,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Rate limit of 300 requests per minute exceeded. Retry in 12s.",
"error": "Too Many Requests",
"statusCode": 429,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Internal server error",
"error": "Internal Server Error",
"statusCode": 500,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Sequencer service unreachable",
"error": "Bad Gateway",
"statusCode": 502,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}{
"message": "Sequencer service timed out",
"error": "Gateway Timeout",
"statusCode": 504,
"request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
}"archived": true.Example
ThisDELETE takes a JSON body carrying user_id:
curl -X DELETE https://client-api.salesfinity.co/v2/sequencer/templates/6650c2b7a9b8c7d6e5f40456 \
-H 'x-api-key: YOUR_API_KEY' -H 'content-type: application/json' \
-d '{ "user_id": "507f1f77bcf86cd799439011" }'
{ "success": true }
Authorizations
Team-scoped API key generated in the Salesfinity dashboard under Settings → Connections → API & Webhooks. A missing or invalid key returns HTTP 403.
Path Parameters
24-character template id.
Body
The team member this call acts as. Must be an active member of the team the API key belongs to.
"507f1f77bcf86cd799439011"
Response
Deleted.
Always true.