var rest = new Ably.Rest(key: ablyApiKey, idempotentRestPublishing: true); var channel = rest.channels.get('example-channel'); channel.publish([{ data: 'payload' }]);