Skip to main content
DELETE
/
v1
/
{workspace}
/
preference_category
/
translation
/
content
/
{locale}
/
Delete Translation
curl -X DELETE "https://management-api.suprsend.com/v1/{workspace}/preference_category/translation/content/{locale}/" \
  --header "Authorization: ServiceToken {token}" \
  --header "Content-Type: application/json"
import requests

url = "https://management-api.suprsend.com/v1/{workspace}/preference_category/translation/content/{locale}/"

headers = {"ServiceToken <token>": "<api-key>"}

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

print(response.text)
const options = {method: 'DELETE', headers: {'ServiceToken <token>': '<api-key>'}};

fetch('https://management-api.suprsend.com/v1/{workspace}/preference_category/translation/content/{locale}/', 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://management-api.suprsend.com/v1/{workspace}/preference_category/translation/content/{locale}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"ServiceToken <token>: <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"
"net/http"
"io"
)

func main() {

url := "https://management-api.suprsend.com/v1/{workspace}/preference_category/translation/content/{locale}/"

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

req.Header.Add("ServiceToken <token>", "<api-key>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://management-api.suprsend.com/v1/{workspace}/preference_category/translation/content/{locale}/")
.header("ServiceToken <token>", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://management-api.suprsend.com/v1/{workspace}/preference_category/translation/content/{locale}/")

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

request = Net::HTTP::Delete.new(url)
request["ServiceToken <token>"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "code": 400,
  "message": "invalid/unsupported locale: 'apl'"
}
{
"code": 401,
"message": "ServiceToken not found"
}
{
"code": 404,
"message": "translation not found for locale: es"
}

Authorizations

ServiceToken <token>
string
header
required

You can get Service Token from SuprSend dashboard -> Account Settings -> Service Tokens section.

Path Parameters

workspace
string
required

Workspace slug (staging, production, etc.)

locale
string
required

Locale code (e.g., es, fr, de, ja)

Response

Successfully deleted translation