Skip to main content

Broadcasts

The Broadcast Object

PropertyTypeDescription
titlestringThe title of the broadcast.
descriptionstringThe description of the broadcast.
tag_liststring[]A list of tags.
destination_team_idsstring[]An array of Team IDs this broadcast should be sent to.
destination_account_user_idsstring[]An array of Account User IDs this broadcast should be sent to.
statusstringThe current status state of the broadcast. queued|open|closed|errored
response_requestedbooleanIf a response was requested from the destinations.
response_requested_bytimestampThe deadline of when the destinations have to respond by.
broadcast_response_optionsBroadcastResponseOption[]:id, :value, :position, :broadcast_responses_count
broadcast_responsesBroadcastResponses[]:id, :prefix_id, :account_user_id, :broadcast_response_option_id, :channel, :created_at
select_specific_channelsbooleanIf true, the broadcast will only be sent via the "forced" channels specified in the notify_* parameters. If false, the broadcast will be sent via all user's preferred channels.
notify_pushbooleanIf true, the broadcast will be sent via push notifications. Only applicable if select_specific_channels is true.
notify_emailbooleanIf true, the broadcast will be sent via email. Only applicable if select_specific_channels is true.
notify_smsbooleanIf true, the broadcast will be sent via SMS. Only applicable if select_specific_channels is true.
notify_slackbooleanIf true, the broadcast will be sent via Slack. Only applicable if select_specific_channels is true.
notify_whatsappbooleanIf true, the broadcast will be sent via WhatsApp. Only applicable if select_specific_channels is true.

Create a Broadcast

POST https://api.pagertree.com/api/v4/broadcasts

Allowed Parameters

def broadcast_params
params.permit(
:title,
:description,
:tag_list,
:response_requested,
:response_requested_by,
:select_specific_channels,
:notify_push,
:notify_email,
:notify_sms,
:notify_slack,
:notify_whatsapp,
destination_team_ids: [],
destination_account_user_ids: [],
broadcast_response_options_attributes: [
:value
]
)
end

Required Parameters

  • title
  • at least 1 destination (Team or Account User)
  • if response requested, at least 1 response option

Retrieve a Broadcast

GET https://api.pagertree.com/api/v4/broadcasts/:id

Update a Broadcast

PUT https://api.pagertree.com/api/v4/broadcasts/:id

Delete a Broadcast

DELETE https://api.pagertree.com/api/v4/broadcasts/:id

List all Broadcasts

GET https://api.pagertree.com/api/v4/broadcasts

Comment on a Broadcast

POST https://api.pagertree.com/api/v4/broadcasts/:id/comments

Required Parameters

  • body

List a Broadcast's Comments

GET https://api.pagertree.com/api/v4/broadcasts/:id/comments