@linqapp/sdk 0.2.0 → 0.4.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.
Files changed (107) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +31 -0
  3. package/client.d.mts +19 -6
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +19 -6
  6. package/client.d.ts.map +1 -1
  7. package/client.js +13 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +13 -0
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +69 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +69 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +125 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +118 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +1 -0
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +1 -0
  22. package/index.d.ts.map +1 -1
  23. package/index.js +3 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +1 -0
  26. package/index.mjs.map +1 -1
  27. package/internal/tslib.js +18 -18
  28. package/package.json +11 -1
  29. package/pagination.d.mts +2 -0
  30. package/pagination.d.mts.map +1 -0
  31. package/pagination.d.ts +2 -0
  32. package/pagination.d.ts.map +1 -0
  33. package/pagination.js +6 -0
  34. package/pagination.js.map +1 -0
  35. package/pagination.mjs +2 -0
  36. package/pagination.mjs.map +1 -0
  37. package/resources/capability.d.mts +9 -9
  38. package/resources/capability.d.ts +9 -9
  39. package/resources/capability.js +4 -4
  40. package/resources/capability.mjs +4 -4
  41. package/resources/chats/chats.d.mts +67 -84
  42. package/resources/chats/chats.d.mts.map +1 -1
  43. package/resources/chats/chats.d.ts +67 -84
  44. package/resources/chats/chats.d.ts.map +1 -1
  45. package/resources/chats/chats.js +8 -4
  46. package/resources/chats/chats.js.map +1 -1
  47. package/resources/chats/chats.mjs +9 -5
  48. package/resources/chats/chats.mjs.map +1 -1
  49. package/resources/chats/index.d.mts +2 -2
  50. package/resources/chats/index.d.mts.map +1 -1
  51. package/resources/chats/index.d.ts +2 -2
  52. package/resources/chats/index.d.ts.map +1 -1
  53. package/resources/chats/index.js.map +1 -1
  54. package/resources/chats/index.mjs.map +1 -1
  55. package/resources/chats/messages.d.mts +12 -25
  56. package/resources/chats/messages.d.mts.map +1 -1
  57. package/resources/chats/messages.d.ts +12 -25
  58. package/resources/chats/messages.d.ts.map +1 -1
  59. package/resources/chats/messages.js +7 -3
  60. package/resources/chats/messages.js.map +1 -1
  61. package/resources/chats/messages.mjs +7 -3
  62. package/resources/chats/messages.mjs.map +1 -1
  63. package/resources/index.d.mts +4 -3
  64. package/resources/index.d.mts.map +1 -1
  65. package/resources/index.d.ts +4 -3
  66. package/resources/index.d.ts.map +1 -1
  67. package/resources/index.js +3 -1
  68. package/resources/index.js.map +1 -1
  69. package/resources/index.mjs +1 -0
  70. package/resources/index.mjs.map +1 -1
  71. package/resources/messages.d.mts +28 -72
  72. package/resources/messages.d.mts.map +1 -1
  73. package/resources/messages.d.ts +28 -72
  74. package/resources/messages.d.ts.map +1 -1
  75. package/resources/messages.js +25 -4
  76. package/resources/messages.js.map +1 -1
  77. package/resources/messages.mjs +25 -4
  78. package/resources/messages.mjs.map +1 -1
  79. package/resources/shared.d.mts +51 -0
  80. package/resources/shared.d.mts.map +1 -1
  81. package/resources/shared.d.ts +51 -0
  82. package/resources/shared.d.ts.map +1 -1
  83. package/resources/webhooks.d.mts +2506 -0
  84. package/resources/webhooks.d.mts.map +1 -0
  85. package/resources/webhooks.d.ts +2506 -0
  86. package/resources/webhooks.d.ts.map +1 -0
  87. package/resources/webhooks.js +12 -0
  88. package/resources/webhooks.js.map +1 -0
  89. package/resources/webhooks.mjs +8 -0
  90. package/resources/webhooks.mjs.map +1 -0
  91. package/src/client.ts +159 -20
  92. package/src/core/pagination.ts +212 -0
  93. package/src/index.ts +1 -0
  94. package/src/pagination.ts +2 -0
  95. package/src/resources/capability.ts +14 -14
  96. package/src/resources/chats/chats.ts +77 -100
  97. package/src/resources/chats/index.ts +4 -3
  98. package/src/resources/chats/messages.ts +21 -30
  99. package/src/resources/index.ts +55 -10
  100. package/src/resources/messages.ts +40 -90
  101. package/src/resources/shared.ts +62 -0
  102. package/src/resources/webhooks.ts +3089 -0
  103. package/src/version.ts +1 -1
  104. package/version.d.mts +1 -1
  105. package/version.d.ts +1 -1
  106. package/version.js +1 -1
  107. package/version.mjs +1 -1
