Skip to main content
PATCH
/
v1
/
subscriber_list
/
{list_id}
/
version
/
{version_id}
/
delete
/
Delete Draft List
curl --request PATCH \
  --url https://hub.suprsend.com/v1/subscriber_list/{list_id}/version/{version_id}/delete/ \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://hub.suprsend.com/v1/subscriber_list/{list_id}/version/{version_id}/delete/"

headers = {"Authorization": "Bearer <token>"}

response = requests.patch(url, headers=headers)

print(response.text)
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

fetch('https://hub.suprsend.com/v1/subscriber_list/{list_id}/version/{version_id}/delete/', 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://hub.suprsend.com/v1/subscriber_list/{list_id}/version/{version_id}/delete/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://hub.suprsend.com/v1/subscriber_list/{list_id}/version/{version_id}/delete/"

req, _ := http.NewRequest("PATCH", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://hub.suprsend.com/v1/subscriber_list/{list_id}/version/{version_id}/delete/")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://hub.suprsend.com/v1/subscriber_list/{list_id}/version/{version_id}/delete/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "success": true
}
{
"code": 404,
"error_code": "not_found",
"type": "NotFound",
"message": "version_id 01JR6PCW8H9K3H40XZV4A5R not found for list_id _list_id_",
"detail": "version_id 01JR6PCW8H9K3H40XZV4A5R not found for list_id _list_id_"
}

Authorizations

Authorization
string
header
required

Pass as Bearer <API_KEY>. Get API Key from SuprSend dashboard Developers -> API Keys section.

Path Parameters

list_id
string
required

Unique string identifier of the list which you want to delete

version_id
string
default:__version_id__
required

Unique identifier of the draft version of the list which needs to be deleted

Response

200

The response is of type object.