@open-wa/schema 5.5.1 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2886 @@
1
+ {
2
+ "asyncapi": "3.1.0",
3
+ "info": {
4
+ "title": "OpenWA events",
5
+ "version": "5.6.0",
6
+ "description": "Initial public wire contracts for six runtime events. This is not an exhaustive list of internal lifecycle events. SSE and webhook policies differ; MCP provides compact summaries for three events."
7
+ },
8
+ "servers": {
9
+ "easyApi": {
10
+ "host": "localhost:8080",
11
+ "protocol": "http",
12
+ "security": [
13
+ {
14
+ "$ref": "#/components/securitySchemes/apiKey"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ "channels": {
20
+ "sse_ack_changed": {
21
+ "address": "/api/events",
22
+ "description": "SSE event frame: id, event and JSON data; optional topics query filters exact runtime names. Keepalive every 20 seconds; reconnect hint 3000 ms. No history replay. API key in X-API-Key or api_key/key query.",
23
+ "messages": {
24
+ "event": {
25
+ "$ref": "#/components/messages/sse_ack_changed"
26
+ }
27
+ },
28
+ "x-openwa-transport": "sse",
29
+ "servers": [
30
+ {
31
+ "$ref": "#/servers/easyApi"
32
+ }
33
+ ],
34
+ "x-openwa-sse": {
35
+ "event": "ack.changed",
36
+ "contentType": "text/event-stream",
37
+ "topics": "ack.changed"
38
+ }
39
+ },
40
+ "webhook_ack_changed": {
41
+ "address": null,
42
+ "description": "Outbound HTTP POST to the configured destination. Public non-sensitive events pass through the plugin gateway. Optional event-name filter; default 3 retries with exponential delay from 1000 ms. Optional durable journal adds Idempotency-Key and retries pending deliveries after restart. No exactly-once guarantee.",
43
+ "messages": {
44
+ "event": {
45
+ "$ref": "#/components/messages/webhook_ack_changed"
46
+ }
47
+ },
48
+ "x-openwa-transport": "webhook"
49
+ },
50
+ "mcp_ack_changed": {
51
+ "address": null,
52
+ "description": "Verified subscriber-provided HTTPS callback. Subscribe through /mcp using MCP 2026-07-28. Standard Webhooks signatures, stable event IDs and bounded transient retries. No retry on 410/413; cursor:null means no historical replay.",
53
+ "messages": {
54
+ "event": {
55
+ "$ref": "#/components/messages/mcp_ack_changed"
56
+ }
57
+ },
58
+ "x-openwa-transport": "mcp",
59
+ "x-openwa-subscription-schema": {
60
+ "$schema": "http://json-schema.org/draft-07/schema#",
61
+ "type": "object",
62
+ "properties": {
63
+ "chatId": {
64
+ "type": "string",
65
+ "minLength": 1
66
+ }
67
+ },
68
+ "additionalProperties": false
69
+ }
70
+ },
71
+ "sse_group_addedToGroup": {
72
+ "address": "/api/events",
73
+ "description": "SSE event frame: id, event and JSON data; optional topics query filters exact runtime names. Keepalive every 20 seconds; reconnect hint 3000 ms. No history replay. API key in X-API-Key or api_key/key query.",
74
+ "messages": {
75
+ "event": {
76
+ "$ref": "#/components/messages/sse_group_addedToGroup"
77
+ }
78
+ },
79
+ "x-openwa-transport": "sse",
80
+ "servers": [
81
+ {
82
+ "$ref": "#/servers/easyApi"
83
+ }
84
+ ],
85
+ "x-openwa-sse": {
86
+ "event": "group.addedToGroup",
87
+ "contentType": "text/event-stream",
88
+ "topics": "group.addedToGroup"
89
+ }
90
+ },
91
+ "webhook_group_addedToGroup": {
92
+ "address": null,
93
+ "description": "Outbound HTTP POST to the configured destination. Public non-sensitive events pass through the plugin gateway. Optional event-name filter; default 3 retries with exponential delay from 1000 ms. Optional durable journal adds Idempotency-Key and retries pending deliveries after restart. No exactly-once guarantee.",
94
+ "messages": {
95
+ "event": {
96
+ "$ref": "#/components/messages/webhook_group_addedToGroup"
97
+ }
98
+ },
99
+ "x-openwa-transport": "webhook"
100
+ },
101
+ "sse_message_any": {
102
+ "address": "/api/events",
103
+ "description": "SSE event frame: id, event and JSON data; optional topics query filters exact runtime names. Keepalive every 20 seconds; reconnect hint 3000 ms. No history replay. API key in X-API-Key or api_key/key query.",
104
+ "messages": {
105
+ "event": {
106
+ "$ref": "#/components/messages/sse_message_any"
107
+ }
108
+ },
109
+ "x-openwa-transport": "sse",
110
+ "servers": [
111
+ {
112
+ "$ref": "#/servers/easyApi"
113
+ }
114
+ ],
115
+ "x-openwa-sse": {
116
+ "event": "message.any",
117
+ "contentType": "text/event-stream",
118
+ "topics": "message.any"
119
+ }
120
+ },
121
+ "webhook_message_any": {
122
+ "address": null,
123
+ "description": "Outbound HTTP POST to the configured destination. Public non-sensitive events pass through the plugin gateway. Optional event-name filter; default 3 retries with exponential delay from 1000 ms. Optional durable journal adds Idempotency-Key and retries pending deliveries after restart. No exactly-once guarantee.",
124
+ "messages": {
125
+ "event": {
126
+ "$ref": "#/components/messages/webhook_message_any"
127
+ }
128
+ },
129
+ "x-openwa-transport": "webhook"
130
+ },
131
+ "sse_message_received": {
132
+ "address": "/api/events",
133
+ "description": "SSE event frame: id, event and JSON data; optional topics query filters exact runtime names. Keepalive every 20 seconds; reconnect hint 3000 ms. No history replay. API key in X-API-Key or api_key/key query.",
134
+ "messages": {
135
+ "event": {
136
+ "$ref": "#/components/messages/sse_message_received"
137
+ }
138
+ },
139
+ "x-openwa-transport": "sse",
140
+ "servers": [
141
+ {
142
+ "$ref": "#/servers/easyApi"
143
+ }
144
+ ],
145
+ "x-openwa-sse": {
146
+ "event": "message.received",
147
+ "contentType": "text/event-stream",
148
+ "topics": "message.received"
149
+ }
150
+ },
151
+ "webhook_message_received": {
152
+ "address": null,
153
+ "description": "Outbound HTTP POST to the configured destination. Public non-sensitive events pass through the plugin gateway. Optional event-name filter; default 3 retries with exponential delay from 1000 ms. Optional durable journal adds Idempotency-Key and retries pending deliveries after restart. No exactly-once guarantee.",
154
+ "messages": {
155
+ "event": {
156
+ "$ref": "#/components/messages/webhook_message_received"
157
+ }
158
+ },
159
+ "x-openwa-transport": "webhook"
160
+ },
161
+ "mcp_message_received": {
162
+ "address": null,
163
+ "description": "Verified subscriber-provided HTTPS callback. Subscribe through /mcp using MCP 2026-07-28. Standard Webhooks signatures, stable event IDs and bounded transient retries. No retry on 410/413; cursor:null means no historical replay.",
164
+ "messages": {
165
+ "event": {
166
+ "$ref": "#/components/messages/mcp_message_received"
167
+ }
168
+ },
169
+ "x-openwa-transport": "mcp",
170
+ "x-openwa-subscription-schema": {
171
+ "$schema": "http://json-schema.org/draft-07/schema#",
172
+ "type": "object",
173
+ "properties": {
174
+ "chatId": {
175
+ "type": "string",
176
+ "minLength": 1
177
+ }
178
+ },
179
+ "additionalProperties": false
180
+ }
181
+ },
182
+ "sse_session_logout": {
183
+ "address": "/api/events",
184
+ "description": "SSE event frame: id, event and JSON data; optional topics query filters exact runtime names. Keepalive every 20 seconds; reconnect hint 3000 ms. No history replay. API key in X-API-Key or api_key/key query.",
185
+ "messages": {
186
+ "event": {
187
+ "$ref": "#/components/messages/sse_session_logout"
188
+ }
189
+ },
190
+ "x-openwa-transport": "sse",
191
+ "servers": [
192
+ {
193
+ "$ref": "#/servers/easyApi"
194
+ }
195
+ ],
196
+ "x-openwa-sse": {
197
+ "event": "session.logout",
198
+ "contentType": "text/event-stream",
199
+ "topics": "session.logout"
200
+ }
201
+ },
202
+ "webhook_session_logout": {
203
+ "address": null,
204
+ "description": "Outbound HTTP POST to the configured destination. Public non-sensitive events pass through the plugin gateway. Optional event-name filter; default 3 retries with exponential delay from 1000 ms. Optional durable journal adds Idempotency-Key and retries pending deliveries after restart. No exactly-once guarantee.",
205
+ "messages": {
206
+ "event": {
207
+ "$ref": "#/components/messages/webhook_session_logout"
208
+ }
209
+ },
210
+ "x-openwa-transport": "webhook"
211
+ },
212
+ "sse_session_state_changed": {
213
+ "address": "/api/events",
214
+ "description": "SSE event frame: id, event and JSON data; optional topics query filters exact runtime names. Keepalive every 20 seconds; reconnect hint 3000 ms. No history replay. API key in X-API-Key or api_key/key query.",
215
+ "messages": {
216
+ "event": {
217
+ "$ref": "#/components/messages/sse_session_state_changed"
218
+ }
219
+ },
220
+ "x-openwa-transport": "sse",
221
+ "servers": [
222
+ {
223
+ "$ref": "#/servers/easyApi"
224
+ }
225
+ ],
226
+ "x-openwa-sse": {
227
+ "event": "session.state.changed",
228
+ "contentType": "text/event-stream",
229
+ "topics": "session.state.changed"
230
+ }
231
+ },
232
+ "webhook_session_state_changed": {
233
+ "address": null,
234
+ "description": "Outbound HTTP POST to the configured destination. Public non-sensitive events pass through the plugin gateway. Optional event-name filter; default 3 retries with exponential delay from 1000 ms. Optional durable journal adds Idempotency-Key and retries pending deliveries after restart. No exactly-once guarantee.",
235
+ "messages": {
236
+ "event": {
237
+ "$ref": "#/components/messages/webhook_session_state_changed"
238
+ }
239
+ },
240
+ "x-openwa-transport": "webhook"
241
+ },
242
+ "mcp_session_state_changed": {
243
+ "address": null,
244
+ "description": "Verified subscriber-provided HTTPS callback. Subscribe through /mcp using MCP 2026-07-28. Standard Webhooks signatures, stable event IDs and bounded transient retries. No retry on 410/413; cursor:null means no historical replay.",
245
+ "messages": {
246
+ "event": {
247
+ "$ref": "#/components/messages/mcp_session_state_changed"
248
+ }
249
+ },
250
+ "x-openwa-transport": "mcp",
251
+ "x-openwa-subscription-schema": {
252
+ "$schema": "http://json-schema.org/draft-07/schema#",
253
+ "type": "object",
254
+ "properties": {},
255
+ "additionalProperties": false
256
+ }
257
+ }
258
+ },
259
+ "operations": {
260
+ "sse_ack_changed": {
261
+ "action": "send",
262
+ "channel": {
263
+ "$ref": "#/channels/sse_ack_changed"
264
+ },
265
+ "summary": "ack.changed over sse",
266
+ "messages": [
267
+ {
268
+ "$ref": "#/channels/sse_ack_changed/messages/event"
269
+ }
270
+ ]
271
+ },
272
+ "webhook_ack_changed": {
273
+ "action": "send",
274
+ "channel": {
275
+ "$ref": "#/channels/webhook_ack_changed"
276
+ },
277
+ "summary": "ack.changed over webhook",
278
+ "messages": [
279
+ {
280
+ "$ref": "#/channels/webhook_ack_changed/messages/event"
281
+ }
282
+ ]
283
+ },
284
+ "mcp_ack_changed": {
285
+ "action": "send",
286
+ "channel": {
287
+ "$ref": "#/channels/mcp_ack_changed"
288
+ },
289
+ "summary": "ack.changed over mcp",
290
+ "messages": [
291
+ {
292
+ "$ref": "#/channels/mcp_ack_changed/messages/event"
293
+ }
294
+ ]
295
+ },
296
+ "sse_group_addedToGroup": {
297
+ "action": "send",
298
+ "channel": {
299
+ "$ref": "#/channels/sse_group_addedToGroup"
300
+ },
301
+ "summary": "group.addedToGroup over sse",
302
+ "messages": [
303
+ {
304
+ "$ref": "#/channels/sse_group_addedToGroup/messages/event"
305
+ }
306
+ ]
307
+ },
308
+ "webhook_group_addedToGroup": {
309
+ "action": "send",
310
+ "channel": {
311
+ "$ref": "#/channels/webhook_group_addedToGroup"
312
+ },
313
+ "summary": "group.addedToGroup over webhook",
314
+ "messages": [
315
+ {
316
+ "$ref": "#/channels/webhook_group_addedToGroup/messages/event"
317
+ }
318
+ ]
319
+ },
320
+ "sse_message_any": {
321
+ "action": "send",
322
+ "channel": {
323
+ "$ref": "#/channels/sse_message_any"
324
+ },
325
+ "summary": "message.any over sse",
326
+ "messages": [
327
+ {
328
+ "$ref": "#/channels/sse_message_any/messages/event"
329
+ }
330
+ ]
331
+ },
332
+ "webhook_message_any": {
333
+ "action": "send",
334
+ "channel": {
335
+ "$ref": "#/channels/webhook_message_any"
336
+ },
337
+ "summary": "message.any over webhook",
338
+ "messages": [
339
+ {
340
+ "$ref": "#/channels/webhook_message_any/messages/event"
341
+ }
342
+ ]
343
+ },
344
+ "sse_message_received": {
345
+ "action": "send",
346
+ "channel": {
347
+ "$ref": "#/channels/sse_message_received"
348
+ },
349
+ "summary": "message.received over sse",
350
+ "messages": [
351
+ {
352
+ "$ref": "#/channels/sse_message_received/messages/event"
353
+ }
354
+ ]
355
+ },
356
+ "webhook_message_received": {
357
+ "action": "send",
358
+ "channel": {
359
+ "$ref": "#/channels/webhook_message_received"
360
+ },
361
+ "summary": "message.received over webhook",
362
+ "messages": [
363
+ {
364
+ "$ref": "#/channels/webhook_message_received/messages/event"
365
+ }
366
+ ]
367
+ },
368
+ "mcp_message_received": {
369
+ "action": "send",
370
+ "channel": {
371
+ "$ref": "#/channels/mcp_message_received"
372
+ },
373
+ "summary": "message.received over mcp",
374
+ "messages": [
375
+ {
376
+ "$ref": "#/channels/mcp_message_received/messages/event"
377
+ }
378
+ ]
379
+ },
380
+ "sse_session_logout": {
381
+ "action": "send",
382
+ "channel": {
383
+ "$ref": "#/channels/sse_session_logout"
384
+ },
385
+ "summary": "session.logout over sse",
386
+ "messages": [
387
+ {
388
+ "$ref": "#/channels/sse_session_logout/messages/event"
389
+ }
390
+ ]
391
+ },
392
+ "webhook_session_logout": {
393
+ "action": "send",
394
+ "channel": {
395
+ "$ref": "#/channels/webhook_session_logout"
396
+ },
397
+ "summary": "session.logout over webhook",
398
+ "messages": [
399
+ {
400
+ "$ref": "#/channels/webhook_session_logout/messages/event"
401
+ }
402
+ ]
403
+ },
404
+ "sse_session_state_changed": {
405
+ "action": "send",
406
+ "channel": {
407
+ "$ref": "#/channels/sse_session_state_changed"
408
+ },
409
+ "summary": "session.state.changed over sse",
410
+ "messages": [
411
+ {
412
+ "$ref": "#/channels/sse_session_state_changed/messages/event"
413
+ }
414
+ ]
415
+ },
416
+ "webhook_session_state_changed": {
417
+ "action": "send",
418
+ "channel": {
419
+ "$ref": "#/channels/webhook_session_state_changed"
420
+ },
421
+ "summary": "session.state.changed over webhook",
422
+ "messages": [
423
+ {
424
+ "$ref": "#/channels/webhook_session_state_changed/messages/event"
425
+ }
426
+ ]
427
+ },
428
+ "mcp_session_state_changed": {
429
+ "action": "send",
430
+ "channel": {
431
+ "$ref": "#/channels/mcp_session_state_changed"
432
+ },
433
+ "summary": "session.state.changed over mcp",
434
+ "messages": [
435
+ {
436
+ "$ref": "#/channels/mcp_session_state_changed/messages/event"
437
+ }
438
+ ]
439
+ }
440
+ },
441
+ "components": {
442
+ "schemas": {
443
+ "ack_changed": {
444
+ "$schema": "http://json-schema.org/draft-07/schema#",
445
+ "type": "object",
446
+ "properties": {
447
+ "ctx": {
448
+ "type": "object",
449
+ "properties": {
450
+ "correlationId": {
451
+ "type": "string"
452
+ },
453
+ "ts": {
454
+ "type": "number"
455
+ },
456
+ "attempt": {
457
+ "type": "number"
458
+ }
459
+ },
460
+ "required": [
461
+ "correlationId",
462
+ "ts"
463
+ ],
464
+ "additionalProperties": false
465
+ },
466
+ "ack": {
467
+ "type": "object",
468
+ "properties": {
469
+ "id": {
470
+ "type": "string",
471
+ "description": "Message identifier returned by a send method or message event."
472
+ },
473
+ "ack": {
474
+ "type": "number",
475
+ "enum": [
476
+ -1,
477
+ 0,
478
+ 1,
479
+ 2,
480
+ 3,
481
+ 4
482
+ ]
483
+ }
484
+ },
485
+ "required": [
486
+ "id",
487
+ "ack"
488
+ ],
489
+ "additionalProperties": {}
490
+ }
491
+ },
492
+ "required": [
493
+ "ctx",
494
+ "ack"
495
+ ],
496
+ "additionalProperties": false
497
+ },
498
+ "ack_changed_mcp": {
499
+ "$schema": "http://json-schema.org/draft-07/schema#",
500
+ "type": "object",
501
+ "properties": {
502
+ "sessionId": {
503
+ "type": "string"
504
+ },
505
+ "messageId": {
506
+ "type": "string"
507
+ },
508
+ "ack": {
509
+ "type": "number"
510
+ },
511
+ "chatId": {
512
+ "type": "string"
513
+ }
514
+ },
515
+ "required": [
516
+ "sessionId",
517
+ "messageId",
518
+ "ack"
519
+ ],
520
+ "additionalProperties": false
521
+ },
522
+ "group_addedToGroup": {
523
+ "$schema": "http://json-schema.org/draft-07/schema#",
524
+ "type": "object",
525
+ "properties": {
526
+ "ctx": {
527
+ "type": "object",
528
+ "properties": {
529
+ "correlationId": {
530
+ "type": "string"
531
+ },
532
+ "ts": {
533
+ "type": "number"
534
+ },
535
+ "attempt": {
536
+ "type": "number"
537
+ }
538
+ },
539
+ "required": [
540
+ "correlationId",
541
+ "ts"
542
+ ],
543
+ "additionalProperties": false
544
+ },
545
+ "groupId": {
546
+ "type": "string"
547
+ },
548
+ "by": {
549
+ "type": "string"
550
+ }
551
+ },
552
+ "required": [
553
+ "ctx",
554
+ "groupId"
555
+ ],
556
+ "additionalProperties": false
557
+ },
558
+ "message_any": {
559
+ "$schema": "http://json-schema.org/draft-07/schema#",
560
+ "type": "object",
561
+ "properties": {
562
+ "ctx": {
563
+ "type": "object",
564
+ "properties": {
565
+ "correlationId": {
566
+ "type": "string"
567
+ },
568
+ "ts": {
569
+ "type": "number"
570
+ },
571
+ "attempt": {
572
+ "type": "number"
573
+ }
574
+ },
575
+ "required": [
576
+ "correlationId",
577
+ "ts"
578
+ ],
579
+ "additionalProperties": false
580
+ },
581
+ "message": {
582
+ "type": "object",
583
+ "properties": {
584
+ "id": {
585
+ "type": "string",
586
+ "description": "Message identifier returned by a send method or message event."
587
+ },
588
+ "body": {
589
+ "type": "string"
590
+ },
591
+ "type": {
592
+ "type": "string",
593
+ "enum": [
594
+ "chat",
595
+ "audio",
596
+ "ptt",
597
+ "image",
598
+ "video",
599
+ "album",
600
+ "event_creation",
601
+ "event_response",
602
+ "document",
603
+ "sticker",
604
+ "location",
605
+ "vcard",
606
+ "multi_vcard",
607
+ "revoked",
608
+ "order",
609
+ "buttons_response",
610
+ "list_response",
611
+ "unknown"
612
+ ]
613
+ },
614
+ "t": {
615
+ "type": "number"
616
+ },
617
+ "notifyName": {
618
+ "type": "string"
619
+ },
620
+ "from": {
621
+ "type": "string",
622
+ "description": "Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."
623
+ },
624
+ "to": {
625
+ "type": "string",
626
+ "description": "Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."
627
+ },
628
+ "self": {
629
+ "type": "string",
630
+ "enum": [
631
+ "in",
632
+ "out"
633
+ ]
634
+ },
635
+ "ack": {
636
+ "type": "number",
637
+ "enum": [
638
+ -1,
639
+ 0,
640
+ 1,
641
+ 2,
642
+ 3,
643
+ 4
644
+ ]
645
+ },
646
+ "invis": {
647
+ "type": "boolean"
648
+ },
649
+ "isNewMsg": {
650
+ "type": "boolean"
651
+ },
652
+ "star": {
653
+ "type": "boolean"
654
+ },
655
+ "recvFresh": {
656
+ "type": "boolean"
657
+ },
658
+ "broadcast": {
659
+ "type": "boolean"
660
+ },
661
+ "isForwarded": {
662
+ "type": "boolean"
663
+ },
664
+ "labels": {
665
+ "type": "array",
666
+ "items": {
667
+ "type": "string"
668
+ }
669
+ },
670
+ "mentionedJidList": {
671
+ "type": "array",
672
+ "items": {
673
+ "type": "string",
674
+ "description": "Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."
675
+ }
676
+ },
677
+ "caption": {
678
+ "type": "string"
679
+ },
680
+ "event": {
681
+ "type": "object",
682
+ "properties": {
683
+ "id": {
684
+ "type": "string",
685
+ "minLength": 1
686
+ },
687
+ "chatId": {
688
+ "type": "string",
689
+ "minLength": 1
690
+ },
691
+ "creatorId": {
692
+ "type": "string",
693
+ "minLength": 1
694
+ },
695
+ "name": {
696
+ "type": "string"
697
+ },
698
+ "startTime": {
699
+ "type": "integer",
700
+ "minimum": 0,
701
+ "maximum": 2147483647
702
+ },
703
+ "endTime": {
704
+ "type": "integer",
705
+ "minimum": 0,
706
+ "maximum": 2147483647
707
+ },
708
+ "description": {
709
+ "type": "string"
710
+ },
711
+ "location": {
712
+ "type": "object",
713
+ "properties": {
714
+ "name": {
715
+ "type": "string"
716
+ },
717
+ "latitude": {
718
+ "anyOf": [
719
+ {
720
+ "type": "number"
721
+ },
722
+ {
723
+ "anyOf": [
724
+ {
725
+ "type": "string",
726
+ "const": "Infinity"
727
+ },
728
+ {
729
+ "type": "string",
730
+ "const": "-Infinity"
731
+ },
732
+ {
733
+ "type": "string",
734
+ "const": "NaN"
735
+ }
736
+ ]
737
+ }
738
+ ]
739
+ },
740
+ "longitude": {
741
+ "anyOf": [
742
+ {
743
+ "type": "number"
744
+ },
745
+ {
746
+ "anyOf": [
747
+ {
748
+ "type": "string",
749
+ "const": "Infinity"
750
+ },
751
+ {
752
+ "type": "string",
753
+ "const": "-Infinity"
754
+ },
755
+ {
756
+ "type": "string",
757
+ "const": "NaN"
758
+ }
759
+ ]
760
+ }
761
+ ]
762
+ }
763
+ },
764
+ "additionalProperties": false
765
+ },
766
+ "joinLink": {
767
+ "type": "string"
768
+ },
769
+ "isScheduledCall": {
770
+ "type": "boolean"
771
+ },
772
+ "extraGuestsAllowed": {
773
+ "type": "boolean"
774
+ },
775
+ "isCanceled": {
776
+ "type": "boolean"
777
+ },
778
+ "fromMe": {
779
+ "type": "boolean"
780
+ },
781
+ "timestamp": {
782
+ "type": "integer",
783
+ "minimum": 0,
784
+ "maximum": 2147483647
785
+ }
786
+ },
787
+ "required": [
788
+ "id",
789
+ "chatId",
790
+ "creatorId",
791
+ "name",
792
+ "startTime",
793
+ "isCanceled",
794
+ "fromMe",
795
+ "timestamp"
796
+ ],
797
+ "additionalProperties": false
798
+ },
799
+ "expectedImageCount": {
800
+ "description": "Number of image messages declared by an album container; not a received-media count.",
801
+ "anyOf": [
802
+ {
803
+ "type": "integer",
804
+ "minimum": 0,
805
+ "maximum": 9007199254740991
806
+ },
807
+ {
808
+ "type": "null"
809
+ }
810
+ ]
811
+ },
812
+ "expectedVideoCount": {
813
+ "description": "Number of video messages declared by an album container, including GIF videos.",
814
+ "anyOf": [
815
+ {
816
+ "type": "integer",
817
+ "minimum": 0,
818
+ "maximum": 9007199254740991
819
+ },
820
+ {
821
+ "type": "null"
822
+ }
823
+ ]
824
+ },
825
+ "parentMsgKey": {
826
+ "description": "Serialized parent message ID for associated media.",
827
+ "anyOf": [
828
+ {
829
+ "type": "string",
830
+ "description": "Message identifier returned by a send method or message event."
831
+ },
832
+ {
833
+ "type": "null"
834
+ }
835
+ ]
836
+ },
837
+ "associationType": {
838
+ "description": "WhatsApp association type. Album media uses MEDIA_ALBUM.",
839
+ "type": [
840
+ "string",
841
+ "null"
842
+ ]
843
+ },
844
+ "isGif": {
845
+ "type": "boolean"
846
+ },
847
+ "sender": {
848
+ "type": "object",
849
+ "properties": {
850
+ "id": {
851
+ "type": "string",
852
+ "description": "Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."
853
+ },
854
+ "name": {
855
+ "type": "string"
856
+ },
857
+ "shortName": {
858
+ "type": "string"
859
+ },
860
+ "pushname": {
861
+ "type": "string"
862
+ },
863
+ "formattedName": {
864
+ "type": "string"
865
+ },
866
+ "isBusiness": {
867
+ "type": "boolean"
868
+ },
869
+ "isEnterprise": {
870
+ "type": "boolean"
871
+ },
872
+ "isMe": {
873
+ "type": "boolean"
874
+ },
875
+ "isMyContact": {
876
+ "type": "boolean"
877
+ },
878
+ "isPSA": {
879
+ "type": "boolean"
880
+ },
881
+ "isUser": {
882
+ "type": "boolean"
883
+ },
884
+ "isWAContact": {
885
+ "type": "boolean"
886
+ },
887
+ "labels": {
888
+ "type": "array",
889
+ "items": {
890
+ "type": "string"
891
+ }
892
+ },
893
+ "msgs": {
894
+ "anyOf": [
895
+ {
896
+ "type": "array",
897
+ "items": {}
898
+ },
899
+ {
900
+ "type": "null"
901
+ }
902
+ ]
903
+ },
904
+ "profilePicThumbObj": {
905
+ "type": "object",
906
+ "properties": {
907
+ "eurl": {
908
+ "type": "string"
909
+ },
910
+ "id": {
911
+ "type": "object",
912
+ "properties": {
913
+ "server": {
914
+ "type": "string"
915
+ },
916
+ "user": {
917
+ "type": "string"
918
+ },
919
+ "_serialized": {
920
+ "type": "string"
921
+ }
922
+ },
923
+ "required": [
924
+ "server",
925
+ "user",
926
+ "_serialized"
927
+ ],
928
+ "additionalProperties": false
929
+ },
930
+ "img": {
931
+ "type": "string"
932
+ },
933
+ "imgFull": {
934
+ "type": "string"
935
+ },
936
+ "tag": {
937
+ "type": "string"
938
+ }
939
+ },
940
+ "additionalProperties": false
941
+ },
942
+ "statusMute": {
943
+ "type": "boolean"
944
+ },
945
+ "type": {
946
+ "type": "string"
947
+ },
948
+ "verifiedLevel": {
949
+ "type": "number"
950
+ },
951
+ "verifiedName": {
952
+ "type": "string"
953
+ },
954
+ "isOnline": {
955
+ "type": "boolean"
956
+ },
957
+ "lastSeen": {
958
+ "type": "number"
959
+ }
960
+ },
961
+ "required": [
962
+ "id"
963
+ ],
964
+ "additionalProperties": {}
965
+ },
966
+ "timestamp": {
967
+ "type": "number"
968
+ },
969
+ "content": {
970
+ "type": "string"
971
+ },
972
+ "isGroupMsg": {
973
+ "type": "boolean"
974
+ },
975
+ "isMMS": {
976
+ "type": "boolean"
977
+ },
978
+ "isMedia": {
979
+ "type": "boolean"
980
+ },
981
+ "isNotification": {
982
+ "type": "boolean"
983
+ },
984
+ "isPSA": {
985
+ "type": "boolean"
986
+ },
987
+ "fromMe": {
988
+ "type": "boolean"
989
+ },
990
+ "chat": {
991
+ "type": "object",
992
+ "properties": {
993
+ "id": {
994
+ "type": "string",
995
+ "description": "Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."
996
+ },
997
+ "name": {
998
+ "type": "string"
999
+ },
1000
+ "formattedTitle": {
1001
+ "type": "string"
1002
+ },
1003
+ "isGroup": {
1004
+ "type": "boolean"
1005
+ },
1006
+ "contact": {
1007
+ "anyOf": [
1008
+ {
1009
+ "type": "object",
1010
+ "properties": {
1011
+ "id": {
1012
+ "type": "string",
1013
+ "description": "Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."
1014
+ },
1015
+ "name": {
1016
+ "type": "string"
1017
+ },
1018
+ "shortName": {
1019
+ "type": "string"
1020
+ },
1021
+ "pushname": {
1022
+ "type": "string"
1023
+ },
1024
+ "formattedName": {
1025
+ "type": "string"
1026
+ },
1027
+ "isBusiness": {
1028
+ "type": "boolean"
1029
+ },
1030
+ "isEnterprise": {
1031
+ "type": "boolean"
1032
+ },
1033
+ "isMe": {
1034
+ "type": "boolean"
1035
+ },
1036
+ "isMyContact": {
1037
+ "type": "boolean"
1038
+ },
1039
+ "isPSA": {
1040
+ "type": "boolean"
1041
+ },
1042
+ "isUser": {
1043
+ "type": "boolean"
1044
+ },
1045
+ "isWAContact": {
1046
+ "type": "boolean"
1047
+ },
1048
+ "labels": {
1049
+ "type": "array",
1050
+ "items": {
1051
+ "type": "string"
1052
+ }
1053
+ },
1054
+ "msgs": {
1055
+ "anyOf": [
1056
+ {
1057
+ "type": "array",
1058
+ "items": {}
1059
+ },
1060
+ {
1061
+ "type": "null"
1062
+ }
1063
+ ]
1064
+ },
1065
+ "profilePicThumbObj": {
1066
+ "type": "object",
1067
+ "properties": {
1068
+ "eurl": {
1069
+ "type": "string"
1070
+ },
1071
+ "id": {
1072
+ "type": "object",
1073
+ "properties": {
1074
+ "server": {
1075
+ "type": "string"
1076
+ },
1077
+ "user": {
1078
+ "type": "string"
1079
+ },
1080
+ "_serialized": {
1081
+ "type": "string"
1082
+ }
1083
+ },
1084
+ "required": [
1085
+ "server",
1086
+ "user",
1087
+ "_serialized"
1088
+ ],
1089
+ "additionalProperties": false
1090
+ },
1091
+ "img": {
1092
+ "type": "string"
1093
+ },
1094
+ "imgFull": {
1095
+ "type": "string"
1096
+ },
1097
+ "tag": {
1098
+ "type": "string"
1099
+ }
1100
+ },
1101
+ "additionalProperties": false
1102
+ },
1103
+ "statusMute": {
1104
+ "type": "boolean"
1105
+ },
1106
+ "type": {
1107
+ "type": "string"
1108
+ },
1109
+ "verifiedLevel": {
1110
+ "type": "number"
1111
+ },
1112
+ "verifiedName": {
1113
+ "type": "string"
1114
+ },
1115
+ "isOnline": {
1116
+ "type": "boolean"
1117
+ },
1118
+ "lastSeen": {
1119
+ "type": "number"
1120
+ }
1121
+ },
1122
+ "required": [
1123
+ "id"
1124
+ ],
1125
+ "additionalProperties": {}
1126
+ },
1127
+ {
1128
+ "type": "null"
1129
+ }
1130
+ ]
1131
+ },
1132
+ "groupMetadata": {
1133
+ "anyOf": [
1134
+ {
1135
+ "type": "object",
1136
+ "properties": {
1137
+ "id": {
1138
+ "type": "string",
1139
+ "description": "Identifier for a WhatsApp group. Use the value returned by the API."
1140
+ },
1141
+ "subject": {
1142
+ "type": "string"
1143
+ },
1144
+ "creation": {
1145
+ "type": "number"
1146
+ },
1147
+ "owner": {
1148
+ "type": "string",
1149
+ "description": "Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."
1150
+ },
1151
+ "desc": {
1152
+ "type": "string"
1153
+ },
1154
+ "descTime": {
1155
+ "type": "number"
1156
+ },
1157
+ "descOwner": {
1158
+ "type": "string",
1159
+ "description": "Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."
1160
+ },
1161
+ "restrict": {
1162
+ "type": "boolean"
1163
+ },
1164
+ "announce": {
1165
+ "type": "boolean"
1166
+ },
1167
+ "participants": {
1168
+ "type": "array",
1169
+ "items": {
1170
+ "type": "object",
1171
+ "properties": {
1172
+ "id": {
1173
+ "type": "string",
1174
+ "description": "Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."
1175
+ },
1176
+ "isAdmin": {
1177
+ "type": "boolean"
1178
+ },
1179
+ "isSuperAdmin": {
1180
+ "type": "boolean"
1181
+ }
1182
+ },
1183
+ "required": [
1184
+ "id",
1185
+ "isAdmin"
1186
+ ],
1187
+ "additionalProperties": false
1188
+ }
1189
+ }
1190
+ },
1191
+ "required": [
1192
+ "id",
1193
+ "subject",
1194
+ "creation",
1195
+ "participants"
1196
+ ],
1197
+ "additionalProperties": {},
1198
+ "description": "Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."
1199
+ },
1200
+ {
1201
+ "type": "null"
1202
+ }
1203
+ ]
1204
+ },
1205
+ "presence": {
1206
+ "anyOf": [
1207
+ {
1208
+ "type": "object",
1209
+ "propertyNames": {
1210
+ "type": "string"
1211
+ },
1212
+ "additionalProperties": {}
1213
+ },
1214
+ {
1215
+ "type": "null"
1216
+ }
1217
+ ]
1218
+ },
1219
+ "t": {
1220
+ "type": "number"
1221
+ },
1222
+ "unreadCount": {
1223
+ "type": "number"
1224
+ },
1225
+ "lastReceivedKey": {},
1226
+ "msgs": {
1227
+ "anyOf": [
1228
+ {
1229
+ "type": "array",
1230
+ "items": {}
1231
+ },
1232
+ {
1233
+ "type": "null"
1234
+ }
1235
+ ]
1236
+ },
1237
+ "isReadOnly": {
1238
+ "type": "boolean"
1239
+ },
1240
+ "muteExpiration": {
1241
+ "type": "number"
1242
+ },
1243
+ "notSpam": {
1244
+ "type": "boolean"
1245
+ },
1246
+ "pin": {
1247
+ "type": "number"
1248
+ },
1249
+ "ack": {}
1250
+ },
1251
+ "required": [
1252
+ "id",
1253
+ "isGroup",
1254
+ "contact"
1255
+ ],
1256
+ "additionalProperties": {},
1257
+ "description": "Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."
1258
+ },
1259
+ "chatId": {
1260
+ "type": "string",
1261
+ "description": "Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."
1262
+ },
1263
+ "author": {
1264
+ "type": "string"
1265
+ },
1266
+ "clientUrl": {
1267
+ "type": "string"
1268
+ },
1269
+ "deprecatedMms3Url": {
1270
+ "type": "string"
1271
+ },
1272
+ "isQuotedMsgAvailable": {
1273
+ "type": "boolean"
1274
+ },
1275
+ "quotedMsg": {},
1276
+ "quotedMsgObj": {},
1277
+ "senderId": {
1278
+ "type": "string"
1279
+ }
1280
+ },
1281
+ "required": [
1282
+ "id"
1283
+ ],
1284
+ "additionalProperties": {}
1285
+ }
1286
+ },
1287
+ "required": [
1288
+ "ctx",
1289
+ "message"
1290
+ ],
1291
+ "additionalProperties": false
1292
+ },
1293
+ "message_received": {
1294
+ "$schema": "http://json-schema.org/draft-07/schema#",
1295
+ "type": "object",
1296
+ "properties": {
1297
+ "ctx": {
1298
+ "type": "object",
1299
+ "properties": {
1300
+ "correlationId": {
1301
+ "type": "string"
1302
+ },
1303
+ "ts": {
1304
+ "type": "number"
1305
+ },
1306
+ "attempt": {
1307
+ "type": "number"
1308
+ }
1309
+ },
1310
+ "required": [
1311
+ "correlationId",
1312
+ "ts"
1313
+ ],
1314
+ "additionalProperties": false
1315
+ },
1316
+ "message": {
1317
+ "type": "object",
1318
+ "properties": {
1319
+ "id": {
1320
+ "type": "string",
1321
+ "description": "Message identifier returned by a send method or message event."
1322
+ },
1323
+ "body": {
1324
+ "type": "string"
1325
+ },
1326
+ "type": {
1327
+ "type": "string",
1328
+ "enum": [
1329
+ "chat",
1330
+ "audio",
1331
+ "ptt",
1332
+ "image",
1333
+ "video",
1334
+ "album",
1335
+ "event_creation",
1336
+ "event_response",
1337
+ "document",
1338
+ "sticker",
1339
+ "location",
1340
+ "vcard",
1341
+ "multi_vcard",
1342
+ "revoked",
1343
+ "order",
1344
+ "buttons_response",
1345
+ "list_response",
1346
+ "unknown"
1347
+ ]
1348
+ },
1349
+ "t": {
1350
+ "type": "number"
1351
+ },
1352
+ "notifyName": {
1353
+ "type": "string"
1354
+ },
1355
+ "from": {
1356
+ "type": "string",
1357
+ "description": "Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."
1358
+ },
1359
+ "to": {
1360
+ "type": "string",
1361
+ "description": "Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."
1362
+ },
1363
+ "self": {
1364
+ "type": "string",
1365
+ "enum": [
1366
+ "in",
1367
+ "out"
1368
+ ]
1369
+ },
1370
+ "ack": {
1371
+ "type": "number",
1372
+ "enum": [
1373
+ -1,
1374
+ 0,
1375
+ 1,
1376
+ 2,
1377
+ 3,
1378
+ 4
1379
+ ]
1380
+ },
1381
+ "invis": {
1382
+ "type": "boolean"
1383
+ },
1384
+ "isNewMsg": {
1385
+ "type": "boolean"
1386
+ },
1387
+ "star": {
1388
+ "type": "boolean"
1389
+ },
1390
+ "recvFresh": {
1391
+ "type": "boolean"
1392
+ },
1393
+ "broadcast": {
1394
+ "type": "boolean"
1395
+ },
1396
+ "isForwarded": {
1397
+ "type": "boolean"
1398
+ },
1399
+ "labels": {
1400
+ "type": "array",
1401
+ "items": {
1402
+ "type": "string"
1403
+ }
1404
+ },
1405
+ "mentionedJidList": {
1406
+ "type": "array",
1407
+ "items": {
1408
+ "type": "string",
1409
+ "description": "Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."
1410
+ }
1411
+ },
1412
+ "caption": {
1413
+ "type": "string"
1414
+ },
1415
+ "event": {
1416
+ "type": "object",
1417
+ "properties": {
1418
+ "id": {
1419
+ "type": "string",
1420
+ "minLength": 1
1421
+ },
1422
+ "chatId": {
1423
+ "type": "string",
1424
+ "minLength": 1
1425
+ },
1426
+ "creatorId": {
1427
+ "type": "string",
1428
+ "minLength": 1
1429
+ },
1430
+ "name": {
1431
+ "type": "string"
1432
+ },
1433
+ "startTime": {
1434
+ "type": "integer",
1435
+ "minimum": 0,
1436
+ "maximum": 2147483647
1437
+ },
1438
+ "endTime": {
1439
+ "type": "integer",
1440
+ "minimum": 0,
1441
+ "maximum": 2147483647
1442
+ },
1443
+ "description": {
1444
+ "type": "string"
1445
+ },
1446
+ "location": {
1447
+ "type": "object",
1448
+ "properties": {
1449
+ "name": {
1450
+ "type": "string"
1451
+ },
1452
+ "latitude": {
1453
+ "anyOf": [
1454
+ {
1455
+ "type": "number"
1456
+ },
1457
+ {
1458
+ "anyOf": [
1459
+ {
1460
+ "type": "string",
1461
+ "const": "Infinity"
1462
+ },
1463
+ {
1464
+ "type": "string",
1465
+ "const": "-Infinity"
1466
+ },
1467
+ {
1468
+ "type": "string",
1469
+ "const": "NaN"
1470
+ }
1471
+ ]
1472
+ }
1473
+ ]
1474
+ },
1475
+ "longitude": {
1476
+ "anyOf": [
1477
+ {
1478
+ "type": "number"
1479
+ },
1480
+ {
1481
+ "anyOf": [
1482
+ {
1483
+ "type": "string",
1484
+ "const": "Infinity"
1485
+ },
1486
+ {
1487
+ "type": "string",
1488
+ "const": "-Infinity"
1489
+ },
1490
+ {
1491
+ "type": "string",
1492
+ "const": "NaN"
1493
+ }
1494
+ ]
1495
+ }
1496
+ ]
1497
+ }
1498
+ },
1499
+ "additionalProperties": false
1500
+ },
1501
+ "joinLink": {
1502
+ "type": "string"
1503
+ },
1504
+ "isScheduledCall": {
1505
+ "type": "boolean"
1506
+ },
1507
+ "extraGuestsAllowed": {
1508
+ "type": "boolean"
1509
+ },
1510
+ "isCanceled": {
1511
+ "type": "boolean"
1512
+ },
1513
+ "fromMe": {
1514
+ "type": "boolean"
1515
+ },
1516
+ "timestamp": {
1517
+ "type": "integer",
1518
+ "minimum": 0,
1519
+ "maximum": 2147483647
1520
+ }
1521
+ },
1522
+ "required": [
1523
+ "id",
1524
+ "chatId",
1525
+ "creatorId",
1526
+ "name",
1527
+ "startTime",
1528
+ "isCanceled",
1529
+ "fromMe",
1530
+ "timestamp"
1531
+ ],
1532
+ "additionalProperties": false
1533
+ },
1534
+ "expectedImageCount": {
1535
+ "description": "Number of image messages declared by an album container; not a received-media count.",
1536
+ "anyOf": [
1537
+ {
1538
+ "type": "integer",
1539
+ "minimum": 0,
1540
+ "maximum": 9007199254740991
1541
+ },
1542
+ {
1543
+ "type": "null"
1544
+ }
1545
+ ]
1546
+ },
1547
+ "expectedVideoCount": {
1548
+ "description": "Number of video messages declared by an album container, including GIF videos.",
1549
+ "anyOf": [
1550
+ {
1551
+ "type": "integer",
1552
+ "minimum": 0,
1553
+ "maximum": 9007199254740991
1554
+ },
1555
+ {
1556
+ "type": "null"
1557
+ }
1558
+ ]
1559
+ },
1560
+ "parentMsgKey": {
1561
+ "description": "Serialized parent message ID for associated media.",
1562
+ "anyOf": [
1563
+ {
1564
+ "type": "string",
1565
+ "description": "Message identifier returned by a send method or message event."
1566
+ },
1567
+ {
1568
+ "type": "null"
1569
+ }
1570
+ ]
1571
+ },
1572
+ "associationType": {
1573
+ "description": "WhatsApp association type. Album media uses MEDIA_ALBUM.",
1574
+ "type": [
1575
+ "string",
1576
+ "null"
1577
+ ]
1578
+ },
1579
+ "isGif": {
1580
+ "type": "boolean"
1581
+ },
1582
+ "sender": {
1583
+ "type": "object",
1584
+ "properties": {
1585
+ "id": {
1586
+ "type": "string",
1587
+ "description": "Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."
1588
+ },
1589
+ "name": {
1590
+ "type": "string"
1591
+ },
1592
+ "shortName": {
1593
+ "type": "string"
1594
+ },
1595
+ "pushname": {
1596
+ "type": "string"
1597
+ },
1598
+ "formattedName": {
1599
+ "type": "string"
1600
+ },
1601
+ "isBusiness": {
1602
+ "type": "boolean"
1603
+ },
1604
+ "isEnterprise": {
1605
+ "type": "boolean"
1606
+ },
1607
+ "isMe": {
1608
+ "type": "boolean"
1609
+ },
1610
+ "isMyContact": {
1611
+ "type": "boolean"
1612
+ },
1613
+ "isPSA": {
1614
+ "type": "boolean"
1615
+ },
1616
+ "isUser": {
1617
+ "type": "boolean"
1618
+ },
1619
+ "isWAContact": {
1620
+ "type": "boolean"
1621
+ },
1622
+ "labels": {
1623
+ "type": "array",
1624
+ "items": {
1625
+ "type": "string"
1626
+ }
1627
+ },
1628
+ "msgs": {
1629
+ "anyOf": [
1630
+ {
1631
+ "type": "array",
1632
+ "items": {}
1633
+ },
1634
+ {
1635
+ "type": "null"
1636
+ }
1637
+ ]
1638
+ },
1639
+ "profilePicThumbObj": {
1640
+ "type": "object",
1641
+ "properties": {
1642
+ "eurl": {
1643
+ "type": "string"
1644
+ },
1645
+ "id": {
1646
+ "type": "object",
1647
+ "properties": {
1648
+ "server": {
1649
+ "type": "string"
1650
+ },
1651
+ "user": {
1652
+ "type": "string"
1653
+ },
1654
+ "_serialized": {
1655
+ "type": "string"
1656
+ }
1657
+ },
1658
+ "required": [
1659
+ "server",
1660
+ "user",
1661
+ "_serialized"
1662
+ ],
1663
+ "additionalProperties": false
1664
+ },
1665
+ "img": {
1666
+ "type": "string"
1667
+ },
1668
+ "imgFull": {
1669
+ "type": "string"
1670
+ },
1671
+ "tag": {
1672
+ "type": "string"
1673
+ }
1674
+ },
1675
+ "additionalProperties": false
1676
+ },
1677
+ "statusMute": {
1678
+ "type": "boolean"
1679
+ },
1680
+ "type": {
1681
+ "type": "string"
1682
+ },
1683
+ "verifiedLevel": {
1684
+ "type": "number"
1685
+ },
1686
+ "verifiedName": {
1687
+ "type": "string"
1688
+ },
1689
+ "isOnline": {
1690
+ "type": "boolean"
1691
+ },
1692
+ "lastSeen": {
1693
+ "type": "number"
1694
+ }
1695
+ },
1696
+ "required": [
1697
+ "id"
1698
+ ],
1699
+ "additionalProperties": {}
1700
+ },
1701
+ "timestamp": {
1702
+ "type": "number"
1703
+ },
1704
+ "content": {
1705
+ "type": "string"
1706
+ },
1707
+ "isGroupMsg": {
1708
+ "type": "boolean"
1709
+ },
1710
+ "isMMS": {
1711
+ "type": "boolean"
1712
+ },
1713
+ "isMedia": {
1714
+ "type": "boolean"
1715
+ },
1716
+ "isNotification": {
1717
+ "type": "boolean"
1718
+ },
1719
+ "isPSA": {
1720
+ "type": "boolean"
1721
+ },
1722
+ "fromMe": {
1723
+ "type": "boolean"
1724
+ },
1725
+ "chat": {
1726
+ "type": "object",
1727
+ "properties": {
1728
+ "id": {
1729
+ "type": "string",
1730
+ "description": "Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."
1731
+ },
1732
+ "name": {
1733
+ "type": "string"
1734
+ },
1735
+ "formattedTitle": {
1736
+ "type": "string"
1737
+ },
1738
+ "isGroup": {
1739
+ "type": "boolean"
1740
+ },
1741
+ "contact": {
1742
+ "anyOf": [
1743
+ {
1744
+ "type": "object",
1745
+ "properties": {
1746
+ "id": {
1747
+ "type": "string",
1748
+ "description": "Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."
1749
+ },
1750
+ "name": {
1751
+ "type": "string"
1752
+ },
1753
+ "shortName": {
1754
+ "type": "string"
1755
+ },
1756
+ "pushname": {
1757
+ "type": "string"
1758
+ },
1759
+ "formattedName": {
1760
+ "type": "string"
1761
+ },
1762
+ "isBusiness": {
1763
+ "type": "boolean"
1764
+ },
1765
+ "isEnterprise": {
1766
+ "type": "boolean"
1767
+ },
1768
+ "isMe": {
1769
+ "type": "boolean"
1770
+ },
1771
+ "isMyContact": {
1772
+ "type": "boolean"
1773
+ },
1774
+ "isPSA": {
1775
+ "type": "boolean"
1776
+ },
1777
+ "isUser": {
1778
+ "type": "boolean"
1779
+ },
1780
+ "isWAContact": {
1781
+ "type": "boolean"
1782
+ },
1783
+ "labels": {
1784
+ "type": "array",
1785
+ "items": {
1786
+ "type": "string"
1787
+ }
1788
+ },
1789
+ "msgs": {
1790
+ "anyOf": [
1791
+ {
1792
+ "type": "array",
1793
+ "items": {}
1794
+ },
1795
+ {
1796
+ "type": "null"
1797
+ }
1798
+ ]
1799
+ },
1800
+ "profilePicThumbObj": {
1801
+ "type": "object",
1802
+ "properties": {
1803
+ "eurl": {
1804
+ "type": "string"
1805
+ },
1806
+ "id": {
1807
+ "type": "object",
1808
+ "properties": {
1809
+ "server": {
1810
+ "type": "string"
1811
+ },
1812
+ "user": {
1813
+ "type": "string"
1814
+ },
1815
+ "_serialized": {
1816
+ "type": "string"
1817
+ }
1818
+ },
1819
+ "required": [
1820
+ "server",
1821
+ "user",
1822
+ "_serialized"
1823
+ ],
1824
+ "additionalProperties": false
1825
+ },
1826
+ "img": {
1827
+ "type": "string"
1828
+ },
1829
+ "imgFull": {
1830
+ "type": "string"
1831
+ },
1832
+ "tag": {
1833
+ "type": "string"
1834
+ }
1835
+ },
1836
+ "additionalProperties": false
1837
+ },
1838
+ "statusMute": {
1839
+ "type": "boolean"
1840
+ },
1841
+ "type": {
1842
+ "type": "string"
1843
+ },
1844
+ "verifiedLevel": {
1845
+ "type": "number"
1846
+ },
1847
+ "verifiedName": {
1848
+ "type": "string"
1849
+ },
1850
+ "isOnline": {
1851
+ "type": "boolean"
1852
+ },
1853
+ "lastSeen": {
1854
+ "type": "number"
1855
+ }
1856
+ },
1857
+ "required": [
1858
+ "id"
1859
+ ],
1860
+ "additionalProperties": {}
1861
+ },
1862
+ {
1863
+ "type": "null"
1864
+ }
1865
+ ]
1866
+ },
1867
+ "groupMetadata": {
1868
+ "anyOf": [
1869
+ {
1870
+ "type": "object",
1871
+ "properties": {
1872
+ "id": {
1873
+ "type": "string",
1874
+ "description": "Identifier for a WhatsApp group. Use the value returned by the API."
1875
+ },
1876
+ "subject": {
1877
+ "type": "string"
1878
+ },
1879
+ "creation": {
1880
+ "type": "number"
1881
+ },
1882
+ "owner": {
1883
+ "type": "string",
1884
+ "description": "Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."
1885
+ },
1886
+ "desc": {
1887
+ "type": "string"
1888
+ },
1889
+ "descTime": {
1890
+ "type": "number"
1891
+ },
1892
+ "descOwner": {
1893
+ "type": "string",
1894
+ "description": "Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."
1895
+ },
1896
+ "restrict": {
1897
+ "type": "boolean"
1898
+ },
1899
+ "announce": {
1900
+ "type": "boolean"
1901
+ },
1902
+ "participants": {
1903
+ "type": "array",
1904
+ "items": {
1905
+ "type": "object",
1906
+ "properties": {
1907
+ "id": {
1908
+ "type": "string",
1909
+ "description": "Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."
1910
+ },
1911
+ "isAdmin": {
1912
+ "type": "boolean"
1913
+ },
1914
+ "isSuperAdmin": {
1915
+ "type": "boolean"
1916
+ }
1917
+ },
1918
+ "required": [
1919
+ "id",
1920
+ "isAdmin"
1921
+ ],
1922
+ "additionalProperties": false
1923
+ }
1924
+ }
1925
+ },
1926
+ "required": [
1927
+ "id",
1928
+ "subject",
1929
+ "creation",
1930
+ "participants"
1931
+ ],
1932
+ "additionalProperties": {},
1933
+ "description": "Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."
1934
+ },
1935
+ {
1936
+ "type": "null"
1937
+ }
1938
+ ]
1939
+ },
1940
+ "presence": {
1941
+ "anyOf": [
1942
+ {
1943
+ "type": "object",
1944
+ "propertyNames": {
1945
+ "type": "string"
1946
+ },
1947
+ "additionalProperties": {}
1948
+ },
1949
+ {
1950
+ "type": "null"
1951
+ }
1952
+ ]
1953
+ },
1954
+ "t": {
1955
+ "type": "number"
1956
+ },
1957
+ "unreadCount": {
1958
+ "type": "number"
1959
+ },
1960
+ "lastReceivedKey": {},
1961
+ "msgs": {
1962
+ "anyOf": [
1963
+ {
1964
+ "type": "array",
1965
+ "items": {}
1966
+ },
1967
+ {
1968
+ "type": "null"
1969
+ }
1970
+ ]
1971
+ },
1972
+ "isReadOnly": {
1973
+ "type": "boolean"
1974
+ },
1975
+ "muteExpiration": {
1976
+ "type": "number"
1977
+ },
1978
+ "notSpam": {
1979
+ "type": "boolean"
1980
+ },
1981
+ "pin": {
1982
+ "type": "number"
1983
+ },
1984
+ "ack": {}
1985
+ },
1986
+ "required": [
1987
+ "id",
1988
+ "isGroup",
1989
+ "contact"
1990
+ ],
1991
+ "additionalProperties": {},
1992
+ "description": "Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."
1993
+ },
1994
+ "chatId": {
1995
+ "type": "string",
1996
+ "description": "Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."
1997
+ },
1998
+ "author": {
1999
+ "type": "string"
2000
+ },
2001
+ "clientUrl": {
2002
+ "type": "string"
2003
+ },
2004
+ "deprecatedMms3Url": {
2005
+ "type": "string"
2006
+ },
2007
+ "isQuotedMsgAvailable": {
2008
+ "type": "boolean"
2009
+ },
2010
+ "quotedMsg": {},
2011
+ "quotedMsgObj": {},
2012
+ "senderId": {
2013
+ "type": "string"
2014
+ }
2015
+ },
2016
+ "required": [
2017
+ "id"
2018
+ ],
2019
+ "additionalProperties": {}
2020
+ }
2021
+ },
2022
+ "required": [
2023
+ "ctx",
2024
+ "message"
2025
+ ],
2026
+ "additionalProperties": false
2027
+ },
2028
+ "message_received_mcp": {
2029
+ "$schema": "http://json-schema.org/draft-07/schema#",
2030
+ "type": "object",
2031
+ "properties": {
2032
+ "sessionId": {
2033
+ "type": "string"
2034
+ },
2035
+ "messageId": {
2036
+ "type": "string"
2037
+ },
2038
+ "chatId": {
2039
+ "type": "string"
2040
+ },
2041
+ "from": {
2042
+ "type": "string"
2043
+ },
2044
+ "body": {
2045
+ "type": "string",
2046
+ "maxLength": 4000
2047
+ },
2048
+ "truncated": {
2049
+ "type": "boolean"
2050
+ }
2051
+ },
2052
+ "required": [
2053
+ "sessionId",
2054
+ "messageId",
2055
+ "truncated"
2056
+ ],
2057
+ "additionalProperties": false
2058
+ },
2059
+ "session_logout": {
2060
+ "$schema": "http://json-schema.org/draft-07/schema#",
2061
+ "type": "object",
2062
+ "properties": {
2063
+ "correlationId": {
2064
+ "type": "string"
2065
+ },
2066
+ "ts": {
2067
+ "type": "number"
2068
+ },
2069
+ "attempt": {
2070
+ "type": "number"
2071
+ },
2072
+ "step": {
2073
+ "type": "string"
2074
+ },
2075
+ "details": {
2076
+ "type": "object",
2077
+ "properties": {
2078
+ "reason": {
2079
+ "type": "string"
2080
+ }
2081
+ },
2082
+ "additionalProperties": false
2083
+ },
2084
+ "error": {
2085
+ "type": "object",
2086
+ "properties": {
2087
+ "name": {
2088
+ "type": "string"
2089
+ },
2090
+ "message": {
2091
+ "type": "string"
2092
+ },
2093
+ "stack": {
2094
+ "type": "string"
2095
+ }
2096
+ },
2097
+ "required": [
2098
+ "name",
2099
+ "message"
2100
+ ],
2101
+ "additionalProperties": false
2102
+ },
2103
+ "durationMs": {
2104
+ "type": "number"
2105
+ }
2106
+ },
2107
+ "required": [
2108
+ "correlationId",
2109
+ "ts",
2110
+ "step"
2111
+ ],
2112
+ "additionalProperties": false
2113
+ },
2114
+ "session_state_changed": {
2115
+ "$schema": "http://json-schema.org/draft-07/schema#",
2116
+ "type": "object",
2117
+ "properties": {
2118
+ "correlationId": {
2119
+ "type": "string"
2120
+ },
2121
+ "ts": {
2122
+ "type": "number"
2123
+ },
2124
+ "attempt": {
2125
+ "type": "number"
2126
+ },
2127
+ "step": {
2128
+ "type": "string"
2129
+ },
2130
+ "details": {
2131
+ "type": "object",
2132
+ "properties": {
2133
+ "prev": {
2134
+ "type": "string"
2135
+ },
2136
+ "next": {
2137
+ "type": "string"
2138
+ },
2139
+ "reason": {
2140
+ "type": "string"
2141
+ }
2142
+ },
2143
+ "required": [
2144
+ "prev",
2145
+ "next"
2146
+ ],
2147
+ "additionalProperties": false
2148
+ },
2149
+ "error": {
2150
+ "type": "object",
2151
+ "properties": {
2152
+ "name": {
2153
+ "type": "string"
2154
+ },
2155
+ "message": {
2156
+ "type": "string"
2157
+ },
2158
+ "stack": {
2159
+ "type": "string"
2160
+ }
2161
+ },
2162
+ "required": [
2163
+ "name",
2164
+ "message"
2165
+ ],
2166
+ "additionalProperties": false
2167
+ },
2168
+ "durationMs": {
2169
+ "type": "number"
2170
+ }
2171
+ },
2172
+ "required": [
2173
+ "correlationId",
2174
+ "ts",
2175
+ "step"
2176
+ ],
2177
+ "additionalProperties": false
2178
+ },
2179
+ "session_state_changed_mcp": {
2180
+ "$schema": "http://json-schema.org/draft-07/schema#",
2181
+ "type": "object",
2182
+ "properties": {
2183
+ "sessionId": {
2184
+ "type": "string"
2185
+ },
2186
+ "previousState": {
2187
+ "type": "string"
2188
+ },
2189
+ "state": {
2190
+ "type": "string"
2191
+ }
2192
+ },
2193
+ "required": [
2194
+ "sessionId",
2195
+ "state"
2196
+ ],
2197
+ "additionalProperties": false
2198
+ }
2199
+ },
2200
+ "messages": {
2201
+ "sse_ack_changed": {
2202
+ "name": "ack.changed",
2203
+ "title": "ack.changed",
2204
+ "summary": "Fired when a message acknowledgment is received",
2205
+ "contentType": "application/json",
2206
+ "payload": {
2207
+ "type": "object",
2208
+ "properties": {
2209
+ "id": {
2210
+ "type": "string"
2211
+ },
2212
+ "event": {
2213
+ "const": "ack.changed"
2214
+ },
2215
+ "payload": {
2216
+ "$ref": "#/components/schemas/ack_changed"
2217
+ },
2218
+ "ts": {
2219
+ "type": "number"
2220
+ },
2221
+ "sessionId": {
2222
+ "type": "string"
2223
+ }
2224
+ },
2225
+ "required": [
2226
+ "id",
2227
+ "event",
2228
+ "payload",
2229
+ "ts",
2230
+ "sessionId"
2231
+ ],
2232
+ "additionalProperties": false
2233
+ },
2234
+ "x-openwa-listener": "ack",
2235
+ "x-openwa-aliases": [
2236
+ "onAck"
2237
+ ],
2238
+ "x-openwa-optional-runtime-listener": false
2239
+ },
2240
+ "webhook_ack_changed": {
2241
+ "name": "ack.changed",
2242
+ "title": "ack.changed",
2243
+ "summary": "Fired when a message acknowledgment is received",
2244
+ "contentType": "application/json",
2245
+ "payload": {
2246
+ "type": "object",
2247
+ "properties": {
2248
+ "webhookId": {
2249
+ "type": "string"
2250
+ },
2251
+ "sessionId": {
2252
+ "type": "string"
2253
+ },
2254
+ "event": {
2255
+ "const": "ack.changed"
2256
+ },
2257
+ "payload": {
2258
+ "$ref": "#/components/schemas/ack_changed"
2259
+ },
2260
+ "timestamp": {
2261
+ "type": "number"
2262
+ },
2263
+ "idempotencyKey": {
2264
+ "type": "string"
2265
+ }
2266
+ },
2267
+ "required": [
2268
+ "webhookId",
2269
+ "sessionId",
2270
+ "event",
2271
+ "payload",
2272
+ "timestamp"
2273
+ ],
2274
+ "additionalProperties": false
2275
+ },
2276
+ "x-openwa-listener": "ack",
2277
+ "x-openwa-aliases": [
2278
+ "onAck"
2279
+ ],
2280
+ "x-openwa-optional-runtime-listener": false
2281
+ },
2282
+ "mcp_ack_changed": {
2283
+ "name": "ack.changed",
2284
+ "title": "ack.changed",
2285
+ "summary": "Fired when a message acknowledgment is received",
2286
+ "contentType": "application/json",
2287
+ "payload": {
2288
+ "type": "object",
2289
+ "properties": {
2290
+ "eventId": {
2291
+ "type": "string"
2292
+ },
2293
+ "name": {
2294
+ "const": "ack.changed"
2295
+ },
2296
+ "timestamp": {
2297
+ "type": "string",
2298
+ "format": "date-time"
2299
+ },
2300
+ "data": {
2301
+ "$ref": "#/components/schemas/ack_changed_mcp"
2302
+ },
2303
+ "cursor": {
2304
+ "type": "null"
2305
+ }
2306
+ },
2307
+ "required": [
2308
+ "eventId",
2309
+ "name",
2310
+ "timestamp",
2311
+ "data",
2312
+ "cursor"
2313
+ ],
2314
+ "additionalProperties": false
2315
+ },
2316
+ "headers": {
2317
+ "type": "object",
2318
+ "required": [
2319
+ "webhook-id",
2320
+ "webhook-timestamp",
2321
+ "webhook-signature",
2322
+ "X-MCP-Subscription-Id"
2323
+ ],
2324
+ "properties": {
2325
+ "webhook-id": {
2326
+ "type": "string"
2327
+ },
2328
+ "webhook-timestamp": {
2329
+ "type": "string"
2330
+ },
2331
+ "webhook-signature": {
2332
+ "type": "string"
2333
+ },
2334
+ "X-MCP-Subscription-Id": {
2335
+ "type": "string"
2336
+ }
2337
+ }
2338
+ },
2339
+ "x-openwa-listener": "ack",
2340
+ "x-openwa-aliases": [
2341
+ "onAck"
2342
+ ],
2343
+ "x-openwa-optional-runtime-listener": false
2344
+ },
2345
+ "sse_group_addedToGroup": {
2346
+ "name": "group.addedToGroup",
2347
+ "title": "group.addedToGroup",
2348
+ "summary": "Fired when you are added to a group",
2349
+ "contentType": "application/json",
2350
+ "payload": {
2351
+ "type": "object",
2352
+ "properties": {
2353
+ "id": {
2354
+ "type": "string"
2355
+ },
2356
+ "event": {
2357
+ "const": "group.addedToGroup"
2358
+ },
2359
+ "payload": {
2360
+ "$ref": "#/components/schemas/group_addedToGroup"
2361
+ },
2362
+ "ts": {
2363
+ "type": "number"
2364
+ },
2365
+ "sessionId": {
2366
+ "type": "string"
2367
+ }
2368
+ },
2369
+ "required": [
2370
+ "id",
2371
+ "event",
2372
+ "payload",
2373
+ "ts",
2374
+ "sessionId"
2375
+ ],
2376
+ "additionalProperties": false
2377
+ },
2378
+ "x-openwa-listener": "addedToGroup",
2379
+ "x-openwa-aliases": [
2380
+ "onAddedToGroup"
2381
+ ],
2382
+ "x-openwa-optional-runtime-listener": true
2383
+ },
2384
+ "webhook_group_addedToGroup": {
2385
+ "name": "group.addedToGroup",
2386
+ "title": "group.addedToGroup",
2387
+ "summary": "Fired when you are added to a group",
2388
+ "contentType": "application/json",
2389
+ "payload": {
2390
+ "type": "object",
2391
+ "properties": {
2392
+ "webhookId": {
2393
+ "type": "string"
2394
+ },
2395
+ "sessionId": {
2396
+ "type": "string"
2397
+ },
2398
+ "event": {
2399
+ "const": "group.addedToGroup"
2400
+ },
2401
+ "payload": {
2402
+ "$ref": "#/components/schemas/group_addedToGroup"
2403
+ },
2404
+ "timestamp": {
2405
+ "type": "number"
2406
+ },
2407
+ "idempotencyKey": {
2408
+ "type": "string"
2409
+ }
2410
+ },
2411
+ "required": [
2412
+ "webhookId",
2413
+ "sessionId",
2414
+ "event",
2415
+ "payload",
2416
+ "timestamp"
2417
+ ],
2418
+ "additionalProperties": false
2419
+ },
2420
+ "x-openwa-listener": "addedToGroup",
2421
+ "x-openwa-aliases": [
2422
+ "onAddedToGroup"
2423
+ ],
2424
+ "x-openwa-optional-runtime-listener": true
2425
+ },
2426
+ "sse_message_any": {
2427
+ "name": "message.any",
2428
+ "title": "message.any",
2429
+ "summary": "Fired for any message including own messages",
2430
+ "contentType": "application/json",
2431
+ "payload": {
2432
+ "type": "object",
2433
+ "properties": {
2434
+ "id": {
2435
+ "type": "string"
2436
+ },
2437
+ "event": {
2438
+ "const": "message.any"
2439
+ },
2440
+ "payload": {
2441
+ "$ref": "#/components/schemas/message_any"
2442
+ },
2443
+ "ts": {
2444
+ "type": "number"
2445
+ },
2446
+ "sessionId": {
2447
+ "type": "string"
2448
+ }
2449
+ },
2450
+ "required": [
2451
+ "id",
2452
+ "event",
2453
+ "payload",
2454
+ "ts",
2455
+ "sessionId"
2456
+ ],
2457
+ "additionalProperties": false
2458
+ },
2459
+ "x-openwa-listener": "anyMessage",
2460
+ "x-openwa-aliases": [
2461
+ "onAnyMessage"
2462
+ ],
2463
+ "x-openwa-optional-runtime-listener": true
2464
+ },
2465
+ "webhook_message_any": {
2466
+ "name": "message.any",
2467
+ "title": "message.any",
2468
+ "summary": "Fired for any message including own messages",
2469
+ "contentType": "application/json",
2470
+ "payload": {
2471
+ "type": "object",
2472
+ "properties": {
2473
+ "webhookId": {
2474
+ "type": "string"
2475
+ },
2476
+ "sessionId": {
2477
+ "type": "string"
2478
+ },
2479
+ "event": {
2480
+ "const": "message.any"
2481
+ },
2482
+ "payload": {
2483
+ "$ref": "#/components/schemas/message_any"
2484
+ },
2485
+ "timestamp": {
2486
+ "type": "number"
2487
+ },
2488
+ "idempotencyKey": {
2489
+ "type": "string"
2490
+ }
2491
+ },
2492
+ "required": [
2493
+ "webhookId",
2494
+ "sessionId",
2495
+ "event",
2496
+ "payload",
2497
+ "timestamp"
2498
+ ],
2499
+ "additionalProperties": false
2500
+ },
2501
+ "x-openwa-listener": "anyMessage",
2502
+ "x-openwa-aliases": [
2503
+ "onAnyMessage"
2504
+ ],
2505
+ "x-openwa-optional-runtime-listener": true
2506
+ },
2507
+ "sse_message_received": {
2508
+ "name": "message.received",
2509
+ "title": "message.received",
2510
+ "summary": "Fired when a new message is received (excluding own messages)",
2511
+ "contentType": "application/json",
2512
+ "payload": {
2513
+ "type": "object",
2514
+ "properties": {
2515
+ "id": {
2516
+ "type": "string"
2517
+ },
2518
+ "event": {
2519
+ "const": "message.received"
2520
+ },
2521
+ "payload": {
2522
+ "$ref": "#/components/schemas/message_received"
2523
+ },
2524
+ "ts": {
2525
+ "type": "number"
2526
+ },
2527
+ "sessionId": {
2528
+ "type": "string"
2529
+ }
2530
+ },
2531
+ "required": [
2532
+ "id",
2533
+ "event",
2534
+ "payload",
2535
+ "ts",
2536
+ "sessionId"
2537
+ ],
2538
+ "additionalProperties": false
2539
+ },
2540
+ "x-openwa-listener": "message",
2541
+ "x-openwa-aliases": [
2542
+ "onMessage"
2543
+ ],
2544
+ "x-openwa-optional-runtime-listener": false
2545
+ },
2546
+ "webhook_message_received": {
2547
+ "name": "message.received",
2548
+ "title": "message.received",
2549
+ "summary": "Fired when a new message is received (excluding own messages)",
2550
+ "contentType": "application/json",
2551
+ "payload": {
2552
+ "type": "object",
2553
+ "properties": {
2554
+ "webhookId": {
2555
+ "type": "string"
2556
+ },
2557
+ "sessionId": {
2558
+ "type": "string"
2559
+ },
2560
+ "event": {
2561
+ "const": "message.received"
2562
+ },
2563
+ "payload": {
2564
+ "$ref": "#/components/schemas/message_received"
2565
+ },
2566
+ "timestamp": {
2567
+ "type": "number"
2568
+ },
2569
+ "idempotencyKey": {
2570
+ "type": "string"
2571
+ }
2572
+ },
2573
+ "required": [
2574
+ "webhookId",
2575
+ "sessionId",
2576
+ "event",
2577
+ "payload",
2578
+ "timestamp"
2579
+ ],
2580
+ "additionalProperties": false
2581
+ },
2582
+ "x-openwa-listener": "message",
2583
+ "x-openwa-aliases": [
2584
+ "onMessage"
2585
+ ],
2586
+ "x-openwa-optional-runtime-listener": false
2587
+ },
2588
+ "mcp_message_received": {
2589
+ "name": "message.received",
2590
+ "title": "message.received",
2591
+ "summary": "Fired when a new message is received (excluding own messages)",
2592
+ "contentType": "application/json",
2593
+ "payload": {
2594
+ "type": "object",
2595
+ "properties": {
2596
+ "eventId": {
2597
+ "type": "string"
2598
+ },
2599
+ "name": {
2600
+ "const": "message.received"
2601
+ },
2602
+ "timestamp": {
2603
+ "type": "string",
2604
+ "format": "date-time"
2605
+ },
2606
+ "data": {
2607
+ "$ref": "#/components/schemas/message_received_mcp"
2608
+ },
2609
+ "cursor": {
2610
+ "type": "null"
2611
+ }
2612
+ },
2613
+ "required": [
2614
+ "eventId",
2615
+ "name",
2616
+ "timestamp",
2617
+ "data",
2618
+ "cursor"
2619
+ ],
2620
+ "additionalProperties": false
2621
+ },
2622
+ "headers": {
2623
+ "type": "object",
2624
+ "required": [
2625
+ "webhook-id",
2626
+ "webhook-timestamp",
2627
+ "webhook-signature",
2628
+ "X-MCP-Subscription-Id"
2629
+ ],
2630
+ "properties": {
2631
+ "webhook-id": {
2632
+ "type": "string"
2633
+ },
2634
+ "webhook-timestamp": {
2635
+ "type": "string"
2636
+ },
2637
+ "webhook-signature": {
2638
+ "type": "string"
2639
+ },
2640
+ "X-MCP-Subscription-Id": {
2641
+ "type": "string"
2642
+ }
2643
+ }
2644
+ },
2645
+ "x-openwa-listener": "message",
2646
+ "x-openwa-aliases": [
2647
+ "onMessage"
2648
+ ],
2649
+ "x-openwa-optional-runtime-listener": false
2650
+ },
2651
+ "sse_session_logout": {
2652
+ "name": "session.logout",
2653
+ "title": "session.logout",
2654
+ "summary": "Fired when the session is logged out",
2655
+ "contentType": "application/json",
2656
+ "payload": {
2657
+ "type": "object",
2658
+ "properties": {
2659
+ "id": {
2660
+ "type": "string"
2661
+ },
2662
+ "event": {
2663
+ "const": "session.logout"
2664
+ },
2665
+ "payload": {
2666
+ "$ref": "#/components/schemas/session_logout"
2667
+ },
2668
+ "ts": {
2669
+ "type": "number"
2670
+ },
2671
+ "sessionId": {
2672
+ "type": "string"
2673
+ }
2674
+ },
2675
+ "required": [
2676
+ "id",
2677
+ "event",
2678
+ "payload",
2679
+ "ts",
2680
+ "sessionId"
2681
+ ],
2682
+ "additionalProperties": false
2683
+ },
2684
+ "x-openwa-listener": "logout",
2685
+ "x-openwa-aliases": [
2686
+ "onLogout"
2687
+ ],
2688
+ "x-openwa-optional-runtime-listener": false
2689
+ },
2690
+ "webhook_session_logout": {
2691
+ "name": "session.logout",
2692
+ "title": "session.logout",
2693
+ "summary": "Fired when the session is logged out",
2694
+ "contentType": "application/json",
2695
+ "payload": {
2696
+ "type": "object",
2697
+ "properties": {
2698
+ "webhookId": {
2699
+ "type": "string"
2700
+ },
2701
+ "sessionId": {
2702
+ "type": "string"
2703
+ },
2704
+ "event": {
2705
+ "const": "session.logout"
2706
+ },
2707
+ "payload": {
2708
+ "$ref": "#/components/schemas/session_logout"
2709
+ },
2710
+ "timestamp": {
2711
+ "type": "number"
2712
+ },
2713
+ "idempotencyKey": {
2714
+ "type": "string"
2715
+ }
2716
+ },
2717
+ "required": [
2718
+ "webhookId",
2719
+ "sessionId",
2720
+ "event",
2721
+ "payload",
2722
+ "timestamp"
2723
+ ],
2724
+ "additionalProperties": false
2725
+ },
2726
+ "x-openwa-listener": "logout",
2727
+ "x-openwa-aliases": [
2728
+ "onLogout"
2729
+ ],
2730
+ "x-openwa-optional-runtime-listener": false
2731
+ },
2732
+ "sse_session_state_changed": {
2733
+ "name": "session.state.changed",
2734
+ "title": "session.state.changed",
2735
+ "summary": "Fired when connection state changes",
2736
+ "contentType": "application/json",
2737
+ "payload": {
2738
+ "type": "object",
2739
+ "properties": {
2740
+ "id": {
2741
+ "type": "string"
2742
+ },
2743
+ "event": {
2744
+ "const": "session.state.changed"
2745
+ },
2746
+ "payload": {
2747
+ "$ref": "#/components/schemas/session_state_changed"
2748
+ },
2749
+ "ts": {
2750
+ "type": "number"
2751
+ },
2752
+ "sessionId": {
2753
+ "type": "string"
2754
+ }
2755
+ },
2756
+ "required": [
2757
+ "id",
2758
+ "event",
2759
+ "payload",
2760
+ "ts",
2761
+ "sessionId"
2762
+ ],
2763
+ "additionalProperties": false
2764
+ },
2765
+ "x-openwa-listener": "stateChanged",
2766
+ "x-openwa-aliases": [
2767
+ "onStateChanged"
2768
+ ],
2769
+ "x-openwa-optional-runtime-listener": false
2770
+ },
2771
+ "webhook_session_state_changed": {
2772
+ "name": "session.state.changed",
2773
+ "title": "session.state.changed",
2774
+ "summary": "Fired when connection state changes",
2775
+ "contentType": "application/json",
2776
+ "payload": {
2777
+ "type": "object",
2778
+ "properties": {
2779
+ "webhookId": {
2780
+ "type": "string"
2781
+ },
2782
+ "sessionId": {
2783
+ "type": "string"
2784
+ },
2785
+ "event": {
2786
+ "const": "session.state.changed"
2787
+ },
2788
+ "payload": {
2789
+ "$ref": "#/components/schemas/session_state_changed"
2790
+ },
2791
+ "timestamp": {
2792
+ "type": "number"
2793
+ },
2794
+ "idempotencyKey": {
2795
+ "type": "string"
2796
+ }
2797
+ },
2798
+ "required": [
2799
+ "webhookId",
2800
+ "sessionId",
2801
+ "event",
2802
+ "payload",
2803
+ "timestamp"
2804
+ ],
2805
+ "additionalProperties": false
2806
+ },
2807
+ "x-openwa-listener": "stateChanged",
2808
+ "x-openwa-aliases": [
2809
+ "onStateChanged"
2810
+ ],
2811
+ "x-openwa-optional-runtime-listener": false
2812
+ },
2813
+ "mcp_session_state_changed": {
2814
+ "name": "session.state.changed",
2815
+ "title": "session.state.changed",
2816
+ "summary": "Fired when connection state changes",
2817
+ "contentType": "application/json",
2818
+ "payload": {
2819
+ "type": "object",
2820
+ "properties": {
2821
+ "eventId": {
2822
+ "type": "string"
2823
+ },
2824
+ "name": {
2825
+ "const": "session.state.changed"
2826
+ },
2827
+ "timestamp": {
2828
+ "type": "string",
2829
+ "format": "date-time"
2830
+ },
2831
+ "data": {
2832
+ "$ref": "#/components/schemas/session_state_changed_mcp"
2833
+ },
2834
+ "cursor": {
2835
+ "type": "null"
2836
+ }
2837
+ },
2838
+ "required": [
2839
+ "eventId",
2840
+ "name",
2841
+ "timestamp",
2842
+ "data",
2843
+ "cursor"
2844
+ ],
2845
+ "additionalProperties": false
2846
+ },
2847
+ "headers": {
2848
+ "type": "object",
2849
+ "required": [
2850
+ "webhook-id",
2851
+ "webhook-timestamp",
2852
+ "webhook-signature",
2853
+ "X-MCP-Subscription-Id"
2854
+ ],
2855
+ "properties": {
2856
+ "webhook-id": {
2857
+ "type": "string"
2858
+ },
2859
+ "webhook-timestamp": {
2860
+ "type": "string"
2861
+ },
2862
+ "webhook-signature": {
2863
+ "type": "string"
2864
+ },
2865
+ "X-MCP-Subscription-Id": {
2866
+ "type": "string"
2867
+ }
2868
+ }
2869
+ },
2870
+ "x-openwa-listener": "stateChanged",
2871
+ "x-openwa-aliases": [
2872
+ "onStateChanged"
2873
+ ],
2874
+ "x-openwa-optional-runtime-listener": false
2875
+ }
2876
+ },
2877
+ "securitySchemes": {
2878
+ "apiKey": {
2879
+ "type": "httpApiKey",
2880
+ "name": "X-API-Key",
2881
+ "in": "header",
2882
+ "description": "Easy API instance API key. Callback signing secrets are per subscription and are never included in this document."
2883
+ }
2884
+ }
2885
+ }
2886
+ }