@wuapidev/cli 0.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.
Files changed (95) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +84 -0
  3. package/dist/args.d.ts +17 -0
  4. package/dist/args.d.ts.map +1 -0
  5. package/dist/args.js +96 -0
  6. package/dist/args.js.map +1 -0
  7. package/dist/cli.d.ts +3 -0
  8. package/dist/cli.d.ts.map +1 -0
  9. package/dist/cli.js +7 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/context.d.ts +45 -0
  12. package/dist/context.d.ts.map +1 -0
  13. package/dist/context.js +120 -0
  14. package/dist/context.js.map +1 -0
  15. package/dist/credentials.d.ts +31 -0
  16. package/dist/credentials.d.ts.map +1 -0
  17. package/dist/credentials.js +90 -0
  18. package/dist/credentials.js.map +1 -0
  19. package/dist/dialcodes.d.ts +5 -0
  20. package/dist/dialcodes.d.ts.map +1 -0
  21. package/dist/dialcodes.js +51 -0
  22. package/dist/dialcodes.js.map +1 -0
  23. package/dist/dispatch.d.ts +37 -0
  24. package/dist/dispatch.d.ts.map +1 -0
  25. package/dist/dispatch.js +225 -0
  26. package/dist/dispatch.js.map +1 -0
  27. package/dist/dotenv.d.ts +7 -0
  28. package/dist/dotenv.d.ts.map +1 -0
  29. package/dist/dotenv.js +67 -0
  30. package/dist/dotenv.js.map +1 -0
  31. package/dist/errors.d.ts +24 -0
  32. package/dist/errors.d.ts.map +1 -0
  33. package/dist/errors.js +41 -0
  34. package/dist/errors.js.map +1 -0
  35. package/dist/files.d.ts +4 -0
  36. package/dist/files.d.ts.map +1 -0
  37. package/dist/files.js +35 -0
  38. package/dist/files.js.map +1 -0
  39. package/dist/generated/operations.d.ts +3 -0
  40. package/dist/generated/operations.d.ts.map +1 -0
  41. package/dist/generated/operations.js +4462 -0
  42. package/dist/generated/operations.js.map +1 -0
  43. package/dist/help.d.ts +13 -0
  44. package/dist/help.d.ts.map +1 -0
  45. package/dist/help.js +176 -0
  46. package/dist/help.js.map +1 -0
  47. package/dist/index.d.ts +8 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +8 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/io.d.ts +35 -0
  52. package/dist/io.d.ts.map +1 -0
  53. package/dist/io.js +103 -0
  54. package/dist/io.js.map +1 -0
  55. package/dist/link.d.ts +26 -0
  56. package/dist/link.d.ts.map +1 -0
  57. package/dist/link.js +226 -0
  58. package/dist/link.js.map +1 -0
  59. package/dist/login.d.ts +30 -0
  60. package/dist/login.d.ts.map +1 -0
  61. package/dist/login.js +224 -0
  62. package/dist/login.js.map +1 -0
  63. package/dist/main.d.ts +3 -0
  64. package/dist/main.d.ts.map +1 -0
  65. package/dist/main.js +88 -0
  66. package/dist/main.js.map +1 -0
  67. package/dist/mcp.d.ts +3 -0
  68. package/dist/mcp.d.ts.map +1 -0
  69. package/dist/mcp.js +127 -0
  70. package/dist/mcp.js.map +1 -0
  71. package/dist/operation.d.ts +32 -0
  72. package/dist/operation.d.ts.map +1 -0
  73. package/dist/operation.js +3 -0
  74. package/dist/operation.js.map +1 -0
  75. package/dist/paths.d.ts +12 -0
  76. package/dist/paths.d.ts.map +1 -0
  77. package/dist/paths.js +27 -0
  78. package/dist/paths.js.map +1 -0
  79. package/dist/profiles.d.ts +6 -0
  80. package/dist/profiles.d.ts.map +1 -0
  81. package/dist/profiles.js +119 -0
  82. package/dist/profiles.js.map +1 -0
  83. package/dist/qr.d.ts +19 -0
  84. package/dist/qr.d.ts.map +1 -0
  85. package/dist/qr.js +198 -0
  86. package/dist/qr.js.map +1 -0
  87. package/dist/send.d.ts +3 -0
  88. package/dist/send.d.ts.map +1 -0
  89. package/dist/send.js +73 -0
  90. package/dist/send.js.map +1 -0
  91. package/dist/version.d.ts +3 -0
  92. package/dist/version.d.ts.map +1 -0
  93. package/dist/version.js +3 -0
  94. package/dist/version.js.map +1 -0
  95. package/package.json +61 -0
