Sign inGet started

Channel Metrics

In order to query message metrics you must have a channel and perform a HTTP request to the following endpoints with a valid access key.

Fetch message metrics by channel ID

Retrieve a TimeSeries of metrics for the given FilterType and FilterId
Filter TypesFilter ID
ChannelThe Channel ID of the Channel
PlatformCurrently Unused
StatusCurrently Unused
Group ByNotes
statusGroups the results by the channel status, such as "queued, sent, delivered" etc.
POST
/workspaces/{workspaceId}/reporting/messages/{filterType}/{filterId}/metrics
Fetch message metrics for a platform or channel
Treść żądania
periodStart
string
wymagane
periodEnd
string
wymagane
periodGroup
string
wymagane
Possible values: minute, hour, day, month
select
array of string
filterBy
object
Pokaż parametry podrzędne
filterBy.direction
string
Possible values: out, in, ``
filterBy.status
string
Possible values: accepted, processing, sent, sending_failed, delivered, delivery_failed, ``
filterBy.messageType
string
Possible values: text, image, file, gif, location, carousel, list, ``
filterBy.channelId
string
filterBy.platformId
string
filterBy.contextEnabled
boolean
Allows querying for stats with the context info provided
filterBy.contextType
string
The type of context we want to use in our query
filterBy.contextId
string
The relevant ID for the specified context type
filterBy.interaction
string
Possible values: read, opened, clicked, delete, reported_as_spam, unsubscribe_request, reaction, ``
groupBy
array of string
Treść odpowiedzi
periodGroup
string
Possible values: minute, hour, day, month
dataColumns
array of string
wymagane
results
array of object
Pokaż atrybuty podrzędne
results.periodTime
string
wymagane
results.count
integer
results.data
array of string
Przykład kodu
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/reporting/messages/{filterType}/{filterId}/metrics' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'

Fetch channel metrics using query parameter filters

GET
/workspaces/{workspaceId}/reporting/channels/metrics
Fetch channel metrics using various query parameters
Parametry zapytania
periodStart
string
The start of the period for which to fetch metrics
periodEnd
string
The end of the period for which to fetch metrics
periodGroup
string
The time grouping of the period for which to fetch metrics. If provided time series will be returned and grouped by this period.
Possible values: minute, hour, day, month
filter
string
Filter conditions for which to fetch metrics. Each condition is a string in the format of 'equals(field,value)'. Available field-value pairs are
  • channelID - UUID, can supply multiple equals conditions for multiple channelIds
  • platformID - string, can supply multiple equals conditions for multiple platforms
    • Common values are 'sms-messagebird', 'email-sparkpost', 'whatsapp', 'rcs-google'. More are possible and are specified in the summary response for a channel
  • status - string, can supply multiple equals conditions for multiple statuses
    • Allowed values are 'invalid', 'pending', 'setting_up', 'active', 'inactive', 'failed', 'deleted'
  • name - string, only one condition allowed
  • messageType - string, can supply multiple equals conditions for multiple messageTypes
    • Allowed values are 'invalid', 'text', 'html', 'image', 'file', 'gif', 'location', 'carousel', 'list', 'section', 'authentication', 'contact', 'template'
  • direction - string, only one condition allowed
    • Allowed values are 'in', 'out', 'unknown'
Treść odpowiedzi
Odpowiedź jest tablicą.
summary
object
Pokaż atrybuty podrzędne
summary.channelId
string
summary.channelName
string
summary.channelPlatformId
string
summary.channelStatus
string
summary.messageType
string
summary.direction
string
summary.queued
integer
summary.skipped
integer
summary.scheduled
integer
summary.delivered
integer
summary.bounced
integer
summary.opened
integer
summary.readOrOpened
integer
summary.clicked
integer
summary.unsubscribed
integer
summary.checkoutAbandonedCount
integer
summary.orderConfirmedCount
integer
summary.formViewedCount
integer
summary.formSubmittedCount
integer
summary.pageViewedCount
integer
summary.productViewedCount
integer
summary.attributedRevenue
number
summary.currency
string
timeSeries
array of object
Pokaż atrybuty podrzędne
timeSeries.periodDate
string
timeSeries.queued
integer
timeSeries.skipped
integer
timeSeries.scheduled
integer
timeSeries.delivered
integer
timeSeries.bounced
integer
timeSeries.opened
integer
timeSeries.clicked
integer
timeSeries.unsubscribed
integer
Przykład kodu
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/reporting/channels/metrics' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'