Opt a subscription's reminder phone out of SMS
Records that the customer no longer agrees to subscription texts, for a subscription’s reminder phone. Appends an opt_out event to the consent ledger with source admin and the acting admin as actor, and stops reminders to that phone the way a STOP reply does. It never opts a phone in: opt-in stays with the shopper. phone_ref must be the reference the read returned; a phone that changed since, even to one with the same last 4 digits, is refused (phone_changed). A key the request does not declare is refused. Repeating it on an opted-out phone changes nothing. Requires the subscriptions update permission and an admin user (a droplet or client token is refused), and Subscription Pro active for the company. Returns the standing after the write.
curl --request POST \
--url https://api.fluid.app/api/subscriptions/{token}/sms_consent/opt_out \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_ref": "5b1f0c2e9a7d4e83"
}
'import requests
url = "https://api.fluid.app/api/subscriptions/{token}/sms_consent/opt_out"
payload = { "phone_ref": "5b1f0c2e9a7d4e83" }
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({phone_ref: '5b1f0c2e9a7d4e83'})
};
fetch('https://api.fluid.app/api/subscriptions/{token}/sms_consent/opt_out', 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/{token}/sms_consent/opt_out",
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([
'phone_ref' => '5b1f0c2e9a7d4e83'
]),
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/{token}/sms_consent/opt_out"
payload := strings.NewReader("{\n \"phone_ref\": \"5b1f0c2e9a7d4e83\"\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/{token}/sms_consent/opt_out")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_ref\": \"5b1f0c2e9a7d4e83\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/subscriptions/{token}/sms_consent/opt_out")
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 \"phone_ref\": \"5b1f0c2e9a7d4e83\"\n}"
response = http.request(request)
puts response.read_body{
"sms_consent": {
"status": "opted_out",
"phone_last4": "0147",
"phone_ref": "5b1f0c2e9a7d4e83",
"events": [
{
"event": "opt_out",
"source": "admin",
"occurred_at": "2026-10-12T14:30:00Z"
},
{
"event": "opt_in",
"source": "keyword_yes",
"occurred_at": "2026-10-11T09:12:44Z"
},
{
"event": "opt_in_requested",
"source": "checkout",
"occurred_at": "2026-10-10T17:03:10Z"
}
]
},
"meta": {
"request_id": "3e8b1f2a-6c4d-4a7e-9b10-2d5f8c3a1e67",
"timestamp": "2026-10-11T09:13:02Z"
}
}{
"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
}
}{
"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
}
}Authorizations
Bearer token authentication
Path Parameters
Body
curl --request POST \
--url https://api.fluid.app/api/subscriptions/{token}/sms_consent/opt_out \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_ref": "5b1f0c2e9a7d4e83"
}
'import requests
url = "https://api.fluid.app/api/subscriptions/{token}/sms_consent/opt_out"
payload = { "phone_ref": "5b1f0c2e9a7d4e83" }
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({phone_ref: '5b1f0c2e9a7d4e83'})
};
fetch('https://api.fluid.app/api/subscriptions/{token}/sms_consent/opt_out', 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/{token}/sms_consent/opt_out",
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([
'phone_ref' => '5b1f0c2e9a7d4e83'
]),
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/{token}/sms_consent/opt_out"
payload := strings.NewReader("{\n \"phone_ref\": \"5b1f0c2e9a7d4e83\"\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/{token}/sms_consent/opt_out")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phone_ref\": \"5b1f0c2e9a7d4e83\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/subscriptions/{token}/sms_consent/opt_out")
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 \"phone_ref\": \"5b1f0c2e9a7d4e83\"\n}"
response = http.request(request)
puts response.read_body{
"sms_consent": {
"status": "opted_out",
"phone_last4": "0147",
"phone_ref": "5b1f0c2e9a7d4e83",
"events": [
{
"event": "opt_out",
"source": "admin",
"occurred_at": "2026-10-12T14:30:00Z"
},
{
"event": "opt_in",
"source": "keyword_yes",
"occurred_at": "2026-10-11T09:12:44Z"
},
{
"event": "opt_in_requested",
"source": "checkout",
"occurred_at": "2026-10-10T17:03:10Z"
}
]
},
"meta": {
"request_id": "3e8b1f2a-6c4d-4a7e-9b10-2d5f8c3a1e67",
"timestamp": "2026-10-11T09:13:02Z"
}
}{
"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
}
}{
"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
}
}