@kirimdev/sdk 3.0.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4077 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/health": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /**
15
+ * Liveness probe
16
+ * @description Unauthenticated health check. Returns 200 if the API is up.
17
+ */
18
+ get: {
19
+ parameters: {
20
+ query?: never;
21
+ header?: never;
22
+ path?: never;
23
+ cookie?: never;
24
+ };
25
+ requestBody?: never;
26
+ responses: {
27
+ /** @description API is healthy */
28
+ 200: {
29
+ headers: {
30
+ [name: string]: unknown;
31
+ };
32
+ content: {
33
+ "application/json": {
34
+ data: {
35
+ /** @enum {string} */
36
+ status: "ok";
37
+ };
38
+ request_id: string;
39
+ };
40
+ };
41
+ };
42
+ };
43
+ };
44
+ put?: never;
45
+ post?: never;
46
+ delete?: never;
47
+ options?: never;
48
+ head?: never;
49
+ patch?: never;
50
+ trace?: never;
51
+ };
52
+ "/me": {
53
+ parameters: {
54
+ query?: never;
55
+ header?: never;
56
+ path?: never;
57
+ cookie?: never;
58
+ };
59
+ /**
60
+ * Introspect the calling API key
61
+ * @description Returns the organization, API key, and rate-limit tier associated with the bearer token. Use to verify key validity from automation scripts.
62
+ */
63
+ get: {
64
+ parameters: {
65
+ query?: never;
66
+ header?: never;
67
+ path?: never;
68
+ cookie?: never;
69
+ };
70
+ requestBody?: never;
71
+ responses: {
72
+ /** @description API key context */
73
+ 200: {
74
+ headers: {
75
+ [name: string]: unknown;
76
+ };
77
+ content: {
78
+ "application/json": components["schemas"]["MeResponse"];
79
+ };
80
+ };
81
+ /** @description Authentication failure */
82
+ 401: {
83
+ headers: {
84
+ [name: string]: unknown;
85
+ };
86
+ content: {
87
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
88
+ };
89
+ };
90
+ /** @description Rate limit exceeded */
91
+ 429: {
92
+ headers: {
93
+ [name: string]: unknown;
94
+ };
95
+ content: {
96
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
97
+ };
98
+ };
99
+ /** @description Internal server error */
100
+ 500: {
101
+ headers: {
102
+ [name: string]: unknown;
103
+ };
104
+ content: {
105
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
106
+ };
107
+ };
108
+ };
109
+ };
110
+ put?: never;
111
+ post?: never;
112
+ delete?: never;
113
+ options?: never;
114
+ head?: never;
115
+ patch?: never;
116
+ trace?: never;
117
+ };
118
+ "/accounts": {
119
+ parameters: {
120
+ query?: never;
121
+ header?: never;
122
+ path?: never;
123
+ cookie?: never;
124
+ };
125
+ /**
126
+ * List connected WhatsApp accounts
127
+ * @description List the WhatsApp accounts attached to the calling organization. The returned `business_phone_number_id` is the value to use in `/{phone_number_id}/...` path-based endpoints (Meta-style — sender comes from the URL, not the body). Defaults to `status=connected` because that's the only state in which sends are accepted; pass `status=all` to inspect onboarding-in-progress or disconnected accounts. Response is intentionally not paginated.
128
+ */
129
+ get: {
130
+ parameters: {
131
+ query?: {
132
+ status?: "connected" | "all";
133
+ };
134
+ header?: never;
135
+ path?: never;
136
+ cookie?: never;
137
+ };
138
+ requestBody?: never;
139
+ responses: {
140
+ /** @description Account list */
141
+ 200: {
142
+ headers: {
143
+ [name: string]: unknown;
144
+ };
145
+ content: {
146
+ "application/json": components["schemas"]["ListAccountsResponse"];
147
+ };
148
+ };
149
+ /** @description Validation failure */
150
+ 400: {
151
+ headers: {
152
+ [name: string]: unknown;
153
+ };
154
+ content: {
155
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
156
+ };
157
+ };
158
+ /** @description Authentication failure */
159
+ 401: {
160
+ headers: {
161
+ [name: string]: unknown;
162
+ };
163
+ content: {
164
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
165
+ };
166
+ };
167
+ /** @description Rate limit exceeded */
168
+ 429: {
169
+ headers: {
170
+ [name: string]: unknown;
171
+ };
172
+ content: {
173
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
174
+ };
175
+ };
176
+ /** @description Internal server error */
177
+ 500: {
178
+ headers: {
179
+ [name: string]: unknown;
180
+ };
181
+ content: {
182
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
183
+ };
184
+ };
185
+ };
186
+ };
187
+ put?: never;
188
+ post?: never;
189
+ delete?: never;
190
+ options?: never;
191
+ head?: never;
192
+ patch?: never;
193
+ trace?: never;
194
+ };
195
+ "/{phone_number_id}/messages": {
196
+ parameters: {
197
+ query?: never;
198
+ header?: never;
199
+ path?: never;
200
+ cookie?: never;
201
+ };
202
+ /**
203
+ * List messages
204
+ * @description List messages for the WhatsApp account identified by `phone_number_id`. Filter by `conversation_id`, `direction`, `status`, or a `created_after`/`created_before` window.
205
+ */
206
+ get: {
207
+ parameters: {
208
+ query?: {
209
+ conversation_id?: string;
210
+ direction?: "inbound" | "outbound";
211
+ status?: "pending" | "sent" | "delivered" | "read" | "failed";
212
+ created_after?: string;
213
+ created_before?: string;
214
+ limit?: string;
215
+ cursor?: string;
216
+ };
217
+ header?: never;
218
+ path: {
219
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
220
+ phone_number_id: string;
221
+ };
222
+ cookie?: never;
223
+ };
224
+ requestBody?: never;
225
+ responses: {
226
+ /** @description Message list */
227
+ 200: {
228
+ headers: {
229
+ [name: string]: unknown;
230
+ };
231
+ content: {
232
+ "application/json": components["schemas"]["ListMessagesResponse"];
233
+ };
234
+ };
235
+ /** @description Validation failure */
236
+ 400: {
237
+ headers: {
238
+ [name: string]: unknown;
239
+ };
240
+ content: {
241
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
242
+ };
243
+ };
244
+ /** @description Authentication failure */
245
+ 401: {
246
+ headers: {
247
+ [name: string]: unknown;
248
+ };
249
+ content: {
250
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
251
+ };
252
+ };
253
+ /** @description Resource not found */
254
+ 404: {
255
+ headers: {
256
+ [name: string]: unknown;
257
+ };
258
+ content: {
259
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
260
+ };
261
+ };
262
+ /** @description Semantic failure (e.g. idempotency key reuse) */
263
+ 422: {
264
+ headers: {
265
+ [name: string]: unknown;
266
+ };
267
+ content: {
268
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
269
+ };
270
+ };
271
+ /** @description Rate limit exceeded */
272
+ 429: {
273
+ headers: {
274
+ [name: string]: unknown;
275
+ };
276
+ content: {
277
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
278
+ };
279
+ };
280
+ /** @description Internal server error */
281
+ 500: {
282
+ headers: {
283
+ [name: string]: unknown;
284
+ };
285
+ content: {
286
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
287
+ };
288
+ };
289
+ };
290
+ };
291
+ put?: never;
292
+ /**
293
+ * Send a WhatsApp message or mark inbound as read
294
+ * @description Meta-style messages endpoint. Two operations share the same path, distinguished by the request body:
295
+ *
296
+ * **Outbound send** — body has a `type` field (`text`, `image`, `document`, `video`, `audio`, `template`, `interactive`). Body shape mirrors the Meta WhatsApp Cloud API; media variants accept either `link` (hosted URL) or `id` (Meta uploaded media). The sender is the WhatsApp account identified by `phone_number_id` in the URL path; there is no `from` field in the body. Pass `Idempotency-Key` to safely retry on network failure.
297
+ *
298
+ * **Read receipt** — body has `status: "read"` + `message_id` (the inbound wamid from your webhook). Sends a read receipt back to the sender so the double-tick turns blue on their phone. Optional `typing_indicator: { type: "text" }` shows a typing bubble alongside the receipt; Meta auto-dismisses after ~25 seconds or on first outbound message.
299
+ */
300
+ post: {
301
+ parameters: {
302
+ query?: never;
303
+ header?: {
304
+ /** @description Optional idempotency token. See /docs/idempotency. */
305
+ "idempotency-key"?: string;
306
+ };
307
+ path: {
308
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
309
+ phone_number_id: string;
310
+ };
311
+ cookie?: never;
312
+ };
313
+ requestBody?: {
314
+ content: {
315
+ "application/json": {
316
+ /** @enum {string} */
317
+ messaging_product: "whatsapp";
318
+ /** @enum {string} */
319
+ recipient_type?: "individual";
320
+ to: string;
321
+ /** @enum {string} */
322
+ type: "text";
323
+ text: {
324
+ body: string;
325
+ preview_url?: boolean;
326
+ };
327
+ } | {
328
+ /** @enum {string} */
329
+ messaging_product: "whatsapp";
330
+ /** @enum {string} */
331
+ recipient_type?: "individual";
332
+ to: string;
333
+ /** @enum {string} */
334
+ type: "image";
335
+ image: {
336
+ /** Format: uri */
337
+ link?: string;
338
+ id?: string;
339
+ caption?: string;
340
+ filename?: string;
341
+ };
342
+ } | {
343
+ /** @enum {string} */
344
+ messaging_product: "whatsapp";
345
+ /** @enum {string} */
346
+ recipient_type?: "individual";
347
+ to: string;
348
+ /** @enum {string} */
349
+ type: "document";
350
+ document: {
351
+ /** Format: uri */
352
+ link?: string;
353
+ id?: string;
354
+ caption?: string;
355
+ filename?: string;
356
+ };
357
+ } | {
358
+ /** @enum {string} */
359
+ messaging_product: "whatsapp";
360
+ /** @enum {string} */
361
+ recipient_type?: "individual";
362
+ to: string;
363
+ /** @enum {string} */
364
+ type: "video";
365
+ video: {
366
+ /** Format: uri */
367
+ link?: string;
368
+ id?: string;
369
+ caption?: string;
370
+ filename?: string;
371
+ };
372
+ } | {
373
+ /** @enum {string} */
374
+ messaging_product: "whatsapp";
375
+ /** @enum {string} */
376
+ recipient_type?: "individual";
377
+ to: string;
378
+ /** @enum {string} */
379
+ type: "audio";
380
+ audio: {
381
+ /** Format: uri */
382
+ link?: string;
383
+ id?: string;
384
+ caption?: string;
385
+ filename?: string;
386
+ };
387
+ } | {
388
+ /** @enum {string} */
389
+ messaging_product: "whatsapp";
390
+ /** @enum {string} */
391
+ recipient_type?: "individual";
392
+ to: string;
393
+ /** @enum {string} */
394
+ type: "template";
395
+ template: {
396
+ name: string;
397
+ language: string | {
398
+ code: string;
399
+ policy?: string;
400
+ };
401
+ components?: ({
402
+ /** @enum {string} */
403
+ type: "header" | "body" | "button";
404
+ /** @enum {string} */
405
+ sub_type?: "url" | "quick_reply" | "copy_code" | "flow";
406
+ index?: number;
407
+ parameters?: {
408
+ [key: string]: unknown;
409
+ }[];
410
+ } & {
411
+ [key: string]: unknown;
412
+ })[];
413
+ };
414
+ } | {
415
+ /** @enum {string} */
416
+ messaging_product: "whatsapp";
417
+ /** @enum {string} */
418
+ recipient_type?: "individual";
419
+ to: string;
420
+ /** @enum {string} */
421
+ type: "interactive";
422
+ interactive: {
423
+ /** @enum {string} */
424
+ type: "cta_url";
425
+ body: {
426
+ text: string;
427
+ };
428
+ action: {
429
+ /** @enum {string} */
430
+ name: "cta_url";
431
+ parameters: {
432
+ display_text: string;
433
+ /** Format: uri */
434
+ url: string;
435
+ };
436
+ };
437
+ } | {
438
+ /** @enum {string} */
439
+ type: "list";
440
+ header?: {
441
+ /** @enum {string} */
442
+ type: "text";
443
+ text: string;
444
+ };
445
+ body: {
446
+ text: string;
447
+ };
448
+ footer?: {
449
+ text: string;
450
+ };
451
+ action: {
452
+ button: string;
453
+ sections: {
454
+ title?: string;
455
+ rows: {
456
+ id: string;
457
+ title: string;
458
+ description?: string;
459
+ }[];
460
+ }[];
461
+ };
462
+ } | {
463
+ /** @enum {string} */
464
+ type: "carousel";
465
+ body: {
466
+ text: string;
467
+ };
468
+ action: {
469
+ cards: {
470
+ card_index?: number;
471
+ /** @enum {string} */
472
+ type?: "cta_url";
473
+ header: {
474
+ /** @enum {string} */
475
+ type: "image";
476
+ image: {
477
+ /** Format: uri */
478
+ link: string;
479
+ };
480
+ } | {
481
+ /** @enum {string} */
482
+ type: "video";
483
+ video: {
484
+ /** Format: uri */
485
+ link: string;
486
+ };
487
+ };
488
+ body?: {
489
+ text: string;
490
+ };
491
+ action: {
492
+ /** @enum {string} */
493
+ name: "cta_url";
494
+ parameters: {
495
+ display_text: string;
496
+ /** Format: uri */
497
+ url: string;
498
+ };
499
+ } | {
500
+ buttons: {
501
+ /** @enum {string} */
502
+ type: "quick_reply";
503
+ quick_reply: {
504
+ id: string;
505
+ title: string;
506
+ };
507
+ }[];
508
+ };
509
+ }[];
510
+ };
511
+ } | {
512
+ /** @enum {string} */
513
+ type: "reply_buttons";
514
+ header?: {
515
+ /** @enum {string} */
516
+ type: "text";
517
+ text: string;
518
+ } | {
519
+ /** @enum {string} */
520
+ type: "image";
521
+ image: {
522
+ /** Format: uri */
523
+ link: string;
524
+ };
525
+ } | {
526
+ /** @enum {string} */
527
+ type: "video";
528
+ video: {
529
+ /** Format: uri */
530
+ link: string;
531
+ };
532
+ } | {
533
+ /** @enum {string} */
534
+ type: "document";
535
+ document: {
536
+ /** Format: uri */
537
+ link: string;
538
+ };
539
+ };
540
+ body: {
541
+ text: string;
542
+ };
543
+ footer?: {
544
+ text: string;
545
+ };
546
+ action: {
547
+ buttons: {
548
+ /** @enum {string} */
549
+ type: "reply";
550
+ reply: {
551
+ id: string;
552
+ title: string;
553
+ };
554
+ }[];
555
+ };
556
+ };
557
+ } | {
558
+ /** @enum {string} */
559
+ messaging_product: "whatsapp";
560
+ /** @enum {string} */
561
+ status: "read";
562
+ /**
563
+ * @description Meta WhatsApp message id (wamid) of the inbound message to mark as read. Get it from the inbound webhook payload — NOT a Kirim `msg_*` external id.
564
+ * @example wamid.HBgNNjI4MTIzNDU2Nzg5FQIAEhggMUE5MDM1QzVDMUYxQTAyRkVCNzZDQjVDMjFFRDQzNTUA
565
+ */
566
+ message_id: string;
567
+ /** @description Optional. When present, Meta also shows a typing indicator to the recipient that auto-dismisses on response or after ~25 seconds. Only include if you intend to respond — leaving the indicator hanging produces a poor UX. */
568
+ typing_indicator?: {
569
+ /** @enum {string} */
570
+ type: "text";
571
+ };
572
+ };
573
+ };
574
+ };
575
+ responses: {
576
+ /** @description Message accepted for delivery, or read receipt sent. */
577
+ 200: {
578
+ headers: {
579
+ [name: string]: unknown;
580
+ };
581
+ content: {
582
+ "application/json": components["schemas"]["SendMessageResponse"];
583
+ };
584
+ };
585
+ /** @description Validation failure */
586
+ 400: {
587
+ headers: {
588
+ [name: string]: unknown;
589
+ };
590
+ content: {
591
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
592
+ };
593
+ };
594
+ /** @description Authentication failure */
595
+ 401: {
596
+ headers: {
597
+ [name: string]: unknown;
598
+ };
599
+ content: {
600
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
601
+ };
602
+ };
603
+ /** @description Resource not found */
604
+ 404: {
605
+ headers: {
606
+ [name: string]: unknown;
607
+ };
608
+ content: {
609
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
610
+ };
611
+ };
612
+ /** @description Semantic failure (e.g. idempotency key reuse) */
613
+ 422: {
614
+ headers: {
615
+ [name: string]: unknown;
616
+ };
617
+ content: {
618
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
619
+ };
620
+ };
621
+ /** @description Rate limit exceeded */
622
+ 429: {
623
+ headers: {
624
+ [name: string]: unknown;
625
+ };
626
+ content: {
627
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
628
+ };
629
+ };
630
+ /** @description Upstream WhatsApp error */
631
+ 502: {
632
+ headers: {
633
+ [name: string]: unknown;
634
+ };
635
+ content: {
636
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
637
+ };
638
+ };
639
+ /** @description Service unavailable */
640
+ 503: {
641
+ headers: {
642
+ [name: string]: unknown;
643
+ };
644
+ content: {
645
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
646
+ };
647
+ };
648
+ };
649
+ };
650
+ delete?: never;
651
+ options?: never;
652
+ head?: never;
653
+ patch?: never;
654
+ trace?: never;
655
+ };
656
+ "/{phone_number_id}/messages/{id}": {
657
+ parameters: {
658
+ query?: never;
659
+ header?: never;
660
+ path?: never;
661
+ cookie?: never;
662
+ };
663
+ /** Fetch a sent message by id */
664
+ get: {
665
+ parameters: {
666
+ query?: never;
667
+ header?: never;
668
+ path: {
669
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
670
+ phone_number_id: string;
671
+ id: string;
672
+ };
673
+ cookie?: never;
674
+ };
675
+ requestBody?: never;
676
+ responses: {
677
+ /** @description Message resource */
678
+ 200: {
679
+ headers: {
680
+ [name: string]: unknown;
681
+ };
682
+ content: {
683
+ "application/json": components["schemas"]["GetMessageResponse"];
684
+ };
685
+ };
686
+ /** @description Validation failure */
687
+ 400: {
688
+ headers: {
689
+ [name: string]: unknown;
690
+ };
691
+ content: {
692
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
693
+ };
694
+ };
695
+ /** @description Authentication failure */
696
+ 401: {
697
+ headers: {
698
+ [name: string]: unknown;
699
+ };
700
+ content: {
701
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
702
+ };
703
+ };
704
+ /** @description Resource not found */
705
+ 404: {
706
+ headers: {
707
+ [name: string]: unknown;
708
+ };
709
+ content: {
710
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
711
+ };
712
+ };
713
+ /** @description Semantic failure (e.g. idempotency key reuse) */
714
+ 422: {
715
+ headers: {
716
+ [name: string]: unknown;
717
+ };
718
+ content: {
719
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
720
+ };
721
+ };
722
+ /** @description Rate limit exceeded */
723
+ 429: {
724
+ headers: {
725
+ [name: string]: unknown;
726
+ };
727
+ content: {
728
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
729
+ };
730
+ };
731
+ /** @description Internal server error */
732
+ 500: {
733
+ headers: {
734
+ [name: string]: unknown;
735
+ };
736
+ content: {
737
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
738
+ };
739
+ };
740
+ };
741
+ };
742
+ put?: never;
743
+ post?: never;
744
+ delete?: never;
745
+ options?: never;
746
+ head?: never;
747
+ patch?: never;
748
+ trace?: never;
749
+ };
750
+ "/{phone_number_id}/templates": {
751
+ parameters: {
752
+ query?: never;
753
+ header?: never;
754
+ path?: never;
755
+ cookie?: never;
756
+ };
757
+ /**
758
+ * List approved templates
759
+ * @description List templates synced from Meta for the WhatsApp account identified by `phone_number_id`. Default filter is `status=approved`.
760
+ */
761
+ get: {
762
+ parameters: {
763
+ query?: {
764
+ status?: "approved" | "pending" | "rejected" | "all";
765
+ language?: string;
766
+ limit?: string;
767
+ cursor?: string;
768
+ };
769
+ header?: never;
770
+ path: {
771
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
772
+ phone_number_id: string;
773
+ };
774
+ cookie?: never;
775
+ };
776
+ requestBody?: never;
777
+ responses: {
778
+ /** @description Template list */
779
+ 200: {
780
+ headers: {
781
+ [name: string]: unknown;
782
+ };
783
+ content: {
784
+ "application/json": components["schemas"]["ListTemplatesResponse"];
785
+ };
786
+ };
787
+ /** @description Validation failure */
788
+ 400: {
789
+ headers: {
790
+ [name: string]: unknown;
791
+ };
792
+ content: {
793
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
794
+ };
795
+ };
796
+ /** @description Authentication failure */
797
+ 401: {
798
+ headers: {
799
+ [name: string]: unknown;
800
+ };
801
+ content: {
802
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
803
+ };
804
+ };
805
+ /** @description Resource not found */
806
+ 404: {
807
+ headers: {
808
+ [name: string]: unknown;
809
+ };
810
+ content: {
811
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
812
+ };
813
+ };
814
+ /** @description Semantic failure (e.g. idempotency key reuse) */
815
+ 422: {
816
+ headers: {
817
+ [name: string]: unknown;
818
+ };
819
+ content: {
820
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
821
+ };
822
+ };
823
+ /** @description Rate limit exceeded */
824
+ 429: {
825
+ headers: {
826
+ [name: string]: unknown;
827
+ };
828
+ content: {
829
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
830
+ };
831
+ };
832
+ /** @description Internal server error */
833
+ 500: {
834
+ headers: {
835
+ [name: string]: unknown;
836
+ };
837
+ content: {
838
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
839
+ };
840
+ };
841
+ };
842
+ };
843
+ put?: never;
844
+ post?: never;
845
+ delete?: never;
846
+ options?: never;
847
+ head?: never;
848
+ patch?: never;
849
+ trace?: never;
850
+ };
851
+ "/{phone_number_id}/templates/{name}": {
852
+ parameters: {
853
+ query?: never;
854
+ header?: never;
855
+ path?: never;
856
+ cookie?: never;
857
+ };
858
+ /** Fetch a single template by name */
859
+ get: {
860
+ parameters: {
861
+ query?: {
862
+ language?: string;
863
+ };
864
+ header?: never;
865
+ path: {
866
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
867
+ phone_number_id: string;
868
+ name: string;
869
+ };
870
+ cookie?: never;
871
+ };
872
+ requestBody?: never;
873
+ responses: {
874
+ /** @description Template resource */
875
+ 200: {
876
+ headers: {
877
+ [name: string]: unknown;
878
+ };
879
+ content: {
880
+ "application/json": components["schemas"]["GetTemplateResponse"];
881
+ };
882
+ };
883
+ /** @description Validation failure */
884
+ 400: {
885
+ headers: {
886
+ [name: string]: unknown;
887
+ };
888
+ content: {
889
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
890
+ };
891
+ };
892
+ /** @description Authentication failure */
893
+ 401: {
894
+ headers: {
895
+ [name: string]: unknown;
896
+ };
897
+ content: {
898
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
899
+ };
900
+ };
901
+ /** @description Resource not found */
902
+ 404: {
903
+ headers: {
904
+ [name: string]: unknown;
905
+ };
906
+ content: {
907
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
908
+ };
909
+ };
910
+ /** @description Semantic failure (e.g. idempotency key reuse) */
911
+ 422: {
912
+ headers: {
913
+ [name: string]: unknown;
914
+ };
915
+ content: {
916
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
917
+ };
918
+ };
919
+ /** @description Rate limit exceeded */
920
+ 429: {
921
+ headers: {
922
+ [name: string]: unknown;
923
+ };
924
+ content: {
925
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
926
+ };
927
+ };
928
+ /** @description Internal server error */
929
+ 500: {
930
+ headers: {
931
+ [name: string]: unknown;
932
+ };
933
+ content: {
934
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
935
+ };
936
+ };
937
+ };
938
+ };
939
+ put?: never;
940
+ post?: never;
941
+ delete?: never;
942
+ options?: never;
943
+ head?: never;
944
+ patch?: never;
945
+ trace?: never;
946
+ };
947
+ "/webhook_subscriptions": {
948
+ parameters: {
949
+ query?: never;
950
+ header?: never;
951
+ path?: never;
952
+ cookie?: never;
953
+ };
954
+ /** List webhook subscriptions */
955
+ get: {
956
+ parameters: {
957
+ query?: {
958
+ status?: "active" | "paused" | "disabled" | "all";
959
+ limit?: string;
960
+ cursor?: string;
961
+ };
962
+ header?: never;
963
+ path?: never;
964
+ cookie?: never;
965
+ };
966
+ requestBody?: never;
967
+ responses: {
968
+ /** @description Subscription list */
969
+ 200: {
970
+ headers: {
971
+ [name: string]: unknown;
972
+ };
973
+ content: {
974
+ "application/json": components["schemas"]["ListWebhookSubscriptionsResponse"];
975
+ };
976
+ };
977
+ /** @description Validation failure */
978
+ 400: {
979
+ headers: {
980
+ [name: string]: unknown;
981
+ };
982
+ content: {
983
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
984
+ };
985
+ };
986
+ /** @description Authentication failure */
987
+ 401: {
988
+ headers: {
989
+ [name: string]: unknown;
990
+ };
991
+ content: {
992
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
993
+ };
994
+ };
995
+ /** @description Rate limit exceeded */
996
+ 429: {
997
+ headers: {
998
+ [name: string]: unknown;
999
+ };
1000
+ content: {
1001
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1002
+ };
1003
+ };
1004
+ /** @description Internal server error */
1005
+ 500: {
1006
+ headers: {
1007
+ [name: string]: unknown;
1008
+ };
1009
+ content: {
1010
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1011
+ };
1012
+ };
1013
+ };
1014
+ };
1015
+ put?: never;
1016
+ /**
1017
+ * Create a webhook subscription
1018
+ * @description Create a webhook subscription. The response carries `initial_secret` ONCE — store it server-side immediately; Kirimdev cannot show it again.
1019
+ */
1020
+ post: {
1021
+ parameters: {
1022
+ query?: never;
1023
+ header?: never;
1024
+ path?: never;
1025
+ cookie?: never;
1026
+ };
1027
+ requestBody?: {
1028
+ content: {
1029
+ "application/json": {
1030
+ /** Format: uri */
1031
+ url: string;
1032
+ description?: string;
1033
+ events: ("message.received" | "message.status" | "conversation.assigned" | "conversation.closed" | "contact.created" | "contact.updated")[];
1034
+ };
1035
+ };
1036
+ };
1037
+ responses: {
1038
+ /** @description Created */
1039
+ 200: {
1040
+ headers: {
1041
+ [name: string]: unknown;
1042
+ };
1043
+ content: {
1044
+ "application/json": components["schemas"]["CreateWebhookSubscriptionResponse"];
1045
+ };
1046
+ };
1047
+ /** @description Validation failure */
1048
+ 400: {
1049
+ headers: {
1050
+ [name: string]: unknown;
1051
+ };
1052
+ content: {
1053
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1054
+ };
1055
+ };
1056
+ /** @description Authentication failure */
1057
+ 401: {
1058
+ headers: {
1059
+ [name: string]: unknown;
1060
+ };
1061
+ content: {
1062
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1063
+ };
1064
+ };
1065
+ /** @description Rate limit exceeded */
1066
+ 429: {
1067
+ headers: {
1068
+ [name: string]: unknown;
1069
+ };
1070
+ content: {
1071
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1072
+ };
1073
+ };
1074
+ /** @description Internal server error */
1075
+ 500: {
1076
+ headers: {
1077
+ [name: string]: unknown;
1078
+ };
1079
+ content: {
1080
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1081
+ };
1082
+ };
1083
+ /** @description Service unavailable */
1084
+ 503: {
1085
+ headers: {
1086
+ [name: string]: unknown;
1087
+ };
1088
+ content: {
1089
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1090
+ };
1091
+ };
1092
+ };
1093
+ };
1094
+ delete?: never;
1095
+ options?: never;
1096
+ head?: never;
1097
+ patch?: never;
1098
+ trace?: never;
1099
+ };
1100
+ "/webhook_subscriptions/{id}": {
1101
+ parameters: {
1102
+ query?: never;
1103
+ header?: never;
1104
+ path?: never;
1105
+ cookie?: never;
1106
+ };
1107
+ /** Fetch one webhook subscription */
1108
+ get: {
1109
+ parameters: {
1110
+ query?: never;
1111
+ header?: never;
1112
+ path: {
1113
+ id: string;
1114
+ };
1115
+ cookie?: never;
1116
+ };
1117
+ requestBody?: never;
1118
+ responses: {
1119
+ /** @description Subscription resource */
1120
+ 200: {
1121
+ headers: {
1122
+ [name: string]: unknown;
1123
+ };
1124
+ content: {
1125
+ "application/json": components["schemas"]["GetWebhookSubscriptionResponse"];
1126
+ };
1127
+ };
1128
+ /** @description Validation failure */
1129
+ 400: {
1130
+ headers: {
1131
+ [name: string]: unknown;
1132
+ };
1133
+ content: {
1134
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1135
+ };
1136
+ };
1137
+ /** @description Authentication failure */
1138
+ 401: {
1139
+ headers: {
1140
+ [name: string]: unknown;
1141
+ };
1142
+ content: {
1143
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1144
+ };
1145
+ };
1146
+ /** @description Resource not found */
1147
+ 404: {
1148
+ headers: {
1149
+ [name: string]: unknown;
1150
+ };
1151
+ content: {
1152
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1153
+ };
1154
+ };
1155
+ /** @description Rate limit exceeded */
1156
+ 429: {
1157
+ headers: {
1158
+ [name: string]: unknown;
1159
+ };
1160
+ content: {
1161
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1162
+ };
1163
+ };
1164
+ /** @description Internal server error */
1165
+ 500: {
1166
+ headers: {
1167
+ [name: string]: unknown;
1168
+ };
1169
+ content: {
1170
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1171
+ };
1172
+ };
1173
+ };
1174
+ };
1175
+ put?: never;
1176
+ post?: never;
1177
+ /** Delete a webhook subscription */
1178
+ delete: {
1179
+ parameters: {
1180
+ query?: never;
1181
+ header?: never;
1182
+ path: {
1183
+ id: string;
1184
+ };
1185
+ cookie?: never;
1186
+ };
1187
+ requestBody?: never;
1188
+ responses: {
1189
+ /** @description Deleted */
1190
+ 200: {
1191
+ headers: {
1192
+ [name: string]: unknown;
1193
+ };
1194
+ content: {
1195
+ "application/json": components["schemas"]["DeleteWebhookSubscriptionResponse"];
1196
+ };
1197
+ };
1198
+ /** @description Validation failure */
1199
+ 400: {
1200
+ headers: {
1201
+ [name: string]: unknown;
1202
+ };
1203
+ content: {
1204
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1205
+ };
1206
+ };
1207
+ /** @description Authentication failure */
1208
+ 401: {
1209
+ headers: {
1210
+ [name: string]: unknown;
1211
+ };
1212
+ content: {
1213
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1214
+ };
1215
+ };
1216
+ /** @description Resource not found */
1217
+ 404: {
1218
+ headers: {
1219
+ [name: string]: unknown;
1220
+ };
1221
+ content: {
1222
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1223
+ };
1224
+ };
1225
+ /** @description Rate limit exceeded */
1226
+ 429: {
1227
+ headers: {
1228
+ [name: string]: unknown;
1229
+ };
1230
+ content: {
1231
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1232
+ };
1233
+ };
1234
+ /** @description Internal server error */
1235
+ 500: {
1236
+ headers: {
1237
+ [name: string]: unknown;
1238
+ };
1239
+ content: {
1240
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1241
+ };
1242
+ };
1243
+ };
1244
+ };
1245
+ options?: never;
1246
+ head?: never;
1247
+ /**
1248
+ * Update a webhook subscription
1249
+ * @description Toggle status (active/paused), update URL/events/description.
1250
+ */
1251
+ patch: {
1252
+ parameters: {
1253
+ query?: never;
1254
+ header?: never;
1255
+ path: {
1256
+ id: string;
1257
+ };
1258
+ cookie?: never;
1259
+ };
1260
+ requestBody?: {
1261
+ content: {
1262
+ "application/json": {
1263
+ /** Format: uri */
1264
+ url?: string;
1265
+ description?: string | null;
1266
+ events?: ("message.received" | "message.status" | "conversation.assigned" | "conversation.closed" | "contact.created" | "contact.updated")[];
1267
+ /** @enum {string} */
1268
+ status?: "active" | "paused";
1269
+ };
1270
+ };
1271
+ };
1272
+ responses: {
1273
+ /** @description Updated subscription */
1274
+ 200: {
1275
+ headers: {
1276
+ [name: string]: unknown;
1277
+ };
1278
+ content: {
1279
+ "application/json": components["schemas"]["UpdateWebhookSubscriptionResponse"];
1280
+ };
1281
+ };
1282
+ /** @description Validation failure */
1283
+ 400: {
1284
+ headers: {
1285
+ [name: string]: unknown;
1286
+ };
1287
+ content: {
1288
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1289
+ };
1290
+ };
1291
+ /** @description Authentication failure */
1292
+ 401: {
1293
+ headers: {
1294
+ [name: string]: unknown;
1295
+ };
1296
+ content: {
1297
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1298
+ };
1299
+ };
1300
+ /** @description Resource not found */
1301
+ 404: {
1302
+ headers: {
1303
+ [name: string]: unknown;
1304
+ };
1305
+ content: {
1306
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1307
+ };
1308
+ };
1309
+ /** @description Rate limit exceeded */
1310
+ 429: {
1311
+ headers: {
1312
+ [name: string]: unknown;
1313
+ };
1314
+ content: {
1315
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1316
+ };
1317
+ };
1318
+ /** @description Internal server error */
1319
+ 500: {
1320
+ headers: {
1321
+ [name: string]: unknown;
1322
+ };
1323
+ content: {
1324
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1325
+ };
1326
+ };
1327
+ };
1328
+ };
1329
+ trace?: never;
1330
+ };
1331
+ "/webhook_subscriptions/{id}/secrets": {
1332
+ parameters: {
1333
+ query?: never;
1334
+ header?: never;
1335
+ path?: never;
1336
+ cookie?: never;
1337
+ };
1338
+ get?: never;
1339
+ put?: never;
1340
+ /**
1341
+ * Add a new signing secret (rotation)
1342
+ * @description Issue a new signing secret with the given expiry. During the overlap window every active secret is used to sign outbound deliveries; subscribers verify against any of them.
1343
+ */
1344
+ post: {
1345
+ parameters: {
1346
+ query?: never;
1347
+ header?: never;
1348
+ path: {
1349
+ id: string;
1350
+ };
1351
+ cookie?: never;
1352
+ };
1353
+ requestBody?: {
1354
+ content: {
1355
+ "application/json": {
1356
+ expires_in_hours?: number;
1357
+ };
1358
+ };
1359
+ };
1360
+ responses: {
1361
+ /** @description New secret created */
1362
+ 200: {
1363
+ headers: {
1364
+ [name: string]: unknown;
1365
+ };
1366
+ content: {
1367
+ "application/json": components["schemas"]["AddWebhookSecretResponse"];
1368
+ };
1369
+ };
1370
+ /** @description Validation failure */
1371
+ 400: {
1372
+ headers: {
1373
+ [name: string]: unknown;
1374
+ };
1375
+ content: {
1376
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1377
+ };
1378
+ };
1379
+ /** @description Authentication failure */
1380
+ 401: {
1381
+ headers: {
1382
+ [name: string]: unknown;
1383
+ };
1384
+ content: {
1385
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1386
+ };
1387
+ };
1388
+ /** @description Resource not found */
1389
+ 404: {
1390
+ headers: {
1391
+ [name: string]: unknown;
1392
+ };
1393
+ content: {
1394
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1395
+ };
1396
+ };
1397
+ /** @description Conflict (e.g. webhook subscription disabled) */
1398
+ 409: {
1399
+ headers: {
1400
+ [name: string]: unknown;
1401
+ };
1402
+ content: {
1403
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1404
+ };
1405
+ };
1406
+ /** @description Rate limit exceeded */
1407
+ 429: {
1408
+ headers: {
1409
+ [name: string]: unknown;
1410
+ };
1411
+ content: {
1412
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1413
+ };
1414
+ };
1415
+ /** @description Internal server error */
1416
+ 500: {
1417
+ headers: {
1418
+ [name: string]: unknown;
1419
+ };
1420
+ content: {
1421
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1422
+ };
1423
+ };
1424
+ /** @description Service unavailable */
1425
+ 503: {
1426
+ headers: {
1427
+ [name: string]: unknown;
1428
+ };
1429
+ content: {
1430
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1431
+ };
1432
+ };
1433
+ };
1434
+ };
1435
+ delete?: never;
1436
+ options?: never;
1437
+ head?: never;
1438
+ patch?: never;
1439
+ trace?: never;
1440
+ };
1441
+ "/webhook_subscriptions/{id}/secrets/{secret_id}": {
1442
+ parameters: {
1443
+ query?: never;
1444
+ header?: never;
1445
+ path?: never;
1446
+ cookie?: never;
1447
+ };
1448
+ get?: never;
1449
+ put?: never;
1450
+ post?: never;
1451
+ /** Revoke a signing secret */
1452
+ delete: {
1453
+ parameters: {
1454
+ query?: never;
1455
+ header?: never;
1456
+ path: {
1457
+ id: string;
1458
+ secret_id: string;
1459
+ };
1460
+ cookie?: never;
1461
+ };
1462
+ requestBody?: never;
1463
+ responses: {
1464
+ /** @description Secret revoked */
1465
+ 200: {
1466
+ headers: {
1467
+ [name: string]: unknown;
1468
+ };
1469
+ content: {
1470
+ "application/json": components["schemas"]["DeleteWebhookSecretResponse"];
1471
+ };
1472
+ };
1473
+ /** @description Validation failure */
1474
+ 400: {
1475
+ headers: {
1476
+ [name: string]: unknown;
1477
+ };
1478
+ content: {
1479
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1480
+ };
1481
+ };
1482
+ /** @description Authentication failure */
1483
+ 401: {
1484
+ headers: {
1485
+ [name: string]: unknown;
1486
+ };
1487
+ content: {
1488
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1489
+ };
1490
+ };
1491
+ /** @description Resource not found */
1492
+ 404: {
1493
+ headers: {
1494
+ [name: string]: unknown;
1495
+ };
1496
+ content: {
1497
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1498
+ };
1499
+ };
1500
+ /** @description Semantic failure (e.g. idempotency key reuse) */
1501
+ 422: {
1502
+ headers: {
1503
+ [name: string]: unknown;
1504
+ };
1505
+ content: {
1506
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1507
+ };
1508
+ };
1509
+ /** @description Rate limit exceeded */
1510
+ 429: {
1511
+ headers: {
1512
+ [name: string]: unknown;
1513
+ };
1514
+ content: {
1515
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1516
+ };
1517
+ };
1518
+ /** @description Internal server error */
1519
+ 500: {
1520
+ headers: {
1521
+ [name: string]: unknown;
1522
+ };
1523
+ content: {
1524
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1525
+ };
1526
+ };
1527
+ };
1528
+ };
1529
+ options?: never;
1530
+ head?: never;
1531
+ patch?: never;
1532
+ trace?: never;
1533
+ };
1534
+ "/webhook_deliveries": {
1535
+ parameters: {
1536
+ query?: never;
1537
+ header?: never;
1538
+ path?: never;
1539
+ cookie?: never;
1540
+ };
1541
+ /** List webhook deliveries */
1542
+ get: {
1543
+ parameters: {
1544
+ query?: {
1545
+ subscription_id?: string;
1546
+ status?: "pending" | "succeeded" | "failed" | "dead";
1547
+ event_type?: string;
1548
+ created_after?: string;
1549
+ created_before?: string;
1550
+ limit?: string;
1551
+ cursor?: string;
1552
+ };
1553
+ header?: never;
1554
+ path?: never;
1555
+ cookie?: never;
1556
+ };
1557
+ requestBody?: never;
1558
+ responses: {
1559
+ /** @description Delivery list */
1560
+ 200: {
1561
+ headers: {
1562
+ [name: string]: unknown;
1563
+ };
1564
+ content: {
1565
+ "application/json": components["schemas"]["ListWebhookDeliveriesResponse"];
1566
+ };
1567
+ };
1568
+ /** @description Validation failure */
1569
+ 400: {
1570
+ headers: {
1571
+ [name: string]: unknown;
1572
+ };
1573
+ content: {
1574
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1575
+ };
1576
+ };
1577
+ /** @description Authentication failure */
1578
+ 401: {
1579
+ headers: {
1580
+ [name: string]: unknown;
1581
+ };
1582
+ content: {
1583
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1584
+ };
1585
+ };
1586
+ /** @description Rate limit exceeded */
1587
+ 429: {
1588
+ headers: {
1589
+ [name: string]: unknown;
1590
+ };
1591
+ content: {
1592
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1593
+ };
1594
+ };
1595
+ /** @description Internal server error */
1596
+ 500: {
1597
+ headers: {
1598
+ [name: string]: unknown;
1599
+ };
1600
+ content: {
1601
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1602
+ };
1603
+ };
1604
+ };
1605
+ };
1606
+ put?: never;
1607
+ post?: never;
1608
+ delete?: never;
1609
+ options?: never;
1610
+ head?: never;
1611
+ patch?: never;
1612
+ trace?: never;
1613
+ };
1614
+ "/webhook_deliveries/{id}": {
1615
+ parameters: {
1616
+ query?: never;
1617
+ header?: never;
1618
+ path?: never;
1619
+ cookie?: never;
1620
+ };
1621
+ /** Fetch one delivery (with full payload) */
1622
+ get: {
1623
+ parameters: {
1624
+ query?: never;
1625
+ header?: never;
1626
+ path: {
1627
+ id: string;
1628
+ };
1629
+ cookie?: never;
1630
+ };
1631
+ requestBody?: never;
1632
+ responses: {
1633
+ /** @description Delivery resource */
1634
+ 200: {
1635
+ headers: {
1636
+ [name: string]: unknown;
1637
+ };
1638
+ content: {
1639
+ "application/json": components["schemas"]["GetWebhookDeliveryResponse"];
1640
+ };
1641
+ };
1642
+ /** @description Validation failure */
1643
+ 400: {
1644
+ headers: {
1645
+ [name: string]: unknown;
1646
+ };
1647
+ content: {
1648
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1649
+ };
1650
+ };
1651
+ /** @description Authentication failure */
1652
+ 401: {
1653
+ headers: {
1654
+ [name: string]: unknown;
1655
+ };
1656
+ content: {
1657
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1658
+ };
1659
+ };
1660
+ /** @description Resource not found */
1661
+ 404: {
1662
+ headers: {
1663
+ [name: string]: unknown;
1664
+ };
1665
+ content: {
1666
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1667
+ };
1668
+ };
1669
+ /** @description Rate limit exceeded */
1670
+ 429: {
1671
+ headers: {
1672
+ [name: string]: unknown;
1673
+ };
1674
+ content: {
1675
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1676
+ };
1677
+ };
1678
+ /** @description Internal server error */
1679
+ 500: {
1680
+ headers: {
1681
+ [name: string]: unknown;
1682
+ };
1683
+ content: {
1684
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1685
+ };
1686
+ };
1687
+ };
1688
+ };
1689
+ put?: never;
1690
+ post?: never;
1691
+ delete?: never;
1692
+ options?: never;
1693
+ head?: never;
1694
+ patch?: never;
1695
+ trace?: never;
1696
+ };
1697
+ "/webhook_deliveries/{id}/replay": {
1698
+ parameters: {
1699
+ query?: never;
1700
+ header?: never;
1701
+ path?: never;
1702
+ cookie?: never;
1703
+ };
1704
+ get?: never;
1705
+ put?: never;
1706
+ /**
1707
+ * Replay a single delivery
1708
+ * @description Re-fire a single delivery against the original subscription URL. Creates a fresh delivery row; the original stays for audit.
1709
+ */
1710
+ post: {
1711
+ parameters: {
1712
+ query?: never;
1713
+ header?: never;
1714
+ path: {
1715
+ id: string;
1716
+ };
1717
+ cookie?: never;
1718
+ };
1719
+ requestBody?: never;
1720
+ responses: {
1721
+ /** @description Replay enqueued */
1722
+ 200: {
1723
+ headers: {
1724
+ [name: string]: unknown;
1725
+ };
1726
+ content: {
1727
+ "application/json": components["schemas"]["ReplayWebhookDeliveryResponse"];
1728
+ };
1729
+ };
1730
+ /** @description Validation failure */
1731
+ 400: {
1732
+ headers: {
1733
+ [name: string]: unknown;
1734
+ };
1735
+ content: {
1736
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1737
+ };
1738
+ };
1739
+ /** @description Authentication failure */
1740
+ 401: {
1741
+ headers: {
1742
+ [name: string]: unknown;
1743
+ };
1744
+ content: {
1745
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1746
+ };
1747
+ };
1748
+ /** @description Resource not found */
1749
+ 404: {
1750
+ headers: {
1751
+ [name: string]: unknown;
1752
+ };
1753
+ content: {
1754
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1755
+ };
1756
+ };
1757
+ /** @description Conflict (e.g. webhook subscription disabled) */
1758
+ 409: {
1759
+ headers: {
1760
+ [name: string]: unknown;
1761
+ };
1762
+ content: {
1763
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1764
+ };
1765
+ };
1766
+ /** @description Rate limit exceeded */
1767
+ 429: {
1768
+ headers: {
1769
+ [name: string]: unknown;
1770
+ };
1771
+ content: {
1772
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1773
+ };
1774
+ };
1775
+ /** @description Internal server error */
1776
+ 500: {
1777
+ headers: {
1778
+ [name: string]: unknown;
1779
+ };
1780
+ content: {
1781
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1782
+ };
1783
+ };
1784
+ };
1785
+ };
1786
+ delete?: never;
1787
+ options?: never;
1788
+ head?: never;
1789
+ patch?: never;
1790
+ trace?: never;
1791
+ };
1792
+ "/webhook_deliveries/bulk_replay": {
1793
+ parameters: {
1794
+ query?: never;
1795
+ header?: never;
1796
+ path?: never;
1797
+ cookie?: never;
1798
+ };
1799
+ get?: never;
1800
+ put?: never;
1801
+ /**
1802
+ * Replay deliveries in bulk (DLQ)
1803
+ * @description Replay every delivery for a subscription matching the filter, capped at 1000 per request. Paginate via `created_after` / `created_before` for larger backfills.
1804
+ */
1805
+ post: {
1806
+ parameters: {
1807
+ query?: never;
1808
+ header?: never;
1809
+ path?: never;
1810
+ cookie?: never;
1811
+ };
1812
+ requestBody?: {
1813
+ content: {
1814
+ "application/json": {
1815
+ subscription_id: string;
1816
+ /**
1817
+ * @default dead
1818
+ * @enum {string}
1819
+ */
1820
+ status?: "failed" | "dead";
1821
+ event_type?: string;
1822
+ /** Format: date-time */
1823
+ created_after?: string;
1824
+ /** Format: date-time */
1825
+ created_before?: string;
1826
+ };
1827
+ };
1828
+ };
1829
+ responses: {
1830
+ /** @description Bulk replay enqueued */
1831
+ 200: {
1832
+ headers: {
1833
+ [name: string]: unknown;
1834
+ };
1835
+ content: {
1836
+ "application/json": components["schemas"]["BulkReplayResponse"];
1837
+ };
1838
+ };
1839
+ /** @description Validation failure */
1840
+ 400: {
1841
+ headers: {
1842
+ [name: string]: unknown;
1843
+ };
1844
+ content: {
1845
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1846
+ };
1847
+ };
1848
+ /** @description Authentication failure */
1849
+ 401: {
1850
+ headers: {
1851
+ [name: string]: unknown;
1852
+ };
1853
+ content: {
1854
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1855
+ };
1856
+ };
1857
+ /** @description Resource not found */
1858
+ 404: {
1859
+ headers: {
1860
+ [name: string]: unknown;
1861
+ };
1862
+ content: {
1863
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1864
+ };
1865
+ };
1866
+ /** @description Conflict (e.g. webhook subscription disabled) */
1867
+ 409: {
1868
+ headers: {
1869
+ [name: string]: unknown;
1870
+ };
1871
+ content: {
1872
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1873
+ };
1874
+ };
1875
+ /** @description Rate limit exceeded */
1876
+ 429: {
1877
+ headers: {
1878
+ [name: string]: unknown;
1879
+ };
1880
+ content: {
1881
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1882
+ };
1883
+ };
1884
+ /** @description Internal server error */
1885
+ 500: {
1886
+ headers: {
1887
+ [name: string]: unknown;
1888
+ };
1889
+ content: {
1890
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1891
+ };
1892
+ };
1893
+ };
1894
+ };
1895
+ delete?: never;
1896
+ options?: never;
1897
+ head?: never;
1898
+ patch?: never;
1899
+ trace?: never;
1900
+ };
1901
+ "/{phone_number_id}/conversations": {
1902
+ parameters: {
1903
+ query?: never;
1904
+ header?: never;
1905
+ path?: never;
1906
+ cookie?: never;
1907
+ };
1908
+ /**
1909
+ * List conversations
1910
+ * @description List conversations for the WhatsApp account identified by `phone_number_id`. Ordered newest-active first by `last_message_at` (NULLS LAST).
1911
+ */
1912
+ get: {
1913
+ parameters: {
1914
+ query?: {
1915
+ status?: "open" | "resolved" | "pending";
1916
+ contact_id?: string;
1917
+ limit?: string;
1918
+ cursor?: string;
1919
+ };
1920
+ header?: never;
1921
+ path: {
1922
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
1923
+ phone_number_id: string;
1924
+ };
1925
+ cookie?: never;
1926
+ };
1927
+ requestBody?: never;
1928
+ responses: {
1929
+ /** @description Conversation list */
1930
+ 200: {
1931
+ headers: {
1932
+ [name: string]: unknown;
1933
+ };
1934
+ content: {
1935
+ "application/json": components["schemas"]["ListConversationsResponse"];
1936
+ };
1937
+ };
1938
+ /** @description Validation failure */
1939
+ 400: {
1940
+ headers: {
1941
+ [name: string]: unknown;
1942
+ };
1943
+ content: {
1944
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1945
+ };
1946
+ };
1947
+ /** @description Authentication failure */
1948
+ 401: {
1949
+ headers: {
1950
+ [name: string]: unknown;
1951
+ };
1952
+ content: {
1953
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1954
+ };
1955
+ };
1956
+ /** @description Resource not found */
1957
+ 404: {
1958
+ headers: {
1959
+ [name: string]: unknown;
1960
+ };
1961
+ content: {
1962
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1963
+ };
1964
+ };
1965
+ /** @description Semantic failure (e.g. idempotency key reuse) */
1966
+ 422: {
1967
+ headers: {
1968
+ [name: string]: unknown;
1969
+ };
1970
+ content: {
1971
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1972
+ };
1973
+ };
1974
+ /** @description Rate limit exceeded */
1975
+ 429: {
1976
+ headers: {
1977
+ [name: string]: unknown;
1978
+ };
1979
+ content: {
1980
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1981
+ };
1982
+ };
1983
+ /** @description Internal server error */
1984
+ 500: {
1985
+ headers: {
1986
+ [name: string]: unknown;
1987
+ };
1988
+ content: {
1989
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
1990
+ };
1991
+ };
1992
+ };
1993
+ };
1994
+ put?: never;
1995
+ post?: never;
1996
+ delete?: never;
1997
+ options?: never;
1998
+ head?: never;
1999
+ patch?: never;
2000
+ trace?: never;
2001
+ };
2002
+ "/{phone_number_id}/conversations/{id}": {
2003
+ parameters: {
2004
+ query?: never;
2005
+ header?: never;
2006
+ path?: never;
2007
+ cookie?: never;
2008
+ };
2009
+ /** Fetch a conversation by id */
2010
+ get: {
2011
+ parameters: {
2012
+ query?: never;
2013
+ header?: never;
2014
+ path: {
2015
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
2016
+ phone_number_id: string;
2017
+ id: string;
2018
+ };
2019
+ cookie?: never;
2020
+ };
2021
+ requestBody?: never;
2022
+ responses: {
2023
+ /** @description Conversation resource */
2024
+ 200: {
2025
+ headers: {
2026
+ [name: string]: unknown;
2027
+ };
2028
+ content: {
2029
+ "application/json": components["schemas"]["GetConversationResponse"];
2030
+ };
2031
+ };
2032
+ /** @description Validation failure */
2033
+ 400: {
2034
+ headers: {
2035
+ [name: string]: unknown;
2036
+ };
2037
+ content: {
2038
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2039
+ };
2040
+ };
2041
+ /** @description Authentication failure */
2042
+ 401: {
2043
+ headers: {
2044
+ [name: string]: unknown;
2045
+ };
2046
+ content: {
2047
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2048
+ };
2049
+ };
2050
+ /** @description Resource not found */
2051
+ 404: {
2052
+ headers: {
2053
+ [name: string]: unknown;
2054
+ };
2055
+ content: {
2056
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2057
+ };
2058
+ };
2059
+ /** @description Semantic failure (e.g. idempotency key reuse) */
2060
+ 422: {
2061
+ headers: {
2062
+ [name: string]: unknown;
2063
+ };
2064
+ content: {
2065
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2066
+ };
2067
+ };
2068
+ /** @description Rate limit exceeded */
2069
+ 429: {
2070
+ headers: {
2071
+ [name: string]: unknown;
2072
+ };
2073
+ content: {
2074
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2075
+ };
2076
+ };
2077
+ /** @description Internal server error */
2078
+ 500: {
2079
+ headers: {
2080
+ [name: string]: unknown;
2081
+ };
2082
+ content: {
2083
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2084
+ };
2085
+ };
2086
+ };
2087
+ };
2088
+ put?: never;
2089
+ post?: never;
2090
+ delete?: never;
2091
+ options?: never;
2092
+ head?: never;
2093
+ /**
2094
+ * Update a conversation
2095
+ * @description Update status (`open` / `resolved` / `pending`) and/or `assigned_to` (user id, or `null` to clear). At least one field must be present.
2096
+ */
2097
+ patch: {
2098
+ parameters: {
2099
+ query?: never;
2100
+ header?: never;
2101
+ path: {
2102
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
2103
+ phone_number_id: string;
2104
+ id: string;
2105
+ };
2106
+ cookie?: never;
2107
+ };
2108
+ requestBody?: {
2109
+ content: {
2110
+ "application/json": {
2111
+ /** @enum {string} */
2112
+ status?: "open" | "resolved" | "pending";
2113
+ assigned_to?: string | null;
2114
+ };
2115
+ };
2116
+ };
2117
+ responses: {
2118
+ /** @description Updated conversation */
2119
+ 200: {
2120
+ headers: {
2121
+ [name: string]: unknown;
2122
+ };
2123
+ content: {
2124
+ "application/json": components["schemas"]["UpdateConversationResponse"];
2125
+ };
2126
+ };
2127
+ /** @description Validation failure */
2128
+ 400: {
2129
+ headers: {
2130
+ [name: string]: unknown;
2131
+ };
2132
+ content: {
2133
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2134
+ };
2135
+ };
2136
+ /** @description Authentication failure */
2137
+ 401: {
2138
+ headers: {
2139
+ [name: string]: unknown;
2140
+ };
2141
+ content: {
2142
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2143
+ };
2144
+ };
2145
+ /** @description Resource not found */
2146
+ 404: {
2147
+ headers: {
2148
+ [name: string]: unknown;
2149
+ };
2150
+ content: {
2151
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2152
+ };
2153
+ };
2154
+ /** @description Semantic failure (e.g. idempotency key reuse) */
2155
+ 422: {
2156
+ headers: {
2157
+ [name: string]: unknown;
2158
+ };
2159
+ content: {
2160
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2161
+ };
2162
+ };
2163
+ /** @description Rate limit exceeded */
2164
+ 429: {
2165
+ headers: {
2166
+ [name: string]: unknown;
2167
+ };
2168
+ content: {
2169
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2170
+ };
2171
+ };
2172
+ /** @description Internal server error */
2173
+ 500: {
2174
+ headers: {
2175
+ [name: string]: unknown;
2176
+ };
2177
+ content: {
2178
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2179
+ };
2180
+ };
2181
+ };
2182
+ };
2183
+ trace?: never;
2184
+ };
2185
+ "/{phone_number_id}/contacts": {
2186
+ parameters: {
2187
+ query?: never;
2188
+ header?: never;
2189
+ path?: never;
2190
+ cookie?: never;
2191
+ };
2192
+ /**
2193
+ * List contacts
2194
+ * @description List contacts attached to the WhatsApp account identified by `phone_number_id`. Filter by exact `phone` (E.164) or partial `search` (matches name and email).
2195
+ */
2196
+ get: {
2197
+ parameters: {
2198
+ query?: {
2199
+ phone?: string;
2200
+ search?: string;
2201
+ limit?: string;
2202
+ cursor?: string;
2203
+ };
2204
+ header?: never;
2205
+ path: {
2206
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
2207
+ phone_number_id: string;
2208
+ };
2209
+ cookie?: never;
2210
+ };
2211
+ requestBody?: never;
2212
+ responses: {
2213
+ /** @description Contact list */
2214
+ 200: {
2215
+ headers: {
2216
+ [name: string]: unknown;
2217
+ };
2218
+ content: {
2219
+ "application/json": components["schemas"]["ListContactsResponse"];
2220
+ };
2221
+ };
2222
+ /** @description Validation failure */
2223
+ 400: {
2224
+ headers: {
2225
+ [name: string]: unknown;
2226
+ };
2227
+ content: {
2228
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2229
+ };
2230
+ };
2231
+ /** @description Authentication failure */
2232
+ 401: {
2233
+ headers: {
2234
+ [name: string]: unknown;
2235
+ };
2236
+ content: {
2237
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2238
+ };
2239
+ };
2240
+ /** @description Resource not found */
2241
+ 404: {
2242
+ headers: {
2243
+ [name: string]: unknown;
2244
+ };
2245
+ content: {
2246
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2247
+ };
2248
+ };
2249
+ /** @description Semantic failure (e.g. idempotency key reuse) */
2250
+ 422: {
2251
+ headers: {
2252
+ [name: string]: unknown;
2253
+ };
2254
+ content: {
2255
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2256
+ };
2257
+ };
2258
+ /** @description Rate limit exceeded */
2259
+ 429: {
2260
+ headers: {
2261
+ [name: string]: unknown;
2262
+ };
2263
+ content: {
2264
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2265
+ };
2266
+ };
2267
+ /** @description Internal server error */
2268
+ 500: {
2269
+ headers: {
2270
+ [name: string]: unknown;
2271
+ };
2272
+ content: {
2273
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2274
+ };
2275
+ };
2276
+ };
2277
+ };
2278
+ put?: never;
2279
+ /**
2280
+ * Create a contact
2281
+ * @description Create a contact attached to the WhatsApp account identified by `phone_number_id` in the URL path.
2282
+ */
2283
+ post: {
2284
+ parameters: {
2285
+ query?: never;
2286
+ header?: never;
2287
+ path: {
2288
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
2289
+ phone_number_id: string;
2290
+ };
2291
+ cookie?: never;
2292
+ };
2293
+ requestBody?: {
2294
+ content: {
2295
+ "application/json": {
2296
+ phone_number: string;
2297
+ name?: string;
2298
+ /** Format: email */
2299
+ email?: string | null;
2300
+ metadata?: {
2301
+ [key: string]: unknown;
2302
+ };
2303
+ };
2304
+ };
2305
+ };
2306
+ responses: {
2307
+ /** @description Contact created */
2308
+ 200: {
2309
+ headers: {
2310
+ [name: string]: unknown;
2311
+ };
2312
+ content: {
2313
+ "application/json": components["schemas"]["CreateContactResponse"];
2314
+ };
2315
+ };
2316
+ /** @description Validation failure */
2317
+ 400: {
2318
+ headers: {
2319
+ [name: string]: unknown;
2320
+ };
2321
+ content: {
2322
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2323
+ };
2324
+ };
2325
+ /** @description Authentication failure */
2326
+ 401: {
2327
+ headers: {
2328
+ [name: string]: unknown;
2329
+ };
2330
+ content: {
2331
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2332
+ };
2333
+ };
2334
+ /** @description Resource not found */
2335
+ 404: {
2336
+ headers: {
2337
+ [name: string]: unknown;
2338
+ };
2339
+ content: {
2340
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2341
+ };
2342
+ };
2343
+ /** @description Semantic failure (e.g. idempotency key reuse) */
2344
+ 422: {
2345
+ headers: {
2346
+ [name: string]: unknown;
2347
+ };
2348
+ content: {
2349
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2350
+ };
2351
+ };
2352
+ /** @description Rate limit exceeded */
2353
+ 429: {
2354
+ headers: {
2355
+ [name: string]: unknown;
2356
+ };
2357
+ content: {
2358
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2359
+ };
2360
+ };
2361
+ /** @description Internal server error */
2362
+ 500: {
2363
+ headers: {
2364
+ [name: string]: unknown;
2365
+ };
2366
+ content: {
2367
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2368
+ };
2369
+ };
2370
+ };
2371
+ };
2372
+ delete?: never;
2373
+ options?: never;
2374
+ head?: never;
2375
+ patch?: never;
2376
+ trace?: never;
2377
+ };
2378
+ "/{phone_number_id}/contacts/{id}": {
2379
+ parameters: {
2380
+ query?: never;
2381
+ header?: never;
2382
+ path?: never;
2383
+ cookie?: never;
2384
+ };
2385
+ /** Fetch a contact by id */
2386
+ get: {
2387
+ parameters: {
2388
+ query?: never;
2389
+ header?: never;
2390
+ path: {
2391
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
2392
+ phone_number_id: string;
2393
+ id: string;
2394
+ };
2395
+ cookie?: never;
2396
+ };
2397
+ requestBody?: never;
2398
+ responses: {
2399
+ /** @description Contact resource */
2400
+ 200: {
2401
+ headers: {
2402
+ [name: string]: unknown;
2403
+ };
2404
+ content: {
2405
+ "application/json": components["schemas"]["GetContactResponse"];
2406
+ };
2407
+ };
2408
+ /** @description Validation failure */
2409
+ 400: {
2410
+ headers: {
2411
+ [name: string]: unknown;
2412
+ };
2413
+ content: {
2414
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2415
+ };
2416
+ };
2417
+ /** @description Authentication failure */
2418
+ 401: {
2419
+ headers: {
2420
+ [name: string]: unknown;
2421
+ };
2422
+ content: {
2423
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2424
+ };
2425
+ };
2426
+ /** @description Resource not found */
2427
+ 404: {
2428
+ headers: {
2429
+ [name: string]: unknown;
2430
+ };
2431
+ content: {
2432
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2433
+ };
2434
+ };
2435
+ /** @description Semantic failure (e.g. idempotency key reuse) */
2436
+ 422: {
2437
+ headers: {
2438
+ [name: string]: unknown;
2439
+ };
2440
+ content: {
2441
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2442
+ };
2443
+ };
2444
+ /** @description Rate limit exceeded */
2445
+ 429: {
2446
+ headers: {
2447
+ [name: string]: unknown;
2448
+ };
2449
+ content: {
2450
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2451
+ };
2452
+ };
2453
+ /** @description Internal server error */
2454
+ 500: {
2455
+ headers: {
2456
+ [name: string]: unknown;
2457
+ };
2458
+ content: {
2459
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2460
+ };
2461
+ };
2462
+ };
2463
+ };
2464
+ put?: never;
2465
+ post?: never;
2466
+ /**
2467
+ * Delete a contact
2468
+ * @description Hard-deletes the contact and cascades to its conversations, messages, and label attachments. Irreversible.
2469
+ */
2470
+ delete: {
2471
+ parameters: {
2472
+ query?: never;
2473
+ header?: never;
2474
+ path: {
2475
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
2476
+ phone_number_id: string;
2477
+ id: string;
2478
+ };
2479
+ cookie?: never;
2480
+ };
2481
+ requestBody?: never;
2482
+ responses: {
2483
+ /** @description Deleted */
2484
+ 200: {
2485
+ headers: {
2486
+ [name: string]: unknown;
2487
+ };
2488
+ content: {
2489
+ "application/json": components["schemas"]["DeleteContactResponse"];
2490
+ };
2491
+ };
2492
+ /** @description Validation failure */
2493
+ 400: {
2494
+ headers: {
2495
+ [name: string]: unknown;
2496
+ };
2497
+ content: {
2498
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2499
+ };
2500
+ };
2501
+ /** @description Authentication failure */
2502
+ 401: {
2503
+ headers: {
2504
+ [name: string]: unknown;
2505
+ };
2506
+ content: {
2507
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2508
+ };
2509
+ };
2510
+ /** @description Resource not found */
2511
+ 404: {
2512
+ headers: {
2513
+ [name: string]: unknown;
2514
+ };
2515
+ content: {
2516
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2517
+ };
2518
+ };
2519
+ /** @description Semantic failure (e.g. idempotency key reuse) */
2520
+ 422: {
2521
+ headers: {
2522
+ [name: string]: unknown;
2523
+ };
2524
+ content: {
2525
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2526
+ };
2527
+ };
2528
+ /** @description Rate limit exceeded */
2529
+ 429: {
2530
+ headers: {
2531
+ [name: string]: unknown;
2532
+ };
2533
+ content: {
2534
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2535
+ };
2536
+ };
2537
+ /** @description Internal server error */
2538
+ 500: {
2539
+ headers: {
2540
+ [name: string]: unknown;
2541
+ };
2542
+ content: {
2543
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2544
+ };
2545
+ };
2546
+ };
2547
+ };
2548
+ options?: never;
2549
+ head?: never;
2550
+ /**
2551
+ * Update a contact
2552
+ * @description Patch name, email, or metadata. Phone number is the identity column and cannot be changed via the API.
2553
+ */
2554
+ patch: {
2555
+ parameters: {
2556
+ query?: never;
2557
+ header?: never;
2558
+ path: {
2559
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
2560
+ phone_number_id: string;
2561
+ id: string;
2562
+ };
2563
+ cookie?: never;
2564
+ };
2565
+ requestBody?: {
2566
+ content: {
2567
+ "application/json": {
2568
+ name?: string | null;
2569
+ email?: string | "" | null;
2570
+ metadata?: {
2571
+ [key: string]: unknown;
2572
+ } | null;
2573
+ };
2574
+ };
2575
+ };
2576
+ responses: {
2577
+ /** @description Updated contact */
2578
+ 200: {
2579
+ headers: {
2580
+ [name: string]: unknown;
2581
+ };
2582
+ content: {
2583
+ "application/json": components["schemas"]["UpdateContactResponse"];
2584
+ };
2585
+ };
2586
+ /** @description Validation failure */
2587
+ 400: {
2588
+ headers: {
2589
+ [name: string]: unknown;
2590
+ };
2591
+ content: {
2592
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2593
+ };
2594
+ };
2595
+ /** @description Authentication failure */
2596
+ 401: {
2597
+ headers: {
2598
+ [name: string]: unknown;
2599
+ };
2600
+ content: {
2601
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2602
+ };
2603
+ };
2604
+ /** @description Resource not found */
2605
+ 404: {
2606
+ headers: {
2607
+ [name: string]: unknown;
2608
+ };
2609
+ content: {
2610
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2611
+ };
2612
+ };
2613
+ /** @description Semantic failure (e.g. idempotency key reuse) */
2614
+ 422: {
2615
+ headers: {
2616
+ [name: string]: unknown;
2617
+ };
2618
+ content: {
2619
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2620
+ };
2621
+ };
2622
+ /** @description Rate limit exceeded */
2623
+ 429: {
2624
+ headers: {
2625
+ [name: string]: unknown;
2626
+ };
2627
+ content: {
2628
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2629
+ };
2630
+ };
2631
+ /** @description Internal server error */
2632
+ 500: {
2633
+ headers: {
2634
+ [name: string]: unknown;
2635
+ };
2636
+ content: {
2637
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2638
+ };
2639
+ };
2640
+ };
2641
+ };
2642
+ trace?: never;
2643
+ };
2644
+ "/{phone_number_id}/messages/{id}/media": {
2645
+ parameters: {
2646
+ query?: never;
2647
+ header?: never;
2648
+ path?: never;
2649
+ cookie?: never;
2650
+ };
2651
+ /**
2652
+ * Redirect to the media asset for a message
2653
+ * @description Returns a 302 redirect to the underlying CDN URL when the message has media (image, document, video, audio). Returns 404 if the message has no media or if media download is still in flight.
2654
+ */
2655
+ get: {
2656
+ parameters: {
2657
+ query?: never;
2658
+ header?: never;
2659
+ path: {
2660
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
2661
+ phone_number_id: string;
2662
+ id: string;
2663
+ };
2664
+ cookie?: never;
2665
+ };
2666
+ requestBody?: never;
2667
+ responses: {
2668
+ /** @description Redirect to the media URL */
2669
+ 302: {
2670
+ headers: {
2671
+ /** @description Public CDN URL for the asset */
2672
+ Location?: string;
2673
+ [name: string]: unknown;
2674
+ };
2675
+ content?: never;
2676
+ };
2677
+ /** @description Validation failure */
2678
+ 400: {
2679
+ headers: {
2680
+ [name: string]: unknown;
2681
+ };
2682
+ content: {
2683
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2684
+ };
2685
+ };
2686
+ /** @description Authentication failure */
2687
+ 401: {
2688
+ headers: {
2689
+ [name: string]: unknown;
2690
+ };
2691
+ content: {
2692
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2693
+ };
2694
+ };
2695
+ /** @description Resource not found */
2696
+ 404: {
2697
+ headers: {
2698
+ [name: string]: unknown;
2699
+ };
2700
+ content: {
2701
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2702
+ };
2703
+ };
2704
+ /** @description Semantic failure (e.g. idempotency key reuse) */
2705
+ 422: {
2706
+ headers: {
2707
+ [name: string]: unknown;
2708
+ };
2709
+ content: {
2710
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2711
+ };
2712
+ };
2713
+ /** @description Rate limit exceeded */
2714
+ 429: {
2715
+ headers: {
2716
+ [name: string]: unknown;
2717
+ };
2718
+ content: {
2719
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2720
+ };
2721
+ };
2722
+ /** @description Internal server error */
2723
+ 500: {
2724
+ headers: {
2725
+ [name: string]: unknown;
2726
+ };
2727
+ content: {
2728
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2729
+ };
2730
+ };
2731
+ };
2732
+ };
2733
+ put?: never;
2734
+ post?: never;
2735
+ delete?: never;
2736
+ options?: never;
2737
+ head?: never;
2738
+ patch?: never;
2739
+ trace?: never;
2740
+ };
2741
+ "/{phone_number_id}/contacts/{id}/labels": {
2742
+ parameters: {
2743
+ query?: never;
2744
+ header?: never;
2745
+ path?: never;
2746
+ cookie?: never;
2747
+ };
2748
+ get?: never;
2749
+ put?: never;
2750
+ /**
2751
+ * Attach a label to a contact
2752
+ * @description Idempotent — attaching the same label twice is a no-op. The label and the contact must belong to the same team.
2753
+ */
2754
+ post: {
2755
+ parameters: {
2756
+ query?: never;
2757
+ header?: never;
2758
+ path: {
2759
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
2760
+ phone_number_id: string;
2761
+ id: string;
2762
+ };
2763
+ cookie?: never;
2764
+ };
2765
+ requestBody?: {
2766
+ content: {
2767
+ "application/json": {
2768
+ label_id: string;
2769
+ };
2770
+ };
2771
+ };
2772
+ responses: {
2773
+ /** @description Attached */
2774
+ 200: {
2775
+ headers: {
2776
+ [name: string]: unknown;
2777
+ };
2778
+ content: {
2779
+ "application/json": components["schemas"]["AttachContactLabelResponse"];
2780
+ };
2781
+ };
2782
+ /** @description Validation failure */
2783
+ 400: {
2784
+ headers: {
2785
+ [name: string]: unknown;
2786
+ };
2787
+ content: {
2788
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2789
+ };
2790
+ };
2791
+ /** @description Authentication failure */
2792
+ 401: {
2793
+ headers: {
2794
+ [name: string]: unknown;
2795
+ };
2796
+ content: {
2797
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2798
+ };
2799
+ };
2800
+ /** @description Resource not found */
2801
+ 404: {
2802
+ headers: {
2803
+ [name: string]: unknown;
2804
+ };
2805
+ content: {
2806
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2807
+ };
2808
+ };
2809
+ /** @description Semantic failure (e.g. idempotency key reuse) */
2810
+ 422: {
2811
+ headers: {
2812
+ [name: string]: unknown;
2813
+ };
2814
+ content: {
2815
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2816
+ };
2817
+ };
2818
+ /** @description Rate limit exceeded */
2819
+ 429: {
2820
+ headers: {
2821
+ [name: string]: unknown;
2822
+ };
2823
+ content: {
2824
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2825
+ };
2826
+ };
2827
+ /** @description Internal server error */
2828
+ 500: {
2829
+ headers: {
2830
+ [name: string]: unknown;
2831
+ };
2832
+ content: {
2833
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2834
+ };
2835
+ };
2836
+ };
2837
+ };
2838
+ delete?: never;
2839
+ options?: never;
2840
+ head?: never;
2841
+ patch?: never;
2842
+ trace?: never;
2843
+ };
2844
+ "/{phone_number_id}/contacts/{id}/labels/{label_id}": {
2845
+ parameters: {
2846
+ query?: never;
2847
+ header?: never;
2848
+ path?: never;
2849
+ cookie?: never;
2850
+ };
2851
+ get?: never;
2852
+ put?: never;
2853
+ post?: never;
2854
+ /** Detach a label from a contact */
2855
+ delete: {
2856
+ parameters: {
2857
+ query?: never;
2858
+ header?: never;
2859
+ path: {
2860
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
2861
+ phone_number_id: string;
2862
+ id: string;
2863
+ label_id: string;
2864
+ };
2865
+ cookie?: never;
2866
+ };
2867
+ requestBody?: never;
2868
+ responses: {
2869
+ /** @description Detached */
2870
+ 200: {
2871
+ headers: {
2872
+ [name: string]: unknown;
2873
+ };
2874
+ content: {
2875
+ "application/json": components["schemas"]["DetachContactLabelResponse"];
2876
+ };
2877
+ };
2878
+ /** @description Validation failure */
2879
+ 400: {
2880
+ headers: {
2881
+ [name: string]: unknown;
2882
+ };
2883
+ content: {
2884
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2885
+ };
2886
+ };
2887
+ /** @description Authentication failure */
2888
+ 401: {
2889
+ headers: {
2890
+ [name: string]: unknown;
2891
+ };
2892
+ content: {
2893
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2894
+ };
2895
+ };
2896
+ /** @description Resource not found */
2897
+ 404: {
2898
+ headers: {
2899
+ [name: string]: unknown;
2900
+ };
2901
+ content: {
2902
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2903
+ };
2904
+ };
2905
+ /** @description Semantic failure (e.g. idempotency key reuse) */
2906
+ 422: {
2907
+ headers: {
2908
+ [name: string]: unknown;
2909
+ };
2910
+ content: {
2911
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2912
+ };
2913
+ };
2914
+ /** @description Rate limit exceeded */
2915
+ 429: {
2916
+ headers: {
2917
+ [name: string]: unknown;
2918
+ };
2919
+ content: {
2920
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2921
+ };
2922
+ };
2923
+ /** @description Internal server error */
2924
+ 500: {
2925
+ headers: {
2926
+ [name: string]: unknown;
2927
+ };
2928
+ content: {
2929
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2930
+ };
2931
+ };
2932
+ };
2933
+ };
2934
+ options?: never;
2935
+ head?: never;
2936
+ patch?: never;
2937
+ trace?: never;
2938
+ };
2939
+ "/{phone_number_id}/contacts/bulk_label": {
2940
+ parameters: {
2941
+ query?: never;
2942
+ header?: never;
2943
+ path?: never;
2944
+ cookie?: never;
2945
+ };
2946
+ get?: never;
2947
+ put?: never;
2948
+ /**
2949
+ * Attach or detach a label across many contacts
2950
+ * @description Apply or remove a label from up to 1000 contacts in a single transaction. Contacts not owned by the path-scoped account are silently skipped and counted under `skipped_cross_org`.
2951
+ */
2952
+ post: {
2953
+ parameters: {
2954
+ query?: never;
2955
+ header?: never;
2956
+ path: {
2957
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
2958
+ phone_number_id: string;
2959
+ };
2960
+ cookie?: never;
2961
+ };
2962
+ requestBody?: {
2963
+ content: {
2964
+ "application/json": {
2965
+ contact_ids: string[];
2966
+ label_id: string;
2967
+ /** @enum {string} */
2968
+ operation: "attach" | "detach";
2969
+ };
2970
+ };
2971
+ };
2972
+ responses: {
2973
+ /** @description Bulk operation result */
2974
+ 200: {
2975
+ headers: {
2976
+ [name: string]: unknown;
2977
+ };
2978
+ content: {
2979
+ "application/json": components["schemas"]["BulkLabelContactsResponse"];
2980
+ };
2981
+ };
2982
+ /** @description Validation failure */
2983
+ 400: {
2984
+ headers: {
2985
+ [name: string]: unknown;
2986
+ };
2987
+ content: {
2988
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2989
+ };
2990
+ };
2991
+ /** @description Authentication failure */
2992
+ 401: {
2993
+ headers: {
2994
+ [name: string]: unknown;
2995
+ };
2996
+ content: {
2997
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
2998
+ };
2999
+ };
3000
+ /** @description Resource not found */
3001
+ 404: {
3002
+ headers: {
3003
+ [name: string]: unknown;
3004
+ };
3005
+ content: {
3006
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3007
+ };
3008
+ };
3009
+ /** @description Semantic failure (e.g. idempotency key reuse) */
3010
+ 422: {
3011
+ headers: {
3012
+ [name: string]: unknown;
3013
+ };
3014
+ content: {
3015
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3016
+ };
3017
+ };
3018
+ /** @description Rate limit exceeded */
3019
+ 429: {
3020
+ headers: {
3021
+ [name: string]: unknown;
3022
+ };
3023
+ content: {
3024
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3025
+ };
3026
+ };
3027
+ /** @description Internal server error */
3028
+ 500: {
3029
+ headers: {
3030
+ [name: string]: unknown;
3031
+ };
3032
+ content: {
3033
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3034
+ };
3035
+ };
3036
+ };
3037
+ };
3038
+ delete?: never;
3039
+ options?: never;
3040
+ head?: never;
3041
+ patch?: never;
3042
+ trace?: never;
3043
+ };
3044
+ "/{phone_number_id}/conversations/{id}/labels": {
3045
+ parameters: {
3046
+ query?: never;
3047
+ header?: never;
3048
+ path?: never;
3049
+ cookie?: never;
3050
+ };
3051
+ get?: never;
3052
+ put?: never;
3053
+ /** Attach a label to a conversation */
3054
+ post: {
3055
+ parameters: {
3056
+ query?: never;
3057
+ header?: never;
3058
+ path: {
3059
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
3060
+ phone_number_id: string;
3061
+ id: string;
3062
+ };
3063
+ cookie?: never;
3064
+ };
3065
+ requestBody?: {
3066
+ content: {
3067
+ "application/json": {
3068
+ label_id: string;
3069
+ };
3070
+ };
3071
+ };
3072
+ responses: {
3073
+ /** @description Attached */
3074
+ 200: {
3075
+ headers: {
3076
+ [name: string]: unknown;
3077
+ };
3078
+ content: {
3079
+ "application/json": components["schemas"]["AttachConversationLabelResponse"];
3080
+ };
3081
+ };
3082
+ /** @description Validation failure */
3083
+ 400: {
3084
+ headers: {
3085
+ [name: string]: unknown;
3086
+ };
3087
+ content: {
3088
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3089
+ };
3090
+ };
3091
+ /** @description Authentication failure */
3092
+ 401: {
3093
+ headers: {
3094
+ [name: string]: unknown;
3095
+ };
3096
+ content: {
3097
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3098
+ };
3099
+ };
3100
+ /** @description Resource not found */
3101
+ 404: {
3102
+ headers: {
3103
+ [name: string]: unknown;
3104
+ };
3105
+ content: {
3106
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3107
+ };
3108
+ };
3109
+ /** @description Semantic failure (e.g. idempotency key reuse) */
3110
+ 422: {
3111
+ headers: {
3112
+ [name: string]: unknown;
3113
+ };
3114
+ content: {
3115
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3116
+ };
3117
+ };
3118
+ /** @description Rate limit exceeded */
3119
+ 429: {
3120
+ headers: {
3121
+ [name: string]: unknown;
3122
+ };
3123
+ content: {
3124
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3125
+ };
3126
+ };
3127
+ /** @description Internal server error */
3128
+ 500: {
3129
+ headers: {
3130
+ [name: string]: unknown;
3131
+ };
3132
+ content: {
3133
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3134
+ };
3135
+ };
3136
+ };
3137
+ };
3138
+ delete?: never;
3139
+ options?: never;
3140
+ head?: never;
3141
+ patch?: never;
3142
+ trace?: never;
3143
+ };
3144
+ "/{phone_number_id}/conversations/{id}/labels/{label_id}": {
3145
+ parameters: {
3146
+ query?: never;
3147
+ header?: never;
3148
+ path?: never;
3149
+ cookie?: never;
3150
+ };
3151
+ get?: never;
3152
+ put?: never;
3153
+ post?: never;
3154
+ /** Detach a label from a conversation */
3155
+ delete: {
3156
+ parameters: {
3157
+ query?: never;
3158
+ header?: never;
3159
+ path: {
3160
+ /** @description Meta WhatsApp Business `phone_number_id` of the connected account that should send / own this resource. Discoverable via `GET /v1/accounts` (returned as `phone_number_id` on each row). */
3161
+ phone_number_id: string;
3162
+ id: string;
3163
+ label_id: string;
3164
+ };
3165
+ cookie?: never;
3166
+ };
3167
+ requestBody?: never;
3168
+ responses: {
3169
+ /** @description Detached */
3170
+ 200: {
3171
+ headers: {
3172
+ [name: string]: unknown;
3173
+ };
3174
+ content: {
3175
+ "application/json": components["schemas"]["DetachConversationLabelResponse"];
3176
+ };
3177
+ };
3178
+ /** @description Validation failure */
3179
+ 400: {
3180
+ headers: {
3181
+ [name: string]: unknown;
3182
+ };
3183
+ content: {
3184
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3185
+ };
3186
+ };
3187
+ /** @description Authentication failure */
3188
+ 401: {
3189
+ headers: {
3190
+ [name: string]: unknown;
3191
+ };
3192
+ content: {
3193
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3194
+ };
3195
+ };
3196
+ /** @description Resource not found */
3197
+ 404: {
3198
+ headers: {
3199
+ [name: string]: unknown;
3200
+ };
3201
+ content: {
3202
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3203
+ };
3204
+ };
3205
+ /** @description Semantic failure (e.g. idempotency key reuse) */
3206
+ 422: {
3207
+ headers: {
3208
+ [name: string]: unknown;
3209
+ };
3210
+ content: {
3211
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3212
+ };
3213
+ };
3214
+ /** @description Rate limit exceeded */
3215
+ 429: {
3216
+ headers: {
3217
+ [name: string]: unknown;
3218
+ };
3219
+ content: {
3220
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3221
+ };
3222
+ };
3223
+ /** @description Internal server error */
3224
+ 500: {
3225
+ headers: {
3226
+ [name: string]: unknown;
3227
+ };
3228
+ content: {
3229
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3230
+ };
3231
+ };
3232
+ };
3233
+ };
3234
+ options?: never;
3235
+ head?: never;
3236
+ patch?: never;
3237
+ trace?: never;
3238
+ };
3239
+ "/labels": {
3240
+ parameters: {
3241
+ query?: never;
3242
+ header?: never;
3243
+ path?: never;
3244
+ cookie?: never;
3245
+ };
3246
+ /**
3247
+ * List labels
3248
+ * @description List labels across every team in the organization.
3249
+ */
3250
+ get: {
3251
+ parameters: {
3252
+ query?: {
3253
+ limit?: string;
3254
+ cursor?: string;
3255
+ };
3256
+ header?: never;
3257
+ path?: never;
3258
+ cookie?: never;
3259
+ };
3260
+ requestBody?: never;
3261
+ responses: {
3262
+ /** @description Label list */
3263
+ 200: {
3264
+ headers: {
3265
+ [name: string]: unknown;
3266
+ };
3267
+ content: {
3268
+ "application/json": components["schemas"]["ListLabelsResponse"];
3269
+ };
3270
+ };
3271
+ /** @description Validation failure */
3272
+ 400: {
3273
+ headers: {
3274
+ [name: string]: unknown;
3275
+ };
3276
+ content: {
3277
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3278
+ };
3279
+ };
3280
+ /** @description Authentication failure */
3281
+ 401: {
3282
+ headers: {
3283
+ [name: string]: unknown;
3284
+ };
3285
+ content: {
3286
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3287
+ };
3288
+ };
3289
+ /** @description Rate limit exceeded */
3290
+ 429: {
3291
+ headers: {
3292
+ [name: string]: unknown;
3293
+ };
3294
+ content: {
3295
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3296
+ };
3297
+ };
3298
+ /** @description Internal server error */
3299
+ 500: {
3300
+ headers: {
3301
+ [name: string]: unknown;
3302
+ };
3303
+ content: {
3304
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3305
+ };
3306
+ };
3307
+ };
3308
+ };
3309
+ put?: never;
3310
+ /**
3311
+ * Create a label
3312
+ * @description Create a label. Single-team orgs auto-resolve `team_id`; multi-team orgs MUST pass it. Names are unique per team — duplicates return `invalid_field_value`.
3313
+ */
3314
+ post: {
3315
+ parameters: {
3316
+ query?: never;
3317
+ header?: never;
3318
+ path?: never;
3319
+ cookie?: never;
3320
+ };
3321
+ requestBody?: {
3322
+ content: {
3323
+ "application/json": {
3324
+ team_id?: string;
3325
+ name: string;
3326
+ /**
3327
+ * @default gray
3328
+ * @enum {string}
3329
+ */
3330
+ color?: "gray" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "sky" | "blue" | "violet" | "pink";
3331
+ };
3332
+ };
3333
+ };
3334
+ responses: {
3335
+ /** @description Label created */
3336
+ 200: {
3337
+ headers: {
3338
+ [name: string]: unknown;
3339
+ };
3340
+ content: {
3341
+ "application/json": components["schemas"]["CreateLabelResponse"];
3342
+ };
3343
+ };
3344
+ /** @description Validation failure */
3345
+ 400: {
3346
+ headers: {
3347
+ [name: string]: unknown;
3348
+ };
3349
+ content: {
3350
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3351
+ };
3352
+ };
3353
+ /** @description Authentication failure */
3354
+ 401: {
3355
+ headers: {
3356
+ [name: string]: unknown;
3357
+ };
3358
+ content: {
3359
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3360
+ };
3361
+ };
3362
+ /** @description Rate limit exceeded */
3363
+ 429: {
3364
+ headers: {
3365
+ [name: string]: unknown;
3366
+ };
3367
+ content: {
3368
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3369
+ };
3370
+ };
3371
+ /** @description Internal server error */
3372
+ 500: {
3373
+ headers: {
3374
+ [name: string]: unknown;
3375
+ };
3376
+ content: {
3377
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3378
+ };
3379
+ };
3380
+ };
3381
+ };
3382
+ delete?: never;
3383
+ options?: never;
3384
+ head?: never;
3385
+ patch?: never;
3386
+ trace?: never;
3387
+ };
3388
+ "/labels/{id}": {
3389
+ parameters: {
3390
+ query?: never;
3391
+ header?: never;
3392
+ path?: never;
3393
+ cookie?: never;
3394
+ };
3395
+ /** Fetch a label by id */
3396
+ get: {
3397
+ parameters: {
3398
+ query?: never;
3399
+ header?: never;
3400
+ path: {
3401
+ id: string;
3402
+ };
3403
+ cookie?: never;
3404
+ };
3405
+ requestBody?: never;
3406
+ responses: {
3407
+ /** @description Label resource */
3408
+ 200: {
3409
+ headers: {
3410
+ [name: string]: unknown;
3411
+ };
3412
+ content: {
3413
+ "application/json": components["schemas"]["GetLabelResponse"];
3414
+ };
3415
+ };
3416
+ /** @description Validation failure */
3417
+ 400: {
3418
+ headers: {
3419
+ [name: string]: unknown;
3420
+ };
3421
+ content: {
3422
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3423
+ };
3424
+ };
3425
+ /** @description Authentication failure */
3426
+ 401: {
3427
+ headers: {
3428
+ [name: string]: unknown;
3429
+ };
3430
+ content: {
3431
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3432
+ };
3433
+ };
3434
+ /** @description Resource not found */
3435
+ 404: {
3436
+ headers: {
3437
+ [name: string]: unknown;
3438
+ };
3439
+ content: {
3440
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3441
+ };
3442
+ };
3443
+ /** @description Rate limit exceeded */
3444
+ 429: {
3445
+ headers: {
3446
+ [name: string]: unknown;
3447
+ };
3448
+ content: {
3449
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3450
+ };
3451
+ };
3452
+ /** @description Internal server error */
3453
+ 500: {
3454
+ headers: {
3455
+ [name: string]: unknown;
3456
+ };
3457
+ content: {
3458
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3459
+ };
3460
+ };
3461
+ };
3462
+ };
3463
+ put?: never;
3464
+ post?: never;
3465
+ /**
3466
+ * Delete a label
3467
+ * @description Hard-deletes the label and cascades to every contact and conversation it was attached to (the row in the join table goes away, the parent resources stay).
3468
+ */
3469
+ delete: {
3470
+ parameters: {
3471
+ query?: never;
3472
+ header?: never;
3473
+ path: {
3474
+ id: string;
3475
+ };
3476
+ cookie?: never;
3477
+ };
3478
+ requestBody?: never;
3479
+ responses: {
3480
+ /** @description Deleted */
3481
+ 200: {
3482
+ headers: {
3483
+ [name: string]: unknown;
3484
+ };
3485
+ content: {
3486
+ "application/json": components["schemas"]["DeleteLabelResponse"];
3487
+ };
3488
+ };
3489
+ /** @description Validation failure */
3490
+ 400: {
3491
+ headers: {
3492
+ [name: string]: unknown;
3493
+ };
3494
+ content: {
3495
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3496
+ };
3497
+ };
3498
+ /** @description Authentication failure */
3499
+ 401: {
3500
+ headers: {
3501
+ [name: string]: unknown;
3502
+ };
3503
+ content: {
3504
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3505
+ };
3506
+ };
3507
+ /** @description Resource not found */
3508
+ 404: {
3509
+ headers: {
3510
+ [name: string]: unknown;
3511
+ };
3512
+ content: {
3513
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3514
+ };
3515
+ };
3516
+ /** @description Rate limit exceeded */
3517
+ 429: {
3518
+ headers: {
3519
+ [name: string]: unknown;
3520
+ };
3521
+ content: {
3522
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3523
+ };
3524
+ };
3525
+ /** @description Internal server error */
3526
+ 500: {
3527
+ headers: {
3528
+ [name: string]: unknown;
3529
+ };
3530
+ content: {
3531
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3532
+ };
3533
+ };
3534
+ };
3535
+ };
3536
+ options?: never;
3537
+ head?: never;
3538
+ /** Update a label */
3539
+ patch: {
3540
+ parameters: {
3541
+ query?: never;
3542
+ header?: never;
3543
+ path: {
3544
+ id: string;
3545
+ };
3546
+ cookie?: never;
3547
+ };
3548
+ requestBody?: {
3549
+ content: {
3550
+ "application/json": {
3551
+ name?: string;
3552
+ /** @enum {string} */
3553
+ color?: "gray" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "sky" | "blue" | "violet" | "pink";
3554
+ };
3555
+ };
3556
+ };
3557
+ responses: {
3558
+ /** @description Updated label */
3559
+ 200: {
3560
+ headers: {
3561
+ [name: string]: unknown;
3562
+ };
3563
+ content: {
3564
+ "application/json": components["schemas"]["UpdateLabelResponse"];
3565
+ };
3566
+ };
3567
+ /** @description Validation failure */
3568
+ 400: {
3569
+ headers: {
3570
+ [name: string]: unknown;
3571
+ };
3572
+ content: {
3573
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3574
+ };
3575
+ };
3576
+ /** @description Authentication failure */
3577
+ 401: {
3578
+ headers: {
3579
+ [name: string]: unknown;
3580
+ };
3581
+ content: {
3582
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3583
+ };
3584
+ };
3585
+ /** @description Resource not found */
3586
+ 404: {
3587
+ headers: {
3588
+ [name: string]: unknown;
3589
+ };
3590
+ content: {
3591
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3592
+ };
3593
+ };
3594
+ /** @description Rate limit exceeded */
3595
+ 429: {
3596
+ headers: {
3597
+ [name: string]: unknown;
3598
+ };
3599
+ content: {
3600
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3601
+ };
3602
+ };
3603
+ /** @description Internal server error */
3604
+ 500: {
3605
+ headers: {
3606
+ [name: string]: unknown;
3607
+ };
3608
+ content: {
3609
+ "application/json": components["schemas"]["ApiErrorEnvelope"];
3610
+ };
3611
+ };
3612
+ };
3613
+ };
3614
+ trace?: never;
3615
+ };
3616
+ }
3617
+ export type webhooks = Record<string, never>;
3618
+ export interface components {
3619
+ schemas: {
3620
+ ApiErrorEnvelope: {
3621
+ error: {
3622
+ /** @example invalid_request_error */
3623
+ type: string;
3624
+ /** @example invalid_phone_number */
3625
+ code: string;
3626
+ message: string;
3627
+ param?: string;
3628
+ /** @example req_01HXYZABCDEFGHJKMNPQRSTVWX */
3629
+ request_id: string;
3630
+ };
3631
+ };
3632
+ Message: {
3633
+ /** @example msg_01HXYZABCDEFGHJKMNPQRSTVWX */
3634
+ id: string;
3635
+ /** @enum {string} */
3636
+ object: "message";
3637
+ to?: string;
3638
+ type?: string;
3639
+ /** @enum {string} */
3640
+ status: "queued" | "pending" | "sent" | "delivered" | "read" | "failed";
3641
+ /** Format: date-time */
3642
+ created_at?: string;
3643
+ conversation_id?: string;
3644
+ message_id?: string;
3645
+ error?: {
3646
+ code: string;
3647
+ message: string;
3648
+ provider_code: number | null;
3649
+ };
3650
+ };
3651
+ Template: {
3652
+ /** @example tmpl_01HXYZABCDEFGHJKMNPQRSTVWX */
3653
+ id: string;
3654
+ /** @enum {string} */
3655
+ object: "template";
3656
+ name: string;
3657
+ language: string;
3658
+ /** @enum {string} */
3659
+ status: "pending" | "approved" | "rejected";
3660
+ content: string;
3661
+ variables: string[];
3662
+ components?: unknown;
3663
+ whatsapp_account: {
3664
+ phone_number: string | null;
3665
+ };
3666
+ provider_template_id: string | null;
3667
+ /** Format: date-time */
3668
+ created_at: string;
3669
+ /** Format: date-time */
3670
+ updated_at: string;
3671
+ };
3672
+ Account: {
3673
+ /** @enum {string} */
3674
+ object: "account";
3675
+ /**
3676
+ * @description Meta WhatsApp Business `phone_number_id`. Use as the `{phone_number_id}` path parameter in `/v1/{phone_number_id}/...` endpoints. Nullable while onboarding is in flight.
3677
+ * @example 106540352242922
3678
+ */
3679
+ phone_number_id: string | null;
3680
+ /** @example +628111222333 */
3681
+ phone_number: string | null;
3682
+ /** @example Customer Support */
3683
+ name: string | null;
3684
+ /**
3685
+ * @description Lifecycle state of the account (e.g. `connected`, `disconnected`, `degraded`, `onboarding`).
3686
+ * @example connected
3687
+ */
3688
+ status: string;
3689
+ };
3690
+ WebhookSubscription: {
3691
+ /** @example wbs_01HXYZABCDEFGHJKMNPQRSTVWX */
3692
+ id: string;
3693
+ /** @enum {string} */
3694
+ object: "webhook_subscription";
3695
+ /** Format: uri */
3696
+ url: string;
3697
+ description: string | null;
3698
+ events: string[];
3699
+ /** @enum {string} */
3700
+ status: "active" | "paused" | "disabled";
3701
+ disabled_reason: string | null;
3702
+ consecutive_failures: number;
3703
+ secrets: {
3704
+ /** @example sec_01HXYZABCDEFGHJKMNPQRSTVWX */
3705
+ id: string;
3706
+ /** Format: date-time */
3707
+ created_at: string;
3708
+ /** Format: date-time */
3709
+ expires_at: string | null;
3710
+ }[];
3711
+ /** Format: date-time */
3712
+ created_at: string;
3713
+ /** Format: date-time */
3714
+ updated_at: string;
3715
+ initial_secret?: string;
3716
+ };
3717
+ WebhookDelivery: {
3718
+ /** @example wbd_01HXYZABCDEFGHJKMNPQRSTVWX */
3719
+ id: string;
3720
+ /** @enum {string} */
3721
+ object: "webhook_delivery";
3722
+ subscription_id: string;
3723
+ event_type: string;
3724
+ event_id: string;
3725
+ /** @enum {string} */
3726
+ status: "pending" | "succeeded" | "failed" | "dead";
3727
+ attempt_count: number;
3728
+ /** Format: date-time */
3729
+ last_attempt_at: string | null;
3730
+ /** Format: date-time */
3731
+ next_attempt_at: string | null;
3732
+ response_status: number | null;
3733
+ response_body_snippet: string | null;
3734
+ duration_ms: number | null;
3735
+ replayed_from: string | null;
3736
+ payload?: unknown;
3737
+ /** Format: date-time */
3738
+ created_at: string;
3739
+ };
3740
+ Conversation: {
3741
+ /** @example cnv_01HXYZABCDEFGHJKMNPQRSTVWX */
3742
+ id: string;
3743
+ /** @enum {string} */
3744
+ object: "conversation";
3745
+ /** @enum {string} */
3746
+ status: "open" | "resolved" | "pending";
3747
+ contact: {
3748
+ id: string;
3749
+ phone_number: string | null;
3750
+ name: string | null;
3751
+ };
3752
+ whatsapp_account: {
3753
+ phone_number: string | null;
3754
+ };
3755
+ assignee: {
3756
+ id: string;
3757
+ name: string | null;
3758
+ email: string | null;
3759
+ } | null;
3760
+ unread_count: number;
3761
+ /** Format: date-time */
3762
+ last_message_at: string | null;
3763
+ /** Format: date-time */
3764
+ last_inbound_at: string | null;
3765
+ /** Format: date-time */
3766
+ created_at: string;
3767
+ /** Format: date-time */
3768
+ updated_at: string;
3769
+ };
3770
+ Contact: {
3771
+ /** @example ctc_01HXYZABCDEFGHJKMNPQRSTVWX */
3772
+ id: string;
3773
+ /** @enum {string} */
3774
+ object: "contact";
3775
+ phone_number: string | null;
3776
+ name: string | null;
3777
+ email: string | null;
3778
+ metadata: {
3779
+ [key: string]: unknown;
3780
+ } | null;
3781
+ whatsapp_account: {
3782
+ phone_number: string | null;
3783
+ };
3784
+ /** Format: date-time */
3785
+ created_at: string;
3786
+ /** Format: date-time */
3787
+ updated_at: string;
3788
+ };
3789
+ Label: {
3790
+ /** @example lbl_01HXYZABCDEFGHJKMNPQRSTVWX */
3791
+ id: string;
3792
+ /** @enum {string} */
3793
+ object: "label";
3794
+ name: string;
3795
+ /** @enum {string} */
3796
+ color: "gray" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "sky" | "blue" | "violet" | "pink";
3797
+ team_id: string;
3798
+ /** Format: date-time */
3799
+ created_at: string;
3800
+ /** Format: date-time */
3801
+ updated_at: string;
3802
+ };
3803
+ MessageListItem: {
3804
+ /** @example msg_01HXYZABCDEFGHJKMNPQRSTVWX */
3805
+ id: string;
3806
+ /** @enum {string} */
3807
+ object: "message";
3808
+ conversation_id: string;
3809
+ to: string | null;
3810
+ /** @enum {string} */
3811
+ direction: "inbound" | "outbound";
3812
+ type: string;
3813
+ content: string | null;
3814
+ media_url: string | null;
3815
+ /** @enum {string} */
3816
+ status: "pending" | "sent" | "delivered" | "read" | "failed";
3817
+ /** Format: date-time */
3818
+ created_at: string;
3819
+ error?: {
3820
+ code: string;
3821
+ message: string;
3822
+ provider_code: number | null;
3823
+ };
3824
+ };
3825
+ MeResponse: {
3826
+ data: {
3827
+ organization: {
3828
+ /** @example org_01HXYZABCDEFGHJKMNPQRSTVWX */
3829
+ id: string;
3830
+ /** @enum {string} */
3831
+ object: "organization";
3832
+ name: string;
3833
+ };
3834
+ api_key: {
3835
+ /** @example key_01HXYZABCDEFGHJKMNPQRSTVWX */
3836
+ id: string;
3837
+ /** @enum {string} */
3838
+ object: "api_key";
3839
+ label: string;
3840
+ last4: string;
3841
+ };
3842
+ rate_limits: {
3843
+ tier: string;
3844
+ write_per_minute: number;
3845
+ read_per_minute: number;
3846
+ };
3847
+ };
3848
+ request_id: string;
3849
+ };
3850
+ ListAccountsResponse: {
3851
+ data: components["schemas"]["Account"][];
3852
+ has_more: boolean;
3853
+ next_cursor: string | null;
3854
+ request_id: string;
3855
+ };
3856
+ SendMessageResponse: {
3857
+ data: components["schemas"]["Message"];
3858
+ request_id: string;
3859
+ };
3860
+ GetMessageResponse: {
3861
+ data: components["schemas"]["Message"];
3862
+ request_id: string;
3863
+ };
3864
+ ListTemplatesResponse: {
3865
+ data: components["schemas"]["Template"][];
3866
+ has_more: boolean;
3867
+ next_cursor: string | null;
3868
+ request_id: string;
3869
+ };
3870
+ GetTemplateResponse: {
3871
+ data: components["schemas"]["Template"];
3872
+ request_id: string;
3873
+ };
3874
+ CreateWebhookSubscriptionResponse: {
3875
+ data: components["schemas"]["WebhookSubscription"];
3876
+ request_id: string;
3877
+ };
3878
+ ListWebhookSubscriptionsResponse: {
3879
+ data: components["schemas"]["WebhookSubscription"][];
3880
+ has_more: boolean;
3881
+ next_cursor: string | null;
3882
+ request_id: string;
3883
+ };
3884
+ GetWebhookSubscriptionResponse: {
3885
+ data: components["schemas"]["WebhookSubscription"];
3886
+ request_id: string;
3887
+ };
3888
+ UpdateWebhookSubscriptionResponse: {
3889
+ data: components["schemas"]["WebhookSubscription"];
3890
+ request_id: string;
3891
+ };
3892
+ DeleteWebhookSubscriptionResponse: {
3893
+ data: {
3894
+ id: string;
3895
+ /** @enum {boolean} */
3896
+ deleted: true;
3897
+ };
3898
+ request_id: string;
3899
+ };
3900
+ AddWebhookSecretResponse: {
3901
+ data: {
3902
+ id: string;
3903
+ /** @enum {string} */
3904
+ object: "webhook_secret";
3905
+ secret: string;
3906
+ /** Format: date-time */
3907
+ created_at: string;
3908
+ /** Format: date-time */
3909
+ expires_at: string | null;
3910
+ };
3911
+ request_id: string;
3912
+ };
3913
+ DeleteWebhookSecretResponse: {
3914
+ data: {
3915
+ id: string;
3916
+ /** @enum {boolean} */
3917
+ deleted: true;
3918
+ };
3919
+ request_id: string;
3920
+ };
3921
+ ListWebhookDeliveriesResponse: {
3922
+ data: components["schemas"]["WebhookDelivery"][];
3923
+ has_more: boolean;
3924
+ next_cursor: string | null;
3925
+ request_id: string;
3926
+ };
3927
+ GetWebhookDeliveryResponse: {
3928
+ data: components["schemas"]["WebhookDelivery"];
3929
+ request_id: string;
3930
+ };
3931
+ ReplayWebhookDeliveryResponse: {
3932
+ data: {
3933
+ id: string;
3934
+ /** @enum {string} */
3935
+ object: "webhook_delivery";
3936
+ replayed_from: string;
3937
+ /** @enum {string} */
3938
+ status: "pending";
3939
+ };
3940
+ request_id: string;
3941
+ };
3942
+ BulkReplayResponse: {
3943
+ data: {
3944
+ enqueued: number;
3945
+ capped: boolean;
3946
+ };
3947
+ request_id: string;
3948
+ };
3949
+ ListConversationsResponse: {
3950
+ data: components["schemas"]["Conversation"][];
3951
+ has_more: boolean;
3952
+ next_cursor: string | null;
3953
+ request_id: string;
3954
+ };
3955
+ GetConversationResponse: {
3956
+ data: components["schemas"]["Conversation"];
3957
+ request_id: string;
3958
+ };
3959
+ ListContactsResponse: {
3960
+ data: components["schemas"]["Contact"][];
3961
+ has_more: boolean;
3962
+ next_cursor: string | null;
3963
+ request_id: string;
3964
+ };
3965
+ GetContactResponse: {
3966
+ data: components["schemas"]["Contact"];
3967
+ request_id: string;
3968
+ };
3969
+ ListMessagesResponse: {
3970
+ data: components["schemas"]["MessageListItem"][];
3971
+ has_more: boolean;
3972
+ next_cursor: string | null;
3973
+ request_id: string;
3974
+ };
3975
+ CreateContactResponse: {
3976
+ data: components["schemas"]["Contact"];
3977
+ request_id: string;
3978
+ };
3979
+ UpdateContactResponse: {
3980
+ data: components["schemas"]["Contact"];
3981
+ request_id: string;
3982
+ };
3983
+ DeleteContactResponse: {
3984
+ data: {
3985
+ id: string;
3986
+ /** @enum {string} */
3987
+ object: "contact";
3988
+ /** @enum {boolean} */
3989
+ deleted: true;
3990
+ };
3991
+ request_id: string;
3992
+ };
3993
+ AttachContactLabelResponse: {
3994
+ data: {
3995
+ contact_id: string;
3996
+ label_id: string;
3997
+ /** @enum {boolean} */
3998
+ attached: true;
3999
+ };
4000
+ request_id: string;
4001
+ };
4002
+ DetachContactLabelResponse: {
4003
+ data: {
4004
+ contact_id: string;
4005
+ label_id: string;
4006
+ /** @enum {boolean} */
4007
+ attached: false;
4008
+ };
4009
+ request_id: string;
4010
+ };
4011
+ BulkLabelContactsResponse: {
4012
+ data: {
4013
+ applied: number;
4014
+ skipped_cross_org: number;
4015
+ skipped_team_mismatch: number;
4016
+ };
4017
+ request_id: string;
4018
+ };
4019
+ UpdateConversationResponse: {
4020
+ data: components["schemas"]["Conversation"];
4021
+ request_id: string;
4022
+ };
4023
+ AttachConversationLabelResponse: {
4024
+ data: {
4025
+ conversation_id: string;
4026
+ label_id: string;
4027
+ /** @enum {boolean} */
4028
+ attached: true;
4029
+ };
4030
+ request_id: string;
4031
+ };
4032
+ DetachConversationLabelResponse: {
4033
+ data: {
4034
+ conversation_id: string;
4035
+ label_id: string;
4036
+ /** @enum {boolean} */
4037
+ attached: false;
4038
+ };
4039
+ request_id: string;
4040
+ };
4041
+ ListLabelsResponse: {
4042
+ data: components["schemas"]["Label"][];
4043
+ has_more: boolean;
4044
+ next_cursor: string | null;
4045
+ request_id: string;
4046
+ };
4047
+ CreateLabelResponse: {
4048
+ data: components["schemas"]["Label"];
4049
+ request_id: string;
4050
+ };
4051
+ GetLabelResponse: {
4052
+ data: components["schemas"]["Label"];
4053
+ request_id: string;
4054
+ };
4055
+ UpdateLabelResponse: {
4056
+ data: components["schemas"]["Label"];
4057
+ request_id: string;
4058
+ };
4059
+ DeleteLabelResponse: {
4060
+ data: {
4061
+ id: string;
4062
+ /** @enum {string} */
4063
+ object: "label";
4064
+ /** @enum {boolean} */
4065
+ deleted: true;
4066
+ };
4067
+ request_id: string;
4068
+ };
4069
+ };
4070
+ responses: never;
4071
+ parameters: never;
4072
+ requestBodies: never;
4073
+ headers: never;
4074
+ pathItems: never;
4075
+ }
4076
+ export type $defs = Record<string, never>;
4077
+ export type operations = Record<string, never>;