Skip to main content

Stream Chat API

https://getstream.io/chat/

Profile Requirements

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

JSON
//RecipientProfile using channelType and channelId
{
"streamChat": {
"channelType": "messaging",
"channelId": "my-channel-id"
}
}
JSON
//RecipientProfile using messageId (required for updating an existing message)
{
"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.

JSON
{
"event": "<COURIER_NOTIFICATION_ID>",
"recipient": "foo_bar",
"profile": {
"streamChat": {
"channelType": "messaging",
"channelId": "my-channel-id"
}
},
"data": {
"name": "Foo Bar"
},
"override": {
"stream-chat": {
"body": {
"skip_push": true
}
},
"config": {
"baseUrl": "<overriden-base-url>",
"apiKey": "<overriden-api-key>",
"apiSecret": "<overriden-api-secret>",
"senderId": "<overriden-sender-id>"
}
}
}
Was this helpful?