curl --request POST \
--url https://app.formbricks.com/api/v3/responses/batch-delete \
--header 'Content-Type: application/json' \
--cookie next-auth.session-token= \
--data '
{
"ids": [
"clrs1234567890123456789012",
"clrs2234567890123456789012",
"clrs3234567890123456789012"
]
}
'import requests
url = "https://app.formbricks.com/api/v3/responses/batch-delete"
payload = { "ids": ["clrs1234567890123456789012", "clrs2234567890123456789012", "clrs3234567890123456789012"] }
headers = {
"cookie": "next-auth.session-token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'next-auth.session-token=', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: [
'clrs1234567890123456789012',
'clrs2234567890123456789012',
'clrs3234567890123456789012'
]
})
};
fetch('https://app.formbricks.com/api/v3/responses/batch-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://app.formbricks.com/api/v3/responses/batch-delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'clrs1234567890123456789012',
'clrs2234567890123456789012',
'clrs3234567890123456789012'
]
]),
CURLOPT_COOKIE => "next-auth.session-token=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://app.formbricks.com/api/v3/responses/batch-delete"
payload := strings.NewReader("{\n \"ids\": [\n \"clrs1234567890123456789012\",\n \"clrs2234567890123456789012\",\n \"clrs3234567890123456789012\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "next-auth.session-token=")
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.post("https://app.formbricks.com/api/v3/responses/batch-delete")
.header("cookie", "next-auth.session-token=")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"clrs1234567890123456789012\",\n \"clrs2234567890123456789012\",\n \"clrs3234567890123456789012\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.formbricks.com/api/v3/responses/batch-delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'next-auth.session-token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"clrs1234567890123456789012\",\n \"clrs2234567890123456789012\",\n \"clrs3234567890123456789012\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"deleted": 1
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}Delete responses in bulk
Deletes up to 100 responses in one transaction. Requires manage access to the workspace.
A POST custom method, not a DELETE on the collection. A collection-level DELETE that loses its filters — through a client bug, a proxy stripping a query string, a copied curl command — degrades into erasing every response in scope. A distinct path cannot be reached by accident. AIP-165 blesses batchDelete for exactly this reason.
It scope-filters rather than rejecting. Ids belonging to another workspace, and ids that no longer exist, are ignored; the ids in the caller’s own workspace are deleted and deleted reports how many that was. Rejecting the whole call on a foreign id would do two bad things at once: leak that the id exists somewhere, and break retries — after a partially-applied call, an already-deleted id is indistinguishable from a foreign one. Scope-filtering is idempotent and leaks nothing, so a client can safely retry the same batch.
Because deleted can therefore be lower than the number of ids sent — or zero — do not treat a shortfall as an error. Deletion cascades to uploaded files exactly as the single-response delete does — and, exactly as it does, leaves the Hub copy in place. See that operation for why.
workspaceId is the scope, and it is required. Unlike the single-response delete — which resolves the workspace from the response so a caller cannot pair someone else’s id with a scope it happens to hold — a batch has no single response to resolve from, and scope-filtering is only meaningful against a known workspace. Supplying it is safe here because the same value is both what manage is checked against and what the delete is filtered by: the two cannot diverge, so a foreign id matches nothing rather than being deleted under a scope the caller does hold.
curl --request POST \
--url https://app.formbricks.com/api/v3/responses/batch-delete \
--header 'Content-Type: application/json' \
--cookie next-auth.session-token= \
--data '
{
"ids": [
"clrs1234567890123456789012",
"clrs2234567890123456789012",
"clrs3234567890123456789012"
]
}
'import requests
url = "https://app.formbricks.com/api/v3/responses/batch-delete"
payload = { "ids": ["clrs1234567890123456789012", "clrs2234567890123456789012", "clrs3234567890123456789012"] }
headers = {
"cookie": "next-auth.session-token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'next-auth.session-token=', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: [
'clrs1234567890123456789012',
'clrs2234567890123456789012',
'clrs3234567890123456789012'
]
})
};
fetch('https://app.formbricks.com/api/v3/responses/batch-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://app.formbricks.com/api/v3/responses/batch-delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'clrs1234567890123456789012',
'clrs2234567890123456789012',
'clrs3234567890123456789012'
]
]),
CURLOPT_COOKIE => "next-auth.session-token=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://app.formbricks.com/api/v3/responses/batch-delete"
payload := strings.NewReader("{\n \"ids\": [\n \"clrs1234567890123456789012\",\n \"clrs2234567890123456789012\",\n \"clrs3234567890123456789012\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "next-auth.session-token=")
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.post("https://app.formbricks.com/api/v3/responses/batch-delete")
.header("cookie", "next-auth.session-token=")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"clrs1234567890123456789012\",\n \"clrs2234567890123456789012\",\n \"clrs3234567890123456789012\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.formbricks.com/api/v3/responses/batch-delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'next-auth.session-token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"clrs1234567890123456789012\",\n \"clrs2234567890123456789012\",\n \"clrs3234567890123456789012\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"deleted": 1
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}Authorizations
NextAuth session JWT cookie. Development: often next-auth.session-token.
Production (HTTPS): often __Secure-next-auth.session-token. Send the cookie your browser receives after sign-in.
Query Parameters
Workspace identifier. This is the canonical container ID for v3 APIs.
Body
Ids to delete. A POST custom method rather than a DELETE on the collection: a collection-level DELETE that loses its filters degrades into erasing every response in scope, and a distinct path cannot be reached by accident — which is exactly the shape feedbackRecords ships today, a collection DELETE whose filters are the only thing standing between a caller and the whole dataset. AIP-165 blesses the custom-method form.
Response ids to delete, at most 100 per call.
1 - 100 elementsResponse
Batch processed. deleted counts the responses actually removed, which may be fewer than the ids submitted.
Show child attributes
Show child attributes
Was this page helpful?