Trips
Get a trip communication
Requires access to trip messages under the authenticated organization and excludes sample trips. Saving a draft does not send it; phone and note channels create manual logs. Sending resolves active matching participants with email addresses and queues email or SMS delivery; SMS also requires at least one valid phone.
GET
/
admin
/
trips
/
{tripId}
/
messages
/
{id}
Get a trip communication
curl --request GET \
--url https://api.gratona.com/v1/admin/trips/{tripId}/messages/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/trips/{tripId}/messages/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/admin/trips/{tripId}/messages/{id}', 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/trips/{tripId}/messages/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/admin/trips/{tripId}/messages/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gratona.com/v1/admin/trips/{tripId}/messages/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/trips/{tripId}/messages/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"subject": "<string>",
"body": "<string>",
"channel": "<string>",
"entry_type": "<string>",
"status": "<string>",
"recipient_count": 123,
"sent_at": "2023-11-07T05:31:56Z",
"activity_at": "2023-11-07T05:31:56Z",
"replies_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"recipient_filter": {
"custom": [
123
],
"role": "leader",
"task_incomplete": 123,
"fundraising_below": 123
},
"sender": {
"id": 123,
"name": "<string>",
"email": "<string>"
},
"participants": [
{
"id": 123,
"name": "<string>",
"email": "<string>",
"role": "<string>",
"status": "<string>"
}
]
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}Authorizations
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Trip ID belonging to the authenticated organization.
Record ID within the organization and any parent resource in this route.
Response
Get a trip communication response.
Show child attributes
Show child attributes
⌘I
Get a trip communication
curl --request GET \
--url https://api.gratona.com/v1/admin/trips/{tripId}/messages/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/trips/{tripId}/messages/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/admin/trips/{tripId}/messages/{id}', 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/trips/{tripId}/messages/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/admin/trips/{tripId}/messages/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gratona.com/v1/admin/trips/{tripId}/messages/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/trips/{tripId}/messages/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"subject": "<string>",
"body": "<string>",
"channel": "<string>",
"entry_type": "<string>",
"status": "<string>",
"recipient_count": 123,
"sent_at": "2023-11-07T05:31:56Z",
"activity_at": "2023-11-07T05:31:56Z",
"replies_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"recipient_filter": {
"custom": [
123
],
"role": "leader",
"task_incomplete": 123,
"fundraising_below": 123
},
"sender": {
"id": 123,
"name": "<string>",
"email": "<string>"
},
"participants": [
{
"id": 123,
"name": "<string>",
"email": "<string>",
"role": "<string>",
"status": "<string>"
}
]
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}