Translations
Delete a Study translation
Deletes the translation for a locale.
DELETE
/
v2
/
studies
/
{studyId}
/
translations
/
{locale}
Delete a Study translation
curl --request DELETE \
--url https://api.sprig.com/v2/studies/{studyId}/translations/{locale} \
--header 'Authorization: <api-key>' \
--header 'If-Match: <if-match>'import requests
url = "https://api.sprig.com/v2/studies/{studyId}/translations/{locale}"
headers = {
"If-Match": "<if-match>",
"Authorization": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'If-Match': '<if-match>', Authorization: '<api-key>'}
};
fetch('https://api.sprig.com/v2/studies/{studyId}/translations/{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://api.sprig.com/v2/studies/{studyId}/translations/{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 => [
"Authorization: <api-key>",
"If-Match: <if-match>"
],
]);
$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://api.sprig.com/v2/studies/{studyId}/translations/{locale}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "<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://api.sprig.com/v2/studies/{studyId}/translations/{locale}")
.header("If-Match", "<if-match>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sprig.com/v2/studies/{studyId}/translations/{locale}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"resource": {
"type": "<string>",
"id": "<string>"
}
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"resource": {
"type": "<string>",
"id": "<string>"
}
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"resource": {
"type": "<string>",
"id": "<string>"
}
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"resource": {
"type": "<string>",
"id": "<string>"
}
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"resource": {
"type": "<string>",
"id": "<string>"
}
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"resource": {
"type": "<string>",
"id": "<string>"
}
}
]
}Authorizations
Use API-Key YOUR_API_KEY. The key selects the Production or Development environment.
Headers
Quoted Study version last read from ETag or Study.version. Required on mutating Study writes.
Example:
"\"126300\""
Path Parameters
One BCP 47 locale token.
Required string length:
2 - 35Pattern:
^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$Response
No Content
Was this page helpful?
⌘I
Delete a Study translation
curl --request DELETE \
--url https://api.sprig.com/v2/studies/{studyId}/translations/{locale} \
--header 'Authorization: <api-key>' \
--header 'If-Match: <if-match>'import requests
url = "https://api.sprig.com/v2/studies/{studyId}/translations/{locale}"
headers = {
"If-Match": "<if-match>",
"Authorization": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'If-Match': '<if-match>', Authorization: '<api-key>'}
};
fetch('https://api.sprig.com/v2/studies/{studyId}/translations/{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://api.sprig.com/v2/studies/{studyId}/translations/{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 => [
"Authorization: <api-key>",
"If-Match: <if-match>"
],
]);
$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://api.sprig.com/v2/studies/{studyId}/translations/{locale}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "<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://api.sprig.com/v2/studies/{studyId}/translations/{locale}")
.header("If-Match", "<if-match>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sprig.com/v2/studies/{studyId}/translations/{locale}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"resource": {
"type": "<string>",
"id": "<string>"
}
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"resource": {
"type": "<string>",
"id": "<string>"
}
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"resource": {
"type": "<string>",
"id": "<string>"
}
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"resource": {
"type": "<string>",
"id": "<string>"
}
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"resource": {
"type": "<string>",
"id": "<string>"
}
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>",
"resource": {
"type": "<string>",
"id": "<string>"
}
}
]
}