POST /channels/{channel_id}/messages
Publish a message to the specified channel
Servers
- https://rest.ably.io
Path parameters
Name | Type | Required | Description |
---|---|---|---|
channel_id |
String | Yes |
The Channel's ID. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
X-Ably-Version |
String | No |
The version of the API you wish to use. |
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Query parameters
Name | Type | Required | Description |
---|---|---|---|
format |
String | No |
The response format you would like Possible values:
|
Request body fields
Name | Type | Required | Description |
---|---|---|---|
id |
String | No |
A Unique ID that can be specified by the publisher for idempotent publishing. |
data |
String | No |
The string encoded payload, with the encoding specified below. |
extras |
Object | No |
Extras object. Currently only allows for push extra. |
extras.push |
Object | No | |
extras.push.data |
String | No |
Arbitrary key-value string-to-string payload. |
extras.push.apns |
Object | No |
Extends and overrides generic values when delivering via APNs. See examples |
extras.push.apns.notification |
Object | No | |
extras.push.apns.notification.collapseKey |
String | No |
Platform-specific, used to group notifications together. |
extras.push.apns.notification.body |
String | No |
Text below title on the expanded notification. |
extras.push.apns.notification.title |
String | No |
Title to display at the notification. |
extras.push.apns.notification.sound |
String | No |
Platform-specific sound for the notification. |
extras.push.apns.notification.icon |
String | No |
Platform-specific icon for the notification. |
extras.push.fcm |
Object | No |
Extends and overrides generic values when delivering via GCM/FCM. See examples |
extras.push.fcm.notification |
Object | No | |
extras.push.fcm.notification.collapseKey |
String | No |
Platform-specific, used to group notifications together. |
extras.push.fcm.notification.body |
String | No |
Text below title on the expanded notification. |
extras.push.fcm.notification.title |
String | No |
Title to display at the notification. |
extras.push.fcm.notification.sound |
String | No |
Platform-specific sound for the notification. |
extras.push.fcm.notification.icon |
String | No |
Platform-specific icon for the notification. |
extras.push.web |
Object | No |
Extends and overrides generic values when delivering via web. See examples |
extras.push.web.notification |
Object | No | |
extras.push.web.notification.collapseKey |
String | No |
Platform-specific, used to group notifications together. |
extras.push.web.notification.body |
String | No |
Text below title on the expanded notification. |
extras.push.web.notification.title |
String | No |
Title to display at the notification. |
extras.push.web.notification.sound |
String | No |
Platform-specific sound for the notification. |
extras.push.web.notification.icon |
String | No |
Platform-specific icon for the notification. |
extras.push.notification |
Object | No | |
extras.push.notification.collapseKey |
String | No |
Platform-specific, used to group notifications together. |
extras.push.notification.body |
String | No |
Text below title on the expanded notification. |
extras.push.notification.title |
String | No |
Title to display at the notification. |
extras.push.notification.sound |
String | No |
Platform-specific sound for the notification. |
extras.push.notification.icon |
String | No |
Platform-specific icon for the notification. |
timestamp |
Integer | No |
Timestamp when the message was received by the Ably, as milliseconds since the epoch. |
name |
String | No |
The event name, if provided. |
encoding |
String | No |
This will typically be empty as all messages received from Ably are automatically decoded client-side using this value. However, if the message encoding cannot be processed, this attribute will contain the remaining transformations not applied to the data payload. |
clientId |
String | No |
The client ID of the publisher of this message. |
connectionId |
String | No |
The connection ID of the publisher of this message. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.