@@ -0,0 +1,4462 @@
1
+ // Generated by scripts/gen-operations.mjs from apps/wuapi/public/openapi.json
2
+ // and packages/sdk-codegen/wuapi.sdk.toml. Do not edit: run `npm run gen`.
3
+ export const OPERATIONS = [
4
+ {
5
+ "operationId": "getMe",
6
+ "resource": [],
7
+ "method": "me",
8
+ "httpMethod": "GET",
9
+ "path": "/v1/me",
10
+ "pathParams": [],
11
+ "query": [],
12
+ "hasBody": false,
13
+ "bodyRequired": false,
14
+ "body": [],
15
+ "paginated": false,
16
+ "summary": "Get the current key",
17
+ "description": "The organization, the API key and, when the request is scoped to a project, that project.",
18
+ "deprecated": false
19
+ },
20
+ {
21
+ "operationId": "getUsage",
22
+ "resource": [
23
+ "usage"
24
+ ],
25
+ "method": "get",
26
+ "httpMethod": "GET",
27
+ "path": "/v1/usage",
28
+ "pathParams": [],
29
+ "query": [],
30
+ "hasBody": false,
31
+ "bodyRequired": false,
32
+ "body": [],
33
+ "paginated": false,
34
+ "summary": "Get usage",
35
+ "description": "Billable usage for the current calendar month (UTC). Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
36
+ "deprecated": false
37
+ },
38
+ {
39
+ "operationId": "getUsageByProject",
40
+ "resource": [
41
+ "usage"
42
+ ],
43
+ "method": "byProject",
44
+ "httpMethod": "GET",
45
+ "path": "/v1/usage/by-project",
46
+ "pathParams": [],
47
+ "query": [
48
+ {
49
+ "name": "month",
50
+ "type": "string",
51
+ "required": false,
52
+ "description": "Month in UTC as `YYYY-MM`. Defaults to the current month. Selects the month of `proxyBytes`, `sentMessageCount` and `receivedMessageCount`; `accountCount` and `billableAccountCount` are always curren…"
53
+ }
54
+ ],
55
+ "hasBody": false,
56
+ "bodyRequired": false,
57
+ "body": [],
58
+ "paginated": false,
59
+ "summary": "Get usage by project",
60
+ "description": "The rebilling export for `month` (default the current month): one line per project, plus unassigned resources and totals. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
61
+ "deprecated": false
62
+ },
63
+ {
64
+ "operationId": "listProxyLocations",
65
+ "resource": [
66
+ "proxyLocations"
67
+ ],
68
+ "method": "list",
69
+ "httpMethod": "GET",
70
+ "path": "/v1/proxy-locations",
71
+ "pathParams": [],
72
+ "query": [
73
+ {
74
+ "name": "country",
75
+ "type": "string",
76
+ "required": false,
77
+ "description": "Only this country (ISO 3166-1 alpha-2)."
78
+ },
79
+ {
80
+ "name": "q",
81
+ "type": "string",
82
+ "required": false,
83
+ "description": "Search text: city name, city code, country name or ISO code. Case and accents are ignored."
84
+ },
85
+ {
86
+ "name": "limit",
87
+ "type": "integer",
88
+ "required": false,
89
+ "description": "Page size, 1 to 100."
90
+ },
91
+ {
92
+ "name": "cursor",
93
+ "type": "string",
94
+ "required": false,
95
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
96
+ }
97
+ ],
98
+ "hasBody": false,
99
+ "bodyRequired": false,
100
+ "body": [],
101
+ "paginated": true,
102
+ "summary": "List proxy locations",
103
+ "description": "The catalog of supported `{country, city}` pairs for `proxyLocation`, ordered by country name, then by city population, largest first. Filter with `country`, or search with `q`.",
104
+ "deprecated": false
105
+ },
106
+ {
107
+ "operationId": "listAccounts",
108
+ "resource": [
109
+ "accounts"
110
+ ],
111
+ "method": "list",
112
+ "httpMethod": "GET",
113
+ "path": "/v1/accounts",
114
+ "pathParams": [],
115
+ "query": [
116
+ {
117
+ "name": "limit",
118
+ "type": "integer",
119
+ "required": false,
120
+ "description": "Page size, 1 to 100."
121
+ },
122
+ {
123
+ "name": "cursor",
124
+ "type": "string",
125
+ "required": false,
126
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
127
+ },
128
+ {
129
+ "name": "projectId",
130
+ "type": "string",
131
+ "required": false,
132
+ "description": "Filter by project: a project id, `ext:<externalId>`, or `none` for resources in no project. With an organization scope and no filter, the list covers every project and the unassigned resources. With…"
133
+ }
134
+ ],
135
+ "hasBody": false,
136
+ "bodyRequired": false,
137
+ "body": [],
138
+ "paginated": true,
139
+ "summary": "List accounts",
140
+ "description": "Accounts in scope, newest first. Deleted accounts are not listed.",
141
+ "deprecated": false
142
+ },
143
+ {
144
+ "operationId": "createAccount",
145
+ "resource": [
146
+ "accounts"
147
+ ],
148
+ "method": "create",
149
+ "httpMethod": "POST",
150
+ "path": "/v1/accounts",
151
+ "pathParams": [],
152
+ "query": [],
153
+ "hasBody": true,
154
+ "bodyRequired": true,
155
+ "body": [
156
+ {
157
+ "name": "",
158
+ "fields": [
159
+ {
160
+ "name": "name",
161
+ "type": "string",
162
+ "required": false,
163
+ "description": "Label, at most 100 characters."
164
+ },
165
+ {
166
+ "name": "proxyLocation",
167
+ "type": "object",
168
+ "required": true,
169
+ "description": "Required. Where the account's residential proxy exits: a pair from `GET /v1/proxy-locations`, ideally the number's own country. Missing: `400 invalid_request`; not in the catalog: `400 unsupported_pr…"
170
+ },
171
+ {
172
+ "name": "pairingPhone",
173
+ "type": "string",
174
+ "required": false,
175
+ "description": "Link by pairing code instead of QR code: the number to link, E.164 or digits. The code appears as `pairingCode` (and the `account.pairing_code_issued` event) once the session is up; `qrCodeUrl` stays…"
176
+ },
177
+ {
178
+ "name": "projectId",
179
+ "type": "string",
180
+ "required": false,
181
+ "description": "Organization keys only: create the account in this project (id or `ext:<externalId>`). A project scope uses its own project; naming another answers `403 forbidden`."
182
+ },
183
+ {
184
+ "name": "historySync",
185
+ "type": "\"none\" | \"recent\"",
186
+ "required": false,
187
+ "description": "Import the recent chats the phone sends when the number links: `recent`. Default `none`, no history. WhatsApp sends this history once, right after linking."
188
+ }
189
+ ]
190
+ }
191
+ ],
192
+ "paginated": false,
193
+ "summary": "Create an account",
194
+ "description": "Start linking a new WhatsApp number. Choose where its residential proxy exits with `proxyLocation`, a pair from `GET /v1/proxy-locations` (ideally the number's own country). The account is returned with `status: initializing`. Poll `GET /v1/accounts/{accountId}` (or listen for `account.qr_code_issued`) until `status` is `qr_ready`, show `qrCodeUrl` to the phone owner (WhatsApp > Linked devices >…",
195
+ "deprecated": false
196
+ },
197
+ {
198
+ "operationId": "getAccount",
199
+ "resource": [
200
+ "accounts"
201
+ ],
202
+ "method": "get",
203
+ "httpMethod": "GET",
204
+ "path": "/v1/accounts/{accountId}",
205
+ "pathParams": [
206
+ "accountId"
207
+ ],
208
+ "query": [],
209
+ "hasBody": false,
210
+ "bodyRequired": false,
211
+ "body": [],
212
+ "paginated": false,
213
+ "summary": "Get an account",
214
+ "description": "The account, with its current QR code or pairing code while it links.",
215
+ "deprecated": false
216
+ },
217
+ {
218
+ "operationId": "updateAccount",
219
+ "resource": [
220
+ "accounts"
221
+ ],
222
+ "method": "update",
223
+ "httpMethod": "PATCH",
224
+ "path": "/v1/accounts/{accountId}",
225
+ "pathParams": [
226
+ "accountId"
227
+ ],
228
+ "query": [],
229
+ "hasBody": true,
230
+ "bodyRequired": true,
231
+ "body": [
232
+ {
233
+ "name": "",
234
+ "fields": [
235
+ {
236
+ "name": "name",
237
+ "type": "string",
238
+ "required": false,
239
+ "description": ""
240
+ },
241
+ {
242
+ "name": "rejectCalls",
243
+ "type": "boolean",
244
+ "required": false,
245
+ "description": "Reject incoming calls automatically."
246
+ },
247
+ {
248
+ "name": "rejectCallsMessage",
249
+ "type": "string",
250
+ "required": false,
251
+ "description": "Sent to the caller after an automatic reject (not for group calls). At most 1000 characters."
252
+ },
253
+ {
254
+ "name": "pacing",
255
+ "type": "object",
256
+ "required": false,
257
+ "description": "Merged over the stored pacing; omitted fields keep their value. `pacing: null` resets everything to the defaults, with every protection off. `0` turns a cap off. Out-of-range values answer `400 inval…"
258
+ },
259
+ {
260
+ "name": "historySync",
261
+ "type": "\"none\" | \"recent\"",
262
+ "required": false,
263
+ "description": "Import history at the next link, or not. WhatsApp sends this history once, right after the number links, so a change applies to the next link. A number that is already linked gets no new history, not…"
264
+ },
265
+ {
266
+ "name": "proxyLocation",
267
+ "type": "object",
268
+ "required": false,
269
+ "description": "Move the number, or switch whether its city is exact. A location change: the number gets a new exit IP and its session reconnects."
270
+ }
271
+ ]
272
+ }
273
+ ],
274
+ "paginated": false,
275
+ "summary": "Update an account",
276
+ "description": "Rename it, set automatic call rejection, or turn on and tune its pacing (anti-ban protections, off by default). Call settings are sent to the live session (the engine must know the account; it does not need to be `ready`). Pacing applies from the next send, without reconnecting. `historySync` is stored at once and applies to the next link: WhatsApp sends history only right after a number links. A…",
277
+ "deprecated": false
278
+ },
279
+ {
280
+ "operationId": "deleteAccount",
281
+ "resource": [
282
+ "accounts"
283
+ ],
284
+ "method": "delete",
285
+ "httpMethod": "DELETE",
286
+ "path": "/v1/accounts/{accountId}",
287
+ "pathParams": [
288
+ "accountId"
289
+ ],
290
+ "query": [],
291
+ "hasBody": false,
292
+ "bodyRequired": false,
293
+ "body": [],
294
+ "paginated": false,
295
+ "summary": "Delete an account",
296
+ "description": "Log the session out on WhatsApp, delete the account and stop billing for it. Fires no event.",
297
+ "deprecated": false
298
+ },
299
+ {
300
+ "operationId": "reconnectAccount",
301
+ "resource": [
302
+ "accounts"
303
+ ],
304
+ "method": "reconnect",
305
+ "httpMethod": "POST",
306
+ "path": "/v1/accounts/{accountId}/reconnect",
307
+ "pathParams": [
308
+ "accountId"
309
+ ],
310
+ "query": [],
311
+ "hasBody": false,
312
+ "bodyRequired": false,
313
+ "body": [],
314
+ "paginated": false,
315
+ "summary": "Reconnect an account",
316
+ "description": "Restart the session. Produces a fresh QR code (or pairing code) when the link is no longer valid.",
317
+ "deprecated": false
318
+ },
319
+ {
320
+ "operationId": "logoutAccount",
321
+ "resource": [
322
+ "accounts"
323
+ ],
324
+ "method": "logout",
325
+ "httpMethod": "POST",
326
+ "path": "/v1/accounts/{accountId}/logout",
327
+ "pathParams": [
328
+ "accountId"
329
+ ],
330
+ "query": [],
331
+ "hasBody": false,
332
+ "bodyRequired": false,
333
+ "body": [],
334
+ "paginated": false,
335
+ "summary": "Log an account out",
336
+ "description": "Unlink the phone and stop billing, keeping the account and its messages. Reconnect to link again.",
337
+ "deprecated": false
338
+ },
339
+ {
340
+ "operationId": "createPairingCode",
341
+ "resource": [
342
+ "accounts"
343
+ ],
344
+ "method": "createPairingCode",
345
+ "httpMethod": "POST",
346
+ "path": "/v1/accounts/{accountId}/pairing-code",
347
+ "pathParams": [
348
+ "accountId"
349
+ ],
350
+ "query": [],
351
+ "hasBody": true,
352
+ "bodyRequired": true,
353
+ "body": [
354
+ {
355
+ "name": "",
356
+ "fields": [
357
+ {
358
+ "name": "phone",
359
+ "type": "string",
360
+ "required": true,
361
+ "description": "The number to link, E.164 (`+584121234567`) or digits."
362
+ }
363
+ ]
364
+ }
365
+ ],
366
+ "paginated": false,
367
+ "summary": "Create a pairing code",
368
+ "description": "Link by phone number instead of QR code: returns an 8-character code the phone owner types in WhatsApp > Linked devices > Link a device > Link with phone number instead. Works while the account is not linked (a session the engine lost is recreated first). The code lives about 160 seconds; ask again after `expiresAt`.",
369
+ "deprecated": false
370
+ },
371
+ {
372
+ "operationId": "setAccountPresence",
373
+ "resource": [
374
+ "accounts"
375
+ ],
376
+ "method": "setPresence",
377
+ "httpMethod": "POST",
378
+ "path": "/v1/accounts/{accountId}/presence",
379
+ "pathParams": [
380
+ "accountId"
381
+ ],
382
+ "query": [],
383
+ "hasBody": true,
384
+ "bodyRequired": true,
385
+ "body": [
386
+ {
387
+ "name": "",
388
+ "fields": [
389
+ {
390
+ "name": "state",
391
+ "type": "\"online\" | \"offline\"",
392
+ "required": true,
393
+ "description": "- `online`: Contacts see the account online. - `offline`: Contacts see it offline."
394
+ }
395
+ ]
396
+ }
397
+ ],
398
+ "paginated": false,
399
+ "summary": "Set online or offline",
400
+ "description": "Show the account as online or offline to contacts.",
401
+ "deprecated": false
402
+ },
403
+ {
404
+ "operationId": "setDefaultDisappearingTimer",
405
+ "resource": [
406
+ "accounts"
407
+ ],
408
+ "method": "setDefaultDisappearingTimer",
409
+ "httpMethod": "PUT",
410
+ "path": "/v1/accounts/{accountId}/disappearing-timer",
411
+ "pathParams": [
412
+ "accountId"
413
+ ],
414
+ "query": [],
415
+ "hasBody": true,
416
+ "bodyRequired": true,
417
+ "body": [
418
+ {
419
+ "name": "",
420
+ "fields": [
421
+ {
422
+ "name": "durationSeconds",
423
+ "type": "0 | 86400 | 604800 | 7776000",
424
+ "required": true,
425
+ "description": "0 turns it off; otherwise 24 hours, 7 days or 90 days."
426
+ }
427
+ ]
428
+ }
429
+ ],
430
+ "paginated": false,
431
+ "summary": "Set the default disappearing timer",
432
+ "description": "The timer new chats start with.",
433
+ "deprecated": false
434
+ },
435
+ {
436
+ "operationId": "sendChatPresence",
437
+ "resource": [
438
+ "chats"
439
+ ],
440
+ "method": "sendPresence",
441
+ "httpMethod": "POST",
442
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/presence",
443
+ "pathParams": [
444
+ "accountId",
445
+ "chatId"
446
+ ],
447
+ "query": [],
448
+ "hasBody": true,
449
+ "bodyRequired": true,
450
+ "body": [
451
+ {
452
+ "name": "",
453
+ "fields": [
454
+ {
455
+ "name": "state",
456
+ "type": "\"typing\" | \"recording\" | \"paused\"",
457
+ "required": true,
458
+ "description": "- `typing`: Show typing. - `recording`: Show recording audio. - `paused`: Clear the indicator."
459
+ }
460
+ ]
461
+ }
462
+ ],
463
+ "paginated": false,
464
+ "summary": "Show typing or recording",
465
+ "description": "Show (`typing`, `recording`) or clear (`paused`) the indicator in a chat.",
466
+ "deprecated": false
467
+ },
468
+ {
469
+ "operationId": "sendReadReceipts",
470
+ "resource": [
471
+ "chats"
472
+ ],
473
+ "method": "sendReadReceipts",
474
+ "httpMethod": "POST",
475
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/read",
476
+ "pathParams": [
477
+ "accountId",
478
+ "chatId"
479
+ ],
480
+ "query": [],
481
+ "hasBody": true,
482
+ "bodyRequired": false,
483
+ "body": [
484
+ {
485
+ "name": "",
486
+ "fields": [
487
+ {
488
+ "name": "messageIds",
489
+ "type": "string[]",
490
+ "required": false,
491
+ "description": "wuapi ids of inbound messages in this chat. Default: every unread inbound message wuapi stores for the chat. At most 500."
492
+ }
493
+ ]
494
+ }
495
+ ],
496
+ "paginated": false,
497
+ "summary": "Send read receipts",
498
+ "description": "Send read receipts (blue ticks) for messages in a chat. Without `messageIds`, every unread inbound message wuapi stores for the chat. In a group WhatsApp takes one receipt per author, so this makes one change per author.",
499
+ "deprecated": false
500
+ },
501
+ {
502
+ "operationId": "markChatRead",
503
+ "resource": [
504
+ "chats"
505
+ ],
506
+ "method": "markRead",
507
+ "httpMethod": "POST",
508
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/mark-read",
509
+ "pathParams": [
510
+ "accountId",
511
+ "chatId"
512
+ ],
513
+ "query": [],
514
+ "hasBody": false,
515
+ "bodyRequired": false,
516
+ "body": [],
517
+ "paginated": false,
518
+ "summary": "Mark a chat read",
519
+ "description": "Clear the chat's unread badge on the phone and other devices. Sends no read receipts; use `POST .../read` for those.",
520
+ "deprecated": false
521
+ },
522
+ {
523
+ "operationId": "markChatUnread",
524
+ "resource": [
525
+ "chats"
526
+ ],
527
+ "method": "markUnread",
528
+ "httpMethod": "POST",
529
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/mark-unread",
530
+ "pathParams": [
531
+ "accountId",
532
+ "chatId"
533
+ ],
534
+ "query": [],
535
+ "hasBody": false,
536
+ "bodyRequired": false,
537
+ "body": [],
538
+ "paginated": false,
539
+ "summary": "Mark a chat unread",
540
+ "description": "Put the unread badge back on the chat.",
541
+ "deprecated": false
542
+ },
543
+ {
544
+ "operationId": "archiveChat",
545
+ "resource": [
546
+ "chats"
547
+ ],
548
+ "method": "archive",
549
+ "httpMethod": "POST",
550
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/archive",
551
+ "pathParams": [
552
+ "accountId",
553
+ "chatId"
554
+ ],
555
+ "query": [],
556
+ "hasBody": false,
557
+ "bodyRequired": false,
558
+ "body": [],
559
+ "paginated": false,
560
+ "summary": "Archive a chat",
561
+ "description": "Archive the chat on the phone and other devices.",
562
+ "deprecated": false
563
+ },
564
+ {
565
+ "operationId": "unarchiveChat",
566
+ "resource": [
567
+ "chats"
568
+ ],
569
+ "method": "unarchive",
570
+ "httpMethod": "POST",
571
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/unarchive",
572
+ "pathParams": [
573
+ "accountId",
574
+ "chatId"
575
+ ],
576
+ "query": [],
577
+ "hasBody": false,
578
+ "bodyRequired": false,
579
+ "body": [],
580
+ "paginated": false,
581
+ "summary": "Unarchive a chat",
582
+ "description": "Move the chat out of the archive.",
583
+ "deprecated": false
584
+ },
585
+ {
586
+ "operationId": "pinChat",
587
+ "resource": [
588
+ "chats"
589
+ ],
590
+ "method": "pin",
591
+ "httpMethod": "POST",
592
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/pin",
593
+ "pathParams": [
594
+ "accountId",
595
+ "chatId"
596
+ ],
597
+ "query": [],
598
+ "hasBody": false,
599
+ "bodyRequired": false,
600
+ "body": [],
601
+ "paginated": false,
602
+ "summary": "Pin a chat",
603
+ "description": "Pin the chat to the top.",
604
+ "deprecated": false
605
+ },
606
+ {
607
+ "operationId": "unpinChat",
608
+ "resource": [
609
+ "chats"
610
+ ],
611
+ "method": "unpin",
612
+ "httpMethod": "POST",
613
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/unpin",
614
+ "pathParams": [
615
+ "accountId",
616
+ "chatId"
617
+ ],
618
+ "query": [],
619
+ "hasBody": false,
620
+ "bodyRequired": false,
621
+ "body": [],
622
+ "paginated": false,
623
+ "summary": "Unpin a chat",
624
+ "description": "Unpin the chat.",
625
+ "deprecated": false
626
+ },
627
+ {
628
+ "operationId": "muteChat",
629
+ "resource": [
630
+ "chats"
631
+ ],
632
+ "method": "mute",
633
+ "httpMethod": "POST",
634
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/mute",
635
+ "pathParams": [
636
+ "accountId",
637
+ "chatId"
638
+ ],
639
+ "query": [],
640
+ "hasBody": true,
641
+ "bodyRequired": false,
642
+ "body": [
643
+ {
644
+ "name": "",
645
+ "fields": [
646
+ {
647
+ "name": "durationSeconds",
648
+ "type": "integer",
649
+ "required": false,
650
+ "description": "How long to mute. 0 or absent: until unmuted."
651
+ }
652
+ ]
653
+ }
654
+ ],
655
+ "paginated": false,
656
+ "summary": "Mute a chat",
657
+ "description": "Mute notifications for the chat, for `durationSeconds` or until unmuted.",
658
+ "deprecated": false
659
+ },
660
+ {
661
+ "operationId": "unmuteChat",
662
+ "resource": [
663
+ "chats"
664
+ ],
665
+ "method": "unmute",
666
+ "httpMethod": "POST",
667
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/unmute",
668
+ "pathParams": [
669
+ "accountId",
670
+ "chatId"
671
+ ],
672
+ "query": [],
673
+ "hasBody": false,
674
+ "bodyRequired": false,
675
+ "body": [],
676
+ "paginated": false,
677
+ "summary": "Unmute a chat",
678
+ "description": "Turn the chat's notifications back on.",
679
+ "deprecated": false
680
+ },
681
+ {
682
+ "operationId": "deleteChat",
683
+ "resource": [
684
+ "chats"
685
+ ],
686
+ "method": "delete",
687
+ "httpMethod": "DELETE",
688
+ "path": "/v1/accounts/{accountId}/chats/{chatId}",
689
+ "pathParams": [
690
+ "accountId",
691
+ "chatId"
692
+ ],
693
+ "query": [
694
+ {
695
+ "name": "deleteMedia",
696
+ "type": "boolean",
697
+ "required": false,
698
+ "description": "Also delete the chat's media."
699
+ }
700
+ ],
701
+ "hasBody": false,
702
+ "bodyRequired": false,
703
+ "body": [],
704
+ "paginated": false,
705
+ "summary": "Delete a chat",
706
+ "description": "Delete the chat on the linked devices. Messages stored in wuapi are kept.",
707
+ "deprecated": false
708
+ },
709
+ {
710
+ "operationId": "setChatDisappearingTimer",
711
+ "resource": [
712
+ "chats"
713
+ ],
714
+ "method": "setDisappearingTimer",
715
+ "httpMethod": "PUT",
716
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/disappearing-timer",
717
+ "pathParams": [
718
+ "accountId",
719
+ "chatId"
720
+ ],
721
+ "query": [],
722
+ "hasBody": true,
723
+ "bodyRequired": true,
724
+ "body": [
725
+ {
726
+ "name": "",
727
+ "fields": [
728
+ {
729
+ "name": "durationSeconds",
730
+ "type": "0 | 86400 | 604800 | 7776000",
731
+ "required": true,
732
+ "description": "0 turns it off; otherwise 24 hours, 7 days or 90 days."
733
+ }
734
+ ]
735
+ }
736
+ ],
737
+ "paginated": false,
738
+ "summary": "Set a chat's disappearing timer",
739
+ "description": "Messages in the chat disappear after `durationSeconds`; 0 turns it off.",
740
+ "deprecated": false
741
+ },
742
+ {
743
+ "operationId": "addChatLabel",
744
+ "resource": [
745
+ "chats"
746
+ ],
747
+ "method": "addLabel",
748
+ "httpMethod": "POST",
749
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/labels",
750
+ "pathParams": [
751
+ "accountId",
752
+ "chatId"
753
+ ],
754
+ "query": [],
755
+ "hasBody": true,
756
+ "bodyRequired": true,
757
+ "body": [
758
+ {
759
+ "name": "",
760
+ "fields": [
761
+ {
762
+ "name": "labelId",
763
+ "type": "string",
764
+ "required": true,
765
+ "description": ""
766
+ }
767
+ ]
768
+ }
769
+ ],
770
+ "paginated": false,
771
+ "summary": "Label a chat",
772
+ "description": "WhatsApp Business accounts only; others answer `400 not_supported`.",
773
+ "deprecated": false
774
+ },
775
+ {
776
+ "operationId": "removeChatLabel",
777
+ "resource": [
778
+ "chats"
779
+ ],
780
+ "method": "removeLabel",
781
+ "httpMethod": "DELETE",
782
+ "path": "/v1/accounts/{accountId}/chats/{chatId}/labels/{labelId}",
783
+ "pathParams": [
784
+ "accountId",
785
+ "chatId",
786
+ "labelId"
787
+ ],
788
+ "query": [],
789
+ "hasBody": false,
790
+ "bodyRequired": false,
791
+ "body": [],
792
+ "paginated": false,
793
+ "summary": "Remove a label from a chat",
794
+ "description": "WhatsApp Business accounts only.",
795
+ "deprecated": false
796
+ },
797
+ {
798
+ "operationId": "upsertLabel",
799
+ "resource": [
800
+ "labels"
801
+ ],
802
+ "method": "upsert",
803
+ "httpMethod": "PUT",
804
+ "path": "/v1/accounts/{accountId}/labels/{labelId}",
805
+ "pathParams": [
806
+ "accountId",
807
+ "labelId"
808
+ ],
809
+ "query": [],
810
+ "hasBody": true,
811
+ "bodyRequired": true,
812
+ "body": [
813
+ {
814
+ "name": "",
815
+ "fields": [
816
+ {
817
+ "name": "name",
818
+ "type": "string",
819
+ "required": true,
820
+ "description": ""
821
+ },
822
+ {
823
+ "name": "color",
824
+ "type": "integer",
825
+ "required": false,
826
+ "description": "WhatsApp's label color index."
827
+ }
828
+ ]
829
+ }
830
+ ],
831
+ "paginated": false,
832
+ "summary": "Create or edit a label",
833
+ "description": "Creates the label with this id, or edits it. WhatsApp Business accounts only; others answer `400 not_supported`.",
834
+ "deprecated": false
835
+ },
836
+ {
837
+ "operationId": "deleteLabel",
838
+ "resource": [
839
+ "labels"
840
+ ],
841
+ "method": "delete",
842
+ "httpMethod": "DELETE",
843
+ "path": "/v1/accounts/{accountId}/labels/{labelId}",
844
+ "pathParams": [
845
+ "accountId",
846
+ "labelId"
847
+ ],
848
+ "query": [],
849
+ "hasBody": false,
850
+ "bodyRequired": false,
851
+ "body": [],
852
+ "paginated": false,
853
+ "summary": "Delete a label",
854
+ "description": "WhatsApp Business accounts only.",
855
+ "deprecated": false
856
+ },
857
+ {
858
+ "operationId": "addMessageLabel",
859
+ "resource": [
860
+ "messages"
861
+ ],
862
+ "method": "addLabel",
863
+ "httpMethod": "POST",
864
+ "path": "/v1/messages/{messageId}/labels",
865
+ "pathParams": [
866
+ "messageId"
867
+ ],
868
+ "query": [],
869
+ "hasBody": true,
870
+ "bodyRequired": true,
871
+ "body": [
872
+ {
873
+ "name": "",
874
+ "fields": [
875
+ {
876
+ "name": "labelId",
877
+ "type": "string",
878
+ "required": true,
879
+ "description": ""
880
+ }
881
+ ]
882
+ }
883
+ ],
884
+ "paginated": false,
885
+ "summary": "Label a message",
886
+ "description": "WhatsApp Business accounts only. The message must have reached WhatsApp and not be deleted.",
887
+ "deprecated": false
888
+ },
889
+ {
890
+ "operationId": "removeMessageLabel",
891
+ "resource": [
892
+ "messages"
893
+ ],
894
+ "method": "removeLabel",
895
+ "httpMethod": "DELETE",
896
+ "path": "/v1/messages/{messageId}/labels/{labelId}",
897
+ "pathParams": [
898
+ "messageId",
899
+ "labelId"
900
+ ],
901
+ "query": [],
902
+ "hasBody": false,
903
+ "bodyRequired": false,
904
+ "body": [],
905
+ "paginated": false,
906
+ "summary": "Remove a label from a message",
907
+ "description": "WhatsApp Business accounts only.",
908
+ "deprecated": false
909
+ },
910
+ {
911
+ "operationId": "createStory",
912
+ "resource": [
913
+ "stories"
914
+ ],
915
+ "method": "create",
916
+ "httpMethod": "POST",
917
+ "path": "/v1/accounts/{accountId}/stories",
918
+ "pathParams": [
919
+ "accountId"
920
+ ],
921
+ "query": [],
922
+ "hasBody": true,
923
+ "bodyRequired": true,
924
+ "body": [
925
+ {
926
+ "name": "text",
927
+ "fields": [
928
+ {
929
+ "name": "type",
930
+ "type": "\"text\"",
931
+ "required": false,
932
+ "description": "`text`. A body without `type` is also posted as text."
933
+ },
934
+ {
935
+ "name": "text",
936
+ "type": "string",
937
+ "required": true,
938
+ "description": "The story. Not blank; at most 4096 characters."
939
+ },
940
+ {
941
+ "name": "backgroundColor",
942
+ "type": "string",
943
+ "required": false,
944
+ "description": "`#RRGGBB`."
945
+ },
946
+ {
947
+ "name": "font",
948
+ "type": "0 | 1 | 2 | 6 | 7 | 8 | 9 | 10",
949
+ "required": false,
950
+ "description": "WhatsApp's font."
951
+ }
952
+ ]
953
+ },
954
+ {
955
+ "name": "video",
956
+ "fields": [
957
+ {
958
+ "name": "type",
959
+ "type": "\"image\" | \"video\"",
960
+ "required": true,
961
+ "description": ""
962
+ },
963
+ {
964
+ "name": "media",
965
+ "type": "object",
966
+ "required": true,
967
+ "description": "An image or video for a story, fetched by our servers."
968
+ },
969
+ {
970
+ "name": "text",
971
+ "type": "string",
972
+ "required": false,
973
+ "description": "Caption. At most 4096 characters."
974
+ }
975
+ ]
976
+ }
977
+ ],
978
+ "paginated": false,
979
+ "summary": "Post a story",
980
+ "description": "Queued like any send and stored as an outbound message with `chatId: stories`. The outcome arrives as `message.sent` or `message.failed`.",
981
+ "deprecated": false
982
+ },
983
+ {
984
+ "operationId": "checkContacts",
985
+ "resource": [
986
+ "contacts"
987
+ ],
988
+ "method": "check",
989
+ "httpMethod": "POST",
990
+ "path": "/v1/accounts/{accountId}/contacts/check",
991
+ "pathParams": [
992
+ "accountId"
993
+ ],
994
+ "query": [],
995
+ "hasBody": true,
996
+ "bodyRequired": true,
997
+ "body": [
998
+ {
999
+ "name": "",
1000
+ "fields": [
1001
+ {
1002
+ "name": "phones",
1003
+ "type": "string[]",
1004
+ "required": true,
1005
+ "description": "1 to 50 phone numbers (E.164 or digits)."
1006
+ }
1007
+ ]
1008
+ }
1009
+ ],
1010
+ "paginated": false,
1011
+ "summary": "Check numbers on WhatsApp",
1012
+ "description": "Which numbers have WhatsApp. Read-only: works for a suspended project.",
1013
+ "deprecated": false
1014
+ },
1015
+ {
1016
+ "operationId": "lookupContacts",
1017
+ "resource": [
1018
+ "contacts"
1019
+ ],
1020
+ "method": "lookup",
1021
+ "httpMethod": "POST",
1022
+ "path": "/v1/accounts/{accountId}/contacts/lookup",
1023
+ "pathParams": [
1024
+ "accountId"
1025
+ ],
1026
+ "query": [],
1027
+ "hasBody": true,
1028
+ "bodyRequired": true,
1029
+ "body": [
1030
+ {
1031
+ "name": "",
1032
+ "fields": [
1033
+ {
1034
+ "name": "contactIds",
1035
+ "type": "string[]",
1036
+ "required": true,
1037
+ "description": "1 to 50 contact ids (E.164, digits or `lid:<digits>`)."
1038
+ }
1039
+ ]
1040
+ }
1041
+ ],
1042
+ "paginated": false,
1043
+ "summary": "Look up contacts",
1044
+ "description": "About text, picture id, verified business name and device count. Read-only.",
1045
+ "deprecated": false
1046
+ },
1047
+ {
1048
+ "operationId": "getContactPicture",
1049
+ "resource": [
1050
+ "contacts"
1051
+ ],
1052
+ "method": "getPicture",
1053
+ "httpMethod": "GET",
1054
+ "path": "/v1/accounts/{accountId}/contacts/{contactId}/picture",
1055
+ "pathParams": [
1056
+ "accountId",
1057
+ "contactId"
1058
+ ],
1059
+ "query": [
1060
+ {
1061
+ "name": "preview",
1062
+ "type": "boolean",
1063
+ "required": false,
1064
+ "description": "Return the small preview."
1065
+ }
1066
+ ],
1067
+ "hasBody": false,
1068
+ "bodyRequired": false,
1069
+ "body": [],
1070
+ "paginated": false,
1071
+ "summary": "Get a profile picture",
1072
+ "description": "The contact's profile picture, if this account can see it.",
1073
+ "deprecated": false
1074
+ },
1075
+ {
1076
+ "operationId": "getBusinessProfile",
1077
+ "resource": [
1078
+ "contacts"
1079
+ ],
1080
+ "method": "getBusinessProfile",
1081
+ "httpMethod": "GET",
1082
+ "path": "/v1/accounts/{accountId}/contacts/{contactId}/business-profile",
1083
+ "pathParams": [
1084
+ "accountId",
1085
+ "contactId"
1086
+ ],
1087
+ "query": [],
1088
+ "hasBody": false,
1089
+ "bodyRequired": false,
1090
+ "body": [],
1091
+ "paginated": false,
1092
+ "summary": "Get a business profile",
1093
+ "description": "The WhatsApp Business profile of a contact.",
1094
+ "deprecated": false
1095
+ },
1096
+ {
1097
+ "operationId": "subscribeContactPresence",
1098
+ "resource": [
1099
+ "contacts"
1100
+ ],
1101
+ "method": "subscribePresence",
1102
+ "httpMethod": "POST",
1103
+ "path": "/v1/accounts/{accountId}/contacts/{contactId}/subscribe-presence",
1104
+ "pathParams": [
1105
+ "accountId",
1106
+ "contactId"
1107
+ ],
1108
+ "query": [],
1109
+ "hasBody": false,
1110
+ "bodyRequired": false,
1111
+ "body": [],
1112
+ "paginated": false,
1113
+ "summary": "Subscribe to a contact's presence",
1114
+ "description": "Receive `contact.presence_updated` events for the contact. Needs the engine's extended events; otherwise `400 not_supported`.",
1115
+ "deprecated": false
1116
+ },
1117
+ {
1118
+ "operationId": "blockContact",
1119
+ "resource": [
1120
+ "contacts"
1121
+ ],
1122
+ "method": "block",
1123
+ "httpMethod": "POST",
1124
+ "path": "/v1/accounts/{accountId}/contacts/{contactId}/block",
1125
+ "pathParams": [
1126
+ "accountId",
1127
+ "contactId"
1128
+ ],
1129
+ "query": [],
1130
+ "hasBody": false,
1131
+ "bodyRequired": false,
1132
+ "body": [],
1133
+ "paginated": false,
1134
+ "summary": "Block a contact",
1135
+ "description": "The contact can no longer message or call the account.",
1136
+ "deprecated": false
1137
+ },
1138
+ {
1139
+ "operationId": "unblockContact",
1140
+ "resource": [
1141
+ "contacts"
1142
+ ],
1143
+ "method": "unblock",
1144
+ "httpMethod": "POST",
1145
+ "path": "/v1/accounts/{accountId}/contacts/{contactId}/unblock",
1146
+ "pathParams": [
1147
+ "accountId",
1148
+ "contactId"
1149
+ ],
1150
+ "query": [],
1151
+ "hasBody": false,
1152
+ "bodyRequired": false,
1153
+ "body": [],
1154
+ "paginated": false,
1155
+ "summary": "Unblock a contact",
1156
+ "description": "Remove the contact from the blocklist.",
1157
+ "deprecated": false
1158
+ },
1159
+ {
1160
+ "operationId": "listBlockedContacts",
1161
+ "resource": [
1162
+ "contacts"
1163
+ ],
1164
+ "method": "listBlocked",
1165
+ "httpMethod": "GET",
1166
+ "path": "/v1/accounts/{accountId}/blocklist",
1167
+ "pathParams": [
1168
+ "accountId"
1169
+ ],
1170
+ "query": [
1171
+ {
1172
+ "name": "limit",
1173
+ "type": "integer",
1174
+ "required": false,
1175
+ "description": "Page size, 1 to 100."
1176
+ },
1177
+ {
1178
+ "name": "cursor",
1179
+ "type": "string",
1180
+ "required": false,
1181
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
1182
+ }
1183
+ ],
1184
+ "hasBody": false,
1185
+ "bodyRequired": false,
1186
+ "body": [],
1187
+ "paginated": true,
1188
+ "summary": "List blocked contacts",
1189
+ "description": "The account's blocklist, read live from WhatsApp. `contactId` is the contact as WhatsApp lists it (often a LID); `phone` and `lid` add the number and the LID when the account knows them.",
1190
+ "deprecated": false
1191
+ },
1192
+ {
1193
+ "operationId": "getContactLink",
1194
+ "resource": [
1195
+ "contacts"
1196
+ ],
1197
+ "method": "getLink",
1198
+ "httpMethod": "GET",
1199
+ "path": "/v1/accounts/{accountId}/contact-link",
1200
+ "pathParams": [
1201
+ "accountId"
1202
+ ],
1203
+ "query": [],
1204
+ "hasBody": false,
1205
+ "bodyRequired": false,
1206
+ "body": [],
1207
+ "paginated": false,
1208
+ "summary": "Get the account's contact link",
1209
+ "description": "The account's own contact QR link.",
1210
+ "deprecated": false
1211
+ },
1212
+ {
1213
+ "operationId": "resetContactLink",
1214
+ "resource": [
1215
+ "contacts"
1216
+ ],
1217
+ "method": "resetLink",
1218
+ "httpMethod": "POST",
1219
+ "path": "/v1/accounts/{accountId}/contact-link/reset",
1220
+ "pathParams": [
1221
+ "accountId"
1222
+ ],
1223
+ "query": [],
1224
+ "hasBody": false,
1225
+ "bodyRequired": false,
1226
+ "body": [],
1227
+ "paginated": false,
1228
+ "summary": "Reset the account's contact link",
1229
+ "description": "Revoke the current contact link and return a new one.",
1230
+ "deprecated": false
1231
+ },
1232
+ {
1233
+ "operationId": "resolveLink",
1234
+ "resource": [
1235
+ "contacts"
1236
+ ],
1237
+ "method": "resolveLink",
1238
+ "httpMethod": "POST",
1239
+ "path": "/v1/accounts/{accountId}/links/resolve",
1240
+ "pathParams": [
1241
+ "accountId"
1242
+ ],
1243
+ "query": [],
1244
+ "hasBody": true,
1245
+ "bodyRequired": true,
1246
+ "body": [
1247
+ {
1248
+ "name": "",
1249
+ "fields": [
1250
+ {
1251
+ "name": "kind",
1252
+ "type": "\"contact\" | \"business\"",
1253
+ "required": true,
1254
+ "description": "- `contact`: A contact QR link. - `business`: A business message link."
1255
+ },
1256
+ {
1257
+ "name": "code",
1258
+ "type": "string",
1259
+ "required": true,
1260
+ "description": "The code or the full link."
1261
+ }
1262
+ ]
1263
+ }
1264
+ ],
1265
+ "paginated": false,
1266
+ "summary": "Resolve a contact or business link",
1267
+ "description": "Who a contact QR link or a business message link points to. Read-only. `400 not_supported` when WhatsApp does not offer link resolution to this account.",
1268
+ "deprecated": false
1269
+ },
1270
+ {
1271
+ "operationId": "listBots",
1272
+ "resource": [
1273
+ "bots"
1274
+ ],
1275
+ "method": "list",
1276
+ "httpMethod": "GET",
1277
+ "path": "/v1/accounts/{accountId}/bots",
1278
+ "pathParams": [
1279
+ "accountId"
1280
+ ],
1281
+ "query": [
1282
+ {
1283
+ "name": "limit",
1284
+ "type": "integer",
1285
+ "required": false,
1286
+ "description": "Page size, 1 to 100."
1287
+ },
1288
+ {
1289
+ "name": "cursor",
1290
+ "type": "string",
1291
+ "required": false,
1292
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
1293
+ }
1294
+ ],
1295
+ "hasBody": false,
1296
+ "bodyRequired": false,
1297
+ "body": [],
1298
+ "paginated": true,
1299
+ "summary": "List WhatsApp AI bots",
1300
+ "description": "WhatsApp's AI bot directory as the account sees it. `400 not_supported` when WhatsApp does not offer it to this account (WhatsApp's AI assistant is not available in every country or on every account).",
1301
+ "deprecated": false
1302
+ },
1303
+ {
1304
+ "operationId": "updateProfile",
1305
+ "resource": [
1306
+ "profile"
1307
+ ],
1308
+ "method": "update",
1309
+ "httpMethod": "PATCH",
1310
+ "path": "/v1/accounts/{accountId}/profile",
1311
+ "pathParams": [
1312
+ "accountId"
1313
+ ],
1314
+ "query": [],
1315
+ "hasBody": true,
1316
+ "bodyRequired": true,
1317
+ "body": [
1318
+ {
1319
+ "name": "",
1320
+ "fields": [
1321
+ {
1322
+ "name": "about",
1323
+ "type": "string",
1324
+ "required": false,
1325
+ "description": "The About text."
1326
+ },
1327
+ {
1328
+ "name": "name",
1329
+ "type": "string",
1330
+ "required": false,
1331
+ "description": "Display name."
1332
+ }
1333
+ ]
1334
+ }
1335
+ ],
1336
+ "paginated": false,
1337
+ "summary": "Update the About text or display name",
1338
+ "description": "WhatsApp cannot be read back here, so this answers 204. `about` and `name` are two changes on WhatsApp.",
1339
+ "deprecated": false
1340
+ },
1341
+ {
1342
+ "operationId": "setProfilePicture",
1343
+ "resource": [
1344
+ "profile"
1345
+ ],
1346
+ "method": "setPicture",
1347
+ "httpMethod": "PUT",
1348
+ "path": "/v1/accounts/{accountId}/profile/picture",
1349
+ "pathParams": [
1350
+ "accountId"
1351
+ ],
1352
+ "query": [],
1353
+ "hasBody": true,
1354
+ "bodyRequired": true,
1355
+ "body": [
1356
+ {
1357
+ "name": "",
1358
+ "fields": [
1359
+ {
1360
+ "name": "url",
1361
+ "type": "string",
1362
+ "required": true,
1363
+ "description": ""
1364
+ }
1365
+ ]
1366
+ },
1367
+ {
1368
+ "name": "",
1369
+ "fields": [
1370
+ {
1371
+ "name": "base64",
1372
+ "type": "string",
1373
+ "required": true,
1374
+ "description": ""
1375
+ }
1376
+ ]
1377
+ }
1378
+ ],
1379
+ "paginated": false,
1380
+ "summary": "Set the profile picture",
1381
+ "description": "JPEG, from an https URL or base64.",
1382
+ "deprecated": false
1383
+ },
1384
+ {
1385
+ "operationId": "deleteProfilePicture",
1386
+ "resource": [
1387
+ "profile"
1388
+ ],
1389
+ "method": "deletePicture",
1390
+ "httpMethod": "DELETE",
1391
+ "path": "/v1/accounts/{accountId}/profile/picture",
1392
+ "pathParams": [
1393
+ "accountId"
1394
+ ],
1395
+ "query": [],
1396
+ "hasBody": false,
1397
+ "bodyRequired": false,
1398
+ "body": [],
1399
+ "paginated": false,
1400
+ "summary": "Delete the profile picture",
1401
+ "description": "Remove the account's profile picture.",
1402
+ "deprecated": false
1403
+ },
1404
+ {
1405
+ "operationId": "getPrivacySettings",
1406
+ "resource": [
1407
+ "privacy"
1408
+ ],
1409
+ "method": "get",
1410
+ "httpMethod": "GET",
1411
+ "path": "/v1/accounts/{accountId}/privacy",
1412
+ "pathParams": [
1413
+ "accountId"
1414
+ ],
1415
+ "query": [],
1416
+ "hasBody": false,
1417
+ "bodyRequired": false,
1418
+ "body": [],
1419
+ "paginated": false,
1420
+ "summary": "Get privacy settings",
1421
+ "description": "The account's privacy settings, read live from WhatsApp.",
1422
+ "deprecated": false
1423
+ },
1424
+ {
1425
+ "operationId": "updatePrivacySettings",
1426
+ "resource": [
1427
+ "privacy"
1428
+ ],
1429
+ "method": "update",
1430
+ "httpMethod": "PATCH",
1431
+ "path": "/v1/accounts/{accountId}/privacy",
1432
+ "pathParams": [
1433
+ "accountId"
1434
+ ],
1435
+ "query": [],
1436
+ "hasBody": true,
1437
+ "bodyRequired": true,
1438
+ "body": [
1439
+ {
1440
+ "name": "",
1441
+ "fields": [
1442
+ {
1443
+ "name": "groupAdd",
1444
+ "type": "string",
1445
+ "required": false,
1446
+ "description": ""
1447
+ },
1448
+ {
1449
+ "name": "lastSeen",
1450
+ "type": "string",
1451
+ "required": false,
1452
+ "description": ""
1453
+ },
1454
+ {
1455
+ "name": "stories",
1456
+ "type": "string",
1457
+ "required": false,
1458
+ "description": ""
1459
+ },
1460
+ {
1461
+ "name": "profile",
1462
+ "type": "string",
1463
+ "required": false,
1464
+ "description": ""
1465
+ },
1466
+ {
1467
+ "name": "readReceipts",
1468
+ "type": "string",
1469
+ "required": false,
1470
+ "description": ""
1471
+ },
1472
+ {
1473
+ "name": "online",
1474
+ "type": "string",
1475
+ "required": false,
1476
+ "description": ""
1477
+ },
1478
+ {
1479
+ "name": "callAdd",
1480
+ "type": "string",
1481
+ "required": false,
1482
+ "description": ""
1483
+ },
1484
+ {
1485
+ "name": "messages",
1486
+ "type": "string",
1487
+ "required": false,
1488
+ "description": ""
1489
+ }
1490
+ ]
1491
+ }
1492
+ ],
1493
+ "paginated": false,
1494
+ "summary": "Change privacy settings",
1495
+ "description": "Change one or more settings. Each setting is one change on WhatsApp. Returns every setting after the change.",
1496
+ "deprecated": false
1497
+ },
1498
+ {
1499
+ "operationId": "getStoryPrivacy",
1500
+ "resource": [
1501
+ "privacy"
1502
+ ],
1503
+ "method": "getStoryPrivacy",
1504
+ "httpMethod": "GET",
1505
+ "path": "/v1/accounts/{accountId}/privacy/stories",
1506
+ "pathParams": [
1507
+ "accountId"
1508
+ ],
1509
+ "query": [],
1510
+ "hasBody": false,
1511
+ "bodyRequired": false,
1512
+ "body": [],
1513
+ "paginated": false,
1514
+ "summary": "Get story privacy",
1515
+ "description": "Who sees the account's stories.",
1516
+ "deprecated": false
1517
+ },
1518
+ {
1519
+ "operationId": "rejectCall",
1520
+ "resource": [
1521
+ "calls"
1522
+ ],
1523
+ "method": "reject",
1524
+ "httpMethod": "POST",
1525
+ "path": "/v1/accounts/{accountId}/calls/{callId}/reject",
1526
+ "pathParams": [
1527
+ "accountId",
1528
+ "callId"
1529
+ ],
1530
+ "query": [],
1531
+ "hasBody": true,
1532
+ "bodyRequired": true,
1533
+ "body": [
1534
+ {
1535
+ "name": "",
1536
+ "fields": [
1537
+ {
1538
+ "name": "from",
1539
+ "type": "string",
1540
+ "required": true,
1541
+ "description": "The caller, as in the `call.received` event (`data.object.from`)."
1542
+ }
1543
+ ]
1544
+ }
1545
+ ],
1546
+ "paginated": false,
1547
+ "summary": "Reject an incoming call",
1548
+ "description": "Use the `id` and `from` of a `call.received` event. For automatic rejection, set `rejectCalls` on the account.",
1549
+ "deprecated": false
1550
+ },
1551
+ {
1552
+ "operationId": "getStickerPack",
1553
+ "resource": [
1554
+ "stickerPacks"
1555
+ ],
1556
+ "method": "get",
1557
+ "httpMethod": "GET",
1558
+ "path": "/v1/accounts/{accountId}/sticker-packs/{stickerPackId}",
1559
+ "pathParams": [
1560
+ "accountId",
1561
+ "stickerPackId"
1562
+ ],
1563
+ "query": [],
1564
+ "hasBody": false,
1565
+ "bodyRequired": false,
1566
+ "body": [],
1567
+ "paginated": false,
1568
+ "summary": "Get a sticker pack",
1569
+ "description": "A sticker pack and its stickers.",
1570
+ "deprecated": false
1571
+ },
1572
+ {
1573
+ "operationId": "getOrder",
1574
+ "resource": [
1575
+ "orders"
1576
+ ],
1577
+ "method": "get",
1578
+ "httpMethod": "GET",
1579
+ "path": "/v1/accounts/{accountId}/orders/{orderId}",
1580
+ "pathParams": [
1581
+ "accountId",
1582
+ "orderId"
1583
+ ],
1584
+ "query": [
1585
+ {
1586
+ "name": "token",
1587
+ "type": "string",
1588
+ "required": true,
1589
+ "description": "The order's token, from the order message."
1590
+ }
1591
+ ],
1592
+ "hasBody": false,
1593
+ "bodyRequired": false,
1594
+ "body": [],
1595
+ "paginated": false,
1596
+ "summary": "Get an order",
1597
+ "description": "Details of a catalog order received as a message.",
1598
+ "deprecated": false
1599
+ },
1600
+ {
1601
+ "operationId": "listMessages",
1602
+ "resource": [
1603
+ "messages"
1604
+ ],
1605
+ "method": "list",
1606
+ "httpMethod": "GET",
1607
+ "path": "/v1/messages",
1608
+ "pathParams": [],
1609
+ "query": [
1610
+ {
1611
+ "name": "accountId",
1612
+ "type": "string",
1613
+ "required": false,
1614
+ "description": "Only this account's messages."
1615
+ },
1616
+ {
1617
+ "name": "chatId",
1618
+ "type": "string",
1619
+ "required": false,
1620
+ "description": "Only this chat: a contact id, a group id, a channel id or `stories`."
1621
+ },
1622
+ {
1623
+ "name": "direction",
1624
+ "type": "\"inbound\" | \"outbound\"",
1625
+ "required": false,
1626
+ "description": "Only inbound or outbound messages."
1627
+ },
1628
+ {
1629
+ "name": "limit",
1630
+ "type": "integer",
1631
+ "required": false,
1632
+ "description": "Page size, 1 to 100."
1633
+ },
1634
+ {
1635
+ "name": "cursor",
1636
+ "type": "string",
1637
+ "required": false,
1638
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
1639
+ },
1640
+ {
1641
+ "name": "projectId",
1642
+ "type": "string",
1643
+ "required": false,
1644
+ "description": "Filter by project: a project id, `ext:<externalId>`, or `none` for resources in no project. With an organization scope and no filter, the list covers every project and the unassigned resources. With…"
1645
+ }
1646
+ ],
1647
+ "hasBody": false,
1648
+ "bodyRequired": false,
1649
+ "body": [],
1650
+ "paginated": true,
1651
+ "summary": "List messages",
1652
+ "description": "Messages in scope, newest first.",
1653
+ "deprecated": false
1654
+ },
1655
+ {
1656
+ "operationId": "sendMessage",
1657
+ "resource": [
1658
+ "messages"
1659
+ ],
1660
+ "method": "send",
1661
+ "httpMethod": "POST",
1662
+ "path": "/v1/messages",
1663
+ "pathParams": [],
1664
+ "query": [],
1665
+ "hasBody": true,
1666
+ "bodyRequired": true,
1667
+ "body": [
1668
+ {
1669
+ "name": "text",
1670
+ "fields": [
1671
+ {
1672
+ "name": "accountId",
1673
+ "type": "string",
1674
+ "required": true,
1675
+ "description": "The account to send from. It must be `ready`."
1676
+ },
1677
+ {
1678
+ "name": "to",
1679
+ "type": "string",
1680
+ "required": true,
1681
+ "description": "A contact id (E.164, digits or `lid:<digits>`), a WhatsApp username (`@handle`) of a contact this account already chats with, a group id, or a channel id (to post in a channel the account administers…"
1682
+ },
1683
+ {
1684
+ "name": "type",
1685
+ "type": "\"text\"",
1686
+ "required": false,
1687
+ "description": "`text`. A body without `type` is also sent as text."
1688
+ },
1689
+ {
1690
+ "name": "text",
1691
+ "type": "string",
1692
+ "required": true,
1693
+ "description": "The message. Not blank; at most 4096 characters."
1694
+ },
1695
+ {
1696
+ "name": "mentions",
1697
+ "type": "string[]",
1698
+ "required": false,
1699
+ "description": "Contact ids to mention. At most 256. Not for channel posts."
1700
+ },
1701
+ {
1702
+ "name": "mentionAll",
1703
+ "type": "boolean",
1704
+ "required": false,
1705
+ "description": "Groups only: mention every participant."
1706
+ },
1707
+ {
1708
+ "name": "forwarded",
1709
+ "type": "boolean",
1710
+ "required": false,
1711
+ "description": "Mark as forwarded."
1712
+ },
1713
+ {
1714
+ "name": "disappearingSeconds",
1715
+ "type": "0 | 86400 | 604800 | 7776000",
1716
+ "required": false,
1717
+ "description": "Match the chat's disappearing timer."
1718
+ },
1719
+ {
1720
+ "name": "linkPreview",
1721
+ "type": "object",
1722
+ "required": false,
1723
+ "description": "Text only. wuapi does not fetch previews; you provide them."
1724
+ },
1725
+ {
1726
+ "name": "replyToMessageId",
1727
+ "type": "string",
1728
+ "required": false,
1729
+ "description": "A wuapi message id in the same chat to quote. Any type. Not for channel posts."
1730
+ },
1731
+ {
1732
+ "name": "metadata",
1733
+ "type": "object",
1734
+ "required": false,
1735
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
1736
+ }
1737
+ ]
1738
+ },
1739
+ {
1740
+ "name": "image",
1741
+ "fields": [
1742
+ {
1743
+ "name": "accountId",
1744
+ "type": "string",
1745
+ "required": true,
1746
+ "description": "The account to send from. It must be `ready`."
1747
+ },
1748
+ {
1749
+ "name": "to",
1750
+ "type": "string",
1751
+ "required": true,
1752
+ "description": "A contact id (E.164, digits or `lid:<digits>`), a WhatsApp username (`@handle`) of a contact this account already chats with, a group id, or a channel id (to post in a channel the account administers…"
1753
+ },
1754
+ {
1755
+ "name": "type",
1756
+ "type": "\"image\"",
1757
+ "required": true,
1758
+ "description": "`image`."
1759
+ },
1760
+ {
1761
+ "name": "media",
1762
+ "type": "object",
1763
+ "required": true,
1764
+ "description": "A file to send, fetched by our servers."
1765
+ },
1766
+ {
1767
+ "name": "text",
1768
+ "type": "string",
1769
+ "required": false,
1770
+ "description": "Caption. At most 4096 characters."
1771
+ },
1772
+ {
1773
+ "name": "mentions",
1774
+ "type": "string[]",
1775
+ "required": false,
1776
+ "description": "Contact ids to mention. At most 256. Not for channel posts."
1777
+ },
1778
+ {
1779
+ "name": "mentionAll",
1780
+ "type": "boolean",
1781
+ "required": false,
1782
+ "description": "Groups only: mention every participant."
1783
+ },
1784
+ {
1785
+ "name": "forwarded",
1786
+ "type": "boolean",
1787
+ "required": false,
1788
+ "description": "Mark as forwarded."
1789
+ },
1790
+ {
1791
+ "name": "viewOnce",
1792
+ "type": "boolean",
1793
+ "required": false,
1794
+ "description": "The recipient can open it once."
1795
+ },
1796
+ {
1797
+ "name": "disappearingSeconds",
1798
+ "type": "0 | 86400 | 604800 | 7776000",
1799
+ "required": false,
1800
+ "description": "Match the chat's disappearing timer."
1801
+ },
1802
+ {
1803
+ "name": "replyToMessageId",
1804
+ "type": "string",
1805
+ "required": false,
1806
+ "description": "A wuapi message id in the same chat to quote. Any type. Not for channel posts."
1807
+ },
1808
+ {
1809
+ "name": "metadata",
1810
+ "type": "object",
1811
+ "required": false,
1812
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
1813
+ }
1814
+ ]
1815
+ },
1816
+ {
1817
+ "name": "video",
1818
+ "fields": [
1819
+ {
1820
+ "name": "accountId",
1821
+ "type": "string",
1822
+ "required": true,
1823
+ "description": "The account to send from. It must be `ready`."
1824
+ },
1825
+ {
1826
+ "name": "to",
1827
+ "type": "string",
1828
+ "required": true,
1829
+ "description": "A contact id (E.164, digits or `lid:<digits>`), a WhatsApp username (`@handle`) of a contact this account already chats with, a group id, or a channel id (to post in a channel the account administers…"
1830
+ },
1831
+ {
1832
+ "name": "type",
1833
+ "type": "\"video\"",
1834
+ "required": true,
1835
+ "description": "`video`."
1836
+ },
1837
+ {
1838
+ "name": "media",
1839
+ "type": "object",
1840
+ "required": true,
1841
+ "description": "A video to send, fetched by our servers."
1842
+ },
1843
+ {
1844
+ "name": "text",
1845
+ "type": "string",
1846
+ "required": false,
1847
+ "description": "Caption. At most 4096 characters."
1848
+ },
1849
+ {
1850
+ "name": "mentions",
1851
+ "type": "string[]",
1852
+ "required": false,
1853
+ "description": "Contact ids to mention. At most 256. Not for channel posts."
1854
+ },
1855
+ {
1856
+ "name": "mentionAll",
1857
+ "type": "boolean",
1858
+ "required": false,
1859
+ "description": "Groups only: mention every participant."
1860
+ },
1861
+ {
1862
+ "name": "forwarded",
1863
+ "type": "boolean",
1864
+ "required": false,
1865
+ "description": "Mark as forwarded."
1866
+ },
1867
+ {
1868
+ "name": "viewOnce",
1869
+ "type": "boolean",
1870
+ "required": false,
1871
+ "description": "The recipient can open it once."
1872
+ },
1873
+ {
1874
+ "name": "disappearingSeconds",
1875
+ "type": "0 | 86400 | 604800 | 7776000",
1876
+ "required": false,
1877
+ "description": "Match the chat's disappearing timer."
1878
+ },
1879
+ {
1880
+ "name": "replyToMessageId",
1881
+ "type": "string",
1882
+ "required": false,
1883
+ "description": "A wuapi message id in the same chat to quote. Any type. Not for channel posts."
1884
+ },
1885
+ {
1886
+ "name": "metadata",
1887
+ "type": "object",
1888
+ "required": false,
1889
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
1890
+ }
1891
+ ]
1892
+ },
1893
+ {
1894
+ "name": "audio",
1895
+ "fields": [
1896
+ {
1897
+ "name": "accountId",
1898
+ "type": "string",
1899
+ "required": true,
1900
+ "description": "The account to send from. It must be `ready`."
1901
+ },
1902
+ {
1903
+ "name": "to",
1904
+ "type": "string",
1905
+ "required": true,
1906
+ "description": "A contact id (E.164, digits or `lid:<digits>`) or a group id. Channels take only `text`, `image`, `video` and `document`."
1907
+ },
1908
+ {
1909
+ "name": "type",
1910
+ "type": "\"audio\"",
1911
+ "required": true,
1912
+ "description": "`audio`."
1913
+ },
1914
+ {
1915
+ "name": "media",
1916
+ "type": "object",
1917
+ "required": true,
1918
+ "description": "A file to send, fetched by our servers."
1919
+ },
1920
+ {
1921
+ "name": "text",
1922
+ "type": "string",
1923
+ "required": false,
1924
+ "description": "Caption. At most 4096 characters."
1925
+ },
1926
+ {
1927
+ "name": "mentions",
1928
+ "type": "string[]",
1929
+ "required": false,
1930
+ "description": "Contact ids to mention. At most 256. Not for channel posts."
1931
+ },
1932
+ {
1933
+ "name": "mentionAll",
1934
+ "type": "boolean",
1935
+ "required": false,
1936
+ "description": "Groups only: mention every participant."
1937
+ },
1938
+ {
1939
+ "name": "forwarded",
1940
+ "type": "boolean",
1941
+ "required": false,
1942
+ "description": "Mark as forwarded."
1943
+ },
1944
+ {
1945
+ "name": "viewOnce",
1946
+ "type": "boolean",
1947
+ "required": false,
1948
+ "description": "The recipient can open it once."
1949
+ },
1950
+ {
1951
+ "name": "disappearingSeconds",
1952
+ "type": "0 | 86400 | 604800 | 7776000",
1953
+ "required": false,
1954
+ "description": "Match the chat's disappearing timer."
1955
+ },
1956
+ {
1957
+ "name": "replyToMessageId",
1958
+ "type": "string",
1959
+ "required": false,
1960
+ "description": "A wuapi message id in the same chat to quote. Any type. Not for channel posts."
1961
+ },
1962
+ {
1963
+ "name": "metadata",
1964
+ "type": "object",
1965
+ "required": false,
1966
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
1967
+ }
1968
+ ]
1969
+ },
1970
+ {
1971
+ "name": "voice",
1972
+ "fields": [
1973
+ {
1974
+ "name": "accountId",
1975
+ "type": "string",
1976
+ "required": true,
1977
+ "description": "The account to send from. It must be `ready`."
1978
+ },
1979
+ {
1980
+ "name": "to",
1981
+ "type": "string",
1982
+ "required": true,
1983
+ "description": "A contact id (E.164, digits or `lid:<digits>`) or a group id. Channels take only `text`, `image`, `video` and `document`."
1984
+ },
1985
+ {
1986
+ "name": "type",
1987
+ "type": "\"voice\"",
1988
+ "required": true,
1989
+ "description": "`voice`."
1990
+ },
1991
+ {
1992
+ "name": "media",
1993
+ "type": "object",
1994
+ "required": true,
1995
+ "description": "A file to send, fetched by our servers."
1996
+ },
1997
+ {
1998
+ "name": "text",
1999
+ "type": "string",
2000
+ "required": false,
2001
+ "description": "Caption. At most 4096 characters."
2002
+ },
2003
+ {
2004
+ "name": "mentions",
2005
+ "type": "string[]",
2006
+ "required": false,
2007
+ "description": "Contact ids to mention. At most 256. Not for channel posts."
2008
+ },
2009
+ {
2010
+ "name": "mentionAll",
2011
+ "type": "boolean",
2012
+ "required": false,
2013
+ "description": "Groups only: mention every participant."
2014
+ },
2015
+ {
2016
+ "name": "forwarded",
2017
+ "type": "boolean",
2018
+ "required": false,
2019
+ "description": "Mark as forwarded."
2020
+ },
2021
+ {
2022
+ "name": "viewOnce",
2023
+ "type": "boolean",
2024
+ "required": false,
2025
+ "description": "The recipient can open it once."
2026
+ },
2027
+ {
2028
+ "name": "disappearingSeconds",
2029
+ "type": "0 | 86400 | 604800 | 7776000",
2030
+ "required": false,
2031
+ "description": "Match the chat's disappearing timer."
2032
+ },
2033
+ {
2034
+ "name": "replyToMessageId",
2035
+ "type": "string",
2036
+ "required": false,
2037
+ "description": "A wuapi message id in the same chat to quote. Any type. Not for channel posts."
2038
+ },
2039
+ {
2040
+ "name": "metadata",
2041
+ "type": "object",
2042
+ "required": false,
2043
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
2044
+ }
2045
+ ]
2046
+ },
2047
+ {
2048
+ "name": "document",
2049
+ "fields": [
2050
+ {
2051
+ "name": "accountId",
2052
+ "type": "string",
2053
+ "required": true,
2054
+ "description": "The account to send from. It must be `ready`."
2055
+ },
2056
+ {
2057
+ "name": "to",
2058
+ "type": "string",
2059
+ "required": true,
2060
+ "description": "A contact id (E.164, digits or `lid:<digits>`), a WhatsApp username (`@handle`) of a contact this account already chats with, a group id, or a channel id (to post in a channel the account administers…"
2061
+ },
2062
+ {
2063
+ "name": "type",
2064
+ "type": "\"document\"",
2065
+ "required": true,
2066
+ "description": "`document`."
2067
+ },
2068
+ {
2069
+ "name": "media",
2070
+ "type": "object",
2071
+ "required": true,
2072
+ "description": "A file to send, fetched by our servers."
2073
+ },
2074
+ {
2075
+ "name": "text",
2076
+ "type": "string",
2077
+ "required": false,
2078
+ "description": "Caption. At most 4096 characters."
2079
+ },
2080
+ {
2081
+ "name": "mentions",
2082
+ "type": "string[]",
2083
+ "required": false,
2084
+ "description": "Contact ids to mention. At most 256. Not for channel posts."
2085
+ },
2086
+ {
2087
+ "name": "mentionAll",
2088
+ "type": "boolean",
2089
+ "required": false,
2090
+ "description": "Groups only: mention every participant."
2091
+ },
2092
+ {
2093
+ "name": "forwarded",
2094
+ "type": "boolean",
2095
+ "required": false,
2096
+ "description": "Mark as forwarded."
2097
+ },
2098
+ {
2099
+ "name": "disappearingSeconds",
2100
+ "type": "0 | 86400 | 604800 | 7776000",
2101
+ "required": false,
2102
+ "description": "Match the chat's disappearing timer."
2103
+ },
2104
+ {
2105
+ "name": "replyToMessageId",
2106
+ "type": "string",
2107
+ "required": false,
2108
+ "description": "A wuapi message id in the same chat to quote. Any type. Not for channel posts."
2109
+ },
2110
+ {
2111
+ "name": "metadata",
2112
+ "type": "object",
2113
+ "required": false,
2114
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
2115
+ }
2116
+ ]
2117
+ },
2118
+ {
2119
+ "name": "sticker",
2120
+ "fields": [
2121
+ {
2122
+ "name": "accountId",
2123
+ "type": "string",
2124
+ "required": true,
2125
+ "description": "The account to send from. It must be `ready`."
2126
+ },
2127
+ {
2128
+ "name": "to",
2129
+ "type": "string",
2130
+ "required": true,
2131
+ "description": "A contact id (E.164, digits or `lid:<digits>`) or a group id. Channels take only `text`, `image`, `video` and `document`."
2132
+ },
2133
+ {
2134
+ "name": "type",
2135
+ "type": "\"sticker\"",
2136
+ "required": true,
2137
+ "description": "`sticker`."
2138
+ },
2139
+ {
2140
+ "name": "media",
2141
+ "type": "object",
2142
+ "required": true,
2143
+ "description": "A file to send, fetched by our servers."
2144
+ },
2145
+ {
2146
+ "name": "text",
2147
+ "type": "string",
2148
+ "required": false,
2149
+ "description": "Caption. At most 4096 characters."
2150
+ },
2151
+ {
2152
+ "name": "mentions",
2153
+ "type": "string[]",
2154
+ "required": false,
2155
+ "description": "Contact ids to mention. At most 256. Not for channel posts."
2156
+ },
2157
+ {
2158
+ "name": "mentionAll",
2159
+ "type": "boolean",
2160
+ "required": false,
2161
+ "description": "Groups only: mention every participant."
2162
+ },
2163
+ {
2164
+ "name": "forwarded",
2165
+ "type": "boolean",
2166
+ "required": false,
2167
+ "description": "Mark as forwarded."
2168
+ },
2169
+ {
2170
+ "name": "disappearingSeconds",
2171
+ "type": "0 | 86400 | 604800 | 7776000",
2172
+ "required": false,
2173
+ "description": "Match the chat's disappearing timer."
2174
+ },
2175
+ {
2176
+ "name": "replyToMessageId",
2177
+ "type": "string",
2178
+ "required": false,
2179
+ "description": "A wuapi message id in the same chat to quote. Any type. Not for channel posts."
2180
+ },
2181
+ {
2182
+ "name": "metadata",
2183
+ "type": "object",
2184
+ "required": false,
2185
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
2186
+ }
2187
+ ]
2188
+ },
2189
+ {
2190
+ "name": "location",
2191
+ "fields": [
2192
+ {
2193
+ "name": "accountId",
2194
+ "type": "string",
2195
+ "required": true,
2196
+ "description": "The account to send from. It must be `ready`."
2197
+ },
2198
+ {
2199
+ "name": "to",
2200
+ "type": "string",
2201
+ "required": true,
2202
+ "description": "A contact id (E.164, digits or `lid:<digits>`) or a group id. Channels take only `text`, `image`, `video` and `document`."
2203
+ },
2204
+ {
2205
+ "name": "type",
2206
+ "type": "\"location\"",
2207
+ "required": true,
2208
+ "description": "`location`."
2209
+ },
2210
+ {
2211
+ "name": "location",
2212
+ "type": "object",
2213
+ "required": true,
2214
+ "description": "A pin on the map."
2215
+ },
2216
+ {
2217
+ "name": "mentions",
2218
+ "type": "string[]",
2219
+ "required": false,
2220
+ "description": "Contact ids to mention. At most 256. Not for channel posts."
2221
+ },
2222
+ {
2223
+ "name": "mentionAll",
2224
+ "type": "boolean",
2225
+ "required": false,
2226
+ "description": "Groups only: mention every participant."
2227
+ },
2228
+ {
2229
+ "name": "forwarded",
2230
+ "type": "boolean",
2231
+ "required": false,
2232
+ "description": "Mark as forwarded."
2233
+ },
2234
+ {
2235
+ "name": "disappearingSeconds",
2236
+ "type": "0 | 86400 | 604800 | 7776000",
2237
+ "required": false,
2238
+ "description": "Match the chat's disappearing timer."
2239
+ },
2240
+ {
2241
+ "name": "replyToMessageId",
2242
+ "type": "string",
2243
+ "required": false,
2244
+ "description": "A wuapi message id in the same chat to quote. Any type. Not for channel posts."
2245
+ },
2246
+ {
2247
+ "name": "metadata",
2248
+ "type": "object",
2249
+ "required": false,
2250
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
2251
+ }
2252
+ ]
2253
+ },
2254
+ {
2255
+ "name": "contact",
2256
+ "fields": [
2257
+ {
2258
+ "name": "accountId",
2259
+ "type": "string",
2260
+ "required": true,
2261
+ "description": "The account to send from. It must be `ready`."
2262
+ },
2263
+ {
2264
+ "name": "to",
2265
+ "type": "string",
2266
+ "required": true,
2267
+ "description": "A contact id (E.164, digits or `lid:<digits>`) or a group id. Channels take only `text`, `image`, `video` and `document`."
2268
+ },
2269
+ {
2270
+ "name": "type",
2271
+ "type": "\"contact\"",
2272
+ "required": true,
2273
+ "description": "`contact`."
2274
+ },
2275
+ {
2276
+ "name": "contact",
2277
+ "type": "object",
2278
+ "required": true,
2279
+ "description": ""
2280
+ },
2281
+ {
2282
+ "name": "mentions",
2283
+ "type": "string[]",
2284
+ "required": false,
2285
+ "description": "Contact ids to mention. At most 256. Not for channel posts."
2286
+ },
2287
+ {
2288
+ "name": "mentionAll",
2289
+ "type": "boolean",
2290
+ "required": false,
2291
+ "description": "Groups only: mention every participant."
2292
+ },
2293
+ {
2294
+ "name": "forwarded",
2295
+ "type": "boolean",
2296
+ "required": false,
2297
+ "description": "Mark as forwarded."
2298
+ },
2299
+ {
2300
+ "name": "disappearingSeconds",
2301
+ "type": "0 | 86400 | 604800 | 7776000",
2302
+ "required": false,
2303
+ "description": "Match the chat's disappearing timer."
2304
+ },
2305
+ {
2306
+ "name": "replyToMessageId",
2307
+ "type": "string",
2308
+ "required": false,
2309
+ "description": "A wuapi message id in the same chat to quote. Any type. Not for channel posts."
2310
+ },
2311
+ {
2312
+ "name": "metadata",
2313
+ "type": "object",
2314
+ "required": false,
2315
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
2316
+ }
2317
+ ]
2318
+ },
2319
+ {
2320
+ "name": "contacts",
2321
+ "fields": [
2322
+ {
2323
+ "name": "accountId",
2324
+ "type": "string",
2325
+ "required": true,
2326
+ "description": "The account to send from. It must be `ready`."
2327
+ },
2328
+ {
2329
+ "name": "to",
2330
+ "type": "string",
2331
+ "required": true,
2332
+ "description": "A contact id (E.164, digits or `lid:<digits>`) or a group id. Channels take only `text`, `image`, `video` and `document`."
2333
+ },
2334
+ {
2335
+ "name": "type",
2336
+ "type": "\"contacts\"",
2337
+ "required": true,
2338
+ "description": "`contacts`."
2339
+ },
2340
+ {
2341
+ "name": "contacts",
2342
+ "type": "object[]",
2343
+ "required": true,
2344
+ "description": "2 to 20 cards."
2345
+ },
2346
+ {
2347
+ "name": "mentions",
2348
+ "type": "string[]",
2349
+ "required": false,
2350
+ "description": "Contact ids to mention. At most 256. Not for channel posts."
2351
+ },
2352
+ {
2353
+ "name": "mentionAll",
2354
+ "type": "boolean",
2355
+ "required": false,
2356
+ "description": "Groups only: mention every participant."
2357
+ },
2358
+ {
2359
+ "name": "forwarded",
2360
+ "type": "boolean",
2361
+ "required": false,
2362
+ "description": "Mark as forwarded."
2363
+ },
2364
+ {
2365
+ "name": "disappearingSeconds",
2366
+ "type": "0 | 86400 | 604800 | 7776000",
2367
+ "required": false,
2368
+ "description": "Match the chat's disappearing timer."
2369
+ },
2370
+ {
2371
+ "name": "replyToMessageId",
2372
+ "type": "string",
2373
+ "required": false,
2374
+ "description": "A wuapi message id in the same chat to quote. Any type. Not for channel posts."
2375
+ },
2376
+ {
2377
+ "name": "metadata",
2378
+ "type": "object",
2379
+ "required": false,
2380
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
2381
+ }
2382
+ ]
2383
+ },
2384
+ {
2385
+ "name": "poll",
2386
+ "fields": [
2387
+ {
2388
+ "name": "accountId",
2389
+ "type": "string",
2390
+ "required": true,
2391
+ "description": "The account to send from. It must be `ready`."
2392
+ },
2393
+ {
2394
+ "name": "to",
2395
+ "type": "string",
2396
+ "required": true,
2397
+ "description": "A contact id (E.164, digits or `lid:<digits>`) or a group id. Channels take only `text`, `image`, `video` and `document`."
2398
+ },
2399
+ {
2400
+ "name": "type",
2401
+ "type": "\"poll\"",
2402
+ "required": true,
2403
+ "description": "`poll`."
2404
+ },
2405
+ {
2406
+ "name": "poll",
2407
+ "type": "object",
2408
+ "required": true,
2409
+ "description": "A poll."
2410
+ },
2411
+ {
2412
+ "name": "mentions",
2413
+ "type": "string[]",
2414
+ "required": false,
2415
+ "description": "Contact ids to mention. At most 256. Not for channel posts."
2416
+ },
2417
+ {
2418
+ "name": "mentionAll",
2419
+ "type": "boolean",
2420
+ "required": false,
2421
+ "description": "Groups only: mention every participant."
2422
+ },
2423
+ {
2424
+ "name": "forwarded",
2425
+ "type": "boolean",
2426
+ "required": false,
2427
+ "description": "Mark as forwarded."
2428
+ },
2429
+ {
2430
+ "name": "disappearingSeconds",
2431
+ "type": "0 | 86400 | 604800 | 7776000",
2432
+ "required": false,
2433
+ "description": "Match the chat's disappearing timer."
2434
+ },
2435
+ {
2436
+ "name": "replyToMessageId",
2437
+ "type": "string",
2438
+ "required": false,
2439
+ "description": "A wuapi message id in the same chat to quote. Any type. Not for channel posts."
2440
+ },
2441
+ {
2442
+ "name": "metadata",
2443
+ "type": "object",
2444
+ "required": false,
2445
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
2446
+ }
2447
+ ]
2448
+ },
2449
+ {
2450
+ "name": "calendar_event",
2451
+ "fields": [
2452
+ {
2453
+ "name": "accountId",
2454
+ "type": "string",
2455
+ "required": true,
2456
+ "description": "The account to send from. It must be `ready`."
2457
+ },
2458
+ {
2459
+ "name": "to",
2460
+ "type": "string",
2461
+ "required": true,
2462
+ "description": "A contact id (E.164, digits or `lid:<digits>`) or a group id. Channels take only `text`, `image`, `video` and `document`."
2463
+ },
2464
+ {
2465
+ "name": "type",
2466
+ "type": "\"calendar_event\"",
2467
+ "required": true,
2468
+ "description": "`calendar_event`."
2469
+ },
2470
+ {
2471
+ "name": "calendarEvent",
2472
+ "type": "object",
2473
+ "required": true,
2474
+ "description": "A calendar event."
2475
+ },
2476
+ {
2477
+ "name": "mentions",
2478
+ "type": "string[]",
2479
+ "required": false,
2480
+ "description": "Contact ids to mention. At most 256. Not for channel posts."
2481
+ },
2482
+ {
2483
+ "name": "mentionAll",
2484
+ "type": "boolean",
2485
+ "required": false,
2486
+ "description": "Groups only: mention every participant."
2487
+ },
2488
+ {
2489
+ "name": "forwarded",
2490
+ "type": "boolean",
2491
+ "required": false,
2492
+ "description": "Mark as forwarded."
2493
+ },
2494
+ {
2495
+ "name": "disappearingSeconds",
2496
+ "type": "0 | 86400 | 604800 | 7776000",
2497
+ "required": false,
2498
+ "description": "Match the chat's disappearing timer."
2499
+ },
2500
+ {
2501
+ "name": "replyToMessageId",
2502
+ "type": "string",
2503
+ "required": false,
2504
+ "description": "A wuapi message id in the same chat to quote. Any type. Not for channel posts."
2505
+ },
2506
+ {
2507
+ "name": "metadata",
2508
+ "type": "object",
2509
+ "required": false,
2510
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
2511
+ }
2512
+ ]
2513
+ }
2514
+ ],
2515
+ "paginated": false,
2516
+ "summary": "Send a message",
2517
+ "description": "Queue a message from a `ready` account to a contact, a group, or a channel the account administers. It is returned with `status: queued`; the outcome arrives as `message.sent` / `message.failed`, or read it with `GET /v1/messages/{messageId}`. An account that dropped from `ready` for a reconnect less than the offline tolerance ago (currently 3 minutes) still takes it: it waits for the account, is…",
2518
+ "deprecated": false
2519
+ },
2520
+ {
2521
+ "operationId": "getMessage",
2522
+ "resource": [
2523
+ "messages"
2524
+ ],
2525
+ "method": "get",
2526
+ "httpMethod": "GET",
2527
+ "path": "/v1/messages/{messageId}",
2528
+ "pathParams": [
2529
+ "messageId"
2530
+ ],
2531
+ "query": [],
2532
+ "hasBody": false,
2533
+ "bodyRequired": false,
2534
+ "body": [],
2535
+ "paginated": false,
2536
+ "summary": "Get a message",
2537
+ "description": "A message and its current status.",
2538
+ "deprecated": false
2539
+ },
2540
+ {
2541
+ "operationId": "editMessage",
2542
+ "resource": [
2543
+ "messages"
2544
+ ],
2545
+ "method": "edit",
2546
+ "httpMethod": "PATCH",
2547
+ "path": "/v1/messages/{messageId}",
2548
+ "pathParams": [
2549
+ "messageId"
2550
+ ],
2551
+ "query": [],
2552
+ "hasBody": true,
2553
+ "bodyRequired": true,
2554
+ "body": [
2555
+ {
2556
+ "name": "",
2557
+ "fields": [
2558
+ {
2559
+ "name": "text",
2560
+ "type": "string",
2561
+ "required": true,
2562
+ "description": "The new text."
2563
+ }
2564
+ ]
2565
+ }
2566
+ ],
2567
+ "paginated": false,
2568
+ "summary": "Edit a message",
2569
+ "description": "Outbound text messages only, within WhatsApp's edit window (about 15 minutes; WhatsApp's refusal is returned as is). Fires `message.edited`.",
2570
+ "deprecated": false
2571
+ },
2572
+ {
2573
+ "operationId": "deleteMessage",
2574
+ "resource": [
2575
+ "messages"
2576
+ ],
2577
+ "method": "delete",
2578
+ "httpMethod": "DELETE",
2579
+ "path": "/v1/messages/{messageId}",
2580
+ "pathParams": [
2581
+ "messageId"
2582
+ ],
2583
+ "query": [
2584
+ {
2585
+ "name": "forEveryone",
2586
+ "type": "boolean",
2587
+ "required": false,
2588
+ "description": "`false` deletes it on the linked devices only and keeps the row unchanged."
2589
+ }
2590
+ ],
2591
+ "hasBody": false,
2592
+ "bodyRequired": false,
2593
+ "body": [],
2594
+ "paginated": false,
2595
+ "summary": "Delete a message",
2596
+ "description": "Outbound messages only. For everyone by default: the row stays with `deletedAt` set and its content cleared, and `message.deleted` fires.",
2597
+ "deprecated": false
2598
+ },
2599
+ {
2600
+ "operationId": "reactToMessage",
2601
+ "resource": [
2602
+ "messages"
2603
+ ],
2604
+ "method": "react",
2605
+ "httpMethod": "POST",
2606
+ "path": "/v1/messages/{messageId}/react",
2607
+ "pathParams": [
2608
+ "messageId"
2609
+ ],
2610
+ "query": [],
2611
+ "hasBody": true,
2612
+ "bodyRequired": true,
2613
+ "body": [
2614
+ {
2615
+ "name": "",
2616
+ "fields": [
2617
+ {
2618
+ "name": "emoji",
2619
+ "type": "string",
2620
+ "required": true,
2621
+ "description": "One emoji. An empty string removes the reaction."
2622
+ }
2623
+ ]
2624
+ }
2625
+ ],
2626
+ "paginated": false,
2627
+ "summary": "React to a message",
2628
+ "description": "An empty `emoji` removes the reaction.",
2629
+ "deprecated": false
2630
+ },
2631
+ {
2632
+ "operationId": "voteInPoll",
2633
+ "resource": [
2634
+ "messages"
2635
+ ],
2636
+ "method": "vote",
2637
+ "httpMethod": "POST",
2638
+ "path": "/v1/messages/{messageId}/vote",
2639
+ "pathParams": [
2640
+ "messageId"
2641
+ ],
2642
+ "query": [],
2643
+ "hasBody": true,
2644
+ "bodyRequired": true,
2645
+ "body": [
2646
+ {
2647
+ "name": "",
2648
+ "fields": [
2649
+ {
2650
+ "name": "options",
2651
+ "type": "string[]",
2652
+ "required": true,
2653
+ "description": "Names of this poll's options. `[]` retracts the vote."
2654
+ }
2655
+ ]
2656
+ }
2657
+ ],
2658
+ "paginated": false,
2659
+ "summary": "Vote in a poll",
2660
+ "description": "Options are validated against the stored poll. Returns the poll with its tally, your vote included.",
2661
+ "deprecated": false
2662
+ },
2663
+ {
2664
+ "operationId": "starMessage",
2665
+ "resource": [
2666
+ "messages"
2667
+ ],
2668
+ "method": "star",
2669
+ "httpMethod": "POST",
2670
+ "path": "/v1/messages/{messageId}/star",
2671
+ "pathParams": [
2672
+ "messageId"
2673
+ ],
2674
+ "query": [],
2675
+ "hasBody": false,
2676
+ "bodyRequired": false,
2677
+ "body": [],
2678
+ "paginated": false,
2679
+ "summary": "Star a message",
2680
+ "description": "Star the message on the phone and other devices.",
2681
+ "deprecated": false
2682
+ },
2683
+ {
2684
+ "operationId": "unstarMessage",
2685
+ "resource": [
2686
+ "messages"
2687
+ ],
2688
+ "method": "unstar",
2689
+ "httpMethod": "POST",
2690
+ "path": "/v1/messages/{messageId}/unstar",
2691
+ "pathParams": [
2692
+ "messageId"
2693
+ ],
2694
+ "query": [],
2695
+ "hasBody": false,
2696
+ "bodyRequired": false,
2697
+ "body": [],
2698
+ "paginated": false,
2699
+ "summary": "Unstar a message",
2700
+ "description": "Remove the star.",
2701
+ "deprecated": false
2702
+ },
2703
+ {
2704
+ "operationId": "listGroups",
2705
+ "resource": [
2706
+ "groups"
2707
+ ],
2708
+ "method": "list",
2709
+ "httpMethod": "GET",
2710
+ "path": "/v1/accounts/{accountId}/groups",
2711
+ "pathParams": [
2712
+ "accountId"
2713
+ ],
2714
+ "query": [
2715
+ {
2716
+ "name": "limit",
2717
+ "type": "integer",
2718
+ "required": false,
2719
+ "description": "Page size, 1 to 100."
2720
+ },
2721
+ {
2722
+ "name": "cursor",
2723
+ "type": "string",
2724
+ "required": false,
2725
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
2726
+ }
2727
+ ],
2728
+ "hasBody": false,
2729
+ "bodyRequired": false,
2730
+ "body": [],
2731
+ "paginated": true,
2732
+ "summary": "List groups",
2733
+ "description": "Every group of the account, read live from WhatsApp.",
2734
+ "deprecated": false
2735
+ },
2736
+ {
2737
+ "operationId": "createGroup",
2738
+ "resource": [
2739
+ "groups"
2740
+ ],
2741
+ "method": "create",
2742
+ "httpMethod": "POST",
2743
+ "path": "/v1/accounts/{accountId}/groups",
2744
+ "pathParams": [
2745
+ "accountId"
2746
+ ],
2747
+ "query": [],
2748
+ "hasBody": true,
2749
+ "bodyRequired": true,
2750
+ "body": [
2751
+ {
2752
+ "name": "",
2753
+ "fields": [
2754
+ {
2755
+ "name": "name",
2756
+ "type": "string",
2757
+ "required": true,
2758
+ "description": ""
2759
+ },
2760
+ {
2761
+ "name": "participants",
2762
+ "type": "string[]",
2763
+ "required": false,
2764
+ "description": "Contact ids. Required and non-empty unless `community` is true."
2765
+ },
2766
+ {
2767
+ "name": "community",
2768
+ "type": "boolean",
2769
+ "required": false,
2770
+ "description": "Create a community instead of a group; `participants` may be empty."
2771
+ }
2772
+ ]
2773
+ }
2774
+ ],
2775
+ "paginated": false,
2776
+ "summary": "Create a group or community",
2777
+ "description": "With `community: true`, creates a community (`participants` may be empty); link groups to it with `POST .../groups/{groupId}/subgroups`.",
2778
+ "deprecated": false
2779
+ },
2780
+ {
2781
+ "operationId": "joinGroup",
2782
+ "resource": [
2783
+ "groups"
2784
+ ],
2785
+ "method": "join",
2786
+ "httpMethod": "POST",
2787
+ "path": "/v1/accounts/{accountId}/groups/join",
2788
+ "pathParams": [
2789
+ "accountId"
2790
+ ],
2791
+ "query": [],
2792
+ "hasBody": true,
2793
+ "bodyRequired": true,
2794
+ "body": [
2795
+ {
2796
+ "name": "",
2797
+ "fields": [
2798
+ {
2799
+ "name": "code",
2800
+ "type": "string",
2801
+ "required": true,
2802
+ "description": "The invite code or the full `https://chat.whatsapp.com/...` link."
2803
+ }
2804
+ ]
2805
+ }
2806
+ ],
2807
+ "paginated": false,
2808
+ "summary": "Join a group by invite",
2809
+ "description": "Join with an invite code or link.",
2810
+ "deprecated": false
2811
+ },
2812
+ {
2813
+ "operationId": "getGroupInvite",
2814
+ "resource": [
2815
+ "groups"
2816
+ ],
2817
+ "method": "getInvite",
2818
+ "httpMethod": "GET",
2819
+ "path": "/v1/accounts/{accountId}/groups/invites/{code}",
2820
+ "pathParams": [
2821
+ "accountId",
2822
+ "code"
2823
+ ],
2824
+ "query": [],
2825
+ "hasBody": false,
2826
+ "bodyRequired": false,
2827
+ "body": [],
2828
+ "paginated": false,
2829
+ "summary": "Preview a group invite",
2830
+ "description": "The group behind an invite code, without joining.",
2831
+ "deprecated": false
2832
+ },
2833
+ {
2834
+ "operationId": "getGroup",
2835
+ "resource": [
2836
+ "groups"
2837
+ ],
2838
+ "method": "get",
2839
+ "httpMethod": "GET",
2840
+ "path": "/v1/accounts/{accountId}/groups/{groupId}",
2841
+ "pathParams": [
2842
+ "accountId",
2843
+ "groupId"
2844
+ ],
2845
+ "query": [],
2846
+ "hasBody": false,
2847
+ "bodyRequired": false,
2848
+ "body": [],
2849
+ "paginated": false,
2850
+ "summary": "Get a group",
2851
+ "description": "The group and its participants, read live from WhatsApp.",
2852
+ "deprecated": false
2853
+ },
2854
+ {
2855
+ "operationId": "updateGroup",
2856
+ "resource": [
2857
+ "groups"
2858
+ ],
2859
+ "method": "update",
2860
+ "httpMethod": "PATCH",
2861
+ "path": "/v1/accounts/{accountId}/groups/{groupId}",
2862
+ "pathParams": [
2863
+ "accountId",
2864
+ "groupId"
2865
+ ],
2866
+ "query": [],
2867
+ "hasBody": true,
2868
+ "bodyRequired": true,
2869
+ "body": [
2870
+ {
2871
+ "name": "",
2872
+ "fields": [
2873
+ {
2874
+ "name": "name",
2875
+ "type": "string",
2876
+ "required": false,
2877
+ "description": ""
2878
+ },
2879
+ {
2880
+ "name": "description",
2881
+ "type": "string",
2882
+ "required": false,
2883
+ "description": ""
2884
+ },
2885
+ {
2886
+ "name": "announce",
2887
+ "type": "boolean",
2888
+ "required": false,
2889
+ "description": "Only admins can send."
2890
+ },
2891
+ {
2892
+ "name": "locked",
2893
+ "type": "boolean",
2894
+ "required": false,
2895
+ "description": "Only admins can edit the group info."
2896
+ },
2897
+ {
2898
+ "name": "joinApproval",
2899
+ "type": "boolean",
2900
+ "required": false,
2901
+ "description": "New members need admin approval."
2902
+ },
2903
+ {
2904
+ "name": "memberAddMode",
2905
+ "type": "\"admins\" | \"all_members\"",
2906
+ "required": false,
2907
+ "description": "- `admins`: Only admins add members. - `all_members`: Any member adds members."
2908
+ }
2909
+ ]
2910
+ }
2911
+ ],
2912
+ "paginated": false,
2913
+ "summary": "Update a group",
2914
+ "description": "Change the name, description or settings. Admins only.",
2915
+ "deprecated": false
2916
+ },
2917
+ {
2918
+ "operationId": "leaveGroup",
2919
+ "resource": [
2920
+ "groups"
2921
+ ],
2922
+ "method": "leave",
2923
+ "httpMethod": "POST",
2924
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/leave",
2925
+ "pathParams": [
2926
+ "accountId",
2927
+ "groupId"
2928
+ ],
2929
+ "query": [],
2930
+ "hasBody": false,
2931
+ "bodyRequired": false,
2932
+ "body": [],
2933
+ "paginated": false,
2934
+ "summary": "Leave a group",
2935
+ "description": "The account leaves the group.",
2936
+ "deprecated": false
2937
+ },
2938
+ {
2939
+ "operationId": "addGroupParticipants",
2940
+ "resource": [
2941
+ "groups"
2942
+ ],
2943
+ "method": "addParticipants",
2944
+ "httpMethod": "POST",
2945
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/participants/add",
2946
+ "pathParams": [
2947
+ "accountId",
2948
+ "groupId"
2949
+ ],
2950
+ "query": [],
2951
+ "hasBody": true,
2952
+ "bodyRequired": true,
2953
+ "body": [
2954
+ {
2955
+ "name": "",
2956
+ "fields": [
2957
+ {
2958
+ "name": "contactIds",
2959
+ "type": "string[]",
2960
+ "required": true,
2961
+ "description": "1 to 256 contact ids."
2962
+ }
2963
+ ]
2964
+ }
2965
+ ],
2966
+ "paginated": false,
2967
+ "summary": "Add participants",
2968
+ "description": "Add contacts to the group. A contact whose privacy forbids it gets an `inviteCode` instead. Each contact gets its own result.",
2969
+ "deprecated": false
2970
+ },
2971
+ {
2972
+ "operationId": "removeGroupParticipants",
2973
+ "resource": [
2974
+ "groups"
2975
+ ],
2976
+ "method": "removeParticipants",
2977
+ "httpMethod": "POST",
2978
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/participants/remove",
2979
+ "pathParams": [
2980
+ "accountId",
2981
+ "groupId"
2982
+ ],
2983
+ "query": [],
2984
+ "hasBody": true,
2985
+ "bodyRequired": true,
2986
+ "body": [
2987
+ {
2988
+ "name": "",
2989
+ "fields": [
2990
+ {
2991
+ "name": "contactIds",
2992
+ "type": "string[]",
2993
+ "required": true,
2994
+ "description": "1 to 256 contact ids."
2995
+ }
2996
+ ]
2997
+ }
2998
+ ],
2999
+ "paginated": false,
3000
+ "summary": "Remove participants",
3001
+ "description": "Remove contacts from the group. Each contact gets its own result.",
3002
+ "deprecated": false
3003
+ },
3004
+ {
3005
+ "operationId": "promoteGroupParticipants",
3006
+ "resource": [
3007
+ "groups"
3008
+ ],
3009
+ "method": "promoteParticipants",
3010
+ "httpMethod": "POST",
3011
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/participants/promote",
3012
+ "pathParams": [
3013
+ "accountId",
3014
+ "groupId"
3015
+ ],
3016
+ "query": [],
3017
+ "hasBody": true,
3018
+ "bodyRequired": true,
3019
+ "body": [
3020
+ {
3021
+ "name": "",
3022
+ "fields": [
3023
+ {
3024
+ "name": "contactIds",
3025
+ "type": "string[]",
3026
+ "required": true,
3027
+ "description": "1 to 256 contact ids."
3028
+ }
3029
+ ]
3030
+ }
3031
+ ],
3032
+ "paginated": false,
3033
+ "summary": "Promote participants",
3034
+ "description": "Make participants admins. Each contact gets its own result.",
3035
+ "deprecated": false
3036
+ },
3037
+ {
3038
+ "operationId": "demoteGroupParticipants",
3039
+ "resource": [
3040
+ "groups"
3041
+ ],
3042
+ "method": "demoteParticipants",
3043
+ "httpMethod": "POST",
3044
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/participants/demote",
3045
+ "pathParams": [
3046
+ "accountId",
3047
+ "groupId"
3048
+ ],
3049
+ "query": [],
3050
+ "hasBody": true,
3051
+ "bodyRequired": true,
3052
+ "body": [
3053
+ {
3054
+ "name": "",
3055
+ "fields": [
3056
+ {
3057
+ "name": "contactIds",
3058
+ "type": "string[]",
3059
+ "required": true,
3060
+ "description": "1 to 256 contact ids."
3061
+ }
3062
+ ]
3063
+ }
3064
+ ],
3065
+ "paginated": false,
3066
+ "summary": "Demote participants",
3067
+ "description": "Make admins regular participants. Each contact gets its own result.",
3068
+ "deprecated": false
3069
+ },
3070
+ {
3071
+ "operationId": "getGroupInviteLink",
3072
+ "resource": [
3073
+ "groups"
3074
+ ],
3075
+ "method": "getInviteLink",
3076
+ "httpMethod": "GET",
3077
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/invite-link",
3078
+ "pathParams": [
3079
+ "accountId",
3080
+ "groupId"
3081
+ ],
3082
+ "query": [],
3083
+ "hasBody": false,
3084
+ "bodyRequired": false,
3085
+ "body": [],
3086
+ "paginated": false,
3087
+ "summary": "Get the invite link",
3088
+ "description": "The group's current invite link. Admins only.",
3089
+ "deprecated": false
3090
+ },
3091
+ {
3092
+ "operationId": "resetGroupInviteLink",
3093
+ "resource": [
3094
+ "groups"
3095
+ ],
3096
+ "method": "resetInviteLink",
3097
+ "httpMethod": "POST",
3098
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/invite-link/reset",
3099
+ "pathParams": [
3100
+ "accountId",
3101
+ "groupId"
3102
+ ],
3103
+ "query": [],
3104
+ "hasBody": false,
3105
+ "bodyRequired": false,
3106
+ "body": [],
3107
+ "paginated": false,
3108
+ "summary": "Reset the invite link",
3109
+ "description": "Revoke the current invite link and return a new one. Admins only.",
3110
+ "deprecated": false
3111
+ },
3112
+ {
3113
+ "operationId": "setGroupPicture",
3114
+ "resource": [
3115
+ "groups"
3116
+ ],
3117
+ "method": "setPicture",
3118
+ "httpMethod": "PUT",
3119
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/picture",
3120
+ "pathParams": [
3121
+ "accountId",
3122
+ "groupId"
3123
+ ],
3124
+ "query": [],
3125
+ "hasBody": true,
3126
+ "bodyRequired": true,
3127
+ "body": [
3128
+ {
3129
+ "name": "",
3130
+ "fields": [
3131
+ {
3132
+ "name": "url",
3133
+ "type": "string",
3134
+ "required": true,
3135
+ "description": ""
3136
+ }
3137
+ ]
3138
+ },
3139
+ {
3140
+ "name": "",
3141
+ "fields": [
3142
+ {
3143
+ "name": "base64",
3144
+ "type": "string",
3145
+ "required": true,
3146
+ "description": ""
3147
+ }
3148
+ ]
3149
+ }
3150
+ ],
3151
+ "paginated": false,
3152
+ "summary": "Set a group's picture",
3153
+ "description": "JPEG. Admins only.",
3154
+ "deprecated": false
3155
+ },
3156
+ {
3157
+ "operationId": "deleteGroupPicture",
3158
+ "resource": [
3159
+ "groups"
3160
+ ],
3161
+ "method": "deletePicture",
3162
+ "httpMethod": "DELETE",
3163
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/picture",
3164
+ "pathParams": [
3165
+ "accountId",
3166
+ "groupId"
3167
+ ],
3168
+ "query": [],
3169
+ "hasBody": false,
3170
+ "bodyRequired": false,
3171
+ "body": [],
3172
+ "paginated": false,
3173
+ "summary": "Delete a group's picture",
3174
+ "description": "Admins only.",
3175
+ "deprecated": false
3176
+ },
3177
+ {
3178
+ "operationId": "listGroupJoinRequests",
3179
+ "resource": [
3180
+ "groups"
3181
+ ],
3182
+ "method": "listJoinRequests",
3183
+ "httpMethod": "GET",
3184
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/join-requests",
3185
+ "pathParams": [
3186
+ "accountId",
3187
+ "groupId"
3188
+ ],
3189
+ "query": [
3190
+ {
3191
+ "name": "limit",
3192
+ "type": "integer",
3193
+ "required": false,
3194
+ "description": "Page size, 1 to 100."
3195
+ },
3196
+ {
3197
+ "name": "cursor",
3198
+ "type": "string",
3199
+ "required": false,
3200
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
3201
+ }
3202
+ ],
3203
+ "hasBody": false,
3204
+ "bodyRequired": false,
3205
+ "body": [],
3206
+ "paginated": true,
3207
+ "summary": "List join requests",
3208
+ "description": "Pending requests to join the group. Admins only.",
3209
+ "deprecated": false
3210
+ },
3211
+ {
3212
+ "operationId": "approveGroupJoinRequests",
3213
+ "resource": [
3214
+ "groups"
3215
+ ],
3216
+ "method": "approveJoinRequests",
3217
+ "httpMethod": "POST",
3218
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/join-requests/approve",
3219
+ "pathParams": [
3220
+ "accountId",
3221
+ "groupId"
3222
+ ],
3223
+ "query": [],
3224
+ "hasBody": true,
3225
+ "bodyRequired": true,
3226
+ "body": [
3227
+ {
3228
+ "name": "",
3229
+ "fields": [
3230
+ {
3231
+ "name": "contactIds",
3232
+ "type": "string[]",
3233
+ "required": true,
3234
+ "description": "1 to 256 contact ids."
3235
+ }
3236
+ ]
3237
+ }
3238
+ ],
3239
+ "paginated": false,
3240
+ "summary": "Approve join requests",
3241
+ "description": "Approve pending requests. Admins only. Each contact gets its own result.",
3242
+ "deprecated": false
3243
+ },
3244
+ {
3245
+ "operationId": "rejectGroupJoinRequests",
3246
+ "resource": [
3247
+ "groups"
3248
+ ],
3249
+ "method": "rejectJoinRequests",
3250
+ "httpMethod": "POST",
3251
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/join-requests/reject",
3252
+ "pathParams": [
3253
+ "accountId",
3254
+ "groupId"
3255
+ ],
3256
+ "query": [],
3257
+ "hasBody": true,
3258
+ "bodyRequired": true,
3259
+ "body": [
3260
+ {
3261
+ "name": "",
3262
+ "fields": [
3263
+ {
3264
+ "name": "contactIds",
3265
+ "type": "string[]",
3266
+ "required": true,
3267
+ "description": "1 to 256 contact ids."
3268
+ }
3269
+ ]
3270
+ }
3271
+ ],
3272
+ "paginated": false,
3273
+ "summary": "Reject join requests",
3274
+ "description": "Reject pending requests. Admins only. Each contact gets its own result.",
3275
+ "deprecated": false
3276
+ },
3277
+ {
3278
+ "operationId": "listSubgroups",
3279
+ "resource": [
3280
+ "groups"
3281
+ ],
3282
+ "method": "listSubgroups",
3283
+ "httpMethod": "GET",
3284
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/subgroups",
3285
+ "pathParams": [
3286
+ "accountId",
3287
+ "groupId"
3288
+ ],
3289
+ "query": [
3290
+ {
3291
+ "name": "limit",
3292
+ "type": "integer",
3293
+ "required": false,
3294
+ "description": "Page size, 1 to 100."
3295
+ },
3296
+ {
3297
+ "name": "cursor",
3298
+ "type": "string",
3299
+ "required": false,
3300
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
3301
+ }
3302
+ ],
3303
+ "hasBody": false,
3304
+ "bodyRequired": false,
3305
+ "body": [],
3306
+ "paginated": true,
3307
+ "summary": "List a community's groups",
3308
+ "description": "Groups linked to the community.",
3309
+ "deprecated": false
3310
+ },
3311
+ {
3312
+ "operationId": "linkSubgroup",
3313
+ "resource": [
3314
+ "groups"
3315
+ ],
3316
+ "method": "linkSubgroup",
3317
+ "httpMethod": "POST",
3318
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/subgroups",
3319
+ "pathParams": [
3320
+ "accountId",
3321
+ "groupId"
3322
+ ],
3323
+ "query": [],
3324
+ "hasBody": true,
3325
+ "bodyRequired": true,
3326
+ "body": [
3327
+ {
3328
+ "name": "",
3329
+ "fields": [
3330
+ {
3331
+ "name": "groupId",
3332
+ "type": "string",
3333
+ "required": true,
3334
+ "description": "The group to link into the community (`...@g.us`)."
3335
+ }
3336
+ ]
3337
+ }
3338
+ ],
3339
+ "paginated": false,
3340
+ "summary": "Link a group to a community",
3341
+ "description": "Admins of both only.",
3342
+ "deprecated": false
3343
+ },
3344
+ {
3345
+ "operationId": "unlinkSubgroup",
3346
+ "resource": [
3347
+ "groups"
3348
+ ],
3349
+ "method": "unlinkSubgroup",
3350
+ "httpMethod": "DELETE",
3351
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/subgroups/{subgroupId}",
3352
+ "pathParams": [
3353
+ "accountId",
3354
+ "groupId",
3355
+ "subgroupId"
3356
+ ],
3357
+ "query": [],
3358
+ "hasBody": false,
3359
+ "bodyRequired": false,
3360
+ "body": [],
3361
+ "paginated": false,
3362
+ "summary": "Unlink a group from a community",
3363
+ "description": "Admins only.",
3364
+ "deprecated": false
3365
+ },
3366
+ {
3367
+ "operationId": "listCommunityParticipants",
3368
+ "resource": [
3369
+ "groups"
3370
+ ],
3371
+ "method": "listCommunityParticipants",
3372
+ "httpMethod": "GET",
3373
+ "path": "/v1/accounts/{accountId}/groups/{groupId}/community-participants",
3374
+ "pathParams": [
3375
+ "accountId",
3376
+ "groupId"
3377
+ ],
3378
+ "query": [
3379
+ {
3380
+ "name": "limit",
3381
+ "type": "integer",
3382
+ "required": false,
3383
+ "description": "Page size, 1 to 100."
3384
+ },
3385
+ {
3386
+ "name": "cursor",
3387
+ "type": "string",
3388
+ "required": false,
3389
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
3390
+ }
3391
+ ],
3392
+ "hasBody": false,
3393
+ "bodyRequired": false,
3394
+ "body": [],
3395
+ "paginated": true,
3396
+ "summary": "List a community's members",
3397
+ "description": "Members across the community's linked groups.",
3398
+ "deprecated": false
3399
+ },
3400
+ {
3401
+ "operationId": "listChannels",
3402
+ "resource": [
3403
+ "channels"
3404
+ ],
3405
+ "method": "list",
3406
+ "httpMethod": "GET",
3407
+ "path": "/v1/accounts/{accountId}/channels",
3408
+ "pathParams": [
3409
+ "accountId"
3410
+ ],
3411
+ "query": [
3412
+ {
3413
+ "name": "limit",
3414
+ "type": "integer",
3415
+ "required": false,
3416
+ "description": "Page size, 1 to 100."
3417
+ },
3418
+ {
3419
+ "name": "cursor",
3420
+ "type": "string",
3421
+ "required": false,
3422
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
3423
+ }
3424
+ ],
3425
+ "hasBody": false,
3426
+ "bodyRequired": false,
3427
+ "body": [],
3428
+ "paginated": true,
3429
+ "summary": "List followed channels",
3430
+ "description": "Channels the account follows, read live from WhatsApp.",
3431
+ "deprecated": false
3432
+ },
3433
+ {
3434
+ "operationId": "createChannel",
3435
+ "resource": [
3436
+ "channels"
3437
+ ],
3438
+ "method": "create",
3439
+ "httpMethod": "POST",
3440
+ "path": "/v1/accounts/{accountId}/channels",
3441
+ "pathParams": [
3442
+ "accountId"
3443
+ ],
3444
+ "query": [],
3445
+ "hasBody": true,
3446
+ "bodyRequired": true,
3447
+ "body": [
3448
+ {
3449
+ "name": "",
3450
+ "fields": [
3451
+ {
3452
+ "name": "name",
3453
+ "type": "string",
3454
+ "required": true,
3455
+ "description": ""
3456
+ },
3457
+ {
3458
+ "name": "description",
3459
+ "type": "string",
3460
+ "required": false,
3461
+ "description": ""
3462
+ },
3463
+ {
3464
+ "name": "pictureBase64",
3465
+ "type": "string",
3466
+ "required": false,
3467
+ "description": "JPEG, base64."
3468
+ }
3469
+ ]
3470
+ }
3471
+ ],
3472
+ "paginated": false,
3473
+ "summary": "Create a channel",
3474
+ "description": "The account becomes its owner. Post to it with `POST /v1/messages` and `to` set to its id.",
3475
+ "deprecated": false
3476
+ },
3477
+ {
3478
+ "operationId": "getChannelInvite",
3479
+ "resource": [
3480
+ "channels"
3481
+ ],
3482
+ "method": "getInvite",
3483
+ "httpMethod": "GET",
3484
+ "path": "/v1/accounts/{accountId}/channels/invites/{code}",
3485
+ "pathParams": [
3486
+ "accountId",
3487
+ "code"
3488
+ ],
3489
+ "query": [],
3490
+ "hasBody": false,
3491
+ "bodyRequired": false,
3492
+ "body": [],
3493
+ "paginated": false,
3494
+ "summary": "Preview a channel invite",
3495
+ "description": "The channel behind an invite code.",
3496
+ "deprecated": false
3497
+ },
3498
+ {
3499
+ "operationId": "getChannel",
3500
+ "resource": [
3501
+ "channels"
3502
+ ],
3503
+ "method": "get",
3504
+ "httpMethod": "GET",
3505
+ "path": "/v1/accounts/{accountId}/channels/{channelId}",
3506
+ "pathParams": [
3507
+ "accountId",
3508
+ "channelId"
3509
+ ],
3510
+ "query": [],
3511
+ "hasBody": false,
3512
+ "bodyRequired": false,
3513
+ "body": [],
3514
+ "paginated": false,
3515
+ "summary": "Get a channel",
3516
+ "description": "A channel, read live from WhatsApp.",
3517
+ "deprecated": false
3518
+ },
3519
+ {
3520
+ "operationId": "followChannel",
3521
+ "resource": [
3522
+ "channels"
3523
+ ],
3524
+ "method": "follow",
3525
+ "httpMethod": "POST",
3526
+ "path": "/v1/accounts/{accountId}/channels/{channelId}/follow",
3527
+ "pathParams": [
3528
+ "accountId",
3529
+ "channelId"
3530
+ ],
3531
+ "query": [],
3532
+ "hasBody": false,
3533
+ "bodyRequired": false,
3534
+ "body": [],
3535
+ "paginated": false,
3536
+ "summary": "Follow a channel",
3537
+ "description": "Start receiving the channel's messages.",
3538
+ "deprecated": false
3539
+ },
3540
+ {
3541
+ "operationId": "unfollowChannel",
3542
+ "resource": [
3543
+ "channels"
3544
+ ],
3545
+ "method": "unfollow",
3546
+ "httpMethod": "POST",
3547
+ "path": "/v1/accounts/{accountId}/channels/{channelId}/unfollow",
3548
+ "pathParams": [
3549
+ "accountId",
3550
+ "channelId"
3551
+ ],
3552
+ "query": [],
3553
+ "hasBody": false,
3554
+ "bodyRequired": false,
3555
+ "body": [],
3556
+ "paginated": false,
3557
+ "summary": "Unfollow a channel",
3558
+ "description": "Stop following the channel.",
3559
+ "deprecated": false
3560
+ },
3561
+ {
3562
+ "operationId": "muteChannel",
3563
+ "resource": [
3564
+ "channels"
3565
+ ],
3566
+ "method": "mute",
3567
+ "httpMethod": "POST",
3568
+ "path": "/v1/accounts/{accountId}/channels/{channelId}/mute",
3569
+ "pathParams": [
3570
+ "accountId",
3571
+ "channelId"
3572
+ ],
3573
+ "query": [],
3574
+ "hasBody": false,
3575
+ "bodyRequired": false,
3576
+ "body": [],
3577
+ "paginated": false,
3578
+ "summary": "Mute a channel",
3579
+ "description": "Mute the channel's notifications.",
3580
+ "deprecated": false
3581
+ },
3582
+ {
3583
+ "operationId": "unmuteChannel",
3584
+ "resource": [
3585
+ "channels"
3586
+ ],
3587
+ "method": "unmute",
3588
+ "httpMethod": "POST",
3589
+ "path": "/v1/accounts/{accountId}/channels/{channelId}/unmute",
3590
+ "pathParams": [
3591
+ "accountId",
3592
+ "channelId"
3593
+ ],
3594
+ "query": [],
3595
+ "hasBody": false,
3596
+ "bodyRequired": false,
3597
+ "body": [],
3598
+ "paginated": false,
3599
+ "summary": "Unmute a channel",
3600
+ "description": "Turn the channel's notifications back on.",
3601
+ "deprecated": false
3602
+ },
3603
+ {
3604
+ "operationId": "listChannelMessages",
3605
+ "resource": [
3606
+ "channels"
3607
+ ],
3608
+ "method": "listMessages",
3609
+ "httpMethod": "GET",
3610
+ "path": "/v1/accounts/{accountId}/channels/{channelId}/messages",
3611
+ "pathParams": [
3612
+ "accountId",
3613
+ "channelId"
3614
+ ],
3615
+ "query": [
3616
+ {
3617
+ "name": "limit",
3618
+ "type": "integer",
3619
+ "required": false,
3620
+ "description": "Page size, 1 to 100."
3621
+ },
3622
+ {
3623
+ "name": "cursor",
3624
+ "type": "string",
3625
+ "required": false,
3626
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
3627
+ }
3628
+ ],
3629
+ "hasBody": false,
3630
+ "bodyRequired": false,
3631
+ "body": [],
3632
+ "paginated": true,
3633
+ "summary": "List a channel's messages",
3634
+ "description": "Messages in the channel, newest first, read live from WhatsApp.",
3635
+ "deprecated": false
3636
+ },
3637
+ {
3638
+ "operationId": "reactToChannelMessage",
3639
+ "resource": [
3640
+ "channels"
3641
+ ],
3642
+ "method": "react",
3643
+ "httpMethod": "POST",
3644
+ "path": "/v1/accounts/{accountId}/channels/{channelId}/messages/{channelMessageId}/react",
3645
+ "pathParams": [
3646
+ "accountId",
3647
+ "channelId",
3648
+ "channelMessageId"
3649
+ ],
3650
+ "query": [],
3651
+ "hasBody": true,
3652
+ "bodyRequired": true,
3653
+ "body": [
3654
+ {
3655
+ "name": "",
3656
+ "fields": [
3657
+ {
3658
+ "name": "emoji",
3659
+ "type": "string",
3660
+ "required": true,
3661
+ "description": "One emoji. An empty string removes the reaction."
3662
+ }
3663
+ ]
3664
+ }
3665
+ ],
3666
+ "paginated": false,
3667
+ "summary": "React to a channel message",
3668
+ "description": "An empty `emoji` removes the reaction.",
3669
+ "deprecated": false
3670
+ },
3671
+ {
3672
+ "operationId": "markChannelMessagesViewed",
3673
+ "resource": [
3674
+ "channels"
3675
+ ],
3676
+ "method": "markViewed",
3677
+ "httpMethod": "POST",
3678
+ "path": "/v1/accounts/{accountId}/channels/{channelId}/mark-viewed",
3679
+ "pathParams": [
3680
+ "accountId",
3681
+ "channelId"
3682
+ ],
3683
+ "query": [],
3684
+ "hasBody": true,
3685
+ "bodyRequired": true,
3686
+ "body": [
3687
+ {
3688
+ "name": "",
3689
+ "fields": [
3690
+ {
3691
+ "name": "channelMessageIds",
3692
+ "type": "string[]",
3693
+ "required": true,
3694
+ "description": "1 to 100 channel message ids."
3695
+ }
3696
+ ]
3697
+ }
3698
+ ],
3699
+ "paginated": false,
3700
+ "summary": "Mark channel messages viewed",
3701
+ "description": "Count the account as a viewer of these messages.",
3702
+ "deprecated": false
3703
+ },
3704
+ {
3705
+ "operationId": "listWebhookEndpoints",
3706
+ "resource": [
3707
+ "webhookEndpoints"
3708
+ ],
3709
+ "method": "list",
3710
+ "httpMethod": "GET",
3711
+ "path": "/v1/webhook-endpoints",
3712
+ "pathParams": [],
3713
+ "query": [
3714
+ {
3715
+ "name": "limit",
3716
+ "type": "integer",
3717
+ "required": false,
3718
+ "description": "Page size, 1 to 100."
3719
+ },
3720
+ {
3721
+ "name": "cursor",
3722
+ "type": "string",
3723
+ "required": false,
3724
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
3725
+ },
3726
+ {
3727
+ "name": "projectId",
3728
+ "type": "string",
3729
+ "required": false,
3730
+ "description": "Filter by project: a project id, `ext:<externalId>`, or `none` for resources in no project. With an organization scope and no filter, the list covers every project and the unassigned resources. With…"
3731
+ }
3732
+ ],
3733
+ "hasBody": false,
3734
+ "bodyRequired": false,
3735
+ "body": [],
3736
+ "paginated": true,
3737
+ "summary": "List webhook endpoints",
3738
+ "description": "Endpoints in scope. Secrets are never included.",
3739
+ "deprecated": false
3740
+ },
3741
+ {
3742
+ "operationId": "createWebhookEndpoint",
3743
+ "resource": [
3744
+ "webhookEndpoints"
3745
+ ],
3746
+ "method": "create",
3747
+ "httpMethod": "POST",
3748
+ "path": "/v1/webhook-endpoints",
3749
+ "pathParams": [],
3750
+ "query": [],
3751
+ "hasBody": true,
3752
+ "bodyRequired": true,
3753
+ "body": [
3754
+ {
3755
+ "name": "",
3756
+ "fields": [
3757
+ {
3758
+ "name": "url",
3759
+ "type": "string",
3760
+ "required": true,
3761
+ "description": "Public https URL."
3762
+ },
3763
+ {
3764
+ "name": "events",
3765
+ "type": "\"account.qr_code_issued\" | \"account.pairing_code_issued\" | \"account.connected\" | \"account.disconnected\" | \"account.failed\" | \"message.received\" | \"message.sent\" | \"message.delivered\" | \"message.read\" | \"message.failed\" | \"message.edited\" | \"message.deleted\" | \"poll.voted\" | \"group.joined\" | \"group.updated\" | \"group.join_requested\" | \"group.join_request_revoked\" | \"chat.updated\" | \"chat.presence_updated\" | \"contact.presence_updated\" | \"contact.picture_updated\" | \"contact.updated\" | \"blocklist.updated\" | \"label.updated\" | \"call.received\" | \"call.ended\" | \"channel.message_received\" | \"channel.message_updated\" | \"channel.updated\" | \"history.synced\" | \"project.created\" | \"project.updated\" | \"project.deleted\" | \"invitation.status_changed\" | \"webhook.test\"[]",
3766
+ "required": true,
3767
+ "description": ""
3768
+ },
3769
+ {
3770
+ "name": "projectId",
3771
+ "type": "string",
3772
+ "required": false,
3773
+ "description": "Organization keys only: make it a project endpoint (id or `ext:<externalId>`). Implied by a project scope."
3774
+ }
3775
+ ]
3776
+ }
3777
+ ],
3778
+ "paginated": false,
3779
+ "summary": "Create a webhook endpoint",
3780
+ "description": "At most 5 organization endpoints and 5 per project; one more answers `400 invalid_request`. The `secret` is returned only here and by rotate-secret.",
3781
+ "deprecated": false
3782
+ },
3783
+ {
3784
+ "operationId": "getWebhookEndpoint",
3785
+ "resource": [
3786
+ "webhookEndpoints"
3787
+ ],
3788
+ "method": "get",
3789
+ "httpMethod": "GET",
3790
+ "path": "/v1/webhook-endpoints/{webhookEndpointId}",
3791
+ "pathParams": [
3792
+ "webhookEndpointId"
3793
+ ],
3794
+ "query": [],
3795
+ "hasBody": false,
3796
+ "bodyRequired": false,
3797
+ "body": [],
3798
+ "paginated": false,
3799
+ "summary": "Get a webhook endpoint",
3800
+ "description": "The endpoint, without its secret.",
3801
+ "deprecated": false
3802
+ },
3803
+ {
3804
+ "operationId": "updateWebhookEndpoint",
3805
+ "resource": [
3806
+ "webhookEndpoints"
3807
+ ],
3808
+ "method": "update",
3809
+ "httpMethod": "PATCH",
3810
+ "path": "/v1/webhook-endpoints/{webhookEndpointId}",
3811
+ "pathParams": [
3812
+ "webhookEndpointId"
3813
+ ],
3814
+ "query": [],
3815
+ "hasBody": true,
3816
+ "bodyRequired": true,
3817
+ "body": [
3818
+ {
3819
+ "name": "",
3820
+ "fields": [
3821
+ {
3822
+ "name": "url",
3823
+ "type": "string",
3824
+ "required": false,
3825
+ "description": ""
3826
+ },
3827
+ {
3828
+ "name": "events",
3829
+ "type": "\"account.qr_code_issued\" | \"account.pairing_code_issued\" | \"account.connected\" | \"account.disconnected\" | \"account.failed\" | \"message.received\" | \"message.sent\" | \"message.delivered\" | \"message.read\" | \"message.failed\" | \"message.edited\" | \"message.deleted\" | \"poll.voted\" | \"group.joined\" | \"group.updated\" | \"group.join_requested\" | \"group.join_request_revoked\" | \"chat.updated\" | \"chat.presence_updated\" | \"contact.presence_updated\" | \"contact.picture_updated\" | \"contact.updated\" | \"blocklist.updated\" | \"label.updated\" | \"call.received\" | \"call.ended\" | \"channel.message_received\" | \"channel.message_updated\" | \"channel.updated\" | \"history.synced\" | \"project.created\" | \"project.updated\" | \"project.deleted\" | \"invitation.status_changed\" | \"webhook.test\"[]",
3830
+ "required": false,
3831
+ "description": ""
3832
+ },
3833
+ {
3834
+ "name": "active",
3835
+ "type": "boolean",
3836
+ "required": false,
3837
+ "description": ""
3838
+ }
3839
+ ]
3840
+ }
3841
+ ],
3842
+ "paginated": false,
3843
+ "summary": "Update a webhook endpoint",
3844
+ "description": "Change the URL, the events, or pause it with `active: false`.",
3845
+ "deprecated": false
3846
+ },
3847
+ {
3848
+ "operationId": "deleteWebhookEndpoint",
3849
+ "resource": [
3850
+ "webhookEndpoints"
3851
+ ],
3852
+ "method": "delete",
3853
+ "httpMethod": "DELETE",
3854
+ "path": "/v1/webhook-endpoints/{webhookEndpointId}",
3855
+ "pathParams": [
3856
+ "webhookEndpointId"
3857
+ ],
3858
+ "query": [],
3859
+ "hasBody": false,
3860
+ "bodyRequired": false,
3861
+ "body": [],
3862
+ "paginated": false,
3863
+ "summary": "Delete a webhook endpoint",
3864
+ "description": "Stop delivering to it.",
3865
+ "deprecated": false
3866
+ },
3867
+ {
3868
+ "operationId": "rotateWebhookEndpointSecret",
3869
+ "resource": [
3870
+ "webhookEndpoints"
3871
+ ],
3872
+ "method": "rotateSecret",
3873
+ "httpMethod": "POST",
3874
+ "path": "/v1/webhook-endpoints/{webhookEndpointId}/rotate-secret",
3875
+ "pathParams": [
3876
+ "webhookEndpointId"
3877
+ ],
3878
+ "query": [],
3879
+ "hasBody": false,
3880
+ "bodyRequired": false,
3881
+ "body": [],
3882
+ "paginated": false,
3883
+ "summary": "Rotate the signing secret",
3884
+ "description": "A new `secret` replaces the old one, which stops working at once.",
3885
+ "deprecated": false
3886
+ },
3887
+ {
3888
+ "operationId": "listProjects",
3889
+ "resource": [
3890
+ "projects"
3891
+ ],
3892
+ "method": "list",
3893
+ "httpMethod": "GET",
3894
+ "path": "/v1/projects",
3895
+ "pathParams": [],
3896
+ "query": [
3897
+ {
3898
+ "name": "limit",
3899
+ "type": "integer",
3900
+ "required": false,
3901
+ "description": "Page size, 1 to 100."
3902
+ },
3903
+ {
3904
+ "name": "cursor",
3905
+ "type": "string",
3906
+ "required": false,
3907
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
3908
+ },
3909
+ {
3910
+ "name": "externalId",
3911
+ "type": "string",
3912
+ "required": false,
3913
+ "description": "Exact match."
3914
+ },
3915
+ {
3916
+ "name": "status",
3917
+ "type": "\"active\" | \"suspended\"",
3918
+ "required": false,
3919
+ "description": "Only projects with this status."
3920
+ }
3921
+ ],
3922
+ "hasBody": false,
3923
+ "bodyRequired": false,
3924
+ "body": [],
3925
+ "paginated": true,
3926
+ "summary": "List projects",
3927
+ "description": "Live projects, newest first. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
3928
+ "deprecated": false
3929
+ },
3930
+ {
3931
+ "operationId": "createProject",
3932
+ "resource": [
3933
+ "projects"
3934
+ ],
3935
+ "method": "create",
3936
+ "httpMethod": "POST",
3937
+ "path": "/v1/projects",
3938
+ "pathParams": [],
3939
+ "query": [],
3940
+ "hasBody": true,
3941
+ "bodyRequired": true,
3942
+ "body": [
3943
+ {
3944
+ "name": "",
3945
+ "fields": [
3946
+ {
3947
+ "name": "name",
3948
+ "type": "string",
3949
+ "required": true,
3950
+ "description": ""
3951
+ },
3952
+ {
3953
+ "name": "externalId",
3954
+ "type": "string",
3955
+ "required": false,
3956
+ "description": "1 to 128 characters: letters, digits and `. _ : @ -`."
3957
+ },
3958
+ {
3959
+ "name": "metadata",
3960
+ "type": "object",
3961
+ "required": false,
3962
+ "description": "Up to 50 string values; keys 1-64 printable ASCII characters not starting with `$` or `_`."
3963
+ },
3964
+ {
3965
+ "name": "maxAccounts",
3966
+ "type": "integer",
3967
+ "required": false,
3968
+ "description": ""
3969
+ }
3970
+ ]
3971
+ }
3972
+ ],
3973
+ "paginated": false,
3974
+ "summary": "Create a project",
3975
+ "description": "Fires `project.created`. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
3976
+ "deprecated": false
3977
+ },
3978
+ {
3979
+ "operationId": "getProject",
3980
+ "resource": [
3981
+ "projects"
3982
+ ],
3983
+ "method": "get",
3984
+ "httpMethod": "GET",
3985
+ "path": "/v1/projects/{projectId}",
3986
+ "pathParams": [
3987
+ "projectId"
3988
+ ],
3989
+ "query": [],
3990
+ "hasBody": false,
3991
+ "bodyRequired": false,
3992
+ "body": [],
3993
+ "paginated": false,
3994
+ "summary": "Get a project",
3995
+ "description": "A project, by id or `ext:<externalId>`. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
3996
+ "deprecated": false
3997
+ },
3998
+ {
3999
+ "operationId": "updateProject",
4000
+ "resource": [
4001
+ "projects"
4002
+ ],
4003
+ "method": "update",
4004
+ "httpMethod": "PATCH",
4005
+ "path": "/v1/projects/{projectId}",
4006
+ "pathParams": [
4007
+ "projectId"
4008
+ ],
4009
+ "query": [],
4010
+ "hasBody": true,
4011
+ "bodyRequired": true,
4012
+ "body": [
4013
+ {
4014
+ "name": "",
4015
+ "fields": [
4016
+ {
4017
+ "name": "name",
4018
+ "type": "string",
4019
+ "required": false,
4020
+ "description": ""
4021
+ },
4022
+ {
4023
+ "name": "externalId",
4024
+ "type": "string",
4025
+ "required": false,
4026
+ "description": "`null` clears it."
4027
+ },
4028
+ {
4029
+ "name": "metadata",
4030
+ "type": "object",
4031
+ "required": false,
4032
+ "description": "Replaces the whole metadata object."
4033
+ },
4034
+ {
4035
+ "name": "maxAccounts",
4036
+ "type": "integer",
4037
+ "required": false,
4038
+ "description": "`null` removes the limit."
4039
+ },
4040
+ {
4041
+ "name": "status",
4042
+ "type": "\"active\" | \"suspended\"",
4043
+ "required": false,
4044
+ "description": "- `active`: Normal. - `suspended`: Accounts stay linked and keep receiving; every send and write answers `403 project_suspended`."
4045
+ }
4046
+ ]
4047
+ }
4048
+ ],
4049
+ "paginated": false,
4050
+ "summary": "Update, suspend or resume a project",
4051
+ "description": "`status: suspended` refuses every send and write in the project (`403 project_suspended`) while reads and inbound keep working. Fires `project.updated`. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
4052
+ "deprecated": false
4053
+ },
4054
+ {
4055
+ "operationId": "deleteProject",
4056
+ "resource": [
4057
+ "projects"
4058
+ ],
4059
+ "method": "delete",
4060
+ "httpMethod": "DELETE",
4061
+ "path": "/v1/projects/{projectId}",
4062
+ "pathParams": [
4063
+ "projectId"
4064
+ ],
4065
+ "query": [],
4066
+ "hasBody": false,
4067
+ "bodyRequired": false,
4068
+ "body": [],
4069
+ "paginated": false,
4070
+ "summary": "Delete a project",
4071
+ "description": "Answers at once: from then on the project is 404, its keys answer 401 and its `externalId` can be reused. In the background its accounts are logged out and deleted, then its webhook endpoints removed, and `project.deleted` fires. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
4072
+ "deprecated": false
4073
+ },
4074
+ {
4075
+ "operationId": "listProjectApiKeys",
4076
+ "resource": [
4077
+ "projects",
4078
+ "apiKeys"
4079
+ ],
4080
+ "method": "list",
4081
+ "httpMethod": "GET",
4082
+ "path": "/v1/projects/{projectId}/api-keys",
4083
+ "pathParams": [
4084
+ "projectId"
4085
+ ],
4086
+ "query": [
4087
+ {
4088
+ "name": "limit",
4089
+ "type": "integer",
4090
+ "required": false,
4091
+ "description": "Page size, 1 to 100."
4092
+ },
4093
+ {
4094
+ "name": "cursor",
4095
+ "type": "string",
4096
+ "required": false,
4097
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
4098
+ }
4099
+ ],
4100
+ "hasBody": false,
4101
+ "bodyRequired": false,
4102
+ "body": [],
4103
+ "paginated": true,
4104
+ "summary": "List a project's API keys",
4105
+ "description": "Every key of the project, revoked ones included. Never the key itself. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
4106
+ "deprecated": false
4107
+ },
4108
+ {
4109
+ "operationId": "createProjectApiKey",
4110
+ "resource": [
4111
+ "projects",
4112
+ "apiKeys"
4113
+ ],
4114
+ "method": "create",
4115
+ "httpMethod": "POST",
4116
+ "path": "/v1/projects/{projectId}/api-keys",
4117
+ "pathParams": [
4118
+ "projectId"
4119
+ ],
4120
+ "query": [],
4121
+ "hasBody": true,
4122
+ "bodyRequired": true,
4123
+ "body": [
4124
+ {
4125
+ "name": "",
4126
+ "fields": [
4127
+ {
4128
+ "name": "name",
4129
+ "type": "string",
4130
+ "required": true,
4131
+ "description": ""
4132
+ }
4133
+ ]
4134
+ }
4135
+ ],
4136
+ "paginated": false,
4137
+ "summary": "Create a project API key",
4138
+ "description": "A key that reaches only this project's resources. At most 20 active keys per project. The `key` is shown only here. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
4139
+ "deprecated": false
4140
+ },
4141
+ {
4142
+ "operationId": "revokeProjectApiKey",
4143
+ "resource": [
4144
+ "projects",
4145
+ "apiKeys"
4146
+ ],
4147
+ "method": "revoke",
4148
+ "httpMethod": "DELETE",
4149
+ "path": "/v1/projects/{projectId}/api-keys/{apiKeyId}",
4150
+ "pathParams": [
4151
+ "projectId",
4152
+ "apiKeyId"
4153
+ ],
4154
+ "query": [],
4155
+ "hasBody": false,
4156
+ "bodyRequired": false,
4157
+ "body": [],
4158
+ "paginated": false,
4159
+ "summary": "Revoke a project API key",
4160
+ "description": "The key stops working at once. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
4161
+ "deprecated": false
4162
+ },
4163
+ {
4164
+ "operationId": "getProjectUsage",
4165
+ "resource": [
4166
+ "projects"
4167
+ ],
4168
+ "method": "getUsage",
4169
+ "httpMethod": "GET",
4170
+ "path": "/v1/projects/{projectId}/usage",
4171
+ "pathParams": [
4172
+ "projectId"
4173
+ ],
4174
+ "query": [
4175
+ {
4176
+ "name": "month",
4177
+ "type": "string",
4178
+ "required": false,
4179
+ "description": "Month in UTC as `YYYY-MM`. Defaults to the current month. Selects the month of `proxyBytes`, `sentMessageCount` and `receivedMessageCount`; `accountCount` and `billableAccountCount` are always curren…"
4180
+ }
4181
+ ],
4182
+ "hasBody": false,
4183
+ "bodyRequired": false,
4184
+ "body": [],
4185
+ "paginated": false,
4186
+ "summary": "Get a project's usage",
4187
+ "description": "The project's usage for `month`. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
4188
+ "deprecated": false
4189
+ },
4190
+ {
4191
+ "operationId": "listInvitations",
4192
+ "resource": [
4193
+ "invitations"
4194
+ ],
4195
+ "method": "list",
4196
+ "httpMethod": "GET",
4197
+ "path": "/v1/invitations",
4198
+ "pathParams": [],
4199
+ "query": [
4200
+ {
4201
+ "name": "status",
4202
+ "type": "\"pending\" | \"in_progress\" | \"completed\" | \"failed\" | \"cancelled\" | \"expired\"",
4203
+ "required": false,
4204
+ "description": "Only this status."
4205
+ },
4206
+ {
4207
+ "name": "limit",
4208
+ "type": "integer",
4209
+ "required": false,
4210
+ "description": "Page size, 1 to 100."
4211
+ },
4212
+ {
4213
+ "name": "cursor",
4214
+ "type": "string",
4215
+ "required": false,
4216
+ "description": "Opaque cursor from a previous page's `nextCursor`. An invalid or expired cursor answers `400 invalid_request`."
4217
+ },
4218
+ {
4219
+ "name": "projectId",
4220
+ "type": "string",
4221
+ "required": false,
4222
+ "description": "Filter by project: a project id, `ext:<externalId>`, or `none` for resources in no project. With an organization scope and no filter, the list covers every project and the unassigned resources. With…"
4223
+ }
4224
+ ],
4225
+ "hasBody": false,
4226
+ "bodyRequired": false,
4227
+ "body": [],
4228
+ "paginated": true,
4229
+ "summary": "List invitations",
4230
+ "description": "Invitations in scope, newest first. `url` is always `null` here.",
4231
+ "deprecated": false
4232
+ },
4233
+ {
4234
+ "operationId": "createInvitation",
4235
+ "resource": [
4236
+ "invitations"
4237
+ ],
4238
+ "method": "create",
4239
+ "httpMethod": "POST",
4240
+ "path": "/v1/invitations",
4241
+ "pathParams": [],
4242
+ "query": [],
4243
+ "hasBody": true,
4244
+ "bodyRequired": false,
4245
+ "body": [
4246
+ {
4247
+ "name": "",
4248
+ "fields": [
4249
+ {
4250
+ "name": "projectId",
4251
+ "type": "string",
4252
+ "required": false,
4253
+ "description": "Organization keys: the project the account lands in (id or `ext:<externalId>`). A project key invites into its own project."
4254
+ },
4255
+ {
4256
+ "name": "accountName",
4257
+ "type": "string",
4258
+ "required": false,
4259
+ "description": "Name of the account created on completion."
4260
+ },
4261
+ {
4262
+ "name": "inviteeName",
4263
+ "type": "string",
4264
+ "required": false,
4265
+ "description": ""
4266
+ },
4267
+ {
4268
+ "name": "inviteeEmail",
4269
+ "type": "string",
4270
+ "required": false,
4271
+ "description": "With an email, the invitation is emailed when email is enabled (see `emailSentAt`)."
4272
+ },
4273
+ {
4274
+ "name": "inviteePhone",
4275
+ "type": "string",
4276
+ "required": false,
4277
+ "description": "E.164."
4278
+ },
4279
+ {
4280
+ "name": "suggestedCountry",
4281
+ "type": "string",
4282
+ "required": false,
4283
+ "description": "ISO 3166-1 alpha-2 preselected on the page when `proxyLocation` is not set. Derived from `inviteePhone` when absent."
4284
+ },
4285
+ {
4286
+ "name": "proxyLocation",
4287
+ "type": "object",
4288
+ "required": false,
4289
+ "description": "Preset where the account's proxy exits: a pair from `GET /v1/proxy-locations`. Without it the invitee picks the country and city on the page. Not in the catalog: `400 unsupported_proxy_location`."
4290
+ },
4291
+ {
4292
+ "name": "methods",
4293
+ "type": "\"qr_code\" | \"pairing_code\"[]",
4294
+ "required": false,
4295
+ "description": "Default both."
4296
+ },
4297
+ {
4298
+ "name": "historySync",
4299
+ "type": "\"none\" | \"recent\"",
4300
+ "required": false,
4301
+ "description": "Import the recent chats the invitee's phone sends when the number links: `recent`. Default `none`."
4302
+ },
4303
+ {
4304
+ "name": "returnUrl",
4305
+ "type": "string",
4306
+ "required": false,
4307
+ "description": "https."
4308
+ },
4309
+ {
4310
+ "name": "expiresInDays",
4311
+ "type": "integer",
4312
+ "required": false,
4313
+ "description": ""
4314
+ },
4315
+ {
4316
+ "name": "metadata",
4317
+ "type": "object",
4318
+ "required": false,
4319
+ "description": "Up to 20 string values, keys 1 to 40 characters. Copied onto the account on completion."
4320
+ }
4321
+ ]
4322
+ }
4323
+ ],
4324
+ "paginated": false,
4325
+ "summary": "Create an invitation",
4326
+ "description": "A hosted page (`url`) where someone else links their own WhatsApp into your project: they pick where the number's proxy exits (unless you set `proxyLocation`), then scan a QR code or type a pairing code. The account is created in the project when they start, and `invitation.status_changed` fires at each step. With `inviteeEmail`, the invitation is emailed when email is enabled (`emailSentAt`).",
4327
+ "deprecated": false
4328
+ },
4329
+ {
4330
+ "operationId": "getInvitation",
4331
+ "resource": [
4332
+ "invitations"
4333
+ ],
4334
+ "method": "get",
4335
+ "httpMethod": "GET",
4336
+ "path": "/v1/invitations/{invitationId}",
4337
+ "pathParams": [
4338
+ "invitationId"
4339
+ ],
4340
+ "query": [],
4341
+ "hasBody": false,
4342
+ "bodyRequired": false,
4343
+ "body": [],
4344
+ "paginated": false,
4345
+ "summary": "Get an invitation",
4346
+ "description": "`url` is always `null` here.",
4347
+ "deprecated": false
4348
+ },
4349
+ {
4350
+ "operationId": "cancelInvitation",
4351
+ "resource": [
4352
+ "invitations"
4353
+ ],
4354
+ "method": "cancel",
4355
+ "httpMethod": "POST",
4356
+ "path": "/v1/invitations/{invitationId}/cancel",
4357
+ "pathParams": [
4358
+ "invitationId"
4359
+ ],
4360
+ "query": [],
4361
+ "hasBody": false,
4362
+ "bodyRequired": false,
4363
+ "body": [],
4364
+ "paginated": false,
4365
+ "summary": "Cancel an invitation",
4366
+ "description": "The link stops working. Cancelling a cancelled invitation changes nothing. An account the invitee already started stays in the project, unlinked.",
4367
+ "deprecated": false
4368
+ },
4369
+ {
4370
+ "operationId": "resendInvitation",
4371
+ "resource": [
4372
+ "invitations"
4373
+ ],
4374
+ "method": "resend",
4375
+ "httpMethod": "POST",
4376
+ "path": "/v1/invitations/{invitationId}/resend",
4377
+ "pathParams": [
4378
+ "invitationId"
4379
+ ],
4380
+ "query": [],
4381
+ "hasBody": false,
4382
+ "bodyRequired": false,
4383
+ "body": [],
4384
+ "paginated": false,
4385
+ "summary": "Resend an invitation",
4386
+ "description": "Rotates the token (the old `url` stops working), moves the invitation back to `pending` with a new expiry of the same length, and emails it again when it has an `inviteeEmail`. An account the invitee started is kept, so they resume where they left off.",
4387
+ "deprecated": false
4388
+ },
4389
+ {
4390
+ "operationId": "getBranding",
4391
+ "resource": [
4392
+ "branding"
4393
+ ],
4394
+ "method": "get",
4395
+ "httpMethod": "GET",
4396
+ "path": "/v1/branding",
4397
+ "pathParams": [],
4398
+ "query": [],
4399
+ "hasBody": false,
4400
+ "bodyRequired": false,
4401
+ "body": [],
4402
+ "paginated": false,
4403
+ "summary": "Get branding",
4404
+ "description": "What the invitation page and email show. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
4405
+ "deprecated": false
4406
+ },
4407
+ {
4408
+ "operationId": "updateBranding",
4409
+ "resource": [
4410
+ "branding"
4411
+ ],
4412
+ "method": "update",
4413
+ "httpMethod": "PATCH",
4414
+ "path": "/v1/branding",
4415
+ "pathParams": [],
4416
+ "query": [],
4417
+ "hasBody": true,
4418
+ "bodyRequired": true,
4419
+ "body": [
4420
+ {
4421
+ "name": "",
4422
+ "fields": [
4423
+ {
4424
+ "name": "displayName",
4425
+ "type": "string",
4426
+ "required": false,
4427
+ "description": "1 to 60 characters after trimming. It cannot be cleared. Required while the organization has no branding yet: the first update without it answers `400 invalid_request` with `details.field: displayNam…"
4428
+ },
4429
+ {
4430
+ "name": "logoUrl",
4431
+ "type": "string",
4432
+ "required": false,
4433
+ "description": "https URL; `null` clears it. Either one replaces a logo uploaded in the dashboard."
4434
+ },
4435
+ {
4436
+ "name": "accentColor",
4437
+ "type": "string",
4438
+ "required": false,
4439
+ "description": "`#RRGGBB`; `null` clears it."
4440
+ },
4441
+ {
4442
+ "name": "supportUrl",
4443
+ "type": "string",
4444
+ "required": false,
4445
+ "description": "https URL; `null` clears it."
4446
+ },
4447
+ {
4448
+ "name": "hideWuapiBranding",
4449
+ "type": "boolean",
4450
+ "required": false,
4451
+ "description": "Hide the \"Powered by wuapi\" footer on the page and the email line. `true` needs the White label add-on (`402 addon_required` without it); `false` always works."
4452
+ }
4453
+ ]
4454
+ }
4455
+ ],
4456
+ "paginated": false,
4457
+ "summary": "Update branding",
4458
+ "description": "`displayName` is required the first time. Without an accent color the page uses wuapi's own. `hideWuapiBranding: true` needs the White label add-on ($100/month): without it the call answers `402 addon_required` and changes nothing. Organization keys only (project keys get `403 forbidden`); the `Wuapi-Project` header does not change the result.",
4459
+ "deprecated": false
4460
+ }
4461
+ ];
4462
+ //# sourceMappingURL=operations.js.map