Message interactions
You can list message interactions on a specific message using the following endpoint. In order to get an Email message, you must have an active Email channel and perform a HTTP request with a valid access key
GET
/workspaces/{workspaceId}/channels/{channelId}/messages/{messageId}/interactions
List message interactions
响应载荷
results
array of object
显示子属性
results.bodyTemplateProjectId
string
results.channelId
string
必填
results.context
object
必填
显示子属性
results.context.id
string
results.context.tagIds
array of string
results.context.type
string
results.createdAt
string
必填
results.details
string
results.id
string
必填
results.isFirstInteraction
boolean
results.isFirstInteractionIncludingBots
boolean
results.journey
object
显示子属性
results.journey.id
string
results.journey.name
string
results.journey.runId
string
results.journey.scheduleExecutionId
string
results.journey.stepId
string
results.messageCreatedAt
string
results.messageId
string
必填
results.messagePartsCount
integer
必填
results.messageReference
string
必填
results.messageTags
array of string
results.metadata
object
显示子属性
results.metadata.button
object
显示子属性
results.metadata.button.payload
string
必填
results.metadata.conversion
object
显示子属性
results.metadata.conversion.method
string
Method of entering the code
Possible values: unknown, manual, auto
results.metadata.conversion.status
string
Status of the conversion
Possible values: converted, canceled, not_converted, incorrect_code, resent, received_after_expiration
results.metadata.conversion.timestamp
string
Timestamp of when the conversion was recorded
results.metadata.conversion.type
string
Type of conversion
Possible values: otp, url, promo_code
results.metadata.extraInformation
object
results.metadata.link
object
显示子属性
results.metadata.link.clickType
string
Possible values: link, button
results.metadata.link.name
string
必填
results.metadata.link.url
string
必填
results.metadata.prefetched
boolean
results.metadata.reaction
object
显示子属性
results.metadata.reaction.action
string
必填
Possible values: react, unreact
results.metadata.reaction.emoji
string
必填
results.metadata.renderedContentBlocks
array of string
results.metadata.subscriptionList
object
显示子属性
results.metadata.subscriptionList.subscriptionListId
string
必填
results.notification
object
显示子属性
results.notification.template
string
results.notification.url
string
必填
results.platformId
string
必填
results.platformReferenceId
string
results.receiver
object
必填
显示子属性
results.receiver.connector
object
显示子属性
results.receiver.connector.annotations
object
Annotations add extra information to a sender or receiver. For email messages, the name annotation overrides the display name.
显示子属性
results.receiver.connector.annotations.name
string
results.receiver.connector.id
string
必填
results.receiver.connector.identifierValue
string
The identifier value of the sender or receiver connector (e.g. email address or phone number).
results.receiver.connector.types
array of string
results.receiver.contacts
array of object
显示子属性
results.receiver.contacts.contactAnnotation
object
Annotations add extra information to a sender or receiver. For email messages, the name annotation overrides the display name.
显示子属性
results.receiver.contacts.contactAnnotation.name
string
results.receiver.contacts.countryCode
string
results.receiver.contacts.id
string
The ID of the contact.
results.receiver.contacts.identifierKey
string
The identifier key for finding the contact (e.g. emailaddress, phonenumber). For WhatsApp channels with BSUID support, use whatsappbsuid to send to a contact by their Business-Scoped User ID.
results.receiver.contacts.identifierValue
string
The identifier value for finding the contact.
results.receiver.contacts.identifiers
array of object
Additional identifiers to augment the contact during resolution.
显示子属性
results.receiver.contacts.identifiers.identifierKey
string
必填
The identifier key for finding the contact (e.g. emailaddress, phonenumber).
results.receiver.contacts.identifiers.identifierValue
string
必填
The identifier value for finding the contact.
results.receiver.contacts.platformAddress
string
The resolved platform address used to deliver the message (e.g. phone number or email address).
results.receiver.contacts.platformAddressSelector
string
An expression that defines how we resolve the platform address from a contact. Optional override for the default resolution logic.
results.receiver.contacts.receiverExpression
string
results.receiver.contacts.receiverValue
string
results.receiver.contacts.type
string
The type of the receiver (e.g. to, cc, bcc for email).
results.receiver.device
object
显示子属性
results.receiver.device.gateway
string
必填
Possible values: firebase, apns, web
results.receiver.device.id
string
必填
results.receiver.device.identifierValue
string
必填
results.receiver.inbox
object
显示子属性
results.receiver.inbox.emailRecipientType
string
results.receiver.inbox.id
string
必填
results.receiver.inbox.identifierKey
string
必填
results.receiver.inbox.identifierValue
string
必填
results.receiver.inbox.type
string
必填
Possible values: user, group
results.receiver.userContacts
array of object
显示子属性
results.receiver.userContacts.id
string
必填
results.receiver.userContacts.identifierKey
string
必填
results.receiver.userContacts.identifierValue
string
必填
results.receiver.userContacts.type
string
results.type
string
必填
Possible values: invalid, read, opened, clicked, reported-as-spam, unsubscribe-request, delete, reaction, subscribe-request, subscribe-consent, conversion
results.useCaseType
string
Possible values: unspecified, marketing, otp, transactional, conversation, test
代码示例
curl -X GET 'https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/messages/{messageId}/interactions' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'Email supports the following message interactions:
| Interaction | Description |
|---|---|
| opened | A user has opened a message |
| clicked | A user has clicked a link |
| reported-as-spam | A user has reported a message as spam |
| unsubscribe-request | A user has requested to unsubscribe from messages |
Additional information about the interactions can be found in the details field and metadata.link object as follows:
| Interaction | Details | metadata.link | Description |
|---|---|---|---|
| opened | initial_open | Recipient opened a message in an email client, thus rendering a tracking pixel at the top of the message | |
| open | Recipient opened a message in an email client, thus rendering a tracking pixel at the bottom of the message | ||
| amp_initial_open | Recipient opened an AMP message in an email client, thus rendering a tracking pixel at the top of the message | ||
| amp_open | Recipient opened an AMP message in an email client, thus rendering a tracking pixel at the bottom of the message | ||
| clicked | click |
| Recipient clicked a tracked link in a message |
| amp_click |
| Recipient clicked a tracked link in an AMP message | |
| reported-as-spam | spam_complaint | Messages was classified as spam by the recipient | |
| unsubscribe_request | link_unsubscribe | Recipient clicked the 'unsubscribe' button in an email client | |
| list_unsubscribe | Recipient clicked an 'unsubscribe' link in an email message |