curl --request POST \
--url https://api.bbrands.io/api/v3/notification/{document_id}/resend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Customer did not receive the invitation"
}
'import requests
url = "https://api.bbrands.io/api/v3/notification/{document_id}/resend"
payload = { "reason": "Customer did not receive the invitation" }
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({reason: 'Customer did not receive the invitation'})
};
fetch('https://api.bbrands.io/api/v3/notification/{document_id}/resend', 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.bbrands.io/api/v3/notification/{document_id}/resend",
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([
'reason' => 'Customer did not receive the invitation'
]),
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.bbrands.io/api/v3/notification/{document_id}/resend"
payload := strings.NewReader("{\n \"reason\": \"Customer did not receive the invitation\"\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.bbrands.io/api/v3/notification/{document_id}/resend")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Customer did not receive the invitation\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bbrands.io/api/v3/notification/{document_id}/resend")
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 \"reason\": \"Customer did not receive the invitation\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resent_from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"notification_template_version": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued"
},
"message": "<string>",
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "UNPROCESSABLE_ENTITY",
"errors": [
{
"code": "change-reason-required",
"field": "change_reason",
"message": "change_reason is required"
}
],
"message": "Unprocessable Entity"
}
}Resend Notification
Requires notification:resend. Creates a new notification linked
to the original (resent_from, resent_by, resent_reason) in the
same occurrence and queues it with origin user. The content is the
stored one unless use_current_version, which renders the published
template version of the event × channel (email, push and SMS of an
occurrence only).
Before writing anything it re-runs the engine’s manual-send check
(REQ-20.AC-3): a switched-off event or channel, a suppressed address
or an account that opted out answers 409 notification-not-eligible
with the decision reason (event-inactive, channel-inactive,
suppressed-*, opted-out). The event’s bypasses apply; quiet
hours, the frequency cap and the TTL do not; there is no override.
409 notification-not-resendable while the original has not left
yet (cancel it or wait); 409 notification-content-expired when its
stored content was purged (resend with use_current_version). 422
for an invalid body, channel-not-enabled (WhatsApp),
current-version-not-available or invalid-content. 404 notification-not-found for an unknown notification.
curl --request POST \
--url https://api.bbrands.io/api/v3/notification/{document_id}/resend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Customer did not receive the invitation"
}
'import requests
url = "https://api.bbrands.io/api/v3/notification/{document_id}/resend"
payload = { "reason": "Customer did not receive the invitation" }
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({reason: 'Customer did not receive the invitation'})
};
fetch('https://api.bbrands.io/api/v3/notification/{document_id}/resend', 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.bbrands.io/api/v3/notification/{document_id}/resend",
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([
'reason' => 'Customer did not receive the invitation'
]),
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.bbrands.io/api/v3/notification/{document_id}/resend"
payload := strings.NewReader("{\n \"reason\": \"Customer did not receive the invitation\"\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.bbrands.io/api/v3/notification/{document_id}/resend")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Customer did not receive the invitation\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bbrands.io/api/v3/notification/{document_id}/resend")
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 \"reason\": \"Customer did not receive the invitation\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resent_from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"notification_template_version": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued"
},
"message": "<string>",
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
"<unknown>"
],
"message": "<string>"
},
"meta": {
"correlation": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>"
}
}{
"error": {
"code": "UNPROCESSABLE_ENTITY",
"errors": [
{
"code": "change-reason-required",
"field": "change_reason",
"message": "change_reason is required"
}
],
"message": "Unprocessable Entity"
}
}Authorizations
Body
Was this page helpful?