Communications
Reject a pending recipient message
Only pending_approval messages can be rejected. Stores the trimmed rejection reason, current actor/time and rejected status, and records activity. Does not send the message. Versioned access: requires permission: one of email_manager, manage_email.
POST
/
admin
/
recipient-messages
/
{id}
/
reject
Reject a pending recipient message
curl --request POST \
--url https://api.gratona.com/v1/admin/recipient-messages/{id}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "No follow-up is needed."
}
'import requests
url = "https://api.gratona.com/v1/admin/recipient-messages/{id}/reject"
payload = { "reason": "No follow-up is needed." }
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: 'No follow-up is needed.'})
};
fetch('https://api.gratona.com/v1/admin/recipient-messages/{id}/reject', 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.gratona.com/v1/admin/recipient-messages/{id}/reject",
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' => 'No follow-up is needed.'
]),
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.gratona.com/v1/admin/recipient-messages/{id}/reject"
payload := strings.NewReader("{\n \"reason\": \"No follow-up is needed.\"\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.gratona.com/v1/admin/recipient-messages/{id}/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"No follow-up is needed.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/recipient-messages/{id}/reject")
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\": \"No follow-up is needed.\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Recipient message rejected.",
"data": {
"id": 42,
"parent_id": 42,
"entity_id": 42,
"program_id": 42,
"recipient_portal_user_id": 42,
"donor_id": 42,
"thread_id": "recipient-42",
"recipient_name": "Example",
"donor_name": "Example",
"subject": "Example",
"message_html": "Example",
"message_text": "Example",
"message_preview": "Example",
"status_label": "Example",
"program_name": "Example",
"recipient_email": "jsmith@example.com",
"donor_email": "<string>",
"file_name": "Example",
"file_url": "<string>",
"status": "pending_approval",
"approved_by": 42,
"rejected_by": 42,
"rejected_reason": "Example",
"approved_at": "2026-10-20T12:00:00Z",
"rejected_at": "2026-10-20T12:00:00Z",
"sent_at": "2026-10-20T12:00:00Z",
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Id in the current organization.
Body
application/json
Validated request fields for this operation.
Reason. Validation: required, string, max:2000.
Maximum string length:
2000Example:
"No follow-up is needed."
⌘I
Reject a pending recipient message
curl --request POST \
--url https://api.gratona.com/v1/admin/recipient-messages/{id}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "No follow-up is needed."
}
'import requests
url = "https://api.gratona.com/v1/admin/recipient-messages/{id}/reject"
payload = { "reason": "No follow-up is needed." }
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: 'No follow-up is needed.'})
};
fetch('https://api.gratona.com/v1/admin/recipient-messages/{id}/reject', 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.gratona.com/v1/admin/recipient-messages/{id}/reject",
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' => 'No follow-up is needed.'
]),
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.gratona.com/v1/admin/recipient-messages/{id}/reject"
payload := strings.NewReader("{\n \"reason\": \"No follow-up is needed.\"\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.gratona.com/v1/admin/recipient-messages/{id}/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"No follow-up is needed.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/recipient-messages/{id}/reject")
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\": \"No follow-up is needed.\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Recipient message rejected.",
"data": {
"id": 42,
"parent_id": 42,
"entity_id": 42,
"program_id": 42,
"recipient_portal_user_id": 42,
"donor_id": 42,
"thread_id": "recipient-42",
"recipient_name": "Example",
"donor_name": "Example",
"subject": "Example",
"message_html": "Example",
"message_text": "Example",
"message_preview": "Example",
"status_label": "Example",
"program_name": "Example",
"recipient_email": "jsmith@example.com",
"donor_email": "<string>",
"file_name": "Example",
"file_url": "<string>",
"status": "pending_approval",
"approved_by": 42,
"rejected_by": 42,
"rejected_reason": "Example",
"approved_at": "2026-10-20T12:00:00Z",
"rejected_at": "2026-10-20T12:00:00Z",
"sent_at": "2026-10-20T12:00:00Z",
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}