@linqapp/sdk 0.46.0 → 0.47.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.
@@ -2,8 +2,23 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as Shared from './shared';
5
-
6
- export class Webhooks extends APIResource {}
5
+ import * as WebhookEventsAPI from './webhook-events';
6
+ import { Webhook } from 'standardwebhooks';
7
+
8
+ export class Webhooks extends APIResource {
9
+ unwrap(
10
+ body: string,
11
+ { headers, key }: { headers: Record<string, string>; key?: string },
12
+ ): UnwrapWebhookEvent {
13
+ if (headers !== undefined) {
14
+ const keyStr: string | null = key === undefined ? this._client.webhookSecret : key;
15
+ if (keyStr === null) throw new Error('Webhook key must not be null in order to unwrap');
16
+ const wh = new Webhook(keyStr);
17
+ wh.verify(body, headers);
18
+ }
19
+ return JSON.parse(body) as UnwrapWebhookEvent;
20
+ }
21
+ }
7
22
 
8
23
  /**
9
24
  * Unified payload for message webhooks when using `webhook_version: "2026-02-03"`.
@@ -746,6 +761,2905 @@ export interface SchemasTextPartResponse {
746
761
  text_decorations?: Array<Shared.TextDecoration> | null;
747
762
  }
748
763
 
764
+ /**
765
+ * Complete webhook payload for message.sent events (2026-02-03 format)
766
+ */
767
+ export interface MessageSentWebhookEvent {
768
+ /**
769
+ * API version for the webhook payload format
770
+ */
771
+ api_version: string;
772
+
773
+ /**
774
+ * When the event was created
775
+ */
776
+ created_at: string;
777
+
778
+ /**
779
+ * Unified payload for message webhooks when using `webhook_version: "2026-02-03"`.
780
+ *
781
+ * This schema is used for message.sent, message.received, message.delivered, and
782
+ * message.read events when the subscription URL includes `?version=2026-02-03`.
783
+ *
784
+ * Key differences from V1 (2025-01-01):
785
+ *
786
+ * - `direction`: "inbound" or "outbound" instead of `is_from_me` boolean
787
+ * - `sender_handle`: Full handle object for the sender
788
+ * - `chat`: Nested object with `id`, `is_group`, and `owner_handle`
789
+ * - Message fields (`id`, `parts`, `effect`, etc.) are at the top level, not
790
+ * nested in `message`
791
+ *
792
+ * Timestamps indicate the message state:
793
+ *
794
+ * - `message.sent`: sent_at set, delivered_at=null, read_at=null
795
+ * - `message.received`: sent_at set, delivered_at=null, read_at=null
796
+ * - `message.delivered`: sent_at set, delivered_at set, read_at=null
797
+ * - `message.read`: sent_at set, delivered_at set, read_at set
798
+ */
799
+ data: MessageEventV2;
800
+
801
+ /**
802
+ * Unique identifier for this event (for deduplication)
803
+ */
804
+ event_id: string;
805
+
806
+ /**
807
+ * Valid webhook event types that can be subscribed to.
808
+ *
809
+ * **Note:** `message.edited` is only delivered to subscriptions using
810
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
811
+ * subscription will not produce any deliveries.
812
+ */
813
+ event_type: WebhookEventsAPI.WebhookEventType;
814
+
815
+ /**
816
+ * Partner identifier. Present on all webhooks for cross-referencing.
817
+ */
818
+ partner_id: string;
819
+
820
+ /**
821
+ * Trace ID for debugging and correlation across systems.
822
+ */
823
+ trace_id: string;
824
+
825
+ /**
826
+ * Date-based webhook payload version. Determined by the `?version=` query
827
+ * parameter in your webhook subscription URL. If no version parameter is
828
+ * specified, defaults based on subscription creation date.
829
+ */
830
+ webhook_version: string;
831
+ }
832
+
833
+ /**
834
+ * Complete webhook payload for message.received events (2026-02-03 format)
835
+ */
836
+ export interface MessageReceivedWebhookEvent {
837
+ /**
838
+ * API version for the webhook payload format
839
+ */
840
+ api_version: string;
841
+
842
+ /**
843
+ * When the event was created
844
+ */
845
+ created_at: string;
846
+
847
+ /**
848
+ * Unified payload for message webhooks when using `webhook_version: "2026-02-03"`.
849
+ *
850
+ * This schema is used for message.sent, message.received, message.delivered, and
851
+ * message.read events when the subscription URL includes `?version=2026-02-03`.
852
+ *
853
+ * Key differences from V1 (2025-01-01):
854
+ *
855
+ * - `direction`: "inbound" or "outbound" instead of `is_from_me` boolean
856
+ * - `sender_handle`: Full handle object for the sender
857
+ * - `chat`: Nested object with `id`, `is_group`, and `owner_handle`
858
+ * - Message fields (`id`, `parts`, `effect`, etc.) are at the top level, not
859
+ * nested in `message`
860
+ *
861
+ * Timestamps indicate the message state:
862
+ *
863
+ * - `message.sent`: sent_at set, delivered_at=null, read_at=null
864
+ * - `message.received`: sent_at set, delivered_at=null, read_at=null
865
+ * - `message.delivered`: sent_at set, delivered_at set, read_at=null
866
+ * - `message.read`: sent_at set, delivered_at set, read_at set
867
+ */
868
+ data: MessageEventV2;
869
+
870
+ /**
871
+ * Unique identifier for this event (for deduplication)
872
+ */
873
+ event_id: string;
874
+
875
+ /**
876
+ * Valid webhook event types that can be subscribed to.
877
+ *
878
+ * **Note:** `message.edited` is only delivered to subscriptions using
879
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
880
+ * subscription will not produce any deliveries.
881
+ */
882
+ event_type: WebhookEventsAPI.WebhookEventType;
883
+
884
+ /**
885
+ * Partner identifier. Present on all webhooks for cross-referencing.
886
+ */
887
+ partner_id: string;
888
+
889
+ /**
890
+ * Trace ID for debugging and correlation across systems.
891
+ */
892
+ trace_id: string;
893
+
894
+ /**
895
+ * Date-based webhook payload version. Determined by the `?version=` query
896
+ * parameter in your webhook subscription URL. If no version parameter is
897
+ * specified, defaults based on subscription creation date.
898
+ */
899
+ webhook_version: string;
900
+ }
901
+
902
+ /**
903
+ * Complete webhook payload for message.read events (2026-02-03 format)
904
+ */
905
+ export interface MessageReadWebhookEvent {
906
+ /**
907
+ * API version for the webhook payload format
908
+ */
909
+ api_version: string;
910
+
911
+ /**
912
+ * When the event was created
913
+ */
914
+ created_at: string;
915
+
916
+ /**
917
+ * Unified payload for message webhooks when using `webhook_version: "2026-02-03"`.
918
+ *
919
+ * This schema is used for message.sent, message.received, message.delivered, and
920
+ * message.read events when the subscription URL includes `?version=2026-02-03`.
921
+ *
922
+ * Key differences from V1 (2025-01-01):
923
+ *
924
+ * - `direction`: "inbound" or "outbound" instead of `is_from_me` boolean
925
+ * - `sender_handle`: Full handle object for the sender
926
+ * - `chat`: Nested object with `id`, `is_group`, and `owner_handle`
927
+ * - Message fields (`id`, `parts`, `effect`, etc.) are at the top level, not
928
+ * nested in `message`
929
+ *
930
+ * Timestamps indicate the message state:
931
+ *
932
+ * - `message.sent`: sent_at set, delivered_at=null, read_at=null
933
+ * - `message.received`: sent_at set, delivered_at=null, read_at=null
934
+ * - `message.delivered`: sent_at set, delivered_at set, read_at=null
935
+ * - `message.read`: sent_at set, delivered_at set, read_at set
936
+ */
937
+ data: MessageEventV2;
938
+
939
+ /**
940
+ * Unique identifier for this event (for deduplication)
941
+ */
942
+ event_id: string;
943
+
944
+ /**
945
+ * Valid webhook event types that can be subscribed to.
946
+ *
947
+ * **Note:** `message.edited` is only delivered to subscriptions using
948
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
949
+ * subscription will not produce any deliveries.
950
+ */
951
+ event_type: WebhookEventsAPI.WebhookEventType;
952
+
953
+ /**
954
+ * Partner identifier. Present on all webhooks for cross-referencing.
955
+ */
956
+ partner_id: string;
957
+
958
+ /**
959
+ * Trace ID for debugging and correlation across systems.
960
+ */
961
+ trace_id: string;
962
+
963
+ /**
964
+ * Date-based webhook payload version. Determined by the `?version=` query
965
+ * parameter in your webhook subscription URL. If no version parameter is
966
+ * specified, defaults based on subscription creation date.
967
+ */
968
+ webhook_version: string;
969
+ }
970
+
971
+ /**
972
+ * Complete webhook payload for message.delivered events (2026-02-03 format)
973
+ */
974
+ export interface MessageDeliveredWebhookEvent {
975
+ /**
976
+ * API version for the webhook payload format
977
+ */
978
+ api_version: string;
979
+
980
+ /**
981
+ * When the event was created
982
+ */
983
+ created_at: string;
984
+
985
+ /**
986
+ * Unified payload for message webhooks when using `webhook_version: "2026-02-03"`.
987
+ *
988
+ * This schema is used for message.sent, message.received, message.delivered, and
989
+ * message.read events when the subscription URL includes `?version=2026-02-03`.
990
+ *
991
+ * Key differences from V1 (2025-01-01):
992
+ *
993
+ * - `direction`: "inbound" or "outbound" instead of `is_from_me` boolean
994
+ * - `sender_handle`: Full handle object for the sender
995
+ * - `chat`: Nested object with `id`, `is_group`, and `owner_handle`
996
+ * - Message fields (`id`, `parts`, `effect`, etc.) are at the top level, not
997
+ * nested in `message`
998
+ *
999
+ * Timestamps indicate the message state:
1000
+ *
1001
+ * - `message.sent`: sent_at set, delivered_at=null, read_at=null
1002
+ * - `message.received`: sent_at set, delivered_at=null, read_at=null
1003
+ * - `message.delivered`: sent_at set, delivered_at set, read_at=null
1004
+ * - `message.read`: sent_at set, delivered_at set, read_at set
1005
+ */
1006
+ data: MessageEventV2;
1007
+
1008
+ /**
1009
+ * Unique identifier for this event (for deduplication)
1010
+ */
1011
+ event_id: string;
1012
+
1013
+ /**
1014
+ * Valid webhook event types that can be subscribed to.
1015
+ *
1016
+ * **Note:** `message.edited` is only delivered to subscriptions using
1017
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
1018
+ * subscription will not produce any deliveries.
1019
+ */
1020
+ event_type: WebhookEventsAPI.WebhookEventType;
1021
+
1022
+ /**
1023
+ * Partner identifier. Present on all webhooks for cross-referencing.
1024
+ */
1025
+ partner_id: string;
1026
+
1027
+ /**
1028
+ * Trace ID for debugging and correlation across systems.
1029
+ */
1030
+ trace_id: string;
1031
+
1032
+ /**
1033
+ * Date-based webhook payload version. Determined by the `?version=` query
1034
+ * parameter in your webhook subscription URL. If no version parameter is
1035
+ * specified, defaults based on subscription creation date.
1036
+ */
1037
+ webhook_version: string;
1038
+ }
1039
+
1040
+ /**
1041
+ * Complete webhook payload for message.failed events
1042
+ */
1043
+ export interface MessageFailedWebhookEvent {
1044
+ /**
1045
+ * API version for the webhook payload format
1046
+ */
1047
+ api_version: string;
1048
+
1049
+ /**
1050
+ * When the event was created
1051
+ */
1052
+ created_at: string;
1053
+
1054
+ /**
1055
+ * Error details for message.failed webhook events. See
1056
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
1057
+ * code reference.
1058
+ *
1059
+ * In rare cases the message can still be delivered after this event fires — a
1060
+ * `message.delivered` webhook for the same message ID may follow.
1061
+ */
1062
+ data: MessageFailedWebhookEvent.Data;
1063
+
1064
+ /**
1065
+ * Unique identifier for this event (for deduplication)
1066
+ */
1067
+ event_id: string;
1068
+
1069
+ /**
1070
+ * Valid webhook event types that can be subscribed to.
1071
+ *
1072
+ * **Note:** `message.edited` is only delivered to subscriptions using
1073
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
1074
+ * subscription will not produce any deliveries.
1075
+ */
1076
+ event_type: WebhookEventsAPI.WebhookEventType;
1077
+
1078
+ /**
1079
+ * Partner identifier. Present on all webhooks for cross-referencing.
1080
+ */
1081
+ partner_id: string;
1082
+
1083
+ /**
1084
+ * Trace ID for debugging and correlation across systems.
1085
+ */
1086
+ trace_id: string;
1087
+
1088
+ /**
1089
+ * Date-based webhook payload version. Determined by the `?version=` query
1090
+ * parameter in your webhook subscription URL. If no version parameter is
1091
+ * specified, defaults based on subscription creation date.
1092
+ */
1093
+ webhook_version: string;
1094
+ }
1095
+
1096
+ export namespace MessageFailedWebhookEvent {
1097
+ /**
1098
+ * Error details for message.failed webhook events. See
1099
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
1100
+ * code reference.
1101
+ *
1102
+ * In rare cases the message can still be delivered after this event fires — a
1103
+ * `message.delivered` webhook for the same message ID may follow.
1104
+ */
1105
+ export interface Data {
1106
+ /**
1107
+ * Error codes in webhook failure events. The possible set varies by event:
1108
+ * message.failed and poll.failed can carry 3007, 4001, 4002, 4005, 4006, 4007, or
1109
+ * 4008; the group update failure events (chat.group_name_update_failed,
1110
+ * chat.group_icon_update_failed) carry 3007 or 4001; chat.background_update_failed
1111
+ * carries 1005, 2011, 4001, or 5002.
1112
+ */
1113
+ code: number;
1114
+
1115
+ /**
1116
+ * When the failure was detected
1117
+ */
1118
+ failed_at: string;
1119
+
1120
+ /**
1121
+ * Chat identifier (UUID)
1122
+ */
1123
+ chat_id?: string;
1124
+
1125
+ /**
1126
+ * Opaque diagnostic code identifying the specific failure class within `code`.
1127
+ * Values are not enumerated and may change without notice — log it and include it
1128
+ * in support requests, but do not branch on it.
1129
+ */
1130
+ detail_code?: number | null;
1131
+
1132
+ /**
1133
+ * Message identifier (UUID)
1134
+ */
1135
+ message_id?: string;
1136
+
1137
+ /**
1138
+ * Preferred messaging service type. Includes "auto" for default fallback behavior.
1139
+ */
1140
+ preferred_service?: 'iMessage' | 'SMS' | 'RCS' | 'auto' | null;
1141
+
1142
+ /**
1143
+ * Human-readable description of the failure
1144
+ */
1145
+ reason?: string;
1146
+
1147
+ /**
1148
+ * Messaging service type
1149
+ */
1150
+ service?: Shared.ServiceType | null;
1151
+ }
1152
+ }
1153
+
1154
+ /**
1155
+ * Complete webhook payload for message.edited events (2026-02-03 format only)
1156
+ */
1157
+ export interface MessageEditedWebhookEvent {
1158
+ /**
1159
+ * API version for the webhook payload format
1160
+ */
1161
+ api_version: string;
1162
+
1163
+ /**
1164
+ * When the event was created
1165
+ */
1166
+ created_at: string;
1167
+
1168
+ /**
1169
+ * Payload for `message.edited` events (2026-02-03 format).
1170
+ *
1171
+ * Describes which part of a message was edited and when. Only text parts can be
1172
+ * edited. Only available for subscriptions using `webhook_version: "2026-02-03"`.
1173
+ */
1174
+ data: MessageEditedWebhookEvent.Data;
1175
+
1176
+ /**
1177
+ * Unique identifier for this event (for deduplication)
1178
+ */
1179
+ event_id: string;
1180
+
1181
+ /**
1182
+ * Valid webhook event types that can be subscribed to.
1183
+ *
1184
+ * **Note:** `message.edited` is only delivered to subscriptions using
1185
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
1186
+ * subscription will not produce any deliveries.
1187
+ */
1188
+ event_type: WebhookEventsAPI.WebhookEventType;
1189
+
1190
+ /**
1191
+ * Partner identifier. Present on all webhooks for cross-referencing.
1192
+ */
1193
+ partner_id: string;
1194
+
1195
+ /**
1196
+ * Trace ID for debugging and correlation across systems.
1197
+ */
1198
+ trace_id: string;
1199
+
1200
+ /**
1201
+ * Date-based webhook payload version. Determined by the `?version=` query
1202
+ * parameter in your webhook subscription URL. If no version parameter is
1203
+ * specified, defaults based on subscription creation date.
1204
+ */
1205
+ webhook_version: string;
1206
+ }
1207
+
1208
+ export namespace MessageEditedWebhookEvent {
1209
+ /**
1210
+ * Payload for `message.edited` events (2026-02-03 format).
1211
+ *
1212
+ * Describes which part of a message was edited and when. Only text parts can be
1213
+ * edited. Only available for subscriptions using `webhook_version: "2026-02-03"`.
1214
+ */
1215
+ export interface Data {
1216
+ /**
1217
+ * Message identifier
1218
+ */
1219
+ id: string;
1220
+
1221
+ /**
1222
+ * Chat context
1223
+ */
1224
+ chat: Data.Chat;
1225
+
1226
+ /**
1227
+ * "outbound" if you sent the original message, "inbound" if you received it
1228
+ */
1229
+ direction: 'outbound' | 'inbound';
1230
+
1231
+ /**
1232
+ * When the edit occurred
1233
+ */
1234
+ edited_at: string;
1235
+
1236
+ /**
1237
+ * The edited part
1238
+ */
1239
+ part: Data.Part;
1240
+
1241
+ /**
1242
+ * The handle that sent (and edited) this message
1243
+ */
1244
+ sender_handle: Shared.ChatHandle;
1245
+ }
1246
+
1247
+ export namespace Data {
1248
+ /**
1249
+ * Chat context
1250
+ */
1251
+ export interface Chat {
1252
+ /**
1253
+ * Chat identifier
1254
+ */
1255
+ id: string;
1256
+
1257
+ /**
1258
+ * **[BETA]** Current health for a chat. Always present — chats start at `HEALTHY`
1259
+ * and may shift based on engagement and delivery signals on the conversation. Many
1260
+ * `AT_RISK` or `CRITICAL` chats on a single line increase the risk of line
1261
+ * flagging.
1262
+ *
1263
+ * Switch on `status` to surface chat and line health in your UI — the enum is the
1264
+ * long-term contract. Each status carries a `doc_url` that deep-links to the
1265
+ * relevant section of the Chat Health guide. To gate a send, act on the response
1266
+ * rather than the status: a `403` is the authoritative answer.
1267
+ *
1268
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
1269
+ * means and how to react.
1270
+ */
1271
+ health_status: Chat.HealthStatus;
1272
+
1273
+ /**
1274
+ * Whether this is a group chat
1275
+ */
1276
+ is_group: boolean;
1277
+
1278
+ /**
1279
+ * The handle that owns this chat (your phone number)
1280
+ */
1281
+ owner_handle: Shared.ChatHandle;
1282
+ }
1283
+
1284
+ export namespace Chat {
1285
+ /**
1286
+ * **[BETA]** Current health for a chat. Always present — chats start at `HEALTHY`
1287
+ * and may shift based on engagement and delivery signals on the conversation. Many
1288
+ * `AT_RISK` or `CRITICAL` chats on a single line increase the risk of line
1289
+ * flagging.
1290
+ *
1291
+ * Switch on `status` to surface chat and line health in your UI — the enum is the
1292
+ * long-term contract. Each status carries a `doc_url` that deep-links to the
1293
+ * relevant section of the Chat Health guide. To gate a send, act on the response
1294
+ * rather than the status: a `403` is the authoritative answer.
1295
+ *
1296
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
1297
+ * means and how to react.
1298
+ */
1299
+ export interface HealthStatus {
1300
+ /**
1301
+ * Deep-link to the relevant section of the Chat Health guide for this status.
1302
+ */
1303
+ doc_url: string;
1304
+
1305
+ /**
1306
+ * Current health bucket for the chat. See the
1307
+ * [Chat Health guide](/guides/chats/chat-health) for what each value means and how
1308
+ * to react. `doc_url` deep-links to the relevant section.
1309
+ *
1310
+ * `OPTED_OUT` — the recipient sent `STOP`, `UNSUBSCRIBE`, `OPTOUT`, `CANCEL`,
1311
+ * `END`, or `QUIT`. The keyword must be the whole trimmed message, never part of a
1312
+ * longer one: `STOP` counts, `please stop` does not. Most keywords must match
1313
+ * exactly, including case. `OPT OUT` is the exception — it matches in any casing,
1314
+ * with or without the space or a hyphen, so `opt out`, `Opt-Out` and `optout` all
1315
+ * count. It clears as soon as they reply again: any later message from them that
1316
+ * is not itself an opt-out keyword opts them back in immediately — a reply in any
1317
+ * conversation with you counts, the same way the block does.
1318
+ *
1319
+ * `OPTED_OUT` marks only the conversation the keyword arrived in. The block below
1320
+ * is wider than the mark, so a conversation still reading `HEALTHY` can be blocked
1321
+ * as well — gate on the `403`, not on the status. Group threads are never marked
1322
+ * and are never blocked.
1323
+ *
1324
+ * Linq enforces this: while a recipient is opted out, every send to them is
1325
+ * rejected with `403` (error code `2024`) before the message is queued, across
1326
+ * every chat and every line on your account. Nothing is delivered, including a
1327
+ * final courtesy message — to send one, set `override_optout: true` on that single
1328
+ * request.
1329
+ */
1330
+ status: 'HEALTHY' | 'AT_RISK' | 'CRITICAL' | 'OPTED_OUT';
1331
+
1332
+ /**
1333
+ * When this status last changed.
1334
+ */
1335
+ updated_at: string;
1336
+ }
1337
+ }
1338
+
1339
+ /**
1340
+ * The edited part
1341
+ */
1342
+ export interface Part {
1343
+ /**
1344
+ * Zero-based index of the edited part within the message
1345
+ */
1346
+ index: number;
1347
+
1348
+ /**
1349
+ * New text content of the part
1350
+ */
1351
+ text: string;
1352
+ }
1353
+ }
1354
+ }
1355
+
1356
+ /**
1357
+ * Complete webhook payload for reaction.added events
1358
+ */
1359
+ export interface ReactionAddedWebhookEvent {
1360
+ /**
1361
+ * API version for the webhook payload format
1362
+ */
1363
+ api_version: string;
1364
+
1365
+ /**
1366
+ * When the event was created
1367
+ */
1368
+ created_at: string;
1369
+
1370
+ /**
1371
+ * Payload for reaction.added webhook events
1372
+ */
1373
+ data: ReactionEventBase;
1374
+
1375
+ /**
1376
+ * Unique identifier for this event (for deduplication)
1377
+ */
1378
+ event_id: string;
1379
+
1380
+ /**
1381
+ * Valid webhook event types that can be subscribed to.
1382
+ *
1383
+ * **Note:** `message.edited` is only delivered to subscriptions using
1384
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
1385
+ * subscription will not produce any deliveries.
1386
+ */
1387
+ event_type: WebhookEventsAPI.WebhookEventType;
1388
+
1389
+ /**
1390
+ * Partner identifier. Present on all webhooks for cross-referencing.
1391
+ */
1392
+ partner_id: string;
1393
+
1394
+ /**
1395
+ * Trace ID for debugging and correlation across systems.
1396
+ */
1397
+ trace_id: string;
1398
+
1399
+ /**
1400
+ * Date-based webhook payload version. Determined by the `?version=` query
1401
+ * parameter in your webhook subscription URL. If no version parameter is
1402
+ * specified, defaults based on subscription creation date.
1403
+ */
1404
+ webhook_version: string;
1405
+ }
1406
+
1407
+ /**
1408
+ * Complete webhook payload for reaction.removed events
1409
+ */
1410
+ export interface ReactionRemovedWebhookEvent {
1411
+ /**
1412
+ * API version for the webhook payload format
1413
+ */
1414
+ api_version: string;
1415
+
1416
+ /**
1417
+ * When the event was created
1418
+ */
1419
+ created_at: string;
1420
+
1421
+ /**
1422
+ * Payload for reaction.removed webhook events
1423
+ */
1424
+ data: ReactionEventBase;
1425
+
1426
+ /**
1427
+ * Unique identifier for this event (for deduplication)
1428
+ */
1429
+ event_id: string;
1430
+
1431
+ /**
1432
+ * Valid webhook event types that can be subscribed to.
1433
+ *
1434
+ * **Note:** `message.edited` is only delivered to subscriptions using
1435
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
1436
+ * subscription will not produce any deliveries.
1437
+ */
1438
+ event_type: WebhookEventsAPI.WebhookEventType;
1439
+
1440
+ /**
1441
+ * Partner identifier. Present on all webhooks for cross-referencing.
1442
+ */
1443
+ partner_id: string;
1444
+
1445
+ /**
1446
+ * Trace ID for debugging and correlation across systems.
1447
+ */
1448
+ trace_id: string;
1449
+
1450
+ /**
1451
+ * Date-based webhook payload version. Determined by the `?version=` query
1452
+ * parameter in your webhook subscription URL. If no version parameter is
1453
+ * specified, defaults based on subscription creation date.
1454
+ */
1455
+ webhook_version: string;
1456
+ }
1457
+
1458
+ /**
1459
+ * Complete webhook payload for poll.received events
1460
+ */
1461
+ export interface PollReceivedWebhookEvent {
1462
+ /**
1463
+ * API version for the webhook payload format
1464
+ */
1465
+ api_version: string;
1466
+
1467
+ /**
1468
+ * When the event was created
1469
+ */
1470
+ created_at: string;
1471
+
1472
+ /**
1473
+ * Payload for poll.received — a poll created by someone else and delivered to your
1474
+ * line. Carries the full poll snapshot (options, no voters yet) at receipt time.
1475
+ */
1476
+ data: PollReceivedWebhookEvent.Data;
1477
+
1478
+ /**
1479
+ * Unique identifier for this event (for deduplication)
1480
+ */
1481
+ event_id: string;
1482
+
1483
+ /**
1484
+ * Valid webhook event types that can be subscribed to.
1485
+ *
1486
+ * **Note:** `message.edited` is only delivered to subscriptions using
1487
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
1488
+ * subscription will not produce any deliveries.
1489
+ */
1490
+ event_type: WebhookEventsAPI.WebhookEventType;
1491
+
1492
+ /**
1493
+ * Partner identifier. Present on all webhooks for cross-referencing.
1494
+ */
1495
+ partner_id: string;
1496
+
1497
+ /**
1498
+ * Trace ID for debugging and correlation across systems.
1499
+ */
1500
+ trace_id: string;
1501
+
1502
+ /**
1503
+ * Date-based webhook payload version. Determined by the `?version=` query
1504
+ * parameter in your webhook subscription URL. If no version parameter is
1505
+ * specified, defaults based on subscription creation date.
1506
+ */
1507
+ webhook_version: string;
1508
+ }
1509
+
1510
+ export namespace PollReceivedWebhookEvent {
1511
+ /**
1512
+ * Payload for poll.received — a poll created by someone else and delivered to your
1513
+ * line. Carries the full poll snapshot (options, no voters yet) at receipt time.
1514
+ */
1515
+ export interface Data {
1516
+ /**
1517
+ * Chat info for poll webhook events.
1518
+ */
1519
+ chat: Data.Chat;
1520
+
1521
+ created_at: string;
1522
+
1523
+ direction: 'inbound' | 'outbound';
1524
+
1525
+ message_id: string;
1526
+
1527
+ poll: Data.Poll;
1528
+
1529
+ received_at: string;
1530
+
1531
+ service: string;
1532
+
1533
+ updated_at: string;
1534
+
1535
+ /**
1536
+ * The line that created the poll (is_me=false for an inbound poll).
1537
+ */
1538
+ sender_handle?: Shared.ChatHandle | null;
1539
+ }
1540
+
1541
+ export namespace Data {
1542
+ /**
1543
+ * Chat info for poll webhook events.
1544
+ */
1545
+ export interface Chat {
1546
+ id: string;
1547
+
1548
+ is_group?: boolean | null;
1549
+
1550
+ owner_handle?: Shared.ChatHandle | null;
1551
+ }
1552
+
1553
+ export interface Poll {
1554
+ options: Array<Poll.Option>;
1555
+
1556
+ /**
1557
+ * Distinct participants across the whole poll.
1558
+ */
1559
+ total_voters: number;
1560
+ }
1561
+
1562
+ export namespace Poll {
1563
+ export interface Option {
1564
+ can_be_edited: boolean;
1565
+
1566
+ /**
1567
+ * The participant who added this option (poll creator for the initial options;
1568
+ * whoever added later ones). On a poll.updated this differs from the event's
1569
+ * `sender_handle` whenever a remote participant added the option. Null when
1570
+ * unknown.
1571
+ */
1572
+ creator_handle: Shared.ChatHandle;
1573
+
1574
+ option_id: string;
1575
+
1576
+ text: string;
1577
+
1578
+ voters: Array<Option.Voter>;
1579
+ }
1580
+
1581
+ export namespace Option {
1582
+ export interface Voter {
1583
+ handle: string;
1584
+
1585
+ voted_at: string;
1586
+ }
1587
+ }
1588
+ }
1589
+ }
1590
+ }
1591
+
1592
+ /**
1593
+ * Complete webhook payload for poll.sent events
1594
+ */
1595
+ export interface PollSentWebhookEvent {
1596
+ /**
1597
+ * API version for the webhook payload format
1598
+ */
1599
+ api_version: string;
1600
+
1601
+ /**
1602
+ * When the event was created
1603
+ */
1604
+ created_at: string;
1605
+
1606
+ /**
1607
+ * Payload for poll.sent, poll.delivered, and poll.read webhook events. Timestamps
1608
+ * indicate state (null = not yet happened): sent → sent_at; delivered →
1609
+ * +delivered_at; read → +read_at.
1610
+ */
1611
+ data: PollSentWebhookEvent.Data;
1612
+
1613
+ /**
1614
+ * Unique identifier for this event (for deduplication)
1615
+ */
1616
+ event_id: string;
1617
+
1618
+ /**
1619
+ * Valid webhook event types that can be subscribed to.
1620
+ *
1621
+ * **Note:** `message.edited` is only delivered to subscriptions using
1622
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
1623
+ * subscription will not produce any deliveries.
1624
+ */
1625
+ event_type: WebhookEventsAPI.WebhookEventType;
1626
+
1627
+ /**
1628
+ * Partner identifier. Present on all webhooks for cross-referencing.
1629
+ */
1630
+ partner_id: string;
1631
+
1632
+ /**
1633
+ * Trace ID for debugging and correlation across systems.
1634
+ */
1635
+ trace_id: string;
1636
+
1637
+ /**
1638
+ * Date-based webhook payload version. Determined by the `?version=` query
1639
+ * parameter in your webhook subscription URL. If no version parameter is
1640
+ * specified, defaults based on subscription creation date.
1641
+ */
1642
+ webhook_version: string;
1643
+ }
1644
+
1645
+ export namespace PollSentWebhookEvent {
1646
+ /**
1647
+ * Payload for poll.sent, poll.delivered, and poll.read webhook events. Timestamps
1648
+ * indicate state (null = not yet happened): sent → sent_at; delivered →
1649
+ * +delivered_at; read → +read_at.
1650
+ */
1651
+ export interface Data {
1652
+ /**
1653
+ * Chat info for poll webhook events.
1654
+ */
1655
+ chat: Data.Chat;
1656
+
1657
+ created_at: string;
1658
+
1659
+ direction: 'inbound' | 'outbound';
1660
+
1661
+ message_id: string;
1662
+
1663
+ poll: Data.Poll;
1664
+
1665
+ service: string;
1666
+
1667
+ updated_at: string;
1668
+
1669
+ delivered_at?: string | null;
1670
+
1671
+ read_at?: string | null;
1672
+
1673
+ /**
1674
+ * The handle that sent the poll.
1675
+ */
1676
+ sender_handle?: Shared.ChatHandle | null;
1677
+
1678
+ sent_at?: string | null;
1679
+ }
1680
+
1681
+ export namespace Data {
1682
+ /**
1683
+ * Chat info for poll webhook events.
1684
+ */
1685
+ export interface Chat {
1686
+ id: string;
1687
+
1688
+ is_group?: boolean | null;
1689
+
1690
+ owner_handle?: Shared.ChatHandle | null;
1691
+ }
1692
+
1693
+ export interface Poll {
1694
+ options: Array<Poll.Option>;
1695
+
1696
+ /**
1697
+ * Distinct participants across the whole poll.
1698
+ */
1699
+ total_voters: number;
1700
+ }
1701
+
1702
+ export namespace Poll {
1703
+ export interface Option {
1704
+ can_be_edited: boolean;
1705
+
1706
+ /**
1707
+ * The participant who added this option (poll creator for the initial options;
1708
+ * whoever added later ones). On a poll.updated this differs from the event's
1709
+ * `sender_handle` whenever a remote participant added the option. Null when
1710
+ * unknown.
1711
+ */
1712
+ creator_handle: Shared.ChatHandle;
1713
+
1714
+ option_id: string;
1715
+
1716
+ text: string;
1717
+
1718
+ voters: Array<Option.Voter>;
1719
+ }
1720
+
1721
+ export namespace Option {
1722
+ export interface Voter {
1723
+ handle: string;
1724
+
1725
+ voted_at: string;
1726
+ }
1727
+ }
1728
+ }
1729
+ }
1730
+ }
1731
+
1732
+ /**
1733
+ * Complete webhook payload for poll.delivered events
1734
+ */
1735
+ export interface PollDeliveredWebhookEvent {
1736
+ /**
1737
+ * API version for the webhook payload format
1738
+ */
1739
+ api_version: string;
1740
+
1741
+ /**
1742
+ * When the event was created
1743
+ */
1744
+ created_at: string;
1745
+
1746
+ /**
1747
+ * Payload for poll.sent, poll.delivered, and poll.read webhook events. Timestamps
1748
+ * indicate state (null = not yet happened): sent → sent_at; delivered →
1749
+ * +delivered_at; read → +read_at.
1750
+ */
1751
+ data: PollDeliveredWebhookEvent.Data;
1752
+
1753
+ /**
1754
+ * Unique identifier for this event (for deduplication)
1755
+ */
1756
+ event_id: string;
1757
+
1758
+ /**
1759
+ * Valid webhook event types that can be subscribed to.
1760
+ *
1761
+ * **Note:** `message.edited` is only delivered to subscriptions using
1762
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
1763
+ * subscription will not produce any deliveries.
1764
+ */
1765
+ event_type: WebhookEventsAPI.WebhookEventType;
1766
+
1767
+ /**
1768
+ * Partner identifier. Present on all webhooks for cross-referencing.
1769
+ */
1770
+ partner_id: string;
1771
+
1772
+ /**
1773
+ * Trace ID for debugging and correlation across systems.
1774
+ */
1775
+ trace_id: string;
1776
+
1777
+ /**
1778
+ * Date-based webhook payload version. Determined by the `?version=` query
1779
+ * parameter in your webhook subscription URL. If no version parameter is
1780
+ * specified, defaults based on subscription creation date.
1781
+ */
1782
+ webhook_version: string;
1783
+ }
1784
+
1785
+ export namespace PollDeliveredWebhookEvent {
1786
+ /**
1787
+ * Payload for poll.sent, poll.delivered, and poll.read webhook events. Timestamps
1788
+ * indicate state (null = not yet happened): sent → sent_at; delivered →
1789
+ * +delivered_at; read → +read_at.
1790
+ */
1791
+ export interface Data {
1792
+ /**
1793
+ * Chat info for poll webhook events.
1794
+ */
1795
+ chat: Data.Chat;
1796
+
1797
+ created_at: string;
1798
+
1799
+ direction: 'inbound' | 'outbound';
1800
+
1801
+ message_id: string;
1802
+
1803
+ poll: Data.Poll;
1804
+
1805
+ service: string;
1806
+
1807
+ updated_at: string;
1808
+
1809
+ delivered_at?: string | null;
1810
+
1811
+ read_at?: string | null;
1812
+
1813
+ /**
1814
+ * The handle that sent the poll.
1815
+ */
1816
+ sender_handle?: Shared.ChatHandle | null;
1817
+
1818
+ sent_at?: string | null;
1819
+ }
1820
+
1821
+ export namespace Data {
1822
+ /**
1823
+ * Chat info for poll webhook events.
1824
+ */
1825
+ export interface Chat {
1826
+ id: string;
1827
+
1828
+ is_group?: boolean | null;
1829
+
1830
+ owner_handle?: Shared.ChatHandle | null;
1831
+ }
1832
+
1833
+ export interface Poll {
1834
+ options: Array<Poll.Option>;
1835
+
1836
+ /**
1837
+ * Distinct participants across the whole poll.
1838
+ */
1839
+ total_voters: number;
1840
+ }
1841
+
1842
+ export namespace Poll {
1843
+ export interface Option {
1844
+ can_be_edited: boolean;
1845
+
1846
+ /**
1847
+ * The participant who added this option (poll creator for the initial options;
1848
+ * whoever added later ones). On a poll.updated this differs from the event's
1849
+ * `sender_handle` whenever a remote participant added the option. Null when
1850
+ * unknown.
1851
+ */
1852
+ creator_handle: Shared.ChatHandle;
1853
+
1854
+ option_id: string;
1855
+
1856
+ text: string;
1857
+
1858
+ voters: Array<Option.Voter>;
1859
+ }
1860
+
1861
+ export namespace Option {
1862
+ export interface Voter {
1863
+ handle: string;
1864
+
1865
+ voted_at: string;
1866
+ }
1867
+ }
1868
+ }
1869
+ }
1870
+ }
1871
+
1872
+ /**
1873
+ * Complete webhook payload for poll.read events
1874
+ */
1875
+ export interface PollReadWebhookEvent {
1876
+ /**
1877
+ * API version for the webhook payload format
1878
+ */
1879
+ api_version: string;
1880
+
1881
+ /**
1882
+ * When the event was created
1883
+ */
1884
+ created_at: string;
1885
+
1886
+ /**
1887
+ * Payload for poll.sent, poll.delivered, and poll.read webhook events. Timestamps
1888
+ * indicate state (null = not yet happened): sent → sent_at; delivered →
1889
+ * +delivered_at; read → +read_at.
1890
+ */
1891
+ data: PollReadWebhookEvent.Data;
1892
+
1893
+ /**
1894
+ * Unique identifier for this event (for deduplication)
1895
+ */
1896
+ event_id: string;
1897
+
1898
+ /**
1899
+ * Valid webhook event types that can be subscribed to.
1900
+ *
1901
+ * **Note:** `message.edited` is only delivered to subscriptions using
1902
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
1903
+ * subscription will not produce any deliveries.
1904
+ */
1905
+ event_type: WebhookEventsAPI.WebhookEventType;
1906
+
1907
+ /**
1908
+ * Partner identifier. Present on all webhooks for cross-referencing.
1909
+ */
1910
+ partner_id: string;
1911
+
1912
+ /**
1913
+ * Trace ID for debugging and correlation across systems.
1914
+ */
1915
+ trace_id: string;
1916
+
1917
+ /**
1918
+ * Date-based webhook payload version. Determined by the `?version=` query
1919
+ * parameter in your webhook subscription URL. If no version parameter is
1920
+ * specified, defaults based on subscription creation date.
1921
+ */
1922
+ webhook_version: string;
1923
+ }
1924
+
1925
+ export namespace PollReadWebhookEvent {
1926
+ /**
1927
+ * Payload for poll.sent, poll.delivered, and poll.read webhook events. Timestamps
1928
+ * indicate state (null = not yet happened): sent → sent_at; delivered →
1929
+ * +delivered_at; read → +read_at.
1930
+ */
1931
+ export interface Data {
1932
+ /**
1933
+ * Chat info for poll webhook events.
1934
+ */
1935
+ chat: Data.Chat;
1936
+
1937
+ created_at: string;
1938
+
1939
+ direction: 'inbound' | 'outbound';
1940
+
1941
+ message_id: string;
1942
+
1943
+ poll: Data.Poll;
1944
+
1945
+ service: string;
1946
+
1947
+ updated_at: string;
1948
+
1949
+ delivered_at?: string | null;
1950
+
1951
+ read_at?: string | null;
1952
+
1953
+ /**
1954
+ * The handle that sent the poll.
1955
+ */
1956
+ sender_handle?: Shared.ChatHandle | null;
1957
+
1958
+ sent_at?: string | null;
1959
+ }
1960
+
1961
+ export namespace Data {
1962
+ /**
1963
+ * Chat info for poll webhook events.
1964
+ */
1965
+ export interface Chat {
1966
+ id: string;
1967
+
1968
+ is_group?: boolean | null;
1969
+
1970
+ owner_handle?: Shared.ChatHandle | null;
1971
+ }
1972
+
1973
+ export interface Poll {
1974
+ options: Array<Poll.Option>;
1975
+
1976
+ /**
1977
+ * Distinct participants across the whole poll.
1978
+ */
1979
+ total_voters: number;
1980
+ }
1981
+
1982
+ export namespace Poll {
1983
+ export interface Option {
1984
+ can_be_edited: boolean;
1985
+
1986
+ /**
1987
+ * The participant who added this option (poll creator for the initial options;
1988
+ * whoever added later ones). On a poll.updated this differs from the event's
1989
+ * `sender_handle` whenever a remote participant added the option. Null when
1990
+ * unknown.
1991
+ */
1992
+ creator_handle: Shared.ChatHandle;
1993
+
1994
+ option_id: string;
1995
+
1996
+ text: string;
1997
+
1998
+ voters: Array<Option.Voter>;
1999
+ }
2000
+
2001
+ export namespace Option {
2002
+ export interface Voter {
2003
+ handle: string;
2004
+
2005
+ voted_at: string;
2006
+ }
2007
+ }
2008
+ }
2009
+ }
2010
+ }
2011
+
2012
+ /**
2013
+ * Complete webhook payload for poll.updated events
2014
+ */
2015
+ export interface PollUpdatedWebhookEvent {
2016
+ /**
2017
+ * API version for the webhook payload format
2018
+ */
2019
+ api_version: string;
2020
+
2021
+ /**
2022
+ * When the event was created
2023
+ */
2024
+ created_at: string;
2025
+
2026
+ /**
2027
+ * Payload for poll.updated (option(s) added — add-only).
2028
+ */
2029
+ data: PollUpdatedWebhookEvent.Data;
2030
+
2031
+ /**
2032
+ * Unique identifier for this event (for deduplication)
2033
+ */
2034
+ event_id: string;
2035
+
2036
+ /**
2037
+ * Valid webhook event types that can be subscribed to.
2038
+ *
2039
+ * **Note:** `message.edited` is only delivered to subscriptions using
2040
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
2041
+ * subscription will not produce any deliveries.
2042
+ */
2043
+ event_type: WebhookEventsAPI.WebhookEventType;
2044
+
2045
+ /**
2046
+ * Partner identifier. Present on all webhooks for cross-referencing.
2047
+ */
2048
+ partner_id: string;
2049
+
2050
+ /**
2051
+ * Trace ID for debugging and correlation across systems.
2052
+ */
2053
+ trace_id: string;
2054
+
2055
+ /**
2056
+ * Date-based webhook payload version. Determined by the `?version=` query
2057
+ * parameter in your webhook subscription URL. If no version parameter is
2058
+ * specified, defaults based on subscription creation date.
2059
+ */
2060
+ webhook_version: string;
2061
+ }
2062
+
2063
+ export namespace PollUpdatedWebhookEvent {
2064
+ /**
2065
+ * Payload for poll.updated (option(s) added — add-only).
2066
+ */
2067
+ export interface Data {
2068
+ /**
2069
+ * Only the options this update added — never the ones the poll already had. Fetch
2070
+ * the poll to read its full option set.
2071
+ */
2072
+ added_options: Array<Data.AddedOption>;
2073
+
2074
+ /**
2075
+ * Chat info for poll webhook events.
2076
+ */
2077
+ chat: Data.Chat;
2078
+
2079
+ direction: 'inbound' | 'outbound';
2080
+
2081
+ message_id: string;
2082
+
2083
+ /**
2084
+ * Your line — the one that received or sent this update. Always present. On an
2085
+ * inbound update this is NOT who added the option: use
2086
+ * `added_options[].creator_handle` for that, which will be the remote participant.
2087
+ */
2088
+ sender_handle: Shared.ChatHandle;
2089
+
2090
+ service: string;
2091
+ }
2092
+
2093
+ export namespace Data {
2094
+ export interface AddedOption {
2095
+ can_be_edited: boolean;
2096
+
2097
+ /**
2098
+ * The participant who added this option (poll creator for the initial options;
2099
+ * whoever added later ones). On a poll.updated this differs from the event's
2100
+ * `sender_handle` whenever a remote participant added the option. Null when
2101
+ * unknown.
2102
+ */
2103
+ creator_handle: Shared.ChatHandle;
2104
+
2105
+ option_id: string;
2106
+
2107
+ text: string;
2108
+
2109
+ voters: Array<AddedOption.Voter>;
2110
+ }
2111
+
2112
+ export namespace AddedOption {
2113
+ export interface Voter {
2114
+ handle: string;
2115
+
2116
+ voted_at: string;
2117
+ }
2118
+ }
2119
+
2120
+ /**
2121
+ * Chat info for poll webhook events.
2122
+ */
2123
+ export interface Chat {
2124
+ id: string;
2125
+
2126
+ is_group?: boolean | null;
2127
+
2128
+ owner_handle?: Shared.ChatHandle | null;
2129
+ }
2130
+ }
2131
+ }
2132
+
2133
+ /**
2134
+ * Complete webhook payload for poll.failed events
2135
+ */
2136
+ export interface PollFailedWebhookEvent {
2137
+ /**
2138
+ * API version for the webhook payload format
2139
+ */
2140
+ api_version: string;
2141
+
2142
+ /**
2143
+ * When the event was created
2144
+ */
2145
+ created_at: string;
2146
+
2147
+ /**
2148
+ * Payload for poll.failed — an outbound poll (or poll action) that failed to send.
2149
+ * Carries the poll snapshot at failure time plus the error and when it failed.
2150
+ */
2151
+ data: PollFailedWebhookEvent.Data;
2152
+
2153
+ /**
2154
+ * Unique identifier for this event (for deduplication)
2155
+ */
2156
+ event_id: string;
2157
+
2158
+ /**
2159
+ * Valid webhook event types that can be subscribed to.
2160
+ *
2161
+ * **Note:** `message.edited` is only delivered to subscriptions using
2162
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
2163
+ * subscription will not produce any deliveries.
2164
+ */
2165
+ event_type: WebhookEventsAPI.WebhookEventType;
2166
+
2167
+ /**
2168
+ * Partner identifier. Present on all webhooks for cross-referencing.
2169
+ */
2170
+ partner_id: string;
2171
+
2172
+ /**
2173
+ * Trace ID for debugging and correlation across systems.
2174
+ */
2175
+ trace_id: string;
2176
+
2177
+ /**
2178
+ * Date-based webhook payload version. Determined by the `?version=` query
2179
+ * parameter in your webhook subscription URL. If no version parameter is
2180
+ * specified, defaults based on subscription creation date.
2181
+ */
2182
+ webhook_version: string;
2183
+ }
2184
+
2185
+ export namespace PollFailedWebhookEvent {
2186
+ /**
2187
+ * Payload for poll.failed — an outbound poll (or poll action) that failed to send.
2188
+ * Carries the poll snapshot at failure time plus the error and when it failed.
2189
+ */
2190
+ export interface Data {
2191
+ /**
2192
+ * Chat info for poll webhook events.
2193
+ */
2194
+ chat: Data.Chat;
2195
+
2196
+ direction: 'inbound' | 'outbound';
2197
+
2198
+ error: Data.Error;
2199
+
2200
+ failed_at: string;
2201
+
2202
+ message_id: string;
2203
+
2204
+ poll: Data.Poll;
2205
+
2206
+ service: string;
2207
+
2208
+ /**
2209
+ * Null on failure (the send never landed).
2210
+ */
2211
+ sender_handle?: Shared.ChatHandle | null;
2212
+ }
2213
+
2214
+ export namespace Data {
2215
+ /**
2216
+ * Chat info for poll webhook events.
2217
+ */
2218
+ export interface Chat {
2219
+ id: string;
2220
+
2221
+ is_group?: boolean | null;
2222
+
2223
+ owner_handle?: Shared.ChatHandle | null;
2224
+ }
2225
+
2226
+ export interface Error {
2227
+ /**
2228
+ * Error codes in webhook failure events. The possible set varies by event:
2229
+ * message.failed and poll.failed can carry 3007, 4001, 4002, 4005, 4006, 4007, or
2230
+ * 4008; the group update failure events (chat.group_name_update_failed,
2231
+ * chat.group_icon_update_failed) carry 3007 or 4001; chat.background_update_failed
2232
+ * carries 1005, 2011, 4001, or 5002.
2233
+ */
2234
+ code: number;
2235
+
2236
+ message: string;
2237
+ }
2238
+
2239
+ export interface Poll {
2240
+ options: Array<Poll.Option>;
2241
+
2242
+ /**
2243
+ * Distinct participants across the whole poll.
2244
+ */
2245
+ total_voters: number;
2246
+ }
2247
+
2248
+ export namespace Poll {
2249
+ export interface Option {
2250
+ can_be_edited: boolean;
2251
+
2252
+ /**
2253
+ * The participant who added this option (poll creator for the initial options;
2254
+ * whoever added later ones). On a poll.updated this differs from the event's
2255
+ * `sender_handle` whenever a remote participant added the option. Null when
2256
+ * unknown.
2257
+ */
2258
+ creator_handle: Shared.ChatHandle;
2259
+
2260
+ option_id: string;
2261
+
2262
+ text: string;
2263
+
2264
+ voters: Array<Option.Voter>;
2265
+ }
2266
+
2267
+ export namespace Option {
2268
+ export interface Voter {
2269
+ handle: string;
2270
+
2271
+ voted_at: string;
2272
+ }
2273
+ }
2274
+ }
2275
+ }
2276
+ }
2277
+
2278
+ /**
2279
+ * Complete webhook payload for poll.vote.added events
2280
+ */
2281
+ export interface PollVoteAddedWebhookEvent {
2282
+ /**
2283
+ * API version for the webhook payload format
2284
+ */
2285
+ api_version: string;
2286
+
2287
+ /**
2288
+ * When the event was created
2289
+ */
2290
+ created_at: string;
2291
+
2292
+ /**
2293
+ * Payload for poll.vote.added and poll.vote.removed (one option toggled).
2294
+ */
2295
+ data: PollVoteAddedWebhookEvent.Data;
2296
+
2297
+ /**
2298
+ * Unique identifier for this event (for deduplication)
2299
+ */
2300
+ event_id: string;
2301
+
2302
+ /**
2303
+ * Valid webhook event types that can be subscribed to.
2304
+ *
2305
+ * **Note:** `message.edited` is only delivered to subscriptions using
2306
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
2307
+ * subscription will not produce any deliveries.
2308
+ */
2309
+ event_type: WebhookEventsAPI.WebhookEventType;
2310
+
2311
+ /**
2312
+ * Partner identifier. Present on all webhooks for cross-referencing.
2313
+ */
2314
+ partner_id: string;
2315
+
2316
+ /**
2317
+ * Trace ID for debugging and correlation across systems.
2318
+ */
2319
+ trace_id: string;
2320
+
2321
+ /**
2322
+ * Date-based webhook payload version. Determined by the `?version=` query
2323
+ * parameter in your webhook subscription URL. If no version parameter is
2324
+ * specified, defaults based on subscription creation date.
2325
+ */
2326
+ webhook_version: string;
2327
+ }
2328
+
2329
+ export namespace PollVoteAddedWebhookEvent {
2330
+ /**
2331
+ * Payload for poll.vote.added and poll.vote.removed (one option toggled).
2332
+ */
2333
+ export interface Data {
2334
+ /**
2335
+ * Chat info for poll webhook events.
2336
+ */
2337
+ chat: Data.Chat;
2338
+
2339
+ direction: 'inbound' | 'outbound';
2340
+
2341
+ message_id: string;
2342
+
2343
+ option_id: string;
2344
+
2345
+ /**
2346
+ * The voter — always present.
2347
+ */
2348
+ sender_handle: Shared.ChatHandle;
2349
+
2350
+ service: string;
2351
+ }
2352
+
2353
+ export namespace Data {
2354
+ /**
2355
+ * Chat info for poll webhook events.
2356
+ */
2357
+ export interface Chat {
2358
+ id: string;
2359
+
2360
+ is_group?: boolean | null;
2361
+
2362
+ owner_handle?: Shared.ChatHandle | null;
2363
+ }
2364
+ }
2365
+ }
2366
+
2367
+ /**
2368
+ * Complete webhook payload for poll.vote.removed events
2369
+ */
2370
+ export interface PollVoteRemovedWebhookEvent {
2371
+ /**
2372
+ * API version for the webhook payload format
2373
+ */
2374
+ api_version: string;
2375
+
2376
+ /**
2377
+ * When the event was created
2378
+ */
2379
+ created_at: string;
2380
+
2381
+ /**
2382
+ * Payload for poll.vote.added and poll.vote.removed (one option toggled).
2383
+ */
2384
+ data: PollVoteRemovedWebhookEvent.Data;
2385
+
2386
+ /**
2387
+ * Unique identifier for this event (for deduplication)
2388
+ */
2389
+ event_id: string;
2390
+
2391
+ /**
2392
+ * Valid webhook event types that can be subscribed to.
2393
+ *
2394
+ * **Note:** `message.edited` is only delivered to subscriptions using
2395
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
2396
+ * subscription will not produce any deliveries.
2397
+ */
2398
+ event_type: WebhookEventsAPI.WebhookEventType;
2399
+
2400
+ /**
2401
+ * Partner identifier. Present on all webhooks for cross-referencing.
2402
+ */
2403
+ partner_id: string;
2404
+
2405
+ /**
2406
+ * Trace ID for debugging and correlation across systems.
2407
+ */
2408
+ trace_id: string;
2409
+
2410
+ /**
2411
+ * Date-based webhook payload version. Determined by the `?version=` query
2412
+ * parameter in your webhook subscription URL. If no version parameter is
2413
+ * specified, defaults based on subscription creation date.
2414
+ */
2415
+ webhook_version: string;
2416
+ }
2417
+
2418
+ export namespace PollVoteRemovedWebhookEvent {
2419
+ /**
2420
+ * Payload for poll.vote.added and poll.vote.removed (one option toggled).
2421
+ */
2422
+ export interface Data {
2423
+ /**
2424
+ * Chat info for poll webhook events.
2425
+ */
2426
+ chat: Data.Chat;
2427
+
2428
+ direction: 'inbound' | 'outbound';
2429
+
2430
+ message_id: string;
2431
+
2432
+ option_id: string;
2433
+
2434
+ /**
2435
+ * The voter — always present.
2436
+ */
2437
+ sender_handle: Shared.ChatHandle;
2438
+
2439
+ service: string;
2440
+ }
2441
+
2442
+ export namespace Data {
2443
+ /**
2444
+ * Chat info for poll webhook events.
2445
+ */
2446
+ export interface Chat {
2447
+ id: string;
2448
+
2449
+ is_group?: boolean | null;
2450
+
2451
+ owner_handle?: Shared.ChatHandle | null;
2452
+ }
2453
+ }
2454
+ }
2455
+
2456
+ /**
2457
+ * Complete webhook payload for poll.reaction.added events
2458
+ */
2459
+ export interface PollReactionAddedWebhookEvent {
2460
+ /**
2461
+ * API version for the webhook payload format
2462
+ */
2463
+ api_version: string;
2464
+
2465
+ /**
2466
+ * When the event was created
2467
+ */
2468
+ created_at: string;
2469
+
2470
+ /**
2471
+ * Payload for poll.reaction.added — a reaction on a poll message. Same shape as
2472
+ * reaction.added; `message_id` is the poll-definition message's ID. Poll reactions
2473
+ * are stickers, which iMessage cannot remove, so there is no removal counterpart.
2474
+ */
2475
+ data: ReactionEventBase;
2476
+
2477
+ /**
2478
+ * Unique identifier for this event (for deduplication)
2479
+ */
2480
+ event_id: string;
2481
+
2482
+ /**
2483
+ * Valid webhook event types that can be subscribed to.
2484
+ *
2485
+ * **Note:** `message.edited` is only delivered to subscriptions using
2486
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
2487
+ * subscription will not produce any deliveries.
2488
+ */
2489
+ event_type: WebhookEventsAPI.WebhookEventType;
2490
+
2491
+ /**
2492
+ * Partner identifier. Present on all webhooks for cross-referencing.
2493
+ */
2494
+ partner_id: string;
2495
+
2496
+ /**
2497
+ * Trace ID for debugging and correlation across systems.
2498
+ */
2499
+ trace_id: string;
2500
+
2501
+ /**
2502
+ * Date-based webhook payload version. Determined by the `?version=` query
2503
+ * parameter in your webhook subscription URL. If no version parameter is
2504
+ * specified, defaults based on subscription creation date.
2505
+ */
2506
+ webhook_version: string;
2507
+ }
2508
+
2509
+ /**
2510
+ * Complete webhook payload for participant.added events
2511
+ */
2512
+ export interface ParticipantAddedWebhookEvent {
2513
+ /**
2514
+ * API version for the webhook payload format
2515
+ */
2516
+ api_version: string;
2517
+
2518
+ /**
2519
+ * When the event was created
2520
+ */
2521
+ created_at: string;
2522
+
2523
+ /**
2524
+ * Payload for participant.added webhook events
2525
+ */
2526
+ data: ParticipantAddedWebhookEvent.Data;
2527
+
2528
+ /**
2529
+ * Unique identifier for this event (for deduplication)
2530
+ */
2531
+ event_id: string;
2532
+
2533
+ /**
2534
+ * Valid webhook event types that can be subscribed to.
2535
+ *
2536
+ * **Note:** `message.edited` is only delivered to subscriptions using
2537
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
2538
+ * subscription will not produce any deliveries.
2539
+ */
2540
+ event_type: WebhookEventsAPI.WebhookEventType;
2541
+
2542
+ /**
2543
+ * Partner identifier. Present on all webhooks for cross-referencing.
2544
+ */
2545
+ partner_id: string;
2546
+
2547
+ /**
2548
+ * Trace ID for debugging and correlation across systems.
2549
+ */
2550
+ trace_id: string;
2551
+
2552
+ /**
2553
+ * Date-based webhook payload version. Determined by the `?version=` query
2554
+ * parameter in your webhook subscription URL. If no version parameter is
2555
+ * specified, defaults based on subscription creation date.
2556
+ */
2557
+ webhook_version: string;
2558
+ }
2559
+
2560
+ export namespace ParticipantAddedWebhookEvent {
2561
+ /**
2562
+ * Payload for participant.added webhook events
2563
+ */
2564
+ export interface Data {
2565
+ /**
2566
+ * @deprecated DEPRECATED: Use participant instead. Handle (phone number or email
2567
+ * address) of the added participant.
2568
+ */
2569
+ handle: string;
2570
+
2571
+ /**
2572
+ * When the participant was added
2573
+ */
2574
+ added_at?: string;
2575
+
2576
+ /**
2577
+ * Chat identifier (UUID) of the group chat
2578
+ */
2579
+ chat_id?: string;
2580
+
2581
+ /**
2582
+ * The added participant as a full handle object
2583
+ */
2584
+ participant?: Shared.ChatHandle;
2585
+ }
2586
+ }
2587
+
2588
+ /**
2589
+ * Complete webhook payload for participant.removed events
2590
+ */
2591
+ export interface ParticipantRemovedWebhookEvent {
2592
+ /**
2593
+ * API version for the webhook payload format
2594
+ */
2595
+ api_version: string;
2596
+
2597
+ /**
2598
+ * When the event was created
2599
+ */
2600
+ created_at: string;
2601
+
2602
+ /**
2603
+ * Payload for participant.removed webhook events
2604
+ */
2605
+ data: ParticipantRemovedWebhookEvent.Data;
2606
+
2607
+ /**
2608
+ * Unique identifier for this event (for deduplication)
2609
+ */
2610
+ event_id: string;
2611
+
2612
+ /**
2613
+ * Valid webhook event types that can be subscribed to.
2614
+ *
2615
+ * **Note:** `message.edited` is only delivered to subscriptions using
2616
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
2617
+ * subscription will not produce any deliveries.
2618
+ */
2619
+ event_type: WebhookEventsAPI.WebhookEventType;
2620
+
2621
+ /**
2622
+ * Partner identifier. Present on all webhooks for cross-referencing.
2623
+ */
2624
+ partner_id: string;
2625
+
2626
+ /**
2627
+ * Trace ID for debugging and correlation across systems.
2628
+ */
2629
+ trace_id: string;
2630
+
2631
+ /**
2632
+ * Date-based webhook payload version. Determined by the `?version=` query
2633
+ * parameter in your webhook subscription URL. If no version parameter is
2634
+ * specified, defaults based on subscription creation date.
2635
+ */
2636
+ webhook_version: string;
2637
+ }
2638
+
2639
+ export namespace ParticipantRemovedWebhookEvent {
2640
+ /**
2641
+ * Payload for participant.removed webhook events
2642
+ */
2643
+ export interface Data {
2644
+ /**
2645
+ * @deprecated DEPRECATED: Use participant instead. Handle (phone number or email
2646
+ * address) of the removed participant.
2647
+ */
2648
+ handle: string;
2649
+
2650
+ /**
2651
+ * Chat identifier (UUID) of the group chat
2652
+ */
2653
+ chat_id?: string;
2654
+
2655
+ /**
2656
+ * The removed participant as a full handle object
2657
+ */
2658
+ participant?: Shared.ChatHandle;
2659
+
2660
+ /**
2661
+ * When the participant was removed
2662
+ */
2663
+ removed_at?: string;
2664
+ }
2665
+ }
2666
+
2667
+ /**
2668
+ * Complete webhook payload for chat.created events
2669
+ */
2670
+ export interface ChatCreatedWebhookEvent {
2671
+ /**
2672
+ * API version for the webhook payload format
2673
+ */
2674
+ api_version: string;
2675
+
2676
+ /**
2677
+ * When the event was created
2678
+ */
2679
+ created_at: string;
2680
+
2681
+ /**
2682
+ * Payload for chat.created webhook events. Matches GET /v3/chats/{chatId}
2683
+ * response.
2684
+ */
2685
+ data: ChatCreatedWebhookEvent.Data;
2686
+
2687
+ /**
2688
+ * Unique identifier for this event (for deduplication)
2689
+ */
2690
+ event_id: string;
2691
+
2692
+ /**
2693
+ * Valid webhook event types that can be subscribed to.
2694
+ *
2695
+ * **Note:** `message.edited` is only delivered to subscriptions using
2696
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
2697
+ * subscription will not produce any deliveries.
2698
+ */
2699
+ event_type: WebhookEventsAPI.WebhookEventType;
2700
+
2701
+ /**
2702
+ * Partner identifier. Present on all webhooks for cross-referencing.
2703
+ */
2704
+ partner_id: string;
2705
+
2706
+ /**
2707
+ * Trace ID for debugging and correlation across systems.
2708
+ */
2709
+ trace_id: string;
2710
+
2711
+ /**
2712
+ * Date-based webhook payload version. Determined by the `?version=` query
2713
+ * parameter in your webhook subscription URL. If no version parameter is
2714
+ * specified, defaults based on subscription creation date.
2715
+ */
2716
+ webhook_version: string;
2717
+ }
2718
+
2719
+ export namespace ChatCreatedWebhookEvent {
2720
+ /**
2721
+ * Payload for chat.created webhook events. Matches GET /v3/chats/{chatId}
2722
+ * response.
2723
+ */
2724
+ export interface Data {
2725
+ /**
2726
+ * Unique identifier for the chat
2727
+ */
2728
+ id: string;
2729
+
2730
+ /**
2731
+ * When the chat was created
2732
+ */
2733
+ created_at: string;
2734
+
2735
+ /**
2736
+ * Display name for the chat. Defaults to a comma-separated list of recipient
2737
+ * handles. Can be updated for group chats.
2738
+ */
2739
+ display_name: string | null;
2740
+
2741
+ /**
2742
+ * List of chat participants with full handle details. Always contains at least two
2743
+ * handles (your phone number and the other participant).
2744
+ */
2745
+ handles: Array<Shared.ChatHandle>;
2746
+
2747
+ /**
2748
+ * **[BETA]** Current health for a chat. Always present — chats start at `HEALTHY`
2749
+ * and may shift based on engagement and delivery signals on the conversation. Many
2750
+ * `AT_RISK` or `CRITICAL` chats on a single line increase the risk of line
2751
+ * flagging.
2752
+ *
2753
+ * Switch on `status` to surface chat and line health in your UI — the enum is the
2754
+ * long-term contract. Each status carries a `doc_url` that deep-links to the
2755
+ * relevant section of the Chat Health guide. To gate a send, act on the response
2756
+ * rather than the status: a `403` is the authoritative answer.
2757
+ *
2758
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
2759
+ * means and how to react.
2760
+ */
2761
+ health_status: Data.HealthStatus;
2762
+
2763
+ /**
2764
+ * Whether this is a group chat
2765
+ */
2766
+ is_group: boolean;
2767
+
2768
+ /**
2769
+ * When the chat was last updated
2770
+ */
2771
+ updated_at: string;
2772
+
2773
+ /**
2774
+ * Messaging service type
2775
+ */
2776
+ service?: Shared.ServiceType | null;
2777
+ }
2778
+
2779
+ export namespace Data {
2780
+ /**
2781
+ * **[BETA]** Current health for a chat. Always present — chats start at `HEALTHY`
2782
+ * and may shift based on engagement and delivery signals on the conversation. Many
2783
+ * `AT_RISK` or `CRITICAL` chats on a single line increase the risk of line
2784
+ * flagging.
2785
+ *
2786
+ * Switch on `status` to surface chat and line health in your UI — the enum is the
2787
+ * long-term contract. Each status carries a `doc_url` that deep-links to the
2788
+ * relevant section of the Chat Health guide. To gate a send, act on the response
2789
+ * rather than the status: a `403` is the authoritative answer.
2790
+ *
2791
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
2792
+ * means and how to react.
2793
+ */
2794
+ export interface HealthStatus {
2795
+ /**
2796
+ * Deep-link to the relevant section of the Chat Health guide for this status.
2797
+ */
2798
+ doc_url: string;
2799
+
2800
+ /**
2801
+ * Current health bucket for the chat. See the
2802
+ * [Chat Health guide](/guides/chats/chat-health) for what each value means and how
2803
+ * to react. `doc_url` deep-links to the relevant section.
2804
+ *
2805
+ * `OPTED_OUT` — the recipient sent `STOP`, `UNSUBSCRIBE`, `OPTOUT`, `CANCEL`,
2806
+ * `END`, or `QUIT`. The keyword must be the whole trimmed message, never part of a
2807
+ * longer one: `STOP` counts, `please stop` does not. Most keywords must match
2808
+ * exactly, including case. `OPT OUT` is the exception — it matches in any casing,
2809
+ * with or without the space or a hyphen, so `opt out`, `Opt-Out` and `optout` all
2810
+ * count. It clears as soon as they reply again: any later message from them that
2811
+ * is not itself an opt-out keyword opts them back in immediately — a reply in any
2812
+ * conversation with you counts, the same way the block does.
2813
+ *
2814
+ * `OPTED_OUT` marks only the conversation the keyword arrived in. The block below
2815
+ * is wider than the mark, so a conversation still reading `HEALTHY` can be blocked
2816
+ * as well — gate on the `403`, not on the status. Group threads are never marked
2817
+ * and are never blocked.
2818
+ *
2819
+ * Linq enforces this: while a recipient is opted out, every send to them is
2820
+ * rejected with `403` (error code `2024`) before the message is queued, across
2821
+ * every chat and every line on your account. Nothing is delivered, including a
2822
+ * final courtesy message — to send one, set `override_optout: true` on that single
2823
+ * request.
2824
+ */
2825
+ status: 'HEALTHY' | 'AT_RISK' | 'CRITICAL' | 'OPTED_OUT';
2826
+
2827
+ /**
2828
+ * When this status last changed.
2829
+ */
2830
+ updated_at: string;
2831
+ }
2832
+ }
2833
+ }
2834
+
2835
+ /**
2836
+ * Complete webhook payload for chat.group_name_updated events
2837
+ */
2838
+ export interface ChatGroupNameUpdatedWebhookEvent {
2839
+ /**
2840
+ * API version for the webhook payload format
2841
+ */
2842
+ api_version: string;
2843
+
2844
+ /**
2845
+ * When the event was created
2846
+ */
2847
+ created_at: string;
2848
+
2849
+ /**
2850
+ * Payload for chat.group_name_updated webhook events
2851
+ */
2852
+ data: ChatGroupNameUpdatedWebhookEvent.Data;
2853
+
2854
+ /**
2855
+ * Unique identifier for this event (for deduplication)
2856
+ */
2857
+ event_id: string;
2858
+
2859
+ /**
2860
+ * Valid webhook event types that can be subscribed to.
2861
+ *
2862
+ * **Note:** `message.edited` is only delivered to subscriptions using
2863
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
2864
+ * subscription will not produce any deliveries.
2865
+ */
2866
+ event_type: WebhookEventsAPI.WebhookEventType;
2867
+
2868
+ /**
2869
+ * Partner identifier. Present on all webhooks for cross-referencing.
2870
+ */
2871
+ partner_id: string;
2872
+
2873
+ /**
2874
+ * Trace ID for debugging and correlation across systems.
2875
+ */
2876
+ trace_id: string;
2877
+
2878
+ /**
2879
+ * Date-based webhook payload version. Determined by the `?version=` query
2880
+ * parameter in your webhook subscription URL. If no version parameter is
2881
+ * specified, defaults based on subscription creation date.
2882
+ */
2883
+ webhook_version: string;
2884
+ }
2885
+
2886
+ export namespace ChatGroupNameUpdatedWebhookEvent {
2887
+ /**
2888
+ * Payload for chat.group_name_updated webhook events
2889
+ */
2890
+ export interface Data {
2891
+ /**
2892
+ * Chat identifier (UUID) of the group chat
2893
+ */
2894
+ chat_id: string;
2895
+
2896
+ /**
2897
+ * When the update occurred
2898
+ */
2899
+ updated_at: string;
2900
+
2901
+ /**
2902
+ * The handle who made the change.
2903
+ */
2904
+ changed_by_handle?: Shared.ChatHandle | null;
2905
+
2906
+ /**
2907
+ * New group name (null if the name was removed)
2908
+ */
2909
+ new_value?: string | null;
2910
+
2911
+ /**
2912
+ * Previous group name (null if no previous name)
2913
+ */
2914
+ old_value?: string | null;
2915
+ }
2916
+ }
2917
+
2918
+ /**
2919
+ * Complete webhook payload for chat.group_icon_updated events
2920
+ */
2921
+ export interface ChatGroupIconUpdatedWebhookEvent {
2922
+ /**
2923
+ * API version for the webhook payload format
2924
+ */
2925
+ api_version: string;
2926
+
2927
+ /**
2928
+ * When the event was created
2929
+ */
2930
+ created_at: string;
2931
+
2932
+ /**
2933
+ * Payload for chat.group_icon_updated webhook events
2934
+ */
2935
+ data: ChatGroupIconUpdatedWebhookEvent.Data;
2936
+
2937
+ /**
2938
+ * Unique identifier for this event (for deduplication)
2939
+ */
2940
+ event_id: string;
2941
+
2942
+ /**
2943
+ * Valid webhook event types that can be subscribed to.
2944
+ *
2945
+ * **Note:** `message.edited` is only delivered to subscriptions using
2946
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
2947
+ * subscription will not produce any deliveries.
2948
+ */
2949
+ event_type: WebhookEventsAPI.WebhookEventType;
2950
+
2951
+ /**
2952
+ * Partner identifier. Present on all webhooks for cross-referencing.
2953
+ */
2954
+ partner_id: string;
2955
+
2956
+ /**
2957
+ * Trace ID for debugging and correlation across systems.
2958
+ */
2959
+ trace_id: string;
2960
+
2961
+ /**
2962
+ * Date-based webhook payload version. Determined by the `?version=` query
2963
+ * parameter in your webhook subscription URL. If no version parameter is
2964
+ * specified, defaults based on subscription creation date.
2965
+ */
2966
+ webhook_version: string;
2967
+ }
2968
+
2969
+ export namespace ChatGroupIconUpdatedWebhookEvent {
2970
+ /**
2971
+ * Payload for chat.group_icon_updated webhook events
2972
+ */
2973
+ export interface Data {
2974
+ /**
2975
+ * Chat identifier (UUID) of the group chat
2976
+ */
2977
+ chat_id: string;
2978
+
2979
+ /**
2980
+ * When the update occurred
2981
+ */
2982
+ updated_at: string;
2983
+
2984
+ /**
2985
+ * The handle who made the change.
2986
+ */
2987
+ changed_by_handle?: Shared.ChatHandle | null;
2988
+
2989
+ /**
2990
+ * New icon URL (null if the icon was removed)
2991
+ */
2992
+ new_value?: string | null;
2993
+
2994
+ /**
2995
+ * Previous icon URL (null if no previous icon)
2996
+ */
2997
+ old_value?: string | null;
2998
+ }
2999
+ }
3000
+
3001
+ /**
3002
+ * Complete webhook payload for chat.group_name_update_failed events
3003
+ */
3004
+ export interface ChatGroupNameUpdateFailedWebhookEvent {
3005
+ /**
3006
+ * API version for the webhook payload format
3007
+ */
3008
+ api_version: string;
3009
+
3010
+ /**
3011
+ * When the event was created
3012
+ */
3013
+ created_at: string;
3014
+
3015
+ /**
3016
+ * Error details for chat.group_name_update_failed webhook events. See
3017
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
3018
+ * code reference.
3019
+ */
3020
+ data: ChatGroupNameUpdateFailedWebhookEvent.Data;
3021
+
3022
+ /**
3023
+ * Unique identifier for this event (for deduplication)
3024
+ */
3025
+ event_id: string;
3026
+
3027
+ /**
3028
+ * Valid webhook event types that can be subscribed to.
3029
+ *
3030
+ * **Note:** `message.edited` is only delivered to subscriptions using
3031
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
3032
+ * subscription will not produce any deliveries.
3033
+ */
3034
+ event_type: WebhookEventsAPI.WebhookEventType;
3035
+
3036
+ /**
3037
+ * Partner identifier. Present on all webhooks for cross-referencing.
3038
+ */
3039
+ partner_id: string;
3040
+
3041
+ /**
3042
+ * Trace ID for debugging and correlation across systems.
3043
+ */
3044
+ trace_id: string;
3045
+
3046
+ /**
3047
+ * Date-based webhook payload version. Determined by the `?version=` query
3048
+ * parameter in your webhook subscription URL. If no version parameter is
3049
+ * specified, defaults based on subscription creation date.
3050
+ */
3051
+ webhook_version: string;
3052
+ }
3053
+
3054
+ export namespace ChatGroupNameUpdateFailedWebhookEvent {
3055
+ /**
3056
+ * Error details for chat.group_name_update_failed webhook events. See
3057
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
3058
+ * code reference.
3059
+ */
3060
+ export interface Data {
3061
+ /**
3062
+ * Chat identifier (UUID) of the group chat
3063
+ */
3064
+ chat_id: string;
3065
+
3066
+ /**
3067
+ * Error codes in webhook failure events. The possible set varies by event:
3068
+ * message.failed and poll.failed can carry 3007, 4001, 4002, 4005, 4006, 4007, or
3069
+ * 4008; the group update failure events (chat.group_name_update_failed,
3070
+ * chat.group_icon_update_failed) carry 3007 or 4001; chat.background_update_failed
3071
+ * carries 1005, 2011, 4001, or 5002.
3072
+ */
3073
+ error_code: number;
3074
+
3075
+ /**
3076
+ * When the failure was detected
3077
+ */
3078
+ failed_at: string;
3079
+ }
3080
+ }
3081
+
3082
+ /**
3083
+ * Complete webhook payload for chat.group_icon_update_failed events
3084
+ */
3085
+ export interface ChatGroupIconUpdateFailedWebhookEvent {
3086
+ /**
3087
+ * API version for the webhook payload format
3088
+ */
3089
+ api_version: string;
3090
+
3091
+ /**
3092
+ * When the event was created
3093
+ */
3094
+ created_at: string;
3095
+
3096
+ /**
3097
+ * Error details for chat.group_icon_update_failed webhook events. See
3098
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
3099
+ * code reference.
3100
+ */
3101
+ data: ChatGroupIconUpdateFailedWebhookEvent.Data;
3102
+
3103
+ /**
3104
+ * Unique identifier for this event (for deduplication)
3105
+ */
3106
+ event_id: string;
3107
+
3108
+ /**
3109
+ * Valid webhook event types that can be subscribed to.
3110
+ *
3111
+ * **Note:** `message.edited` is only delivered to subscriptions using
3112
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
3113
+ * subscription will not produce any deliveries.
3114
+ */
3115
+ event_type: WebhookEventsAPI.WebhookEventType;
3116
+
3117
+ /**
3118
+ * Partner identifier. Present on all webhooks for cross-referencing.
3119
+ */
3120
+ partner_id: string;
3121
+
3122
+ /**
3123
+ * Trace ID for debugging and correlation across systems.
3124
+ */
3125
+ trace_id: string;
3126
+
3127
+ /**
3128
+ * Date-based webhook payload version. Determined by the `?version=` query
3129
+ * parameter in your webhook subscription URL. If no version parameter is
3130
+ * specified, defaults based on subscription creation date.
3131
+ */
3132
+ webhook_version: string;
3133
+ }
3134
+
3135
+ export namespace ChatGroupIconUpdateFailedWebhookEvent {
3136
+ /**
3137
+ * Error details for chat.group_icon_update_failed webhook events. See
3138
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
3139
+ * code reference.
3140
+ */
3141
+ export interface Data {
3142
+ /**
3143
+ * Chat identifier (UUID) of the group chat
3144
+ */
3145
+ chat_id: string;
3146
+
3147
+ /**
3148
+ * Error codes in webhook failure events. The possible set varies by event:
3149
+ * message.failed and poll.failed can carry 3007, 4001, 4002, 4005, 4006, 4007, or
3150
+ * 4008; the group update failure events (chat.group_name_update_failed,
3151
+ * chat.group_icon_update_failed) carry 3007 or 4001; chat.background_update_failed
3152
+ * carries 1005, 2011, 4001, or 5002.
3153
+ */
3154
+ error_code: number;
3155
+
3156
+ /**
3157
+ * When the failure was detected
3158
+ */
3159
+ failed_at: string;
3160
+ }
3161
+ }
3162
+
3163
+ /**
3164
+ * Complete webhook payload for chat.typing_indicator.started events
3165
+ */
3166
+ export interface ChatTypingIndicatorStartedWebhookEvent {
3167
+ /**
3168
+ * API version for the webhook payload format
3169
+ */
3170
+ api_version: string;
3171
+
3172
+ /**
3173
+ * When the event was created
3174
+ */
3175
+ created_at: string;
3176
+
3177
+ /**
3178
+ * Payload for chat.typing_indicator.started webhook events
3179
+ */
3180
+ data: ChatTypingIndicatorStartedWebhookEvent.Data;
3181
+
3182
+ /**
3183
+ * Unique identifier for this event (for deduplication)
3184
+ */
3185
+ event_id: string;
3186
+
3187
+ /**
3188
+ * Valid webhook event types that can be subscribed to.
3189
+ *
3190
+ * **Note:** `message.edited` is only delivered to subscriptions using
3191
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
3192
+ * subscription will not produce any deliveries.
3193
+ */
3194
+ event_type: WebhookEventsAPI.WebhookEventType;
3195
+
3196
+ /**
3197
+ * Partner identifier. Present on all webhooks for cross-referencing.
3198
+ */
3199
+ partner_id: string;
3200
+
3201
+ /**
3202
+ * Trace ID for debugging and correlation across systems.
3203
+ */
3204
+ trace_id: string;
3205
+
3206
+ /**
3207
+ * Date-based webhook payload version. Determined by the `?version=` query
3208
+ * parameter in your webhook subscription URL. If no version parameter is
3209
+ * specified, defaults based on subscription creation date.
3210
+ */
3211
+ webhook_version: string;
3212
+ }
3213
+
3214
+ export namespace ChatTypingIndicatorStartedWebhookEvent {
3215
+ /**
3216
+ * Payload for chat.typing_indicator.started webhook events
3217
+ */
3218
+ export interface Data {
3219
+ /**
3220
+ * Chat identifier
3221
+ */
3222
+ chat_id: string;
3223
+ }
3224
+ }
3225
+
3226
+ /**
3227
+ * Complete webhook payload for chat.typing_indicator.stopped events
3228
+ */
3229
+ export interface ChatTypingIndicatorStoppedWebhookEvent {
3230
+ /**
3231
+ * API version for the webhook payload format
3232
+ */
3233
+ api_version: string;
3234
+
3235
+ /**
3236
+ * When the event was created
3237
+ */
3238
+ created_at: string;
3239
+
3240
+ /**
3241
+ * Payload for chat.typing_indicator.stopped webhook events
3242
+ */
3243
+ data: ChatTypingIndicatorStoppedWebhookEvent.Data;
3244
+
3245
+ /**
3246
+ * Unique identifier for this event (for deduplication)
3247
+ */
3248
+ event_id: string;
3249
+
3250
+ /**
3251
+ * Valid webhook event types that can be subscribed to.
3252
+ *
3253
+ * **Note:** `message.edited` is only delivered to subscriptions using
3254
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
3255
+ * subscription will not produce any deliveries.
3256
+ */
3257
+ event_type: WebhookEventsAPI.WebhookEventType;
3258
+
3259
+ /**
3260
+ * Partner identifier. Present on all webhooks for cross-referencing.
3261
+ */
3262
+ partner_id: string;
3263
+
3264
+ /**
3265
+ * Trace ID for debugging and correlation across systems.
3266
+ */
3267
+ trace_id: string;
3268
+
3269
+ /**
3270
+ * Date-based webhook payload version. Determined by the `?version=` query
3271
+ * parameter in your webhook subscription URL. If no version parameter is
3272
+ * specified, defaults based on subscription creation date.
3273
+ */
3274
+ webhook_version: string;
3275
+ }
3276
+
3277
+ export namespace ChatTypingIndicatorStoppedWebhookEvent {
3278
+ /**
3279
+ * Payload for chat.typing_indicator.stopped webhook events
3280
+ */
3281
+ export interface Data {
3282
+ /**
3283
+ * Chat identifier
3284
+ */
3285
+ chat_id: string;
3286
+ }
3287
+ }
3288
+
3289
+ /**
3290
+ * Complete webhook payload for chat.background_updated events
3291
+ */
3292
+ export interface ChatBackgroundUpdatedWebhookEvent {
3293
+ /**
3294
+ * API version for the webhook payload format
3295
+ */
3296
+ api_version: string;
3297
+
3298
+ /**
3299
+ * When the event was created
3300
+ */
3301
+ created_at: string;
3302
+
3303
+ /**
3304
+ * Payload for chat.background_updated webhook events.
3305
+ */
3306
+ data: ChatBackgroundUpdatedWebhookEvent.Data;
3307
+
3308
+ /**
3309
+ * Unique identifier for this event (for deduplication)
3310
+ */
3311
+ event_id: string;
3312
+
3313
+ /**
3314
+ * Valid webhook event types that can be subscribed to.
3315
+ *
3316
+ * **Note:** `message.edited` is only delivered to subscriptions using
3317
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
3318
+ * subscription will not produce any deliveries.
3319
+ */
3320
+ event_type: WebhookEventsAPI.WebhookEventType;
3321
+
3322
+ /**
3323
+ * Partner identifier. Present on all webhooks for cross-referencing.
3324
+ */
3325
+ partner_id: string;
3326
+
3327
+ /**
3328
+ * Trace ID for debugging and correlation across systems.
3329
+ */
3330
+ trace_id: string;
3331
+
3332
+ /**
3333
+ * Date-based webhook payload version. Determined by the `?version=` query
3334
+ * parameter in your webhook subscription URL. If no version parameter is
3335
+ * specified, defaults based on subscription creation date.
3336
+ */
3337
+ webhook_version: string;
3338
+ }
3339
+
3340
+ export namespace ChatBackgroundUpdatedWebhookEvent {
3341
+ /**
3342
+ * Payload for chat.background_updated webhook events.
3343
+ */
3344
+ export interface Data {
3345
+ /**
3346
+ * Chat information
3347
+ */
3348
+ chat: Data.Chat;
3349
+
3350
+ /**
3351
+ * Who changed it. `is_me` is true when your own number set it.
3352
+ */
3353
+ actor_handle?: Shared.ChatHandle | null;
3354
+
3355
+ /**
3356
+ * A chat transcript background. Fields are populated per `type`.
3357
+ */
3358
+ background?: Data.Background | null;
3359
+ }
3360
+
3361
+ export namespace Data {
3362
+ /**
3363
+ * Chat information
3364
+ */
3365
+ export interface Chat {
3366
+ /**
3367
+ * Chat identifier
3368
+ */
3369
+ id: string;
3370
+
3371
+ /**
3372
+ * Whether this is a group chat
3373
+ */
3374
+ is_group?: boolean | null;
3375
+
3376
+ /**
3377
+ * Your phone number's handle. Always has is_me=true.
3378
+ */
3379
+ owner_handle?: Shared.ChatHandle | null;
3380
+ }
3381
+
3382
+ /**
3383
+ * A chat transcript background. Fields are populated per `type`.
3384
+ */
3385
+ export interface Background {
3386
+ /**
3387
+ * The background family.
3388
+ */
3389
+ type: 'color' | 'dynamic' | 'photo';
3390
+
3391
+ /**
3392
+ * Photo: a hosted URL for the background image, whether you set it or a
3393
+ * participant did. Apple stores the image, not the URL it came from, so the image
3394
+ * is re-hosted and this is our URL rather than the one you supplied. `null` only
3395
+ * if the image could not be hosted.
3396
+ */
3397
+ image_url?: string | null;
3398
+
3399
+ /**
3400
+ * Color: the two gradient stops as hex, top then bottom.
3401
+ */
3402
+ shades?: Array<string> | null;
3403
+
3404
+ /**
3405
+ * Dynamic: the animated style.
3406
+ */
3407
+ style?: 'sky' | 'water' | 'aurora' | 'glitter' | null;
3408
+
3409
+ /**
3410
+ * Color: `custom` (the stored two colors) or a named swatch. Dynamic: the variant
3411
+ * within the `style` (e.g. `sunrise`).
3412
+ */
3413
+ variant?: string | null;
3414
+ }
3415
+ }
3416
+ }
3417
+
3418
+ /**
3419
+ * Complete webhook payload for chat.background_update_failed events
3420
+ */
3421
+ export interface ChatBackgroundUpdateFailedWebhookEvent {
3422
+ /**
3423
+ * API version for the webhook payload format
3424
+ */
3425
+ api_version: string;
3426
+
3427
+ /**
3428
+ * When the event was created
3429
+ */
3430
+ created_at: string;
3431
+
3432
+ /**
3433
+ * Error details for chat.background_update_failed webhook events. See
3434
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
3435
+ * code reference.
3436
+ */
3437
+ data: ChatBackgroundUpdateFailedWebhookEvent.Data;
3438
+
3439
+ /**
3440
+ * Unique identifier for this event (for deduplication)
3441
+ */
3442
+ event_id: string;
3443
+
3444
+ /**
3445
+ * Valid webhook event types that can be subscribed to.
3446
+ *
3447
+ * **Note:** `message.edited` is only delivered to subscriptions using
3448
+ * `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
3449
+ * subscription will not produce any deliveries.
3450
+ */
3451
+ event_type: WebhookEventsAPI.WebhookEventType;
3452
+
3453
+ /**
3454
+ * Partner identifier. Present on all webhooks for cross-referencing.
3455
+ */
3456
+ partner_id: string;
3457
+
3458
+ /**
3459
+ * Trace ID for debugging and correlation across systems.
3460
+ */
3461
+ trace_id: string;
3462
+
3463
+ /**
3464
+ * Date-based webhook payload version. Determined by the `?version=` query
3465
+ * parameter in your webhook subscription URL. If no version parameter is
3466
+ * specified, defaults based on subscription creation date.
3467
+ */
3468
+ webhook_version: string;
3469
+ }
3470
+
3471
+ export namespace ChatBackgroundUpdateFailedWebhookEvent {
3472
+ /**
3473
+ * Error details for chat.background_update_failed webhook events. See
3474
+ * [WebhookErrorCode](#/components/schemas/WebhookErrorCode) for the full error
3475
+ * code reference.
3476
+ */
3477
+ export interface Data {
3478
+ /**
3479
+ * Chat identifier (UUID) whose background update failed
3480
+ */
3481
+ chat_id: string;
3482
+
3483
+ /**
3484
+ * Error codes in webhook failure events. The possible set varies by event:
3485
+ * message.failed and poll.failed can carry 3007, 4001, 4002, 4005, 4006, 4007, or
3486
+ * 4008; the group update failure events (chat.group_name_update_failed,
3487
+ * chat.group_icon_update_failed) carry 3007 or 4001; chat.background_update_failed
3488
+ * carries 1005, 2011, 4001, or 5002.
3489
+ */
3490
+ error_code: number;
3491
+
3492
+ /**
3493
+ * When the failure was detected
3494
+ */
3495
+ failed_at: string;
3496
+ }
3497
+ }
3498
+
3499
+ /**
3500
+ * Complete webhook payload for phone_number.status_updated events
3501
+ */
3502
+ export interface PhoneNumberStatusUpdatedWebhookEvent {
3503
+ /**
3504
+ * API version for the webhook payload format
3505
+ */
3506
+ api_version: string;
3507
+
3508
+ /**
3509
+ * When the event was created
3510
+ */
3511
+ created_at: string;
3512
+
3513
+ /**
3514
+ * Payload for phone_number.status_updated webhook events
3515
+ */
3516
+ data: PhoneNumberStatusUpdatedWebhookEvent.Data;
3517
+
3518
+ /**
3519
+ * Unique identifier for this event (for deduplication)
3520
+ */
3521
+ event_id: string;
3522
+
3523
+ /**
3524
+ * The type of event
3525
+ */
3526
+ event_type:
3527
+ | 'message.sent'
3528
+ | 'message.received'
3529
+ | 'message.read'
3530
+ | 'message.delivered'
3531
+ | 'message.failed'
3532
+ | 'message.edited'
3533
+ | 'reaction.added'
3534
+ | 'reaction.removed'
3535
+ | 'poll.received'
3536
+ | 'poll.failed'
3537
+ | 'poll.sent'
3538
+ | 'poll.delivered'
3539
+ | 'poll.read'
3540
+ | 'poll.updated'
3541
+ | 'poll.vote.added'
3542
+ | 'poll.vote.removed'
3543
+ | 'poll.reaction.added'
3544
+ | 'participant.added'
3545
+ | 'participant.removed'
3546
+ | 'chat.created'
3547
+ | 'chat.group_name_updated'
3548
+ | 'chat.group_icon_updated'
3549
+ | 'chat.group_name_update_failed'
3550
+ | 'chat.group_icon_update_failed'
3551
+ | 'chat.background_updated'
3552
+ | 'chat.background_update_failed'
3553
+ | 'chat.typing_indicator.started'
3554
+ | 'chat.typing_indicator.stopped'
3555
+ | 'phone_number.status_updated'
3556
+ | 'contact_card.received'
3557
+ | 'call.initiated'
3558
+ | 'call.ringing'
3559
+ | 'call.answered'
3560
+ | 'call.ended'
3561
+ | 'call.failed'
3562
+ | 'call.declined'
3563
+ | 'call.no_answer'
3564
+ | 'location.sharing.started'
3565
+ | 'location.sharing.stopped'
3566
+ | 'payment.succeeded'
3567
+ | 'payment.canceled'
3568
+ | 'payment.expired'
3569
+ | 'payment.declined'
3570
+ | 'payment.authorized'
3571
+ | 'connection.created'
3572
+ | 'connection.revoked';
3573
+
3574
+ /**
3575
+ * Partner identifier. Present on all webhooks for cross-referencing.
3576
+ */
3577
+ partner_id: string;
3578
+
3579
+ /**
3580
+ * Trace ID for debugging and correlation across systems.
3581
+ */
3582
+ trace_id: string;
3583
+
3584
+ /**
3585
+ * Date-based webhook payload version. Determined by the `?version=` query
3586
+ * parameter in your webhook subscription URL. If no version parameter is
3587
+ * specified, defaults based on subscription creation date.
3588
+ */
3589
+ webhook_version: string;
3590
+ }
3591
+
3592
+ export namespace PhoneNumberStatusUpdatedWebhookEvent {
3593
+ /**
3594
+ * Payload for phone_number.status_updated webhook events
3595
+ */
3596
+ export interface Data {
3597
+ /**
3598
+ * When the status change occurred
3599
+ */
3600
+ changed_at: string;
3601
+
3602
+ /**
3603
+ * The new line reputation
3604
+ */
3605
+ new_reputation: 'HEALTHY' | 'AT_RISK' | 'CRITICAL';
3606
+
3607
+ /**
3608
+ * The new service status
3609
+ */
3610
+ new_status: 'ACTIVE' | 'FLAGGED';
3611
+
3612
+ /**
3613
+ * Phone number in E.164 format
3614
+ */
3615
+ phone_number: string;
3616
+
3617
+ /**
3618
+ * The previous line reputation
3619
+ */
3620
+ previous_reputation: 'HEALTHY' | 'AT_RISK' | 'CRITICAL';
3621
+
3622
+ /**
3623
+ * The previous service status
3624
+ */
3625
+ previous_status: 'ACTIVE' | 'FLAGGED';
3626
+ }
3627
+ }
3628
+
3629
+ /**
3630
+ * Complete webhook payload for message.sent events (2026-02-03 format)
3631
+ */
3632
+ export type UnwrapWebhookEvent =
3633
+ | MessageSentWebhookEvent
3634
+ | MessageReceivedWebhookEvent
3635
+ | MessageReadWebhookEvent
3636
+ | MessageDeliveredWebhookEvent
3637
+ | MessageFailedWebhookEvent
3638
+ | MessageEditedWebhookEvent
3639
+ | ReactionAddedWebhookEvent
3640
+ | ReactionRemovedWebhookEvent
3641
+ | PollReceivedWebhookEvent
3642
+ | PollSentWebhookEvent
3643
+ | PollDeliveredWebhookEvent
3644
+ | PollReadWebhookEvent
3645
+ | PollUpdatedWebhookEvent
3646
+ | PollFailedWebhookEvent
3647
+ | PollVoteAddedWebhookEvent
3648
+ | PollVoteRemovedWebhookEvent
3649
+ | PollReactionAddedWebhookEvent
3650
+ | ParticipantAddedWebhookEvent
3651
+ | ParticipantRemovedWebhookEvent
3652
+ | ChatCreatedWebhookEvent
3653
+ | ChatGroupNameUpdatedWebhookEvent
3654
+ | ChatGroupIconUpdatedWebhookEvent
3655
+ | ChatGroupNameUpdateFailedWebhookEvent
3656
+ | ChatGroupIconUpdateFailedWebhookEvent
3657
+ | ChatTypingIndicatorStartedWebhookEvent
3658
+ | ChatTypingIndicatorStoppedWebhookEvent
3659
+ | ChatBackgroundUpdatedWebhookEvent
3660
+ | ChatBackgroundUpdateFailedWebhookEvent
3661
+ | PhoneNumberStatusUpdatedWebhookEvent;
3662
+
749
3663
  export declare namespace Webhooks {
750
3664
  export {
751
3665
  type MessageEventV2 as MessageEventV2,
@@ -754,5 +3668,35 @@ export declare namespace Webhooks {
754
3668
  type SchemasMediaPartResponse as SchemasMediaPartResponse,
755
3669
  type SchemasMessageEffect as SchemasMessageEffect,
756
3670
  type SchemasTextPartResponse as SchemasTextPartResponse,
3671
+ type MessageSentWebhookEvent as MessageSentWebhookEvent,
3672
+ type MessageReceivedWebhookEvent as MessageReceivedWebhookEvent,
3673
+ type MessageReadWebhookEvent as MessageReadWebhookEvent,
3674
+ type MessageDeliveredWebhookEvent as MessageDeliveredWebhookEvent,
3675
+ type MessageFailedWebhookEvent as MessageFailedWebhookEvent,
3676
+ type MessageEditedWebhookEvent as MessageEditedWebhookEvent,
3677
+ type ReactionAddedWebhookEvent as ReactionAddedWebhookEvent,
3678
+ type ReactionRemovedWebhookEvent as ReactionRemovedWebhookEvent,
3679
+ type PollReceivedWebhookEvent as PollReceivedWebhookEvent,
3680
+ type PollSentWebhookEvent as PollSentWebhookEvent,
3681
+ type PollDeliveredWebhookEvent as PollDeliveredWebhookEvent,
3682
+ type PollReadWebhookEvent as PollReadWebhookEvent,
3683
+ type PollUpdatedWebhookEvent as PollUpdatedWebhookEvent,
3684
+ type PollFailedWebhookEvent as PollFailedWebhookEvent,
3685
+ type PollVoteAddedWebhookEvent as PollVoteAddedWebhookEvent,
3686
+ type PollVoteRemovedWebhookEvent as PollVoteRemovedWebhookEvent,
3687
+ type PollReactionAddedWebhookEvent as PollReactionAddedWebhookEvent,
3688
+ type ParticipantAddedWebhookEvent as ParticipantAddedWebhookEvent,
3689
+ type ParticipantRemovedWebhookEvent as ParticipantRemovedWebhookEvent,
3690
+ type ChatCreatedWebhookEvent as ChatCreatedWebhookEvent,
3691
+ type ChatGroupNameUpdatedWebhookEvent as ChatGroupNameUpdatedWebhookEvent,
3692
+ type ChatGroupIconUpdatedWebhookEvent as ChatGroupIconUpdatedWebhookEvent,
3693
+ type ChatGroupNameUpdateFailedWebhookEvent as ChatGroupNameUpdateFailedWebhookEvent,
3694
+ type ChatGroupIconUpdateFailedWebhookEvent as ChatGroupIconUpdateFailedWebhookEvent,
3695
+ type ChatTypingIndicatorStartedWebhookEvent as ChatTypingIndicatorStartedWebhookEvent,
3696
+ type ChatTypingIndicatorStoppedWebhookEvent as ChatTypingIndicatorStoppedWebhookEvent,
3697
+ type ChatBackgroundUpdatedWebhookEvent as ChatBackgroundUpdatedWebhookEvent,
3698
+ type ChatBackgroundUpdateFailedWebhookEvent as ChatBackgroundUpdateFailedWebhookEvent,
3699
+ type PhoneNumberStatusUpdatedWebhookEvent as PhoneNumberStatusUpdatedWebhookEvent,
3700
+ type UnwrapWebhookEvent as UnwrapWebhookEvent,
757
3701
  };
758
3702
  }