Message
A message is an individual email or sms text sent to a member. Every message has a parent message group.
Example Object
{
"type": "Message",
"id": "1",
"attributes": {
"app_name": "string",
"bounced_at": "2000-01-01T12:00:00Z",
"created_at": "2000-01-01T12:00:00Z",
"delivery_status": "string",
"file": "string",
"from_address": "string",
"from_name": "string",
"kind": "value",
"message_type": "string",
"read_at": "2000-01-01T12:00:00Z",
"reject_reason": "string",
"rejection_notification_sent_at": "2000-01-01T12:00:00Z",
"sent_at": "2000-01-01T12:00:00Z",
"subject": "string",
"to_addresses": "string"
},
"relationships": {
"from": {
"data": {
"type": "Person",
"id": "1"
}
},
"to": {
"data": {
"type": "Person",
"id": "1"
}
},
"message_group": {
"data": {
"type": "MessageGroup",
"id": "1"
}
}
}
}
Attributes
| Name |
Type |
Description |
app_name |
string |
|
bounced_at |
date_time |
|
created_at |
date_time |
|
delivery_status |
string |
|
file |
string |
|
from_address |
string |
|
from_name |
string |
|
id |
primary_key |
|
kind |
string |
Possible values: `email`, `sms`, or `church_center_message` |
message_type |
string |
|
read_at |
date_time |
|
reject_reason |
string |
|
rejection_notification_sent_at |
date_time |
|
sent_at |
date_time |
|
subject |
string |
|
to_addresses |
string |
|
Relationships
| Name |
Type |
Association Type |
Note |
| from |
Person |
to_one |
|
| to |
Person |
to_one |
|
| message_group |
MessageGroup |
to_one |
|
Can Include
| Parameter |
Value |
Description |
Assignable |
| include |
message_group |
include associated message_group |
create and update |
| include |
to |
include associated to |
create and update |
Order By
| Parameter |
Value |
Type |
Description |
| order |
app_name |
string |
prefix with a hyphen (-app_name) to reverse the order |
| order |
bounced_at |
string |
prefix with a hyphen (-bounced_at) to reverse the order |
| order |
created_at |
string |
prefix with a hyphen (-created_at) to reverse the order |
| order |
delivery_status |
string |
prefix with a hyphen (-delivery_status) to reverse the order |
| order |
file |
string |
prefix with a hyphen (-file) to reverse the order |
| order |
from_address |
string |
prefix with a hyphen (-from_address) to reverse the order |
| order |
from_name |
string |
prefix with a hyphen (-from_name) to reverse the order |
| order |
kind |
string |
prefix with a hyphen (-kind) to reverse the order |
| order |
reject_reason |
string |
prefix with a hyphen (-reject_reason) to reverse the order |
| order |
rejection_notification_sent_at |
string |
prefix with a hyphen (-rejection_notification_sent_at) to reverse the order |
| order |
sent_at |
string |
prefix with a hyphen (-sent_at) to reverse the order |
| order |
subject |
string |
prefix with a hyphen (-subject) to reverse the order |
| order |
to_addresses |
string |
prefix with a hyphen (-to_addresses) to reverse the order |
Query By
| Name |
Parameter |
Type |
Description |
Example |
| app_name |
where[app_name] |
string |
Query on a specific app_name |
?where[app_name]=string |
| bounced_at |
where[bounced_at] |
date_time |
Query on a specific bounced_at |
?where[bounced_at]=2000-01-01T12:00:00Z |
| created_at |
where[created_at] |
date_time |
Query on a specific created_at |
?where[created_at]=2000-01-01T12:00:00Z |
| delivery_status |
where[delivery_status] |
string |
Query on a specific delivery_status |
?where[delivery_status]=string |
| file |
where[file] |
string |
Query on a specific file |
?where[file]=string |
| from_address |
where[from_address] |
string |
Query on a specific from_address |
?where[from_address]=string |
| kind |
where[kind] |
string |
Query on a specific kind
Possible values: `email`, `sms`, or `church_center_message` |
?where[kind]=value |
| reject_reason |
where[reject_reason] |
string |
Query on a specific reject_reason |
?where[reject_reason]=string |
| rejection_notification_sent_at |
where[rejection_notification_sent_at] |
date_time |
Query on a specific rejection_notification_sent_at |
?where[rejection_notification_sent_at]=2000-01-01T12:00:00Z |
| sent_at |
where[sent_at] |
date_time |
Query on a specific sent_at |
?where[sent_at]=2000-01-01T12:00:00Z |
| subject |
where[subject] |
string |
Query on a specific subject |
?where[subject]=string |
| to_addresses |
where[to_addresses] |
string |
Query on a specific to_addresses |
?where[to_addresses]=string |
Pagination
| Name |
Parameter |
Type |
Description |
| per_page |
per_page |
integer |
how many records to return per page (min=1, max=100, default=25) |
| offset |
offset |
integer |
get results from given offset |
Endpoints
Listing
| HTTP Method |
Endpoint |
| GET |
/people/v2/messages |
Reading
| HTTP Method |
Endpoint |
| GET |
/people/v2/messages/{id} |
Associations
| HTTP Method |
Endpoint |
Returns |
Details |
Filter By |
| GET |
https://api.planningcenteronline.com/people/v2/messages/{message_id}/message_group |
MessageGroup
|
|
|
| GET |
https://api.planningcenteronline.com/people/v2/messages/{message_id}/to |
Person
|
|
|
Belongs To
| HTTP Method |
Endpoint |
Association |
Details |
Filter By |
| GET |
https://api.planningcenteronline.com/people/v2/message_groups/{message_group_id}/messages |
MessageGroup
|
|
|
| GET |
https://api.planningcenteronline.com/people/v2/messages |
Organization
|
|
|
| GET |
https://api.planningcenteronline.com/people/v2/people/{person_id}/messages |
Person
|
The Person's received messages. Can also receive a filter
to return `sent` or `unread`
e.g. `?filter=sent`
|
created_after
received
sent
unread
|