Bulk cancel subscriptions
Cancels each subscription in tokens and emails its customer a cancellation notice. Every unique token is answered: cancelled tokens are listed in success_tokens, and tokens that are not found or could not be cancelled are listed in failed_tokens with the reason. Requires a Bearer token with the subscriptions update permission; customer tokens are refused.
curl --request POST \
--url https://api.fluid.app/api/subscriptions/bulk_cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tokens": [
"sb_3f9a1c7e5b2d4086",
"sb_8c2e6d1f4a7b9053",
"sb_0d4e7a2c9f1b6835"
]
}
'import requests
url = "https://api.fluid.app/api/subscriptions/bulk_cancel"
payload = { "tokens": ["sb_3f9a1c7e5b2d4086", "sb_8c2e6d1f4a7b9053", "sb_0d4e7a2c9f1b6835"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tokens: ['sb_3f9a1c7e5b2d4086', 'sb_8c2e6d1f4a7b9053', 'sb_0d4e7a2c9f1b6835']})
};
fetch('https://api.fluid.app/api/subscriptions/bulk_cancel', 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.fluid.app/api/subscriptions/bulk_cancel",
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([
'tokens' => [
'sb_3f9a1c7e5b2d4086',
'sb_8c2e6d1f4a7b9053',
'sb_0d4e7a2c9f1b6835'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.fluid.app/api/subscriptions/bulk_cancel"
payload := strings.NewReader("{\n \"tokens\": [\n \"sb_3f9a1c7e5b2d4086\",\n \"sb_8c2e6d1f4a7b9053\",\n \"sb_0d4e7a2c9f1b6835\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <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://api.fluid.app/api/subscriptions/bulk_cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tokens\": [\n \"sb_3f9a1c7e5b2d4086\",\n \"sb_8c2e6d1f4a7b9053\",\n \"sb_0d4e7a2c9f1b6835\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/subscriptions/bulk_cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tokens\": [\n \"sb_3f9a1c7e5b2d4086\",\n \"sb_8c2e6d1f4a7b9053\",\n \"sb_0d4e7a2c9f1b6835\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success_tokens": [
"sb_3f9a1c7e5b2d4086",
"sb_8c2e6d1f4a7b9053"
],
"failed_tokens": [
{
"token": "sb_0d4e7a2c9f1b6835",
"error": "subscription not found"
}
],
"meta": {
"request_id": "4f8b2d61-3c9e-4a57-b0e3-7e1d5a9c2f84",
"timestamp": "2026-09-30T14:01:26Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}Body
One cancellation reason code recorded on every cancelled subscription.
A company admin or a back-office caller (a droplet or machine token)
may send any code. Any other caller, including a customer or rep
token, may send only the customer codes (too_expensive,
too_much_product, too_frequent, not_seeing_results,
did_not_like_product, switching_brand,
shipping_or_delivery_issue, taking_a_break,
moving_or_life_change, other). Omitted or null records
merchant_initiated for a company admin or back-office caller and
unknown otherwise. A code the caller may not send returns 422
and cancels nothing.
too_expensive, too_much_product, too_frequent, not_seeing_results, did_not_like_product, switching_brand, shipping_or_delivery_issue, taking_a_break, moving_or_life_change, other, merchant_initiated, support_request, max_cycles_reached, dunning_exhausted, customer_deleted, fraud, unknown, null "merchant_initiated"
curl --request POST \
--url https://api.fluid.app/api/subscriptions/bulk_cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tokens": [
"sb_3f9a1c7e5b2d4086",
"sb_8c2e6d1f4a7b9053",
"sb_0d4e7a2c9f1b6835"
]
}
'import requests
url = "https://api.fluid.app/api/subscriptions/bulk_cancel"
payload = { "tokens": ["sb_3f9a1c7e5b2d4086", "sb_8c2e6d1f4a7b9053", "sb_0d4e7a2c9f1b6835"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tokens: ['sb_3f9a1c7e5b2d4086', 'sb_8c2e6d1f4a7b9053', 'sb_0d4e7a2c9f1b6835']})
};
fetch('https://api.fluid.app/api/subscriptions/bulk_cancel', 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.fluid.app/api/subscriptions/bulk_cancel",
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([
'tokens' => [
'sb_3f9a1c7e5b2d4086',
'sb_8c2e6d1f4a7b9053',
'sb_0d4e7a2c9f1b6835'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.fluid.app/api/subscriptions/bulk_cancel"
payload := strings.NewReader("{\n \"tokens\": [\n \"sb_3f9a1c7e5b2d4086\",\n \"sb_8c2e6d1f4a7b9053\",\n \"sb_0d4e7a2c9f1b6835\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <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://api.fluid.app/api/subscriptions/bulk_cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tokens\": [\n \"sb_3f9a1c7e5b2d4086\",\n \"sb_8c2e6d1f4a7b9053\",\n \"sb_0d4e7a2c9f1b6835\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/subscriptions/bulk_cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tokens\": [\n \"sb_3f9a1c7e5b2d4086\",\n \"sb_8c2e6d1f4a7b9053\",\n \"sb_0d4e7a2c9f1b6835\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success_tokens": [
"sb_3f9a1c7e5b2d4086",
"sb_8c2e6d1f4a7b9053"
],
"failed_tokens": [
{
"token": "sb_0d4e7a2c9f1b6835",
"error": "subscription not found"
}
],
"meta": {
"request_id": "4f8b2d61-3c9e-4a57-b0e3-7e1d5a9c2f84",
"timestamp": "2026-09-30T14:01:26Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"blocked_date": "2026-11-30",
"blocked_day": 30,
"allowed_date": "2026-11-28",
"scheduled_date": "2026-12-10",
"last_bill_date": "2026-11-10",
"requested_date": "2026-11-30",
"payment_uuid": "<string>",
"error_details": [
{
"code": "<string>",
"field": "<string>",
"payment": "not_attempted",
"message": "<string>"
}
],
"coded_recovery": true
}
}