Messages
Update a batch of messages
API Reference
- Introduction
- Authentication
- Authorization
- Endpoints
- Me
- Announcements
- Attachments
- Awards
- Cache
- Calendars
- Categories
- Comments
- Documents
- Events
- Forms
- Groups
- Images
- Messages
- Newsfeed
- Positions
- Qualifications
- Ranks
- Records
- Roster
- Settings
- Specialties
- Statuses
- Submissions
- Tasks
- Units
- Users
Messages
Update a batch of messages
PATCH
/
{version}
/
messages
/
batch
curl --request PATCH \
--url https://api.perscom.io/{version}/messages/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"resources": {
"{key}": {
"message": "<string>",
"channels": [
"broadcast"
],
"recipients": [
123
],
"repeats": false,
"send_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z"
}
}
}'
{
"data": [
{
"id": 123,
"message": "<string>",
"channels": [
"broadcast"
],
"recipients": [
123
],
"repeats": false,
"send_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The API version to use.
Available options:
v1
, v2
Query Parameters
Available options:
schedule
Body
application/json
Supports HTML.
Available options:
broadcast
, database
, discord_private
, discord_public
, mail
, sms
An array of User IDs. Defaults to everyone if no recipients are provided.
Set a future date to send the msssage at.
Response
200
application/json
OK
Supports HTML.
Available options:
broadcast
, database
, discord_private
, discord_public
, mail
, sms
An array of User IDs. Defaults to everyone if no recipients are provided.
Set a future date to send the msssage at.
The date the resource was created. Stored in UTC.
The date the resource was updated. Stored in UTC.
Was this page helpful?
curl --request PATCH \
--url https://api.perscom.io/{version}/messages/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"resources": {
"{key}": {
"message": "<string>",
"channels": [
"broadcast"
],
"recipients": [
123
],
"repeats": false,
"send_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z"
}
}
}'
{
"data": [
{
"id": 123,
"message": "<string>",
"channels": [
"broadcast"
],
"recipients": [
123
],
"repeats": false,
"send_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}