@@ -166,6 +166,14 @@ You can also optionally specify a `name` for the annotation which is used by cer
166166
167167<Code >
168168``` javascript
169+ // Create an Ably Realtime client specifying the clientId that will
170+ // be associated with annotations published by this client
171+ const realtime = new Ably.Realtime ({ key: ' {{API_KEY}}' , clientId: ' my-client-id' });
172+
173+ // Create a channel in a namespace called `annotations`
174+ // which has message annotations enabled
175+ const channel = realtime .channels .get (' annotations:example' );
176+
169177// Delete a 'delivered' annotation
170178await channel .annotations .delete (message .serial , {
171179 type: ' receipts:flag.v1' ,
@@ -174,6 +182,14 @@ await channel.annotations.delete(message.serial, {
174182```
175183
176184``` nodejs
185+ // Create an Ably Realtime client specifying the clientId that will
186+ // be associated with annotations published by this client
187+ const realtime = new Ably.Realtime({ key: '{{API_KEY}}', clientId: 'my-client-id' });
188+
189+ // Create a channel in a namespace called `annotations`
190+ // which has message annotations enabled
191+ const channel = realtime.channels.get('annotations:example');
192+
177193// Delete a 'delivered' annotation
178194await channel.annotations.delete(message.serial, {
179195 type: 'receipts:flag.v1',
0 commit comments