@@ -0,0 +1,2506 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import * as WebhooksAPI from "./webhooks.mjs";
3
+ import * as MessagesAPI from "./messages.mjs";
4
+ import * as Shared from "./shared.mjs";
5
+ import * as WebhookEventsAPI from "./webhook-events.mjs";
6
+ export declare class Webhooks extends APIResource {
7
+ events(body: string): EventsWebhookEvent;
8
+ }
9
+ /**
10
+ * Unified payload for message webhooks when using `webhook_version: "2026-02-03"`.
11
+ *
12
+ * This schema is used for message.sent, message.received, message.delivered, and
13
+ * message.read events when the subscription URL includes `?version=2026-02-03`.
14
+ *
15
+ * Key differences from V1 (2025-01-01):
16
+ *
17
+ * - `direction`: "inbound" or "outbound" instead of `is_from_me` boolean
18
+ * - `sender_handle`: Full handle object for the sender
19
+ * - `chat`: Nested object with `id`, `is_group`, and `owner_handle`
20
+ * - Message fields (`id`, `parts`, `effect`, etc.) are at the top level, not
21
+ * nested in `message`
22
+ *
23
+ * Timestamps indicate the message state:
24
+ *
25
+ * - `message.sent`: sent_at set, delivered_at=null, read_at=null
26
+ * - `message.received`: sent_at set, delivered_at=null, read_at=null
27
+ * - `message.delivered`: sent_at set, delivered_at set, read_at=null
28
+ * - `message.read`: sent_at set, delivered_at set, read_at set
29
+ */
30
+ export interface MessageEventV2 {
31
+ /**
32
+ * Message identifier
33
+ */
34
+ id: string;
35
+ /**
36
+ * Chat information
37
+ */
38
+ chat: MessageEventV2.Chat;
39
+ /**
40
+ * Message direction - "outbound" if sent by you, "inbound" if received
41
+ */
42
+ direction: 'inbound' | 'outbound';
43
+ /**
44
+ * Message parts (text and/or media)
45
+ */
46
+ parts: Array<SchemasTextPartResponse | SchemasMediaPartResponse>;
47
+ /**
48
+ * The handle that sent this message
49
+ */
50
+ sender_handle: MessagesAPI.ChatHandle;
51
+ /**
52
+ * Messaging service type
53
+ */
54
+ service: Shared.ServiceType;
55
+ /**
56
+ * When the message was delivered. Null if not yet delivered.
57
+ */
58
+ delivered_at?: string | null;
59
+ /**
60
+ * iMessage effect applied to a message (screen or bubble animation)
61
+ */
62
+ effect?: SchemasMessageEffect | null;
63
+ /**
64
+ * Idempotency key for deduplication of outbound messages.
65
+ */
66
+ idempotency_key?: string | null;
67
+ /**
68
+ * Preferred messaging service type. Includes "auto" for default fallback behavior.
69
+ */
70
+ preferred_service?: 'iMessage' | 'SMS' | 'RCS' | 'auto' | null;
71
+ /**
72
+ * When the message was read. Null if not yet read.
73
+ */
74
+ read_at?: string | null;
75
+ /**
76
+ * Reference to the message this is replying to (for threaded replies)
77
+ */
78
+ reply_to?: MessageEventV2.ReplyTo | null;
79
+ /**
80
+ * When the message was sent. Null if not yet sent.
81
+ */
82
+ sent_at?: string | null;
83
+ }
84
+ export declare namespace MessageEventV2 {
85
+ /**
86
+ * Chat information
87
+ */
88
+ interface Chat {
89
+ /**
90
+ * Chat identifier
91
+ */
92
+ id: string;
93
+ /**
94
+ * Whether this is a group chat
95
+ */
96
+ is_group?: boolean | null;
97
+ /**
98
+ * Your phone number's handle. Always has is_me=true.
99
+ */
100
+ owner_handle?: MessagesAPI.ChatHandle | null;
101
+ }
102
+ /**
103
+ * Reference to the message this is replying to (for threaded replies)
104
+ */
105
+ interface ReplyTo {
106
+ /**
107
+ * ID of the message being replied to
108
+ */
109
+ message_id?: string;
110
+ /**
111
+ * Index of the part being replied to
112
+ */
113
+ part_index?: number;
114
+ }
115
+ }
116
+ /**
117
+ * Message content nested within webhook events
118
+ */
119
+ export interface MessagePayload {
120
+ /**
121
+ * Message identifier
122
+ */
123
+ id?: string;
124
+ /**
125
+ * When the message record was created
126
+ */
127
+ created_at?: string;
128
+ /**
129
+ * When the message was delivered
130
+ */
131
+ delivered_at?: string | null;
132
+ /**
133
+ * iMessage effect applied to a message (screen or bubble animation)
134
+ */
135
+ effect?: SchemasMessageEffect;
136
+ /**
137
+ * Whether the message has been delivered
138
+ */
139
+ is_delivered?: boolean;
140
+ /**
141
+ * Whether the message has been read
142
+ */
143
+ is_read?: boolean;
144
+ /**
145
+ * Message content parts (text and/or media)
146
+ */
147
+ parts?: Array<SchemasTextPartResponse | SchemasMediaPartResponse>;
148
+ /**
149
+ * When the message was read
150
+ */
151
+ read_at?: string | null;
152
+ /**
153
+ * Reference to the message this is replying to
154
+ */
155
+ reply_to?: MessagePayload.ReplyTo;
156
+ /**
157
+ * When the message was sent
158
+ */
159
+ sent_at?: string | null;
160
+ /**
161
+ * When the message record was last updated
162
+ */
163
+ updated_at?: string;
164
+ }
165
+ export declare namespace MessagePayload {
166
+ /**
167
+ * Reference to the message this is replying to
168
+ */
169
+ interface ReplyTo {
170
+ /**
171
+ * The ID of the message being replied to
172
+ */
173
+ message_id?: string;
174
+ /**
175
+ * Index of the message part being replied to (0-based)
176
+ */
177
+ part_index?: number;
178
+ }
179
+ }
180
+ export interface ReactionEventBase {
181
+ /**
182
+ * Whether this reaction was from the owner of the phone number (true) or from
183
+ * someone else (false)
184
+ */
185
+ is_from_me: boolean;
186
+ /**
187
+ * Type of reaction. Standard iMessage tapbacks are love, like, dislike, laugh,
188
+ * emphasize, question. Custom emoji reactions have type "custom" with the actual
189
+ * emoji in the custom_emoji field. Sticker reactions have type "sticker" with
190
+ * sticker attachment details in the sticker field.
191
+ */
192
+ reaction_type: MessagesAPI.ReactionType;
193
+ /**
194
+ * Chat identifier (UUID)
195
+ */
196
+ chat_id?: string;
197
+ /**
198
+ * The actual emoji when reaction_type is "custom". Null for standard tapbacks.
199
+ */
200
+ custom_emoji?: string | null;
201
+ /**
202
+ * @deprecated DEPRECATED: Use from_handle instead. Phone number or email address
203
+ * of the person who added/removed the reaction.
204
+ */
205
+ from?: string;
206
+ /**
207
+ * The person who added/removed the reaction as a full handle object
208
+ */
209
+ from_handle?: MessagesAPI.ChatHandle;
210
+ /**
211
+ * Message identifier (UUID) that the reaction was added to or removed from
212
+ */
213
+ message_id?: string;
214
+ /**
215
+ * Index of the message part that was reacted to (0-based)
216
+ */
217
+ part_index?: number;
218
+ /**
219
+ * When the reaction was added or removed
220
+ */
221
+ reacted_at?: string;
222
+ /**
223
+ * Messaging service type
224
+ */
225
+ service?: Shared.ServiceType;
226
+ /**
227
+ * Sticker attachment details when reaction_type is "sticker". Null for non-sticker
228
+ * reactions.
229
+ */
230
+ sticker?: ReactionEventBase.Sticker | null;
231
+ }
232
+ export declare namespace ReactionEventBase {
233
+ /**
234
+ * Sticker attachment details when reaction_type is "sticker". Null for non-sticker
235
+ * reactions.
236
+ */
237
+ interface Sticker {
238
+ /**
239
+ * Filename of the sticker
240
+ */
241
+ file_name?: string;
242
+ /**
243
+ * Sticker image height in pixels
244
+ */
245
+ height?: number;
246
+ /**
247
+ * MIME type of the sticker image
248
+ */
249
+ mime_type?: string;
250
+ /**
251
+ * Presigned URL for downloading the sticker image (expires in 1 hour).
252
+ */
253
+ url?: string;
254
+ /**
255
+ * Sticker image width in pixels
256
+ */
257
+ width?: number;
258
+ }
259
+ }
260
+ /**
261
+ * A media attachment part
262
+ */
263
+ export interface SchemasMediaPartResponse {
264
+ /**
265
+ * Unique attachment identifier
266
+ */
267
+ id: string;
268
+ /**
269
+ * Original filename
270
+ */
271
+ filename: string;
272
+ /**
273
+ * MIME type of the file
274
+ */
275
+ mime_type: string;
276
+ /**
277
+ * File size in bytes
278
+ */
279
+ size_bytes: number;
280
+ /**
281
+ * Indicates this is a media attachment part
282
+ */
283
+ type: 'media';
284
+ /**
285
+ * Presigned URL for downloading the attachment (expires in 1 hour).
286
+ */
287
+ url: string;
288
+ }
289
+ /**
290
+ * iMessage effect applied to a message (screen or bubble animation)
291
+ */
292
+ export interface SchemasMessageEffect {
293
+ /**
294
+ * Effect name (confetti, fireworks, slam, gentle, etc.)
295
+ */
296
+ name?: string;
297
+ /**
298
+ * Effect category
299
+ */
300
+ type?: 'screen' | 'bubble';
301
+ }
302
+ /**
303
+ * A text message part
304
+ */
305
+ export interface SchemasTextPartResponse {
306
+ /**
307
+ * Indicates this is a text message part
308
+ */
309
+ type: 'text';
310
+ /**
311
+ * The text content
312
+ */
313
+ value: string;
314
+ }
315
+ /**
316
+ * Complete webhook payload for message.sent events (2026-02-03 format)
317
+ */
318
+ export interface MessageSentV2026WebhookEvent {
319
+ /**
320
+ * API version for the webhook payload format
321
+ */
322
+ api_version: string;
323
+ /**
324
+ * When the event was created
325
+ */
326
+ created_at: string;
327
+ /**
328
+ * Unified payload for message webhooks when using `webhook_version: "2026-02-03"`.
329
+ *
330
+ * This schema is used for message.sent, message.received, message.delivered, and
331
+ * message.read events when the subscription URL includes `?version=2026-02-03`.
332
+ *
333
+ * Key differences from V1 (2025-01-01):
334
+ *
335
+ * - `direction`: "inbound" or "outbound" instead of `is_from_me` boolean
336
+ * - `sender_handle`: Full handle object for the sender
337
+ * - `chat`: Nested object with `id`, `is_group`, and `owner_handle`
338
+ * - Message fields (`id`, `parts`, `effect`, etc.) are at the top level, not
339
+ * nested in `message`
340
+ *
341
+ * Timestamps indicate the message state:
342
+ *
343
+ * - `message.sent`: sent_at set, delivered_at=null, read_at=null
344
+ * - `message.received`: sent_at set, delivered_at=null, read_at=null
345
+ * - `message.delivered`: sent_at set, delivered_at set, read_at=null
346
+ * - `message.read`: sent_at set, delivered_at set, read_at set
347
+ */
348
+ data: MessageEventV2;
349
+ /**
350
+ * Unique identifier for this event (for deduplication)
351
+ */
352
+ event_id: string;
353
+ /**
354
+ * Valid webhook event types that can be subscribed to
355
+ */
356
+ event_type: WebhookEventsAPI.WebhookEventType;
357
+ /**
358
+ * Partner identifier. Present on all webhooks for cross-referencing.
359
+ */
360
+ partner_id: string;
361
+ /**
362
+ * Trace ID for debugging and correlation across systems.
363
+ */
364
+ trace_id: string;
365
+ /**
366
+ * Date-based webhook payload version. Determined by the `?version=` query
367
+ * parameter in your webhook subscription URL. If no version parameter is
368
+ * specified, defaults based on subscription creation date.
369
+ */
370
+ webhook_version: string;
371
+ }
372
+ /**
373
+ * Complete webhook payload for message.received events (2026-02-03 format)
374
+ */
375
+ export interface MessageReceivedV2026WebhookEvent {
376
+ /**
377
+ * API version for the webhook payload format
378
+ */
379
+ api_version: string;
380
+ /**
381
+ * When the event was created
382
+ */
383
+ created_at: string;
384
+ /**
385
+ * Unified payload for message webhooks when using `webhook_version: "2026-02-03"`.
386
+ *
387
+ * This schema is used for message.sent, message.received, message.delivered, and
388
+ * message.read events when the subscription URL includes `?version=2026-02-03`.
389
+ *
390
+ * Key differences from V1 (2025-01-01):
391
+ *
392
+ * - `direction`: "inbound" or "outbound" instead of `is_from_me` boolean
393
+ * - `sender_handle`: Full handle object for the sender
394
+ * - `chat`: Nested object with `id`, `is_group`, and `owner_handle`
395
+ * - Message fields (`id`, `parts`, `effect`, etc.) are at the top level, not
396
+ * nested in `message`
397
+ *
398
+ * Timestamps indicate the message state:
399
+ *
400
+ * - `message.sent`: sent_at set, delivered_at=null, read_at=null
401
+ * - `message.received`: sent_at set, delivered_at=null, read_at=null
402
+ * - `message.delivered`: sent_at set, delivered_at set, read_at=null
403
+ * - `message.read`: sent_at set, delivered_at set, read_at set
404
+ */
405
+ data: MessageEventV2;
406
+ /**
407
+ * Unique identifier for this event (for deduplication)
408
+ */
409
+ event_id: string;
410
+ /**
411
+ * Valid webhook event types that can be subscribed to
412
+ */
413
+ event_type: WebhookEventsAPI.WebhookEventType;
414
+ /**
415
+ * Partner identifier. Present on all webhooks for cross-referencing.
416
+ */
417
+ partner_id: string;
418
+ /**
419
+ * Trace ID for debugging and correlation across systems.
420
+ */
421
+ trace_id: string;
422
+ /**
423
+ * Date-based webhook payload version. Determined by the `?version=` query
424
+ * parameter in your webhook subscription URL. If no version parameter is
425
+ * specified, defaults based on subscription creation date.
426
+ */
427
+ webhook_version: string;
428
+ }
429
+ /**
430
+ * Complete webhook payload for message.read events (2026-02-03 format)
431
+ */
432
+ export interface MessageReadV2026WebhookEvent {
433
+ /**
434
+ * API version for the webhook payload format
435
+ */
436
+ api_version: string;
437
+ /**
438
+ * When the event was created
439
+ */
440
+ created_at: string;
441
+ /**
442
+ * Unified payload for message webhooks when using `webhook_version: "2026-02-03"`.
443
+ *
444
+ * This schema is used for message.sent, message.received, message.delivered, and
445
+ * message.read events when the subscription URL includes `?version=2026-02-03`.
446
+ *
447
+ * Key differences from V1 (2025-01-01):
448
+ *
449
+ * - `direction`: "inbound" or "outbound" instead of `is_from_me` boolean
450
+ * - `sender_handle`: Full handle object for the sender
451
+ * - `chat`: Nested object with `id`, `is_group`, and `owner_handle`
452
+ * - Message fields (`id`, `parts`, `effect`, etc.) are at the top level, not
453
+ * nested in `message`
454
+ *
455
+ * Timestamps indicate the message state:
456
+ *
457
+ * - `message.sent`: sent_at set, delivered_at=null, read_at=null
458
+ * - `message.received`: sent_at set, delivered_at=null, read_at=null
459
+ * - `message.delivered`: sent_at set, delivered_at set, read_at=null
460
+ * - `message.read`: sent_at set, delivered_at set, read_at set
461
+ */
462
+ data: MessageEventV2;
463
+ /**
464
+ * Unique identifier for this event (for deduplication)
465
+ */
466
+ event_id: string;
467
+ /**
468
+ * Valid webhook event types that can be subscribed to
469
+ */
470
+ event_type: WebhookEventsAPI.WebhookEventType;
471
+ /**
472
+ * Partner identifier. Present on all webhooks for cross-referencing.
473
+ */
474
+ partner_id: string;
475
+ /**
476
+ * Trace ID for debugging and correlation across systems.
477
+ */
478
+ trace_id: string;
479
+ /**
480
+ * Date-based webhook payload version. Determined by the `?version=` query
481
+ * parameter in your webhook subscription URL. If no version parameter is
482
+ * specified, defaults based on subscription creation date.
483
+ */
484
+ webhook_version: string;
485
+ }
486
+ /**
487
+ * Complete webhook payload for message.delivered events (2026-02-03 format)
488
+ */
489
+ export interface MessageDeliveredV2026WebhookEvent {
490
+ /**
491
+ * API version for the webhook payload format
492
+ */
493
+ api_version: string;
494
+ /**
495
+ * When the event was created
496
+ */
497
+ created_at: string;
498
+ /**
499
+ * Unified payload for message webhooks when using `webhook_version: "2026-02-03"`.
500
+ *
501
+ * This schema is used for message.sent, message.received, message.delivered, and
502
+ * message.read events when the subscription URL includes `?version=2026-02-03`.
503
+ *
504
+ * Key differences from V1 (2025-01-01):
505
+ *
506
+ * - `direction`: "inbound" or "outbound" instead of `is_from_me` boolean
507
+ * - `sender_handle`: Full handle object for the sender
508
+ * - `chat`: Nested object with `id`, `is_group`, and `owner_handle`
509
+ * - Message fields (`id`, `parts`, `effect`, etc.) are at the top level, not
510
+ * nested in `message`
511
+ *
512
+ * Timestamps indicate the message state:
513
+ *
514
+ * - `message.sent`: sent_at set, delivered_at=null, read_at=null
515
+ * - `message.received`: sent_at set, delivered_at=null, read_at=null
516
+ * - `message.delivered`: sent_at set, delivered_at set, read_at=null
517
+ * - `message.read`: sent_at set, delivered_at set, read_at set
518
+ */
519
+ data: MessageEventV2;
520
+ /**
521
+ * Unique identifier for this event (for deduplication)
522
+ */
523
+ event_id: string;
524
+ /**
525
+ * Valid webhook event types that can be subscribed to
526
+ */
527
+ event_type: WebhookEventsAPI.WebhookEventType;
528
+ /**
529
+ * Partner identifier. Present on all webhooks for cross-referencing.
530
+ */
531
+ partner_id: string;
532
+ /**
533
+ * Trace ID for debugging and correlation across systems.
534
+ */
535
+ trace_id: string;
536
+ /**
537
+ * Date-based webhook payload version. Determined by the `?version=` query
538
+ * parameter in your webhook subscription URL. If no version parameter is
539
+ * specified, defaults based on subscription creation date.
540
+ */
541
+ webhook_version: string;
542
+ }
543
+ /**
544
+ * Complete webhook payload for message.failed events
545
+ */
546
+ export interface MessageFailedV2026WebhookEvent {
547
+ /**
548
+ * API version for the webhook payload format
549
+ */
550
+ api_version: string;
551
+ /**
552
+ * When the event was created
553
+ */
554
+ created_at: string;
555
+ /**
556
+ * Error details for message.failed webhook events. See
557
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
558
+ * code reference.
559
+ */
560
+ data: MessageFailedV2026WebhookEvent.Data;
561
+ /**
562
+ * Unique identifier for this event (for deduplication)
563
+ */
564
+ event_id: string;
565
+ /**
566
+ * Valid webhook event types that can be subscribed to
567
+ */
568
+ event_type: WebhookEventsAPI.WebhookEventType;
569
+ /**
570
+ * Partner identifier. Present on all webhooks for cross-referencing.
571
+ */
572
+ partner_id: string;
573
+ /**
574
+ * Trace ID for debugging and correlation across systems.
575
+ */
576
+ trace_id: string;
577
+ /**
578
+ * Date-based webhook payload version. Determined by the `?version=` query
579
+ * parameter in your webhook subscription URL. If no version parameter is
580
+ * specified, defaults based on subscription creation date.
581
+ */
582
+ webhook_version: string;
583
+ }
584
+ export declare namespace MessageFailedV2026WebhookEvent {
585
+ /**
586
+ * Error details for message.failed webhook events. See
587
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
588
+ * code reference.
589
+ */
590
+ interface Data {
591
+ /**
592
+ * Error codes in webhook failure events (3007, 4001).
593
+ */
594
+ code: number;
595
+ /**
596
+ * When the failure was detected
597
+ */
598
+ failed_at: string;
599
+ /**
600
+ * Chat identifier (UUID)
601
+ */
602
+ chat_id?: string;
603
+ /**
604
+ * Message identifier (UUID)
605
+ */
606
+ message_id?: string;
607
+ /**
608
+ * Human-readable description of the failure
609
+ */
610
+ reason?: string;
611
+ }
612
+ }
613
+ /**
614
+ * Complete webhook payload for reaction.added events
615
+ */
616
+ export interface ReactionAddedV2026WebhookEvent {
617
+ /**
618
+ * API version for the webhook payload format
619
+ */
620
+ api_version: string;
621
+ /**
622
+ * When the event was created
623
+ */
624
+ created_at: string;
625
+ /**
626
+ * Payload for reaction.added webhook events
627
+ */
628
+ data: ReactionEventBase;
629
+ /**
630
+ * Unique identifier for this event (for deduplication)
631
+ */
632
+ event_id: string;
633
+ /**
634
+ * Valid webhook event types that can be subscribed to
635
+ */
636
+ event_type: WebhookEventsAPI.WebhookEventType;
637
+ /**
638
+ * Partner identifier. Present on all webhooks for cross-referencing.
639
+ */
640
+ partner_id: string;
641
+ /**
642
+ * Trace ID for debugging and correlation across systems.
643
+ */
644
+ trace_id: string;
645
+ /**
646
+ * Date-based webhook payload version. Determined by the `?version=` query
647
+ * parameter in your webhook subscription URL. If no version parameter is
648
+ * specified, defaults based on subscription creation date.
649
+ */
650
+ webhook_version: string;
651
+ }
652
+ /**
653
+ * Complete webhook payload for reaction.removed events
654
+ */
655
+ export interface ReactionRemovedV2026WebhookEvent {
656
+ /**
657
+ * API version for the webhook payload format
658
+ */
659
+ api_version: string;
660
+ /**
661
+ * When the event was created
662
+ */
663
+ created_at: string;
664
+ /**
665
+ * Payload for reaction.removed webhook events
666
+ */
667
+ data: ReactionEventBase;
668
+ /**
669
+ * Unique identifier for this event (for deduplication)
670
+ */
671
+ event_id: string;
672
+ /**
673
+ * Valid webhook event types that can be subscribed to
674
+ */
675
+ event_type: WebhookEventsAPI.WebhookEventType;
676
+ /**
677
+ * Partner identifier. Present on all webhooks for cross-referencing.
678
+ */
679
+ partner_id: string;
680
+ /**
681
+ * Trace ID for debugging and correlation across systems.
682
+ */
683
+ trace_id: string;
684
+ /**
685
+ * Date-based webhook payload version. Determined by the `?version=` query
686
+ * parameter in your webhook subscription URL. If no version parameter is
687
+ * specified, defaults based on subscription creation date.
688
+ */
689
+ webhook_version: string;
690
+ }
691
+ /**
692
+ * Complete webhook payload for participant.added events
693
+ */
694
+ export interface ParticipantAddedV2026WebhookEvent {
695
+ /**
696
+ * API version for the webhook payload format
697
+ */
698
+ api_version: string;
699
+ /**
700
+ * When the event was created
701
+ */
702
+ created_at: string;
703
+ /**
704
+ * Payload for participant.added webhook events
705
+ */
706
+ data: ParticipantAddedV2026WebhookEvent.Data;
707
+ /**
708
+ * Unique identifier for this event (for deduplication)
709
+ */
710
+ event_id: string;
711
+ /**
712
+ * Valid webhook event types that can be subscribed to
713
+ */
714
+ event_type: WebhookEventsAPI.WebhookEventType;
715
+ /**
716
+ * Partner identifier. Present on all webhooks for cross-referencing.
717
+ */
718
+ partner_id: string;
719
+ /**
720
+ * Trace ID for debugging and correlation across systems.
721
+ */
722
+ trace_id: string;
723
+ /**
724
+ * Date-based webhook payload version. Determined by the `?version=` query
725
+ * parameter in your webhook subscription URL. If no version parameter is
726
+ * specified, defaults based on subscription creation date.
727
+ */
728
+ webhook_version: string;
729
+ }
730
+ export declare namespace ParticipantAddedV2026WebhookEvent {
731
+ /**
732
+ * Payload for participant.added webhook events
733
+ */
734
+ interface Data {
735
+ /**
736
+ * @deprecated DEPRECATED: Use participant instead. Handle (phone number or email
737
+ * address) of the added participant.
738
+ */
739
+ handle: string;
740
+ /**
741
+ * When the participant was added
742
+ */
743
+ added_at?: string;
744
+ /**
745
+ * Chat identifier (UUID) of the group chat
746
+ */
747
+ chat_id?: string;
748
+ /**
749
+ * The added participant as a full handle object
750
+ */
751
+ participant?: MessagesAPI.ChatHandle;
752
+ }
753
+ }
754
+ /**
755
+ * Complete webhook payload for participant.removed events
756
+ */
757
+ export interface ParticipantRemovedV2026WebhookEvent {
758
+ /**
759
+ * API version for the webhook payload format
760
+ */
761
+ api_version: string;
762
+ /**
763
+ * When the event was created
764
+ */
765
+ created_at: string;
766
+ /**
767
+ * Payload for participant.removed webhook events
768
+ */
769
+ data: ParticipantRemovedV2026WebhookEvent.Data;
770
+ /**
771
+ * Unique identifier for this event (for deduplication)
772
+ */
773
+ event_id: string;
774
+ /**
775
+ * Valid webhook event types that can be subscribed to
776
+ */
777
+ event_type: WebhookEventsAPI.WebhookEventType;
778
+ /**
779
+ * Partner identifier. Present on all webhooks for cross-referencing.
780
+ */
781
+ partner_id: string;
782
+ /**
783
+ * Trace ID for debugging and correlation across systems.
784
+ */
785
+ trace_id: string;
786
+ /**
787
+ * Date-based webhook payload version. Determined by the `?version=` query
788
+ * parameter in your webhook subscription URL. If no version parameter is
789
+ * specified, defaults based on subscription creation date.
790
+ */
791
+ webhook_version: string;
792
+ }
793
+ export declare namespace ParticipantRemovedV2026WebhookEvent {
794
+ /**
795
+ * Payload for participant.removed webhook events
796
+ */
797
+ interface Data {
798
+ /**
799
+ * @deprecated DEPRECATED: Use participant instead. Handle (phone number or email
800
+ * address) of the removed participant.
801
+ */
802
+ handle: string;
803
+ /**
804
+ * Chat identifier (UUID) of the group chat
805
+ */
806
+ chat_id?: string;
807
+ /**
808
+ * The removed participant as a full handle object
809
+ */
810
+ participant?: MessagesAPI.ChatHandle;
811
+ /**
812
+ * When the participant was removed
813
+ */
814
+ removed_at?: string;
815
+ }
816
+ }
817
+ /**
818
+ * Complete webhook payload for chat.group_name_updated events
819
+ */
820
+ export interface ChatGroupNameUpdatedV2026WebhookEvent {
821
+ /**
822
+ * API version for the webhook payload format
823
+ */
824
+ api_version: string;
825
+ /**
826
+ * When the event was created
827
+ */
828
+ created_at: string;
829
+ /**
830
+ * Payload for chat.group_name_updated webhook events
831
+ */
832
+ data: ChatGroupNameUpdatedV2026WebhookEvent.Data;
833
+ /**
834
+ * Unique identifier for this event (for deduplication)
835
+ */
836
+ event_id: string;
837
+ /**
838
+ * Valid webhook event types that can be subscribed to
839
+ */
840
+ event_type: WebhookEventsAPI.WebhookEventType;
841
+ /**
842
+ * Partner identifier. Present on all webhooks for cross-referencing.
843
+ */
844
+ partner_id: string;
845
+ /**
846
+ * Trace ID for debugging and correlation across systems.
847
+ */
848
+ trace_id: string;
849
+ /**
850
+ * Date-based webhook payload version. Determined by the `?version=` query
851
+ * parameter in your webhook subscription URL. If no version parameter is
852
+ * specified, defaults based on subscription creation date.
853
+ */
854
+ webhook_version: string;
855
+ }
856
+ export declare namespace ChatGroupNameUpdatedV2026WebhookEvent {
857
+ /**
858
+ * Payload for chat.group_name_updated webhook events
859
+ */
860
+ interface Data {
861
+ /**
862
+ * Chat identifier (UUID) of the group chat
863
+ */
864
+ chat_id: string;
865
+ /**
866
+ * When the update occurred
867
+ */
868
+ updated_at: string;
869
+ /**
870
+ * The handle who made the change.
871
+ */
872
+ changed_by_handle?: MessagesAPI.ChatHandle | null;
873
+ /**
874
+ * New group name (null if the name was removed)
875
+ */
876
+ new_value?: string | null;
877
+ /**
878
+ * Previous group name (null if no previous name)
879
+ */
880
+ old_value?: string | null;
881
+ }
882
+ }
883
+ /**
884
+ * Complete webhook payload for chat.group_icon_updated events
885
+ */
886
+ export interface ChatGroupIconUpdatedV2026WebhookEvent {
887
+ /**
888
+ * API version for the webhook payload format
889
+ */
890
+ api_version: string;
891
+ /**
892
+ * When the event was created
893
+ */
894
+ created_at: string;
895
+ /**
896
+ * Payload for chat.group_icon_updated webhook events
897
+ */
898
+ data: ChatGroupIconUpdatedV2026WebhookEvent.Data;
899
+ /**
900
+ * Unique identifier for this event (for deduplication)
901
+ */
902
+ event_id: string;
903
+ /**
904
+ * Valid webhook event types that can be subscribed to
905
+ */
906
+ event_type: WebhookEventsAPI.WebhookEventType;
907
+ /**
908
+ * Partner identifier. Present on all webhooks for cross-referencing.
909
+ */
910
+ partner_id: string;
911
+ /**
912
+ * Trace ID for debugging and correlation across systems.
913
+ */
914
+ trace_id: string;
915
+ /**
916
+ * Date-based webhook payload version. Determined by the `?version=` query
917
+ * parameter in your webhook subscription URL. If no version parameter is
918
+ * specified, defaults based on subscription creation date.
919
+ */
920
+ webhook_version: string;
921
+ }
922
+ export declare namespace ChatGroupIconUpdatedV2026WebhookEvent {
923
+ /**
924
+ * Payload for chat.group_icon_updated webhook events
925
+ */
926
+ interface Data {
927
+ /**
928
+ * Chat identifier (UUID) of the group chat
929
+ */
930
+ chat_id: string;
931
+ /**
932
+ * When the update occurred
933
+ */
934
+ updated_at: string;
935
+ /**
936
+ * The handle who made the change.
937
+ */
938
+ changed_by_handle?: MessagesAPI.ChatHandle | null;
939
+ /**
940
+ * New icon URL (null if the icon was removed)
941
+ */
942
+ new_value?: string | null;
943
+ /**
944
+ * Previous icon URL (null if no previous icon)
945
+ */
946
+ old_value?: string | null;
947
+ }
948
+ }
949
+ /**
950
+ * Complete webhook payload for chat.group_name_update_failed events
951
+ */
952
+ export interface ChatGroupNameUpdateFailedV2026WebhookEvent {
953
+ /**
954
+ * API version for the webhook payload format
955
+ */
956
+ api_version: string;
957
+ /**
958
+ * When the event was created
959
+ */
960
+ created_at: string;
961
+ /**
962
+ * Error details for chat.group_name_update_failed webhook events. See
963
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
964
+ * code reference.
965
+ */
966
+ data: ChatGroupNameUpdateFailedV2026WebhookEvent.Data;
967
+ /**
968
+ * Unique identifier for this event (for deduplication)
969
+ */
970
+ event_id: string;
971
+ /**
972
+ * Valid webhook event types that can be subscribed to
973
+ */
974
+ event_type: WebhookEventsAPI.WebhookEventType;
975
+ /**
976
+ * Partner identifier. Present on all webhooks for cross-referencing.
977
+ */
978
+ partner_id: string;
979
+ /**
980
+ * Trace ID for debugging and correlation across systems.
981
+ */
982
+ trace_id: string;
983
+ /**
984
+ * Date-based webhook payload version. Determined by the `?version=` query
985
+ * parameter in your webhook subscription URL. If no version parameter is
986
+ * specified, defaults based on subscription creation date.
987
+ */
988
+ webhook_version: string;
989
+ }
990
+ export declare namespace ChatGroupNameUpdateFailedV2026WebhookEvent {
991
+ /**
992
+ * Error details for chat.group_name_update_failed webhook events. See
993
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
994
+ * code reference.
995
+ */
996
+ interface Data {
997
+ /**
998
+ * Chat identifier (UUID) of the group chat
999
+ */
1000
+ chat_id: string;
1001
+ /**
1002
+ * Error codes in webhook failure events (3007, 4001).
1003
+ */
1004
+ error_code: number;
1005
+ /**
1006
+ * When the failure was detected
1007
+ */
1008
+ failed_at: string;
1009
+ }
1010
+ }
1011
+ /**
1012
+ * Complete webhook payload for chat.group_icon_update_failed events
1013
+ */
1014
+ export interface ChatGroupIconUpdateFailedV2026WebhookEvent {
1015
+ /**
1016
+ * API version for the webhook payload format
1017
+ */
1018
+ api_version: string;
1019
+ /**
1020
+ * When the event was created
1021
+ */
1022
+ created_at: string;
1023
+ /**
1024
+ * Error details for chat.group_icon_update_failed webhook events. See
1025
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
1026
+ * code reference.
1027
+ */
1028
+ data: ChatGroupIconUpdateFailedV2026WebhookEvent.Data;
1029
+ /**
1030
+ * Unique identifier for this event (for deduplication)
1031
+ */
1032
+ event_id: string;
1033
+ /**
1034
+ * Valid webhook event types that can be subscribed to
1035
+ */
1036
+ event_type: WebhookEventsAPI.WebhookEventType;
1037
+ /**
1038
+ * Partner identifier. Present on all webhooks for cross-referencing.
1039
+ */
1040
+ partner_id: string;
1041
+ /**
1042
+ * Trace ID for debugging and correlation across systems.
1043
+ */
1044
+ trace_id: string;
1045
+ /**
1046
+ * Date-based webhook payload version. Determined by the `?version=` query
1047
+ * parameter in your webhook subscription URL. If no version parameter is
1048
+ * specified, defaults based on subscription creation date.
1049
+ */
1050
+ webhook_version: string;
1051
+ }
1052
+ export declare namespace ChatGroupIconUpdateFailedV2026WebhookEvent {
1053
+ /**
1054
+ * Error details for chat.group_icon_update_failed webhook events. See
1055
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
1056
+ * code reference.
1057
+ */
1058
+ interface Data {
1059
+ /**
1060
+ * Chat identifier (UUID) of the group chat
1061
+ */
1062
+ chat_id: string;
1063
+ /**
1064
+ * Error codes in webhook failure events (3007, 4001).
1065
+ */
1066
+ error_code: number;
1067
+ /**
1068
+ * When the failure was detected
1069
+ */
1070
+ failed_at: string;
1071
+ }
1072
+ }
1073
+ /**
1074
+ * Complete webhook payload for chat.created events
1075
+ */
1076
+ export interface ChatCreatedV2026WebhookEvent {
1077
+ /**
1078
+ * API version for the webhook payload format
1079
+ */
1080
+ api_version: string;
1081
+ /**
1082
+ * When the event was created
1083
+ */
1084
+ created_at: string;
1085
+ /**
1086
+ * Payload for chat.created webhook events. Matches GET /v3/chats/{chatId}
1087
+ * response.
1088
+ */
1089
+ data: ChatCreatedV2026WebhookEvent.Data;
1090
+ /**
1091
+ * Unique identifier for this event (for deduplication)
1092
+ */
1093
+ event_id: string;
1094
+ /**
1095
+ * Valid webhook event types that can be subscribed to
1096
+ */
1097
+ event_type: WebhookEventsAPI.WebhookEventType;
1098
+ /**
1099
+ * Partner identifier. Present on all webhooks for cross-referencing.
1100
+ */
1101
+ partner_id: string;
1102
+ /**
1103
+ * Trace ID for debugging and correlation across systems.
1104
+ */
1105
+ trace_id: string;
1106
+ /**
1107
+ * Date-based webhook payload version. Determined by the `?version=` query
1108
+ * parameter in your webhook subscription URL. If no version parameter is
1109
+ * specified, defaults based on subscription creation date.
1110
+ */
1111
+ webhook_version: string;
1112
+ }
1113
+ export declare namespace ChatCreatedV2026WebhookEvent {
1114
+ /**
1115
+ * Payload for chat.created webhook events. Matches GET /v3/chats/{chatId}
1116
+ * response.
1117
+ */
1118
+ interface Data {
1119
+ /**
1120
+ * Unique identifier for the chat
1121
+ */
1122
+ id: string;
1123
+ /**
1124
+ * When the chat was created
1125
+ */
1126
+ created_at: string;
1127
+ /**
1128
+ * Display name for the chat. Defaults to a comma-separated list of recipient
1129
+ * handles. Can be updated for group chats.
1130
+ */
1131
+ display_name: string | null;
1132
+ /**
1133
+ * List of chat participants with full handle details. Always contains at least two
1134
+ * handles (your phone number and the other participant).
1135
+ */
1136
+ handles: Array<MessagesAPI.ChatHandle>;
1137
+ /**
1138
+ * Whether this is a group chat
1139
+ */
1140
+ is_group: boolean;
1141
+ /**
1142
+ * When the chat was last updated
1143
+ */
1144
+ updated_at: string;
1145
+ /**
1146
+ * Messaging service type
1147
+ */
1148
+ service?: Shared.ServiceType | null;
1149
+ }
1150
+ }
1151
+ /**
1152
+ * Complete webhook payload for chat.typing_indicator.started events
1153
+ */
1154
+ export interface ChatTypingIndicatorStartedV2026WebhookEvent {
1155
+ /**
1156
+ * API version for the webhook payload format
1157
+ */
1158
+ api_version: string;
1159
+ /**
1160
+ * When the event was created
1161
+ */
1162
+ created_at: string;
1163
+ /**
1164
+ * Payload for chat.typing_indicator.started webhook events
1165
+ */
1166
+ data: ChatTypingIndicatorStartedV2026WebhookEvent.Data;
1167
+ /**
1168
+ * Unique identifier for this event (for deduplication)
1169
+ */
1170
+ event_id: string;
1171
+ /**
1172
+ * Valid webhook event types that can be subscribed to
1173
+ */
1174
+ event_type: WebhookEventsAPI.WebhookEventType;
1175
+ /**
1176
+ * Partner identifier. Present on all webhooks for cross-referencing.
1177
+ */
1178
+ partner_id: string;
1179
+ /**
1180
+ * Trace ID for debugging and correlation across systems.
1181
+ */
1182
+ trace_id: string;
1183
+ /**
1184
+ * Date-based webhook payload version. Determined by the `?version=` query
1185
+ * parameter in your webhook subscription URL. If no version parameter is
1186
+ * specified, defaults based on subscription creation date.
1187
+ */
1188
+ webhook_version: string;
1189
+ }
1190
+ export declare namespace ChatTypingIndicatorStartedV2026WebhookEvent {
1191
+ /**
1192
+ * Payload for chat.typing_indicator.started webhook events
1193
+ */
1194
+ interface Data {
1195
+ /**
1196
+ * Chat identifier
1197
+ */
1198
+ chat_id: string;
1199
+ }
1200
+ }
1201
+ /**
1202
+ * Complete webhook payload for chat.typing_indicator.stopped events
1203
+ */
1204
+ export interface ChatTypingIndicatorStoppedV2026WebhookEvent {
1205
+ /**
1206
+ * API version for the webhook payload format
1207
+ */
1208
+ api_version: string;
1209
+ /**
1210
+ * When the event was created
1211
+ */
1212
+ created_at: string;
1213
+ /**
1214
+ * Payload for chat.typing_indicator.stopped webhook events
1215
+ */
1216
+ data: ChatTypingIndicatorStoppedV2026WebhookEvent.Data;
1217
+ /**
1218
+ * Unique identifier for this event (for deduplication)
1219
+ */
1220
+ event_id: string;
1221
+ /**
1222
+ * Valid webhook event types that can be subscribed to
1223
+ */
1224
+ event_type: WebhookEventsAPI.WebhookEventType;
1225
+ /**
1226
+ * Partner identifier. Present on all webhooks for cross-referencing.
1227
+ */
1228
+ partner_id: string;
1229
+ /**
1230
+ * Trace ID for debugging and correlation across systems.
1231
+ */
1232
+ trace_id: string;
1233
+ /**
1234
+ * Date-based webhook payload version. Determined by the `?version=` query
1235
+ * parameter in your webhook subscription URL. If no version parameter is
1236
+ * specified, defaults based on subscription creation date.
1237
+ */
1238
+ webhook_version: string;
1239
+ }
1240
+ export declare namespace ChatTypingIndicatorStoppedV2026WebhookEvent {
1241
+ /**
1242
+ * Payload for chat.typing_indicator.stopped webhook events
1243
+ */
1244
+ interface Data {
1245
+ /**
1246
+ * Chat identifier
1247
+ */
1248
+ chat_id: string;
1249
+ }
1250
+ }
1251
+ /**
1252
+ * Complete webhook payload for phone_number.status_updated events
1253
+ */
1254
+ export interface PhoneNumberStatusUpdatedV2026WebhookEvent {
1255
+ /**
1256
+ * API version for the webhook payload format
1257
+ */
1258
+ api_version: string;
1259
+ /**
1260
+ * When the event was created
1261
+ */
1262
+ created_at: string;
1263
+ /**
1264
+ * Payload for phone_number.status_updated webhook events
1265
+ */
1266
+ data: PhoneNumberStatusUpdatedV2026WebhookEvent.Data;
1267
+ /**
1268
+ * Unique identifier for this event (for deduplication)
1269
+ */
1270
+ event_id: string;
1271
+ /**
1272
+ * The type of event
1273
+ */
1274
+ event_type: 'message.sent' | 'message.received' | 'message.read' | 'message.delivered' | 'message.failed' | 'message.edited' | 'reaction.added' | 'reaction.removed' | 'participant.added' | 'participant.removed' | 'chat.created' | 'chat.group_name_updated' | 'chat.group_icon_updated' | 'chat.group_name_update_failed' | 'chat.group_icon_update_failed' | 'chat.typing_indicator.started' | 'chat.typing_indicator.stopped' | 'phone_number.status_updated';
1275
+ /**
1276
+ * Partner identifier. Present on all webhooks for cross-referencing.
1277
+ */
1278
+ partner_id: string;
1279
+ /**
1280
+ * Trace ID for debugging and correlation across systems.
1281
+ */
1282
+ trace_id: string;
1283
+ /**
1284
+ * Date-based webhook payload version. Determined by the `?version=` query
1285
+ * parameter in your webhook subscription URL. If no version parameter is
1286
+ * specified, defaults based on subscription creation date.
1287
+ */
1288
+ webhook_version: string;
1289
+ }
1290
+ export declare namespace PhoneNumberStatusUpdatedV2026WebhookEvent {
1291
+ /**
1292
+ * Payload for phone_number.status_updated webhook events
1293
+ */
1294
+ interface Data {
1295
+ /**
1296
+ * When the status change occurred
1297
+ */
1298
+ changed_at: string;
1299
+ /**
1300
+ * The new service status
1301
+ */
1302
+ new_status: 'ACTIVE' | 'FLAGGED';
1303
+ /**
1304
+ * Phone number in E.164 format
1305
+ */
1306
+ phone_number: string;
1307
+ /**
1308
+ * The previous service status
1309
+ */
1310
+ previous_status: 'ACTIVE' | 'FLAGGED';
1311
+ }
1312
+ }
1313
+ /**
1314
+ * Complete webhook payload for message.sent events (2025-01-01 format)
1315
+ */
1316
+ export interface MessageSentV2025WebhookEvent {
1317
+ /**
1318
+ * API version for the webhook payload format
1319
+ */
1320
+ api_version: string;
1321
+ /**
1322
+ * When the event was created
1323
+ */
1324
+ created_at: string;
1325
+ /**
1326
+ * Unified payload for message.sent and message.received webhook events (2025-01-01
1327
+ * format)
1328
+ */
1329
+ data: MessageSentV2025WebhookEvent.Data;
1330
+ /**
1331
+ * Unique identifier for this event (for deduplication)
1332
+ */
1333
+ event_id: string;
1334
+ /**
1335
+ * Valid webhook event types that can be subscribed to
1336
+ */
1337
+ event_type: WebhookEventsAPI.WebhookEventType;
1338
+ /**
1339
+ * Partner identifier. Present on all webhooks for cross-referencing.
1340
+ */
1341
+ partner_id: string;
1342
+ /**
1343
+ * Trace ID for debugging and correlation across systems.
1344
+ */
1345
+ trace_id: string;
1346
+ /**
1347
+ * Date-based webhook payload version. Determined by the `?version=` query
1348
+ * parameter in your webhook subscription URL. If no version parameter is
1349
+ * specified, defaults based on subscription creation date.
1350
+ */
1351
+ webhook_version: string;
1352
+ }
1353
+ export declare namespace MessageSentV2025WebhookEvent {
1354
+ /**
1355
+ * Unified payload for message.sent and message.received webhook events (2025-01-01
1356
+ * format)
1357
+ */
1358
+ interface Data {
1359
+ /**
1360
+ * Chat identifier
1361
+ */
1362
+ chat_id?: string;
1363
+ /**
1364
+ * @deprecated DEPRECATED: Use from_handle instead. Phone number or email address
1365
+ * of the message sender.
1366
+ */
1367
+ from?: string;
1368
+ /**
1369
+ * The sender of this message as a full handle object
1370
+ */
1371
+ from_handle?: MessagesAPI.ChatHandle;
1372
+ /**
1373
+ * Idempotency key for the message. Used for deduplication of outbound messages.
1374
+ */
1375
+ idempotency_key?: string | null;
1376
+ /**
1377
+ * Whether the message was sent by us (true for sent events, false for received
1378
+ * events)
1379
+ */
1380
+ is_from_me?: boolean;
1381
+ /**
1382
+ * Whether this is a group chat
1383
+ */
1384
+ is_group?: boolean;
1385
+ /**
1386
+ * Message content nested within webhook events
1387
+ */
1388
+ message?: WebhooksAPI.MessagePayload;
1389
+ /**
1390
+ * Preferred messaging service type. Includes "auto" for default fallback behavior.
1391
+ */
1392
+ preferred_service?: 'iMessage' | 'SMS' | 'RCS' | 'auto' | null;
1393
+ /**
1394
+ * When the message was received. Null for sent events.
1395
+ */
1396
+ received_at?: string | null;
1397
+ /**
1398
+ * Our phone number that received the message as a full handle object. Null for
1399
+ * sent events.
1400
+ */
1401
+ recipient_handle?: MessagesAPI.ChatHandle | null;
1402
+ /**
1403
+ * @deprecated DEPRECATED: Use recipient_handle instead. Our phone number that
1404
+ * received the message. Null for sent events.
1405
+ */
1406
+ recipient_phone?: string | null;
1407
+ /**
1408
+ * Messaging service type
1409
+ */
1410
+ service?: Shared.ServiceType | null;
1411
+ }
1412
+ }
1413
+ /**
1414
+ * Complete webhook payload for message.received events (2025-01-01 format)
1415
+ */
1416
+ export interface MessageReceivedV2025WebhookEvent {
1417
+ /**
1418
+ * API version for the webhook payload format
1419
+ */
1420
+ api_version: string;
1421
+ /**
1422
+ * When the event was created
1423
+ */
1424
+ created_at: string;
1425
+ /**
1426
+ * Unified payload for message.sent and message.received webhook events (2025-01-01
1427
+ * format)
1428
+ */
1429
+ data: MessageReceivedV2025WebhookEvent.Data;
1430
+ /**
1431
+ * Unique identifier for this event (for deduplication)
1432
+ */
1433
+ event_id: string;
1434
+ /**
1435
+ * Valid webhook event types that can be subscribed to
1436
+ */
1437
+ event_type: WebhookEventsAPI.WebhookEventType;
1438
+ /**
1439
+ * Partner identifier. Present on all webhooks for cross-referencing.
1440
+ */
1441
+ partner_id: string;
1442
+ /**
1443
+ * Trace ID for debugging and correlation across systems.
1444
+ */
1445
+ trace_id: string;
1446
+ /**
1447
+ * Date-based webhook payload version. Determined by the `?version=` query
1448
+ * parameter in your webhook subscription URL. If no version parameter is
1449
+ * specified, defaults based on subscription creation date.
1450
+ */
1451
+ webhook_version: string;
1452
+ }
1453
+ export declare namespace MessageReceivedV2025WebhookEvent {
1454
+ /**
1455
+ * Unified payload for message.sent and message.received webhook events (2025-01-01
1456
+ * format)
1457
+ */
1458
+ interface Data {
1459
+ /**
1460
+ * Chat identifier
1461
+ */
1462
+ chat_id?: string;
1463
+ /**
1464
+ * @deprecated DEPRECATED: Use from_handle instead. Phone number or email address
1465
+ * of the message sender.
1466
+ */
1467
+ from?: string;
1468
+ /**
1469
+ * The sender of this message as a full handle object
1470
+ */
1471
+ from_handle?: MessagesAPI.ChatHandle;
1472
+ /**
1473
+ * Idempotency key for the message. Used for deduplication of outbound messages.
1474
+ */
1475
+ idempotency_key?: string | null;
1476
+ /**
1477
+ * Whether the message was sent by us (true for sent events, false for received
1478
+ * events)
1479
+ */
1480
+ is_from_me?: boolean;
1481
+ /**
1482
+ * Whether this is a group chat
1483
+ */
1484
+ is_group?: boolean;
1485
+ /**
1486
+ * Message content nested within webhook events
1487
+ */
1488
+ message?: WebhooksAPI.MessagePayload;
1489
+ /**
1490
+ * Preferred messaging service type. Includes "auto" for default fallback behavior.
1491
+ */
1492
+ preferred_service?: 'iMessage' | 'SMS' | 'RCS' | 'auto' | null;
1493
+ /**
1494
+ * When the message was received. Null for sent events.
1495
+ */
1496
+ received_at?: string | null;
1497
+ /**
1498
+ * Our phone number that received the message as a full handle object. Null for
1499
+ * sent events.
1500
+ */
1501
+ recipient_handle?: MessagesAPI.ChatHandle | null;
1502
+ /**
1503
+ * @deprecated DEPRECATED: Use recipient_handle instead. Our phone number that
1504
+ * received the message. Null for sent events.
1505
+ */
1506
+ recipient_phone?: string | null;
1507
+ /**
1508
+ * Messaging service type
1509
+ */
1510
+ service?: Shared.ServiceType | null;
1511
+ }
1512
+ }
1513
+ /**
1514
+ * Complete webhook payload for message.read events (2025-01-01 format)
1515
+ */
1516
+ export interface MessageReadV2025WebhookEvent {
1517
+ /**
1518
+ * API version for the webhook payload format
1519
+ */
1520
+ api_version: string;
1521
+ /**
1522
+ * When the event was created
1523
+ */
1524
+ created_at: string;
1525
+ /**
1526
+ * Payload for message.read webhook events (2025-01-01 format). Extends
1527
+ * MessageEvent with read_at and message_id.
1528
+ */
1529
+ data: MessageReadV2025WebhookEvent.Data;
1530
+ /**
1531
+ * Unique identifier for this event (for deduplication)
1532
+ */
1533
+ event_id: string;
1534
+ /**
1535
+ * Valid webhook event types that can be subscribed to
1536
+ */
1537
+ event_type: WebhookEventsAPI.WebhookEventType;
1538
+ /**
1539
+ * Partner identifier. Present on all webhooks for cross-referencing.
1540
+ */
1541
+ partner_id: string;
1542
+ /**
1543
+ * Trace ID for debugging and correlation across systems.
1544
+ */
1545
+ trace_id: string;
1546
+ /**
1547
+ * Date-based webhook payload version. Determined by the `?version=` query
1548
+ * parameter in your webhook subscription URL. If no version parameter is
1549
+ * specified, defaults based on subscription creation date.
1550
+ */
1551
+ webhook_version: string;
1552
+ }
1553
+ export declare namespace MessageReadV2025WebhookEvent {
1554
+ /**
1555
+ * Payload for message.read webhook events (2025-01-01 format). Extends
1556
+ * MessageEvent with read_at and message_id.
1557
+ */
1558
+ interface Data {
1559
+ /**
1560
+ * When the message was read
1561
+ */
1562
+ read_at: string;
1563
+ /**
1564
+ * Chat identifier
1565
+ */
1566
+ chat_id?: string;
1567
+ /**
1568
+ * @deprecated DEPRECATED: Use from_handle instead. Phone number or email address
1569
+ * of the message sender.
1570
+ */
1571
+ from?: string;
1572
+ /**
1573
+ * The sender of this message as a full handle object
1574
+ */
1575
+ from_handle?: MessagesAPI.ChatHandle;
1576
+ /**
1577
+ * Idempotency key for the message. Used for deduplication of outbound messages.
1578
+ */
1579
+ idempotency_key?: string | null;
1580
+ /**
1581
+ * Whether the message was sent by us (true for sent events, false for received
1582
+ * events)
1583
+ */
1584
+ is_from_me?: boolean;
1585
+ /**
1586
+ * Whether this is a group chat
1587
+ */
1588
+ is_group?: boolean;
1589
+ /**
1590
+ * Message content nested within webhook events
1591
+ */
1592
+ message?: WebhooksAPI.MessagePayload;
1593
+ /**
1594
+ * Message identifier (UUID)
1595
+ */
1596
+ message_id?: string;
1597
+ /**
1598
+ * Preferred messaging service type. Includes "auto" for default fallback behavior.
1599
+ */
1600
+ preferred_service?: 'iMessage' | 'SMS' | 'RCS' | 'auto' | null;
1601
+ /**
1602
+ * When the message was received. Null for sent events.
1603
+ */
1604
+ received_at?: string | null;
1605
+ /**
1606
+ * Our phone number that received the message as a full handle object. Null for
1607
+ * sent events.
1608
+ */
1609
+ recipient_handle?: MessagesAPI.ChatHandle | null;
1610
+ /**
1611
+ * @deprecated DEPRECATED: Use recipient_handle instead. Our phone number that
1612
+ * received the message. Null for sent events.
1613
+ */
1614
+ recipient_phone?: string | null;
1615
+ /**
1616
+ * Messaging service type
1617
+ */
1618
+ service?: Shared.ServiceType | null;
1619
+ }
1620
+ }
1621
+ /**
1622
+ * Complete webhook payload for message.delivered events (2025-01-01 format)
1623
+ */
1624
+ export interface MessageDeliveredV2025WebhookEvent {
1625
+ /**
1626
+ * API version for the webhook payload format
1627
+ */
1628
+ api_version: string;
1629
+ /**
1630
+ * When the event was created
1631
+ */
1632
+ created_at: string;
1633
+ /**
1634
+ * Payload for message.delivered webhook events (2025-01-01 format). Extends
1635
+ * MessageEvent with delivered_at and message_id.
1636
+ */
1637
+ data: MessageDeliveredV2025WebhookEvent.Data;
1638
+ /**
1639
+ * Unique identifier for this event (for deduplication)
1640
+ */
1641
+ event_id: string;
1642
+ /**
1643
+ * Valid webhook event types that can be subscribed to
1644
+ */
1645
+ event_type: WebhookEventsAPI.WebhookEventType;
1646
+ /**
1647
+ * Partner identifier. Present on all webhooks for cross-referencing.
1648
+ */
1649
+ partner_id: string;
1650
+ /**
1651
+ * Trace ID for debugging and correlation across systems.
1652
+ */
1653
+ trace_id: string;
1654
+ /**
1655
+ * Date-based webhook payload version. Determined by the `?version=` query
1656
+ * parameter in your webhook subscription URL. If no version parameter is
1657
+ * specified, defaults based on subscription creation date.
1658
+ */
1659
+ webhook_version: string;
1660
+ }
1661
+ export declare namespace MessageDeliveredV2025WebhookEvent {
1662
+ /**
1663
+ * Payload for message.delivered webhook events (2025-01-01 format). Extends
1664
+ * MessageEvent with delivered_at and message_id.
1665
+ */
1666
+ interface Data {
1667
+ /**
1668
+ * When the message was delivered to the recipient's device
1669
+ */
1670
+ delivered_at: string;
1671
+ /**
1672
+ * Chat identifier
1673
+ */
1674
+ chat_id?: string;
1675
+ /**
1676
+ * @deprecated DEPRECATED: Use from_handle instead. Phone number or email address
1677
+ * of the message sender.
1678
+ */
1679
+ from?: string;
1680
+ /**
1681
+ * The sender of this message as a full handle object
1682
+ */
1683
+ from_handle?: MessagesAPI.ChatHandle;
1684
+ /**
1685
+ * Idempotency key for the message. Used for deduplication of outbound messages.
1686
+ */
1687
+ idempotency_key?: string | null;
1688
+ /**
1689
+ * Whether the message was sent by us (true for sent events, false for received
1690
+ * events)
1691
+ */
1692
+ is_from_me?: boolean;
1693
+ /**
1694
+ * Whether this is a group chat
1695
+ */
1696
+ is_group?: boolean;
1697
+ /**
1698
+ * Message content nested within webhook events
1699
+ */
1700
+ message?: WebhooksAPI.MessagePayload;
1701
+ /**
1702
+ * Message identifier (UUID)
1703
+ */
1704
+ message_id?: string;
1705
+ /**
1706
+ * Preferred messaging service type. Includes "auto" for default fallback behavior.
1707
+ */
1708
+ preferred_service?: 'iMessage' | 'SMS' | 'RCS' | 'auto' | null;
1709
+ /**
1710
+ * When the message was received. Null for sent events.
1711
+ */
1712
+ received_at?: string | null;
1713
+ /**
1714
+ * Our phone number that received the message as a full handle object. Null for
1715
+ * sent events.
1716
+ */
1717
+ recipient_handle?: MessagesAPI.ChatHandle | null;
1718
+ /**
1719
+ * @deprecated DEPRECATED: Use recipient_handle instead. Our phone number that
1720
+ * received the message. Null for sent events.
1721
+ */
1722
+ recipient_phone?: string | null;
1723
+ /**
1724
+ * Messaging service type
1725
+ */
1726
+ service?: Shared.ServiceType | null;
1727
+ }
1728
+ }
1729
+ /**
1730
+ * Complete webhook payload for message.failed events
1731
+ */
1732
+ export interface MessageFailedV2025WebhookEvent {
1733
+ /**
1734
+ * API version for the webhook payload format
1735
+ */
1736
+ api_version: string;
1737
+ /**
1738
+ * When the event was created
1739
+ */
1740
+ created_at: string;
1741
+ /**
1742
+ * Error details for message.failed webhook events. See
1743
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
1744
+ * code reference.
1745
+ */
1746
+ data: MessageFailedV2025WebhookEvent.Data;
1747
+ /**
1748
+ * Unique identifier for this event (for deduplication)
1749
+ */
1750
+ event_id: string;
1751
+ /**
1752
+ * Valid webhook event types that can be subscribed to
1753
+ */
1754
+ event_type: WebhookEventsAPI.WebhookEventType;
1755
+ /**
1756
+ * Partner identifier. Present on all webhooks for cross-referencing.
1757
+ */
1758
+ partner_id: string;
1759
+ /**
1760
+ * Trace ID for debugging and correlation across systems.
1761
+ */
1762
+ trace_id: string;
1763
+ /**
1764
+ * Date-based webhook payload version. Determined by the `?version=` query
1765
+ * parameter in your webhook subscription URL. If no version parameter is
1766
+ * specified, defaults based on subscription creation date.
1767
+ */
1768
+ webhook_version: string;
1769
+ }
1770
+ export declare namespace MessageFailedV2025WebhookEvent {
1771
+ /**
1772
+ * Error details for message.failed webhook events. See
1773
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
1774
+ * code reference.
1775
+ */
1776
+ interface Data {
1777
+ /**
1778
+ * Error codes in webhook failure events (3007, 4001).
1779
+ */
1780
+ code: number;
1781
+ /**
1782
+ * When the failure was detected
1783
+ */
1784
+ failed_at: string;
1785
+ /**
1786
+ * Chat identifier (UUID)
1787
+ */
1788
+ chat_id?: string;
1789
+ /**
1790
+ * Message identifier (UUID)
1791
+ */
1792
+ message_id?: string;
1793
+ /**
1794
+ * Human-readable description of the failure
1795
+ */
1796
+ reason?: string;
1797
+ }
1798
+ }
1799
+ /**
1800
+ * Complete webhook payload for reaction.added events
1801
+ */
1802
+ export interface ReactionAddedV2025WebhookEvent {
1803
+ /**
1804
+ * API version for the webhook payload format
1805
+ */
1806
+ api_version: string;
1807
+ /**
1808
+ * When the event was created
1809
+ */
1810
+ created_at: string;
1811
+ /**
1812
+ * Payload for reaction.added webhook events
1813
+ */
1814
+ data: ReactionEventBase;
1815
+ /**
1816
+ * Unique identifier for this event (for deduplication)
1817
+ */
1818
+ event_id: string;
1819
+ /**
1820
+ * Valid webhook event types that can be subscribed to
1821
+ */
1822
+ event_type: WebhookEventsAPI.WebhookEventType;
1823
+ /**
1824
+ * Partner identifier. Present on all webhooks for cross-referencing.
1825
+ */
1826
+ partner_id: string;
1827
+ /**
1828
+ * Trace ID for debugging and correlation across systems.
1829
+ */
1830
+ trace_id: string;
1831
+ /**
1832
+ * Date-based webhook payload version. Determined by the `?version=` query
1833
+ * parameter in your webhook subscription URL. If no version parameter is
1834
+ * specified, defaults based on subscription creation date.
1835
+ */
1836
+ webhook_version: string;
1837
+ }
1838
+ /**
1839
+ * Complete webhook payload for reaction.removed events
1840
+ */
1841
+ export interface ReactionRemovedV2025WebhookEvent {
1842
+ /**
1843
+ * API version for the webhook payload format
1844
+ */
1845
+ api_version: string;
1846
+ /**
1847
+ * When the event was created
1848
+ */
1849
+ created_at: string;
1850
+ /**
1851
+ * Payload for reaction.removed webhook events
1852
+ */
1853
+ data: ReactionEventBase;
1854
+ /**
1855
+ * Unique identifier for this event (for deduplication)
1856
+ */
1857
+ event_id: string;
1858
+ /**
1859
+ * Valid webhook event types that can be subscribed to
1860
+ */
1861
+ event_type: WebhookEventsAPI.WebhookEventType;
1862
+ /**
1863
+ * Partner identifier. Present on all webhooks for cross-referencing.
1864
+ */
1865
+ partner_id: string;
1866
+ /**
1867
+ * Trace ID for debugging and correlation across systems.
1868
+ */
1869
+ trace_id: string;
1870
+ /**
1871
+ * Date-based webhook payload version. Determined by the `?version=` query
1872
+ * parameter in your webhook subscription URL. If no version parameter is
1873
+ * specified, defaults based on subscription creation date.
1874
+ */
1875
+ webhook_version: string;
1876
+ }
1877
+ /**
1878
+ * Complete webhook payload for participant.added events
1879
+ */
1880
+ export interface ParticipantAddedV2025WebhookEvent {
1881
+ /**
1882
+ * API version for the webhook payload format
1883
+ */
1884
+ api_version: string;
1885
+ /**
1886
+ * When the event was created
1887
+ */
1888
+ created_at: string;
1889
+ /**
1890
+ * Payload for participant.added webhook events
1891
+ */
1892
+ data: ParticipantAddedV2025WebhookEvent.Data;
1893
+ /**
1894
+ * Unique identifier for this event (for deduplication)
1895
+ */
1896
+ event_id: string;
1897
+ /**
1898
+ * Valid webhook event types that can be subscribed to
1899
+ */
1900
+ event_type: WebhookEventsAPI.WebhookEventType;
1901
+ /**
1902
+ * Partner identifier. Present on all webhooks for cross-referencing.
1903
+ */
1904
+ partner_id: string;
1905
+ /**
1906
+ * Trace ID for debugging and correlation across systems.
1907
+ */
1908
+ trace_id: string;
1909
+ /**
1910
+ * Date-based webhook payload version. Determined by the `?version=` query
1911
+ * parameter in your webhook subscription URL. If no version parameter is
1912
+ * specified, defaults based on subscription creation date.
1913
+ */
1914
+ webhook_version: string;
1915
+ }
1916
+ export declare namespace ParticipantAddedV2025WebhookEvent {
1917
+ /**
1918
+ * Payload for participant.added webhook events
1919
+ */
1920
+ interface Data {
1921
+ /**
1922
+ * @deprecated DEPRECATED: Use participant instead. Handle (phone number or email
1923
+ * address) of the added participant.
1924
+ */
1925
+ handle: string;
1926
+ /**
1927
+ * When the participant was added
1928
+ */
1929
+ added_at?: string;
1930
+ /**
1931
+ * Chat identifier (UUID) of the group chat
1932
+ */
1933
+ chat_id?: string;
1934
+ /**
1935
+ * The added participant as a full handle object
1936
+ */
1937
+ participant?: MessagesAPI.ChatHandle;
1938
+ }
1939
+ }
1940
+ /**
1941
+ * Complete webhook payload for participant.removed events
1942
+ */
1943
+ export interface ParticipantRemovedV2025WebhookEvent {
1944
+ /**
1945
+ * API version for the webhook payload format
1946
+ */
1947
+ api_version: string;
1948
+ /**
1949
+ * When the event was created
1950
+ */
1951
+ created_at: string;
1952
+ /**
1953
+ * Payload for participant.removed webhook events
1954
+ */
1955
+ data: ParticipantRemovedV2025WebhookEvent.Data;
1956
+ /**
1957
+ * Unique identifier for this event (for deduplication)
1958
+ */
1959
+ event_id: string;
1960
+ /**
1961
+ * Valid webhook event types that can be subscribed to
1962
+ */
1963
+ event_type: WebhookEventsAPI.WebhookEventType;
1964
+ /**
1965
+ * Partner identifier. Present on all webhooks for cross-referencing.
1966
+ */
1967
+ partner_id: string;
1968
+ /**
1969
+ * Trace ID for debugging and correlation across systems.
1970
+ */
1971
+ trace_id: string;
1972
+ /**
1973
+ * Date-based webhook payload version. Determined by the `?version=` query
1974
+ * parameter in your webhook subscription URL. If no version parameter is
1975
+ * specified, defaults based on subscription creation date.
1976
+ */
1977
+ webhook_version: string;
1978
+ }
1979
+ export declare namespace ParticipantRemovedV2025WebhookEvent {
1980
+ /**
1981
+ * Payload for participant.removed webhook events
1982
+ */
1983
+ interface Data {
1984
+ /**
1985
+ * @deprecated DEPRECATED: Use participant instead. Handle (phone number or email
1986
+ * address) of the removed participant.
1987
+ */
1988
+ handle: string;
1989
+ /**
1990
+ * Chat identifier (UUID) of the group chat
1991
+ */
1992
+ chat_id?: string;
1993
+ /**
1994
+ * The removed participant as a full handle object
1995
+ */
1996
+ participant?: MessagesAPI.ChatHandle;
1997
+ /**
1998
+ * When the participant was removed
1999
+ */
2000
+ removed_at?: string;
2001
+ }
2002
+ }
2003
+ /**
2004
+ * Complete webhook payload for chat.group_name_updated events
2005
+ */
2006
+ export interface ChatGroupNameUpdatedV2025WebhookEvent {
2007
+ /**
2008
+ * API version for the webhook payload format
2009
+ */
2010
+ api_version: string;
2011
+ /**
2012
+ * When the event was created
2013
+ */
2014
+ created_at: string;
2015
+ /**
2016
+ * Payload for chat.group_name_updated webhook events
2017
+ */
2018
+ data: ChatGroupNameUpdatedV2025WebhookEvent.Data;
2019
+ /**
2020
+ * Unique identifier for this event (for deduplication)
2021
+ */
2022
+ event_id: string;
2023
+ /**
2024
+ * Valid webhook event types that can be subscribed to
2025
+ */
2026
+ event_type: WebhookEventsAPI.WebhookEventType;
2027
+ /**
2028
+ * Partner identifier. Present on all webhooks for cross-referencing.
2029
+ */
2030
+ partner_id: string;
2031
+ /**
2032
+ * Trace ID for debugging and correlation across systems.
2033
+ */
2034
+ trace_id: string;
2035
+ /**
2036
+ * Date-based webhook payload version. Determined by the `?version=` query
2037
+ * parameter in your webhook subscription URL. If no version parameter is
2038
+ * specified, defaults based on subscription creation date.
2039
+ */
2040
+ webhook_version: string;
2041
+ }
2042
+ export declare namespace ChatGroupNameUpdatedV2025WebhookEvent {
2043
+ /**
2044
+ * Payload for chat.group_name_updated webhook events
2045
+ */
2046
+ interface Data {
2047
+ /**
2048
+ * Chat identifier (UUID) of the group chat
2049
+ */
2050
+ chat_id: string;
2051
+ /**
2052
+ * When the update occurred
2053
+ */
2054
+ updated_at: string;
2055
+ /**
2056
+ * The handle who made the change.
2057
+ */
2058
+ changed_by_handle?: MessagesAPI.ChatHandle | null;
2059
+ /**
2060
+ * New group name (null if the name was removed)
2061
+ */
2062
+ new_value?: string | null;
2063
+ /**
2064
+ * Previous group name (null if no previous name)
2065
+ */
2066
+ old_value?: string | null;
2067
+ }
2068
+ }
2069
+ /**
2070
+ * Complete webhook payload for chat.group_icon_updated events
2071
+ */
2072
+ export interface ChatGroupIconUpdatedV2025WebhookEvent {
2073
+ /**
2074
+ * API version for the webhook payload format
2075
+ */
2076
+ api_version: string;
2077
+ /**
2078
+ * When the event was created
2079
+ */
2080
+ created_at: string;
2081
+ /**
2082
+ * Payload for chat.group_icon_updated webhook events
2083
+ */
2084
+ data: ChatGroupIconUpdatedV2025WebhookEvent.Data;
2085
+ /**
2086
+ * Unique identifier for this event (for deduplication)
2087
+ */
2088
+ event_id: string;
2089
+ /**
2090
+ * Valid webhook event types that can be subscribed to
2091
+ */
2092
+ event_type: WebhookEventsAPI.WebhookEventType;
2093
+ /**
2094
+ * Partner identifier. Present on all webhooks for cross-referencing.
2095
+ */
2096
+ partner_id: string;
2097
+ /**
2098
+ * Trace ID for debugging and correlation across systems.
2099
+ */
2100
+ trace_id: string;
2101
+ /**
2102
+ * Date-based webhook payload version. Determined by the `?version=` query
2103
+ * parameter in your webhook subscription URL. If no version parameter is
2104
+ * specified, defaults based on subscription creation date.
2105
+ */
2106
+ webhook_version: string;
2107
+ }
2108
+ export declare namespace ChatGroupIconUpdatedV2025WebhookEvent {
2109
+ /**
2110
+ * Payload for chat.group_icon_updated webhook events
2111
+ */
2112
+ interface Data {
2113
+ /**
2114
+ * Chat identifier (UUID) of the group chat
2115
+ */
2116
+ chat_id: string;
2117
+ /**
2118
+ * When the update occurred
2119
+ */
2120
+ updated_at: string;
2121
+ /**
2122
+ * The handle who made the change.
2123
+ */
2124
+ changed_by_handle?: MessagesAPI.ChatHandle | null;
2125
+ /**
2126
+ * New icon URL (null if the icon was removed)
2127
+ */
2128
+ new_value?: string | null;
2129
+ /**
2130
+ * Previous icon URL (null if no previous icon)
2131
+ */
2132
+ old_value?: string | null;
2133
+ }
2134
+ }
2135
+ /**
2136
+ * Complete webhook payload for chat.group_name_update_failed events
2137
+ */
2138
+ export interface ChatGroupNameUpdateFailedV2025WebhookEvent {
2139
+ /**
2140
+ * API version for the webhook payload format
2141
+ */
2142
+ api_version: string;
2143
+ /**
2144
+ * When the event was created
2145
+ */
2146
+ created_at: string;
2147
+ /**
2148
+ * Error details for chat.group_name_update_failed webhook events. See
2149
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
2150
+ * code reference.
2151
+ */
2152
+ data: ChatGroupNameUpdateFailedV2025WebhookEvent.Data;
2153
+ /**
2154
+ * Unique identifier for this event (for deduplication)
2155
+ */
2156
+ event_id: string;
2157
+ /**
2158
+ * Valid webhook event types that can be subscribed to
2159
+ */
2160
+ event_type: WebhookEventsAPI.WebhookEventType;
2161
+ /**
2162
+ * Partner identifier. Present on all webhooks for cross-referencing.
2163
+ */
2164
+ partner_id: string;
2165
+ /**
2166
+ * Trace ID for debugging and correlation across systems.
2167
+ */
2168
+ trace_id: string;
2169
+ /**
2170
+ * Date-based webhook payload version. Determined by the `?version=` query
2171
+ * parameter in your webhook subscription URL. If no version parameter is
2172
+ * specified, defaults based on subscription creation date.
2173
+ */
2174
+ webhook_version: string;
2175
+ }
2176
+ export declare namespace ChatGroupNameUpdateFailedV2025WebhookEvent {
2177
+ /**
2178
+ * Error details for chat.group_name_update_failed webhook events. See
2179
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
2180
+ * code reference.
2181
+ */
2182
+ interface Data {
2183
+ /**
2184
+ * Chat identifier (UUID) of the group chat
2185
+ */
2186
+ chat_id: string;
2187
+ /**
2188
+ * Error codes in webhook failure events (3007, 4001).
2189
+ */
2190
+ error_code: number;
2191
+ /**
2192
+ * When the failure was detected
2193
+ */
2194
+ failed_at: string;
2195
+ }
2196
+ }
2197
+ /**
2198
+ * Complete webhook payload for chat.group_icon_update_failed events
2199
+ */
2200
+ export interface ChatGroupIconUpdateFailedV2025WebhookEvent {
2201
+ /**
2202
+ * API version for the webhook payload format
2203
+ */
2204
+ api_version: string;
2205
+ /**
2206
+ * When the event was created
2207
+ */
2208
+ created_at: string;
2209
+ /**
2210
+ * Error details for chat.group_icon_update_failed webhook events. See
2211
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
2212
+ * code reference.
2213
+ */
2214
+ data: ChatGroupIconUpdateFailedV2025WebhookEvent.Data;
2215
+ /**
2216
+ * Unique identifier for this event (for deduplication)
2217
+ */
2218
+ event_id: string;
2219
+ /**
2220
+ * Valid webhook event types that can be subscribed to
2221
+ */
2222
+ event_type: WebhookEventsAPI.WebhookEventType;
2223
+ /**
2224
+ * Partner identifier. Present on all webhooks for cross-referencing.
2225
+ */
2226
+ partner_id: string;
2227
+ /**
2228
+ * Trace ID for debugging and correlation across systems.
2229
+ */
2230
+ trace_id: string;
2231
+ /**
2232
+ * Date-based webhook payload version. Determined by the `?version=` query
2233
+ * parameter in your webhook subscription URL. If no version parameter is
2234
+ * specified, defaults based on subscription creation date.
2235
+ */
2236
+ webhook_version: string;
2237
+ }
2238
+ export declare namespace ChatGroupIconUpdateFailedV2025WebhookEvent {
2239
+ /**
2240
+ * Error details for chat.group_icon_update_failed webhook events. See
2241
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
2242
+ * code reference.
2243
+ */
2244
+ interface Data {
2245
+ /**
2246
+ * Chat identifier (UUID) of the group chat
2247
+ */
2248
+ chat_id: string;
2249
+ /**
2250
+ * Error codes in webhook failure events (3007, 4001).
2251
+ */
2252
+ error_code: number;
2253
+ /**
2254
+ * When the failure was detected
2255
+ */
2256
+ failed_at: string;
2257
+ }
2258
+ }
2259
+ /**
2260
+ * Complete webhook payload for chat.created events
2261
+ */
2262
+ export interface ChatCreatedV2025WebhookEvent {
2263
+ /**
2264
+ * API version for the webhook payload format
2265
+ */
2266
+ api_version: string;
2267
+ /**
2268
+ * When the event was created
2269
+ */
2270
+ created_at: string;
2271
+ /**
2272
+ * Payload for chat.created webhook events. Matches GET /v3/chats/{chatId}
2273
+ * response.
2274
+ */
2275
+ data: ChatCreatedV2025WebhookEvent.Data;
2276
+ /**
2277
+ * Unique identifier for this event (for deduplication)
2278
+ */
2279
+ event_id: string;
2280
+ /**
2281
+ * Valid webhook event types that can be subscribed to
2282
+ */
2283
+ event_type: WebhookEventsAPI.WebhookEventType;
2284
+ /**
2285
+ * Partner identifier. Present on all webhooks for cross-referencing.
2286
+ */
2287
+ partner_id: string;
2288
+ /**
2289
+ * Trace ID for debugging and correlation across systems.
2290
+ */
2291
+ trace_id: string;
2292
+ /**
2293
+ * Date-based webhook payload version. Determined by the `?version=` query
2294
+ * parameter in your webhook subscription URL. If no version parameter is
2295
+ * specified, defaults based on subscription creation date.
2296
+ */
2297
+ webhook_version: string;
2298
+ }
2299
+ export declare namespace ChatCreatedV2025WebhookEvent {
2300
+ /**
2301
+ * Payload for chat.created webhook events. Matches GET /v3/chats/{chatId}
2302
+ * response.
2303
+ */
2304
+ interface Data {
2305
+ /**
2306
+ * Unique identifier for the chat
2307
+ */
2308
+ id: string;
2309
+ /**
2310
+ * When the chat was created
2311
+ */
2312
+ created_at: string;
2313
+ /**
2314
+ * Display name for the chat. Defaults to a comma-separated list of recipient
2315
+ * handles. Can be updated for group chats.
2316
+ */
2317
+ display_name: string | null;
2318
+ /**
2319
+ * List of chat participants with full handle details. Always contains at least two
2320
+ * handles (your phone number and the other participant).
2321
+ */
2322
+ handles: Array<MessagesAPI.ChatHandle>;
2323
+ /**
2324
+ * Whether this is a group chat
2325
+ */
2326
+ is_group: boolean;
2327
+ /**
2328
+ * When the chat was last updated
2329
+ */
2330
+ updated_at: string;
2331
+ /**
2332
+ * Messaging service type
2333
+ */
2334
+ service?: Shared.ServiceType | null;
2335
+ }
2336
+ }
2337
+ /**
2338
+ * Complete webhook payload for chat.typing_indicator.started events
2339
+ */
2340
+ export interface ChatTypingIndicatorStartedV2025WebhookEvent {
2341
+ /**
2342
+ * API version for the webhook payload format
2343
+ */
2344
+ api_version: string;
2345
+ /**
2346
+ * When the event was created
2347
+ */
2348
+ created_at: string;
2349
+ /**
2350
+ * Payload for chat.typing_indicator.started webhook events
2351
+ */
2352
+ data: ChatTypingIndicatorStartedV2025WebhookEvent.Data;
2353
+ /**
2354
+ * Unique identifier for this event (for deduplication)
2355
+ */
2356
+ event_id: string;
2357
+ /**
2358
+ * Valid webhook event types that can be subscribed to
2359
+ */
2360
+ event_type: WebhookEventsAPI.WebhookEventType;
2361
+ /**
2362
+ * Partner identifier. Present on all webhooks for cross-referencing.
2363
+ */
2364
+ partner_id: string;
2365
+ /**
2366
+ * Trace ID for debugging and correlation across systems.
2367
+ */
2368
+ trace_id: string;
2369
+ /**
2370
+ * Date-based webhook payload version. Determined by the `?version=` query
2371
+ * parameter in your webhook subscription URL. If no version parameter is
2372
+ * specified, defaults based on subscription creation date.
2373
+ */
2374
+ webhook_version: string;
2375
+ }
2376
+ export declare namespace ChatTypingIndicatorStartedV2025WebhookEvent {
2377
+ /**
2378
+ * Payload for chat.typing_indicator.started webhook events
2379
+ */
2380
+ interface Data {
2381
+ /**
2382
+ * Chat identifier
2383
+ */
2384
+ chat_id: string;
2385
+ }
2386
+ }
2387
+ /**
2388
+ * Complete webhook payload for chat.typing_indicator.stopped events
2389
+ */
2390
+ export interface ChatTypingIndicatorStoppedV2025WebhookEvent {
2391
+ /**
2392
+ * API version for the webhook payload format
2393
+ */
2394
+ api_version: string;
2395
+ /**
2396
+ * When the event was created
2397
+ */
2398
+ created_at: string;
2399
+ /**
2400
+ * Payload for chat.typing_indicator.stopped webhook events
2401
+ */
2402
+ data: ChatTypingIndicatorStoppedV2025WebhookEvent.Data;
2403
+ /**
2404
+ * Unique identifier for this event (for deduplication)
2405
+ */
2406
+ event_id: string;
2407
+ /**
2408
+ * Valid webhook event types that can be subscribed to
2409
+ */
2410
+ event_type: WebhookEventsAPI.WebhookEventType;
2411
+ /**
2412
+ * Partner identifier. Present on all webhooks for cross-referencing.
2413
+ */
2414
+ partner_id: string;
2415
+ /**
2416
+ * Trace ID for debugging and correlation across systems.
2417
+ */
2418
+ trace_id: string;
2419
+ /**
2420
+ * Date-based webhook payload version. Determined by the `?version=` query
2421
+ * parameter in your webhook subscription URL. If no version parameter is
2422
+ * specified, defaults based on subscription creation date.
2423
+ */
2424
+ webhook_version: string;
2425
+ }
2426
+ export declare namespace ChatTypingIndicatorStoppedV2025WebhookEvent {
2427
+ /**
2428
+ * Payload for chat.typing_indicator.stopped webhook events
2429
+ */
2430
+ interface Data {
2431
+ /**
2432
+ * Chat identifier
2433
+ */
2434
+ chat_id: string;
2435
+ }
2436
+ }
2437
+ /**
2438
+ * Complete webhook payload for phone_number.status_updated events
2439
+ */
2440
+ export interface PhoneNumberStatusUpdatedV2025WebhookEvent {
2441
+ /**
2442
+ * API version for the webhook payload format
2443
+ */
2444
+ api_version: string;
2445
+ /**
2446
+ * When the event was created
2447
+ */
2448
+ created_at: string;
2449
+ /**
2450
+ * Payload for phone_number.status_updated webhook events
2451
+ */
2452
+ data: PhoneNumberStatusUpdatedV2025WebhookEvent.Data;
2453
+ /**
2454
+ * Unique identifier for this event (for deduplication)
2455
+ */
2456
+ event_id: string;
2457
+ /**
2458
+ * The type of event
2459
+ */
2460
+ event_type: 'message.sent' | 'message.received' | 'message.read' | 'message.delivered' | 'message.failed' | 'message.edited' | 'reaction.added' | 'reaction.removed' | 'participant.added' | 'participant.removed' | 'chat.created' | 'chat.group_name_updated' | 'chat.group_icon_updated' | 'chat.group_name_update_failed' | 'chat.group_icon_update_failed' | 'chat.typing_indicator.started' | 'chat.typing_indicator.stopped' | 'phone_number.status_updated';
2461
+ /**
2462
+ * Partner identifier. Present on all webhooks for cross-referencing.
2463
+ */
2464
+ partner_id: string;
2465
+ /**
2466
+ * Trace ID for debugging and correlation across systems.
2467
+ */
2468
+ trace_id: string;
2469
+ /**
2470
+ * Date-based webhook payload version. Determined by the `?version=` query
2471
+ * parameter in your webhook subscription URL. If no version parameter is
2472
+ * specified, defaults based on subscription creation date.
2473
+ */
2474
+ webhook_version: string;
2475
+ }
2476
+ export declare namespace PhoneNumberStatusUpdatedV2025WebhookEvent {
2477
+ /**
2478
+ * Payload for phone_number.status_updated webhook events
2479
+ */
2480
+ interface Data {
2481
+ /**
2482
+ * When the status change occurred
2483
+ */
2484
+ changed_at: string;
2485
+ /**
2486
+ * The new service status
2487
+ */
2488
+ new_status: 'ACTIVE' | 'FLAGGED';
2489
+ /**
2490
+ * Phone number in E.164 format
2491
+ */
2492
+ phone_number: string;
2493
+ /**
2494
+ * The previous service status
2495
+ */
2496
+ previous_status: 'ACTIVE' | 'FLAGGED';
2497
+ }
2498
+ }
2499
+ /**
2500
+ * Complete webhook payload for message.sent events (2026-02-03 format)
2501
+ */
2502
+ export type EventsWebhookEvent = MessageSentV2026WebhookEvent | MessageReceivedV2026WebhookEvent | MessageReadV2026WebhookEvent | MessageDeliveredV2026WebhookEvent | MessageFailedV2026WebhookEvent | ReactionAddedV2026WebhookEvent | ReactionRemovedV2026WebhookEvent | ParticipantAddedV2026WebhookEvent | ParticipantRemovedV2026WebhookEvent | ChatGroupNameUpdatedV2026WebhookEvent | ChatGroupIconUpdatedV2026WebhookEvent | ChatGroupNameUpdateFailedV2026WebhookEvent | ChatGroupIconUpdateFailedV2026WebhookEvent | ChatCreatedV2026WebhookEvent | ChatTypingIndicatorStartedV2026WebhookEvent | ChatTypingIndicatorStoppedV2026WebhookEvent | PhoneNumberStatusUpdatedV2026WebhookEvent | MessageSentV2025WebhookEvent | MessageReceivedV2025WebhookEvent | MessageReadV2025WebhookEvent | MessageDeliveredV2025WebhookEvent | MessageFailedV2025WebhookEvent | ReactionAddedV2025WebhookEvent | ReactionRemovedV2025WebhookEvent | ParticipantAddedV2025WebhookEvent | ParticipantRemovedV2025WebhookEvent | ChatGroupNameUpdatedV2025WebhookEvent | ChatGroupIconUpdatedV2025WebhookEvent | ChatGroupNameUpdateFailedV2025WebhookEvent | ChatGroupIconUpdateFailedV2025WebhookEvent | ChatCreatedV2025WebhookEvent | ChatTypingIndicatorStartedV2025WebhookEvent | ChatTypingIndicatorStoppedV2025WebhookEvent | PhoneNumberStatusUpdatedV2025WebhookEvent;
2503
+ export declare namespace Webhooks {
2504
+ export { type MessageEventV2 as MessageEventV2, type MessagePayload as MessagePayload, type ReactionEventBase as ReactionEventBase, type SchemasMediaPartResponse as SchemasMediaPartResponse, type SchemasMessageEffect as SchemasMessageEffect, type SchemasTextPartResponse as SchemasTextPartResponse, type MessageSentV2026WebhookEvent as MessageSentV2026WebhookEvent, type MessageReceivedV2026WebhookEvent as MessageReceivedV2026WebhookEvent, type MessageReadV2026WebhookEvent as MessageReadV2026WebhookEvent, type MessageDeliveredV2026WebhookEvent as MessageDeliveredV2026WebhookEvent, type MessageFailedV2026WebhookEvent as MessageFailedV2026WebhookEvent, type ReactionAddedV2026WebhookEvent as ReactionAddedV2026WebhookEvent, type ReactionRemovedV2026WebhookEvent as ReactionRemovedV2026WebhookEvent, type ParticipantAddedV2026WebhookEvent as ParticipantAddedV2026WebhookEvent, type ParticipantRemovedV2026WebhookEvent as ParticipantRemovedV2026WebhookEvent, type ChatGroupNameUpdatedV2026WebhookEvent as ChatGroupNameUpdatedV2026WebhookEvent, type ChatGroupIconUpdatedV2026WebhookEvent as ChatGroupIconUpdatedV2026WebhookEvent, type ChatGroupNameUpdateFailedV2026WebhookEvent as ChatGroupNameUpdateFailedV2026WebhookEvent, type ChatGroupIconUpdateFailedV2026WebhookEvent as ChatGroupIconUpdateFailedV2026WebhookEvent, type ChatCreatedV2026WebhookEvent as ChatCreatedV2026WebhookEvent, type ChatTypingIndicatorStartedV2026WebhookEvent as ChatTypingIndicatorStartedV2026WebhookEvent, type ChatTypingIndicatorStoppedV2026WebhookEvent as ChatTypingIndicatorStoppedV2026WebhookEvent, type PhoneNumberStatusUpdatedV2026WebhookEvent as PhoneNumberStatusUpdatedV2026WebhookEvent, type MessageSentV2025WebhookEvent as MessageSentV2025WebhookEvent, type MessageReceivedV2025WebhookEvent as MessageReceivedV2025WebhookEvent, type MessageReadV2025WebhookEvent as MessageReadV2025WebhookEvent, type MessageDeliveredV2025WebhookEvent as MessageDeliveredV2025WebhookEvent, type MessageFailedV2025WebhookEvent as MessageFailedV2025WebhookEvent, type ReactionAddedV2025WebhookEvent as ReactionAddedV2025WebhookEvent, type ReactionRemovedV2025WebhookEvent as ReactionRemovedV2025WebhookEvent, type ParticipantAddedV2025WebhookEvent as ParticipantAddedV2025WebhookEvent, type ParticipantRemovedV2025WebhookEvent as ParticipantRemovedV2025WebhookEvent, type ChatGroupNameUpdatedV2025WebhookEvent as ChatGroupNameUpdatedV2025WebhookEvent, type ChatGroupIconUpdatedV2025WebhookEvent as ChatGroupIconUpdatedV2025WebhookEvent, type ChatGroupNameUpdateFailedV2025WebhookEvent as ChatGroupNameUpdateFailedV2025WebhookEvent, type ChatGroupIconUpdateFailedV2025WebhookEvent as ChatGroupIconUpdateFailedV2025WebhookEvent, type ChatCreatedV2025WebhookEvent as ChatCreatedV2025WebhookEvent, type ChatTypingIndicatorStartedV2025WebhookEvent as ChatTypingIndicatorStartedV2025WebhookEvent, type ChatTypingIndicatorStoppedV2025WebhookEvent as ChatTypingIndicatorStoppedV2025WebhookEvent, type PhoneNumberStatusUpdatedV2025WebhookEvent as PhoneNumberStatusUpdatedV2025WebhookEvent, type EventsWebhookEvent as EventsWebhookEvent, };
2505
+ }
2506
+ //# sourceMappingURL=webhooks.d.mts.map