Loading...
Skip to main content

Stream Chat

https://getstream.io/chat/

Profile Requirements

To deliver a message to a recipient over Stream Chat, Courier must be provided a channelType and channelId OR a messageId This value should be included in the recipient profile as streamChat.

{
"message": {
//RecipientProfile using channelType and channelId
"to": {
"streamChat": {
"channelType": "messaging",
"channelId": "my-channel-id"
}
}
}
}
{
"message": {
//RecipientProfile using messageId (required for updating an existing message)
"to": {
"streamChat": {
"messageId": "my-message-id"
}
}
}
}

Override

Overrides can be used to change the request body that Courier uses to send the message. Overrides are useful when a field is not yet supported by Courier or you would like to override the value that Courier generates.

{
"message": {
"template": "<COURIER_NOTIFICATION_ID>",
"to": {
"streamChat": {
"channelType": "messaging",
"channelId": "my-channel-id"
}
},
"data": {
"name": "Foo Bar"
},
"providers": {
"stream-chat": {
"override": {
"body": {
"skip_push": true
},
"config": {
"baseUrl": "<overriden-base-url>",
"apiKey": "<overriden-api-key>",
"apiSecret": "<overriden-api-secret>",
"senderId": "<overriden-sender-id>"
}
}
}
}
}
}