@medalsocial/sdk 1.2.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,6 +45,14 @@
45
45
  {
46
46
  "name": "Workspaces",
47
47
  "description": "Inspect workspaces accessible to the current credential."
48
+ },
49
+ {
50
+ "name": "Helpdesk",
51
+ "description": "Read helpdesk conversations, reply, and manage assignment/status."
52
+ },
53
+ {
54
+ "name": "Webhooks",
55
+ "description": "Manage webhook endpoints and inspect their deliveries."
48
56
  }
49
57
  ],
50
58
  "paths": {
@@ -115,7 +123,7 @@
115
123
  "content": {
116
124
  "application/json": {
117
125
  "schema": {
118
- "$ref": "#/components/schemas/Envelope_PostCreateResult"
126
+ "$ref": "#/components/schemas/ApiResponse_PostCreateResult"
119
127
  }
120
128
  }
121
129
  }
@@ -139,7 +147,7 @@
139
147
  "content": {
140
148
  "application/json": {
141
149
  "schema": {
142
- "$ref": "#/components/schemas/Envelope_ChannelArray"
150
+ "$ref": "#/components/schemas/ApiResponse_ChannelArray"
143
151
  }
144
152
  }
145
153
  }
@@ -168,7 +176,7 @@
168
176
  "content": {
169
177
  "application/json": {
170
178
  "schema": {
171
- "$ref": "#/components/schemas/Envelope_PostDetail"
179
+ "$ref": "#/components/schemas/ApiResponse_PostDetail"
172
180
  }
173
181
  }
174
182
  }
@@ -200,7 +208,7 @@
200
208
  "content": {
201
209
  "application/json": {
202
210
  "schema": {
203
- "$ref": "#/components/schemas/Envelope_Success"
211
+ "$ref": "#/components/schemas/ApiResponse_Success"
204
212
  }
205
213
  }
206
214
  }
@@ -222,7 +230,7 @@
222
230
  "content": {
223
231
  "application/json": {
224
232
  "schema": {
225
- "$ref": "#/components/schemas/Envelope_Success"
233
+ "$ref": "#/components/schemas/ApiResponse_Success"
226
234
  }
227
235
  }
228
236
  }
@@ -261,7 +269,7 @@
261
269
  "content": {
262
270
  "application/json": {
263
271
  "schema": {
264
- "$ref": "#/components/schemas/Envelope_ScheduleResult"
272
+ "$ref": "#/components/schemas/ApiResponse_ScheduleResult"
265
273
  }
266
274
  }
267
275
  }
@@ -290,7 +298,7 @@
290
298
  "content": {
291
299
  "application/json": {
292
300
  "schema": {
293
- "$ref": "#/components/schemas/Envelope_PublishResult"
301
+ "$ref": "#/components/schemas/ApiResponse_PublishResult"
294
302
  }
295
303
  }
296
304
  }
@@ -324,7 +332,7 @@
324
332
  "content": {
325
333
  "application/json": {
326
334
  "schema": {
327
- "$ref": "#/components/schemas/Envelope_EmailSendResult"
335
+ "$ref": "#/components/schemas/ApiResponse_EmailSendResult"
328
336
  }
329
337
  }
330
338
  }
@@ -358,7 +366,7 @@
358
366
  "content": {
359
367
  "application/json": {
360
368
  "schema": {
361
- "$ref": "#/components/schemas/Envelope_BatchSendSummary"
369
+ "$ref": "#/components/schemas/ApiResponse_BatchSendSummary"
362
370
  }
363
371
  }
364
372
  }
@@ -382,7 +390,7 @@
382
390
  "content": {
383
391
  "application/json": {
384
392
  "schema": {
385
- "$ref": "#/components/schemas/Envelope_EmailTemplateArray"
393
+ "$ref": "#/components/schemas/ApiResponse_EmailTemplateArray"
386
394
  }
387
395
  }
388
396
  }
@@ -427,7 +435,7 @@
427
435
  "content": {
428
436
  "application/json": {
429
437
  "schema": {
430
- "$ref": "#/components/schemas/Envelope_EmailTemplateDetail"
438
+ "$ref": "#/components/schemas/ApiResponse_EmailTemplateDetail"
431
439
  }
432
440
  }
433
441
  }
@@ -456,7 +464,7 @@
456
464
  "content": {
457
465
  "application/json": {
458
466
  "schema": {
459
- "$ref": "#/components/schemas/Envelope_EmailSend"
467
+ "$ref": "#/components/schemas/ApiResponse_EmailSend"
460
468
  }
461
469
  }
462
470
  }
@@ -549,7 +557,7 @@
549
557
  "content": {
550
558
  "application/json": {
551
559
  "schema": {
552
- "$ref": "#/components/schemas/Envelope_ContactCreateResult"
560
+ "$ref": "#/components/schemas/ApiResponse_ContactCreateResult"
553
561
  }
554
562
  }
555
563
  }
@@ -595,7 +603,7 @@
595
603
  "content": {
596
604
  "application/json": {
597
605
  "schema": {
598
- "$ref": "#/components/schemas/Envelope_ImportContactsResult"
606
+ "$ref": "#/components/schemas/ApiResponse_ImportContactsResult"
599
607
  }
600
608
  }
601
609
  }
@@ -624,7 +632,7 @@
624
632
  "content": {
625
633
  "application/json": {
626
634
  "schema": {
627
- "$ref": "#/components/schemas/Envelope_Contact"
635
+ "$ref": "#/components/schemas/ApiResponse_Contact"
628
636
  }
629
637
  }
630
638
  }
@@ -656,7 +664,7 @@
656
664
  "content": {
657
665
  "application/json": {
658
666
  "schema": {
659
- "$ref": "#/components/schemas/Envelope_ContactUpdateResult"
667
+ "$ref": "#/components/schemas/ApiResponse_ContactUpdateResult"
660
668
  }
661
669
  }
662
670
  }
@@ -678,7 +686,7 @@
678
686
  "content": {
679
687
  "application/json": {
680
688
  "schema": {
681
- "$ref": "#/components/schemas/Envelope_ContactRemoveResult"
689
+ "$ref": "#/components/schemas/ApiResponse_ContactRemoveResult"
682
690
  }
683
691
  }
684
692
  }
@@ -754,7 +762,7 @@
754
762
  "content": {
755
763
  "application/json": {
756
764
  "schema": {
757
- "$ref": "#/components/schemas/Envelope_ContactNoteResult"
765
+ "$ref": "#/components/schemas/ApiResponse_ContactNoteResult"
758
766
  }
759
767
  }
760
768
  }
@@ -832,7 +840,7 @@
832
840
  "content": {
833
841
  "application/json": {
834
842
  "schema": {
835
- "$ref": "#/components/schemas/Envelope_DealCreateResult"
843
+ "$ref": "#/components/schemas/ApiResponse_DealCreateResult"
836
844
  }
837
845
  }
838
846
  }
@@ -861,7 +869,7 @@
861
869
  "content": {
862
870
  "application/json": {
863
871
  "schema": {
864
- "$ref": "#/components/schemas/Envelope_Deal"
872
+ "$ref": "#/components/schemas/ApiResponse_Deal"
865
873
  }
866
874
  }
867
875
  }
@@ -893,7 +901,7 @@
893
901
  "content": {
894
902
  "application/json": {
895
903
  "schema": {
896
- "$ref": "#/components/schemas/Envelope_DealUpdateResult"
904
+ "$ref": "#/components/schemas/ApiResponse_DealUpdateResult"
897
905
  }
898
906
  }
899
907
  }
@@ -915,7 +923,7 @@
915
923
  "content": {
916
924
  "application/json": {
917
925
  "schema": {
918
- "$ref": "#/components/schemas/Envelope_DealRemoveResult"
926
+ "$ref": "#/components/schemas/ApiResponse_DealRemoveResult"
919
927
  }
920
928
  }
921
929
  }
@@ -939,7 +947,7 @@
939
947
  "content": {
940
948
  "application/json": {
941
949
  "schema": {
942
- "$ref": "#/components/schemas/Envelope_GdprExportRequest"
950
+ "$ref": "#/components/schemas/ApiResponse_GdprExportRequest"
943
951
  }
944
952
  }
945
953
  }
@@ -963,7 +971,7 @@
963
971
  "content": {
964
972
  "application/json": {
965
973
  "schema": {
966
- "$ref": "#/components/schemas/Envelope_GdprExportArray"
974
+ "$ref": "#/components/schemas/ApiResponse_GdprExportArray"
967
975
  }
968
976
  }
969
977
  }
@@ -992,7 +1000,7 @@
992
1000
  "content": {
993
1001
  "application/json": {
994
1002
  "schema": {
995
- "$ref": "#/components/schemas/Envelope_GdprExport"
1003
+ "$ref": "#/components/schemas/ApiResponse_GdprExport"
996
1004
  }
997
1005
  }
998
1006
  }
@@ -1026,7 +1034,7 @@
1026
1034
  "content": {
1027
1035
  "application/json": {
1028
1036
  "schema": {
1029
- "$ref": "#/components/schemas/Envelope_ConsentResult"
1037
+ "$ref": "#/components/schemas/ApiResponse_ConsentResult"
1030
1038
  }
1031
1039
  }
1032
1040
  }
@@ -1061,7 +1069,7 @@
1061
1069
  "content": {
1062
1070
  "application/json": {
1063
1071
  "schema": {
1064
- "$ref": "#/components/schemas/Envelope_ConsentRecordArray"
1072
+ "$ref": "#/components/schemas/ApiResponse_ConsentRecordArray"
1065
1073
  }
1066
1074
  }
1067
1075
  }
@@ -1119,7 +1127,7 @@
1119
1127
  "content": {
1120
1128
  "application/json": {
1121
1129
  "schema": {
1122
- "$ref": "#/components/schemas/Envelope_WorkspaceArray"
1130
+ "$ref": "#/components/schemas/ApiResponse_WorkspaceArray"
1123
1131
  }
1124
1132
  }
1125
1133
  }
@@ -1129,111 +1137,550 @@
1129
1137
  }
1130
1138
  }
1131
1139
  }
1132
- }
1133
- },
1134
- "components": {
1135
- "securitySchemes": {
1136
- "bearerAuth": {
1137
- "type": "http",
1138
- "scheme": "bearer"
1139
- }
1140
1140
  },
1141
- "parameters": {
1142
- "Id": {
1143
- "name": "id",
1144
- "in": "path",
1145
- "required": true,
1146
- "schema": {
1147
- "type": "string"
1141
+ "/api/v1/helpdesk/conversations": {
1142
+ "get": {
1143
+ "tags": [
1144
+ "Helpdesk"
1145
+ ],
1146
+ "operationId": "listHelpdeskConversations",
1147
+ "summary": "List helpdesk conversations",
1148
+ "parameters": [
1149
+ {
1150
+ "name": "limit",
1151
+ "in": "query",
1152
+ "schema": {
1153
+ "type": "integer",
1154
+ "minimum": 1,
1155
+ "maximum": 100
1156
+ }
1157
+ },
1158
+ {
1159
+ "$ref": "#/components/parameters/Cursor"
1160
+ },
1161
+ {
1162
+ "name": "status",
1163
+ "in": "query",
1164
+ "schema": {
1165
+ "$ref": "#/components/schemas/HelpdeskConversationStatus"
1166
+ }
1167
+ },
1168
+ {
1169
+ "name": "assignee_user_id",
1170
+ "in": "query",
1171
+ "schema": {
1172
+ "type": "string"
1173
+ },
1174
+ "description": "Only conversations assigned to this user."
1175
+ },
1176
+ {
1177
+ "name": "requester",
1178
+ "in": "query",
1179
+ "schema": {
1180
+ "type": "string"
1181
+ },
1182
+ "description": "Match against visitor name/email."
1183
+ },
1184
+ {
1185
+ "name": "query",
1186
+ "in": "query",
1187
+ "schema": {
1188
+ "type": "string"
1189
+ },
1190
+ "description": "Free-text search query."
1191
+ },
1192
+ {
1193
+ "name": "channels",
1194
+ "in": "query",
1195
+ "schema": {
1196
+ "type": "string"
1197
+ },
1198
+ "description": "Comma-separated channel types (e.g. `widget,whatsapp`)."
1199
+ }
1200
+ ],
1201
+ "responses": {
1202
+ "200": {
1203
+ "description": "Conversations page.",
1204
+ "content": {
1205
+ "application/json": {
1206
+ "schema": {
1207
+ "$ref": "#/components/schemas/PaginatedResponse_HelpdeskConversation"
1208
+ }
1209
+ }
1210
+ }
1211
+ },
1212
+ "default": {
1213
+ "$ref": "#/components/responses/ApiError"
1214
+ }
1148
1215
  }
1149
- },
1150
- "Slug": {
1151
- "name": "slug",
1152
- "in": "path",
1153
- "required": true,
1154
- "schema": {
1155
- "type": "string"
1216
+ }
1217
+ },
1218
+ "/api/v1/helpdesk/conversations/{id}": {
1219
+ "parameters": [
1220
+ {
1221
+ "$ref": "#/components/parameters/Id"
1156
1222
  }
1157
- },
1158
- "Cursor": {
1159
- "name": "cursor",
1160
- "in": "query",
1161
- "schema": {
1162
- "type": "string"
1223
+ ],
1224
+ "get": {
1225
+ "tags": [
1226
+ "Helpdesk"
1227
+ ],
1228
+ "operationId": "getHelpdeskConversation",
1229
+ "summary": "Get a helpdesk conversation",
1230
+ "responses": {
1231
+ "200": {
1232
+ "description": "Conversation.",
1233
+ "content": {
1234
+ "application/json": {
1235
+ "schema": {
1236
+ "$ref": "#/components/schemas/ApiResponse_HelpdeskConversation"
1237
+ }
1238
+ }
1239
+ }
1240
+ },
1241
+ "default": {
1242
+ "$ref": "#/components/responses/ApiError"
1243
+ }
1163
1244
  }
1164
1245
  },
1165
- "Limit": {
1166
- "name": "limit",
1167
- "in": "query",
1168
- "schema": {
1169
- "type": "integer",
1170
- "minimum": 1,
1171
- "maximum": 500
1246
+ "patch": {
1247
+ "tags": [
1248
+ "Helpdesk"
1249
+ ],
1250
+ "operationId": "updateHelpdeskConversation",
1251
+ "summary": "Update a conversation's status or assignee",
1252
+ "description": "Set `status` and/or `assignee_user_id` (`null` unassigns). At least one field is required. Capability-scoped tokens must send `Idempotency-Key` and `X-Capability-Confirmation` headers on this route; API keys with legacy scopes may omit them.",
1253
+ "requestBody": {
1254
+ "required": true,
1255
+ "content": {
1256
+ "application/json": {
1257
+ "schema": {
1258
+ "$ref": "#/components/schemas/UpdateHelpdeskConversationInput"
1259
+ }
1260
+ }
1261
+ }
1262
+ },
1263
+ "responses": {
1264
+ "200": {
1265
+ "description": "Update result.",
1266
+ "content": {
1267
+ "application/json": {
1268
+ "schema": {
1269
+ "$ref": "#/components/schemas/ApiResponse_HelpdeskConversationUpdateResult"
1270
+ }
1271
+ }
1272
+ }
1273
+ },
1274
+ "default": {
1275
+ "$ref": "#/components/responses/ApiError"
1276
+ }
1172
1277
  }
1173
1278
  }
1174
1279
  },
1175
- "responses": {
1176
- "ApiError": {
1177
- "description": "API error.",
1178
- "content": {
1179
- "application/json": {
1280
+ "/api/v1/helpdesk/conversations/{id}/messages": {
1281
+ "parameters": [
1282
+ {
1283
+ "$ref": "#/components/parameters/Id"
1284
+ }
1285
+ ],
1286
+ "get": {
1287
+ "tags": [
1288
+ "Helpdesk"
1289
+ ],
1290
+ "operationId": "listHelpdeskConversationMessages",
1291
+ "summary": "List conversation messages",
1292
+ "parameters": [
1293
+ {
1294
+ "name": "limit",
1295
+ "in": "query",
1180
1296
  "schema": {
1181
- "$ref": "#/components/schemas/ApiError"
1297
+ "type": "integer",
1298
+ "minimum": 1,
1299
+ "maximum": 50
1300
+ }
1301
+ },
1302
+ {
1303
+ "$ref": "#/components/parameters/Cursor"
1304
+ }
1305
+ ],
1306
+ "responses": {
1307
+ "200": {
1308
+ "description": "Messages page.",
1309
+ "content": {
1310
+ "application/json": {
1311
+ "schema": {
1312
+ "$ref": "#/components/schemas/PaginatedResponse_HelpdeskMessage"
1313
+ }
1314
+ }
1315
+ }
1316
+ },
1317
+ "404": {
1318
+ "description": "Conversation not found.",
1319
+ "content": {
1320
+ "application/json": {
1321
+ "schema": {
1322
+ "$ref": "#/components/schemas/ApiError"
1323
+ }
1324
+ }
1182
1325
  }
1326
+ },
1327
+ "default": {
1328
+ "$ref": "#/components/responses/ApiError"
1183
1329
  }
1184
1330
  }
1185
1331
  }
1186
1332
  },
1187
- "schemas": {
1188
- "ApiError": {
1189
- "type": "object",
1190
- "required": [
1191
- "error"
1333
+ "/api/v1/helpdesk/replies": {
1334
+ "post": {
1335
+ "tags": [
1336
+ "Helpdesk"
1192
1337
  ],
1193
- "properties": {
1194
- "error": {
1195
- "type": "object",
1196
- "required": [
1197
- "code",
1198
- "message"
1199
- ],
1200
- "properties": {
1201
- "code": {
1202
- "type": "string"
1203
- },
1204
- "message": {
1205
- "type": "string"
1206
- },
1207
- "details": true
1338
+ "operationId": "createHelpdeskReply",
1339
+ "summary": "Send an operator reply or internal note",
1340
+ "description": "Send an `Idempotency-Key` header so retried requests do not create duplicate messages — it is required for capability-scoped tokens (together with `X-Capability-Confirmation`).",
1341
+ "requestBody": {
1342
+ "required": true,
1343
+ "content": {
1344
+ "application/json": {
1345
+ "schema": {
1346
+ "$ref": "#/components/schemas/CreateHelpdeskReplyInput"
1347
+ }
1208
1348
  }
1209
1349
  }
1350
+ },
1351
+ "responses": {
1352
+ "201": {
1353
+ "description": "Created reply reference.",
1354
+ "content": {
1355
+ "application/json": {
1356
+ "schema": {
1357
+ "$ref": "#/components/schemas/ApiResponse_HelpdeskReplyCreateResult"
1358
+ }
1359
+ }
1360
+ }
1361
+ },
1362
+ "default": {
1363
+ "$ref": "#/components/responses/ApiError"
1364
+ }
1210
1365
  }
1211
- },
1212
- "Pagination": {
1213
- "type": "object",
1214
- "required": [
1215
- "has_more",
1216
- "next_cursor"
1366
+ }
1367
+ },
1368
+ "/api/v1/webhooks": {
1369
+ "get": {
1370
+ "tags": [
1371
+ "Webhooks"
1217
1372
  ],
1218
- "properties": {
1219
- "has_more": {
1220
- "type": "boolean"
1373
+ "operationId": "listWebhooks",
1374
+ "summary": "List webhook endpoints",
1375
+ "responses": {
1376
+ "200": {
1377
+ "description": "Webhook endpoints.",
1378
+ "content": {
1379
+ "application/json": {
1380
+ "schema": {
1381
+ "$ref": "#/components/schemas/ApiResponse_WebhookEndpointArray"
1382
+ }
1383
+ }
1384
+ }
1221
1385
  },
1222
- "next_cursor": {
1223
- "type": [
1224
- "string",
1225
- "null"
1226
- ]
1386
+ "default": {
1387
+ "$ref": "#/components/responses/ApiError"
1227
1388
  }
1228
1389
  }
1229
1390
  },
1230
- "Success": {
1231
- "type": "object",
1232
- "required": [
1233
- "success"
1391
+ "post": {
1392
+ "tags": [
1393
+ "Webhooks"
1234
1394
  ],
1235
- "properties": {
1236
- "success": {
1395
+ "operationId": "createWebhook",
1396
+ "summary": "Create a webhook endpoint",
1397
+ "description": "The response's `data.secret` contains the signing secret EXACTLY ONCE — it can never be retrieved again, so store it securely immediately. An idempotent replay (same `Idempotency-Key`) returns the existing endpoint WITHOUT `secret`. Deliveries are HTTP POSTs signed with `X-Medal-Signature: sha256=<base64(HMAC-SHA256(\"{timestamp}.{rawBody}\", secret))>` plus `X-Medal-Timestamp`, `X-Medal-Event`, and `X-Medal-Delivery-Id` / `Idempotency-Key` headers.",
1398
+ "requestBody": {
1399
+ "required": true,
1400
+ "content": {
1401
+ "application/json": {
1402
+ "schema": {
1403
+ "$ref": "#/components/schemas/CreateWebhookInput"
1404
+ }
1405
+ }
1406
+ }
1407
+ },
1408
+ "responses": {
1409
+ "201": {
1410
+ "description": "Created endpoint, including the one-time `secret`.",
1411
+ "content": {
1412
+ "application/json": {
1413
+ "schema": {
1414
+ "$ref": "#/components/schemas/ApiResponse_WebhookEndpoint"
1415
+ }
1416
+ }
1417
+ }
1418
+ },
1419
+ "default": {
1420
+ "$ref": "#/components/responses/ApiError"
1421
+ }
1422
+ }
1423
+ }
1424
+ },
1425
+ "/api/v1/webhooks/{id}": {
1426
+ "parameters": [
1427
+ {
1428
+ "$ref": "#/components/parameters/Id"
1429
+ }
1430
+ ],
1431
+ "get": {
1432
+ "tags": [
1433
+ "Webhooks"
1434
+ ],
1435
+ "operationId": "getWebhook",
1436
+ "summary": "Get a webhook endpoint",
1437
+ "responses": {
1438
+ "200": {
1439
+ "description": "Webhook endpoint.",
1440
+ "content": {
1441
+ "application/json": {
1442
+ "schema": {
1443
+ "$ref": "#/components/schemas/ApiResponse_WebhookEndpoint"
1444
+ }
1445
+ }
1446
+ }
1447
+ },
1448
+ "default": {
1449
+ "$ref": "#/components/responses/ApiError"
1450
+ }
1451
+ }
1452
+ },
1453
+ "patch": {
1454
+ "tags": [
1455
+ "Webhooks"
1456
+ ],
1457
+ "operationId": "updateWebhook",
1458
+ "summary": "Update a webhook endpoint",
1459
+ "description": "Only provided fields change. Pass `null` for `channels` or `channel_connection_ids` to clear that filter.",
1460
+ "requestBody": {
1461
+ "required": true,
1462
+ "content": {
1463
+ "application/json": {
1464
+ "schema": {
1465
+ "$ref": "#/components/schemas/UpdateWebhookInput"
1466
+ }
1467
+ }
1468
+ }
1469
+ },
1470
+ "responses": {
1471
+ "200": {
1472
+ "description": "Updated endpoint.",
1473
+ "content": {
1474
+ "application/json": {
1475
+ "schema": {
1476
+ "$ref": "#/components/schemas/ApiResponse_WebhookEndpoint"
1477
+ }
1478
+ }
1479
+ }
1480
+ },
1481
+ "default": {
1482
+ "$ref": "#/components/responses/ApiError"
1483
+ }
1484
+ }
1485
+ },
1486
+ "delete": {
1487
+ "tags": [
1488
+ "Webhooks"
1489
+ ],
1490
+ "operationId": "deleteWebhook",
1491
+ "summary": "Delete a webhook endpoint",
1492
+ "description": "Permanently deletes the endpoint and stops all outbound deliveries. Capability-scoped tokens must send `Idempotency-Key` and `X-Capability-Confirmation` headers on this route; API keys with legacy scopes may omit them.",
1493
+ "responses": {
1494
+ "200": {
1495
+ "description": "Delete result.",
1496
+ "content": {
1497
+ "application/json": {
1498
+ "schema": {
1499
+ "$ref": "#/components/schemas/ApiResponse_WebhookDeleteResult"
1500
+ }
1501
+ }
1502
+ }
1503
+ },
1504
+ "default": {
1505
+ "$ref": "#/components/responses/ApiError"
1506
+ }
1507
+ }
1508
+ }
1509
+ },
1510
+ "/api/v1/webhooks/{id}/deliveries": {
1511
+ "parameters": [
1512
+ {
1513
+ "$ref": "#/components/parameters/Id"
1514
+ }
1515
+ ],
1516
+ "get": {
1517
+ "tags": [
1518
+ "Webhooks"
1519
+ ],
1520
+ "operationId": "listWebhookDeliveries",
1521
+ "summary": "List recent deliveries",
1522
+ "parameters": [
1523
+ {
1524
+ "name": "limit",
1525
+ "in": "query",
1526
+ "schema": {
1527
+ "type": "integer",
1528
+ "minimum": 1,
1529
+ "maximum": 100
1530
+ }
1531
+ }
1532
+ ],
1533
+ "responses": {
1534
+ "200": {
1535
+ "description": "Recent deliveries, most recent first.",
1536
+ "content": {
1537
+ "application/json": {
1538
+ "schema": {
1539
+ "$ref": "#/components/schemas/ApiResponse_WebhookDeliveryArray"
1540
+ }
1541
+ }
1542
+ }
1543
+ },
1544
+ "default": {
1545
+ "$ref": "#/components/responses/ApiError"
1546
+ }
1547
+ }
1548
+ }
1549
+ },
1550
+ "/api/v1/webhooks/{id}/test": {
1551
+ "parameters": [
1552
+ {
1553
+ "$ref": "#/components/parameters/Id"
1554
+ }
1555
+ ],
1556
+ "post": {
1557
+ "tags": [
1558
+ "Webhooks"
1559
+ ],
1560
+ "operationId": "testWebhook",
1561
+ "summary": "Queue a test delivery",
1562
+ "description": "Queues a signed `test.ping` delivery to the endpoint.",
1563
+ "responses": {
1564
+ "202": {
1565
+ "description": "Test delivery queued.",
1566
+ "content": {
1567
+ "application/json": {
1568
+ "schema": {
1569
+ "$ref": "#/components/schemas/ApiResponse_WebhookTestResult"
1570
+ }
1571
+ }
1572
+ }
1573
+ },
1574
+ "default": {
1575
+ "$ref": "#/components/responses/ApiError"
1576
+ }
1577
+ }
1578
+ }
1579
+ }
1580
+ },
1581
+ "components": {
1582
+ "securitySchemes": {
1583
+ "bearerAuth": {
1584
+ "type": "http",
1585
+ "scheme": "bearer"
1586
+ }
1587
+ },
1588
+ "parameters": {
1589
+ "Id": {
1590
+ "name": "id",
1591
+ "in": "path",
1592
+ "required": true,
1593
+ "schema": {
1594
+ "type": "string"
1595
+ }
1596
+ },
1597
+ "Slug": {
1598
+ "name": "slug",
1599
+ "in": "path",
1600
+ "required": true,
1601
+ "schema": {
1602
+ "type": "string"
1603
+ }
1604
+ },
1605
+ "Cursor": {
1606
+ "name": "cursor",
1607
+ "in": "query",
1608
+ "schema": {
1609
+ "type": "string"
1610
+ }
1611
+ },
1612
+ "Limit": {
1613
+ "name": "limit",
1614
+ "in": "query",
1615
+ "schema": {
1616
+ "type": "integer",
1617
+ "minimum": 1,
1618
+ "maximum": 500
1619
+ }
1620
+ }
1621
+ },
1622
+ "responses": {
1623
+ "ApiError": {
1624
+ "description": "API error.",
1625
+ "content": {
1626
+ "application/json": {
1627
+ "schema": {
1628
+ "$ref": "#/components/schemas/ApiError"
1629
+ }
1630
+ }
1631
+ }
1632
+ }
1633
+ },
1634
+ "schemas": {
1635
+ "ApiError": {
1636
+ "type": "object",
1637
+ "required": [
1638
+ "error"
1639
+ ],
1640
+ "properties": {
1641
+ "error": {
1642
+ "type": "object",
1643
+ "required": [
1644
+ "code",
1645
+ "message"
1646
+ ],
1647
+ "properties": {
1648
+ "code": {
1649
+ "type": "string"
1650
+ },
1651
+ "message": {
1652
+ "type": "string"
1653
+ },
1654
+ "details": true
1655
+ }
1656
+ }
1657
+ }
1658
+ },
1659
+ "Pagination": {
1660
+ "type": "object",
1661
+ "required": [
1662
+ "has_more",
1663
+ "next_cursor"
1664
+ ],
1665
+ "properties": {
1666
+ "has_more": {
1667
+ "type": "boolean"
1668
+ },
1669
+ "next_cursor": {
1670
+ "type": [
1671
+ "string",
1672
+ "null"
1673
+ ]
1674
+ }
1675
+ }
1676
+ },
1677
+ "Success": {
1678
+ "type": "object",
1679
+ "required": [
1680
+ "success"
1681
+ ],
1682
+ "properties": {
1683
+ "success": {
1237
1684
  "type": "boolean"
1238
1685
  }
1239
1686
  }
@@ -1593,6 +2040,17 @@
1593
2040
  },
1594
2041
  "contact_id": {
1595
2042
  "type": "string"
2043
+ },
2044
+ "idempotency_key": {
2045
+ "type": "string"
2046
+ },
2047
+ "copy_to": {
2048
+ "type": "string",
2049
+ "format": "email"
2050
+ },
2051
+ "copy_reply_to": {
2052
+ "type": "string",
2053
+ "format": "email"
1596
2054
  }
1597
2055
  }
1598
2056
  },
@@ -1600,11 +2058,30 @@
1600
2058
  "type": "object",
1601
2059
  "required": [
1602
2060
  "id",
2061
+ "copy_id",
2062
+ "contact_id",
1603
2063
  "status"
1604
2064
  ],
1605
2065
  "properties": {
1606
2066
  "id": {
1607
- "type": "string"
2067
+ "type": [
2068
+ "string",
2069
+ "null"
2070
+ ],
2071
+ "description": "Email send id — poll GET /api/v1/emails/{id} with it."
2072
+ },
2073
+ "copy_id": {
2074
+ "type": [
2075
+ "string",
2076
+ "null"
2077
+ ],
2078
+ "description": "Send id of the copy_to copy, or null when no copy was requested."
2079
+ },
2080
+ "contact_id": {
2081
+ "type": [
2082
+ "string",
2083
+ "null"
2084
+ ]
1608
2085
  },
1609
2086
  "status": {
1610
2087
  "type": "string"
@@ -1755,7 +2232,8 @@
1755
2232
  "batch_id",
1756
2233
  "total",
1757
2234
  "queued",
1758
- "failed"
2235
+ "failed",
2236
+ "results"
1759
2237
  ],
1760
2238
  "properties": {
1761
2239
  "batch_id": {
@@ -1769,6 +2247,49 @@
1769
2247
  },
1770
2248
  "failed": {
1771
2249
  "type": "integer"
2250
+ },
2251
+ "results": {
2252
+ "type": "array",
2253
+ "description": "Per-recipient outcome, in request order.",
2254
+ "items": {
2255
+ "$ref": "#/components/schemas/BatchSendRecipientResult"
2256
+ }
2257
+ }
2258
+ }
2259
+ },
2260
+ "BatchSendRecipientResult": {
2261
+ "type": "object",
2262
+ "required": [
2263
+ "email",
2264
+ "id",
2265
+ "status",
2266
+ "error"
2267
+ ],
2268
+ "properties": {
2269
+ "email": {
2270
+ "type": "string",
2271
+ "format": "email"
2272
+ },
2273
+ "id": {
2274
+ "type": [
2275
+ "string",
2276
+ "null"
2277
+ ],
2278
+ "description": "Email send id — poll GET /api/v1/emails/{id} with it. Null when not queued."
2279
+ },
2280
+ "status": {
2281
+ "type": "string",
2282
+ "enum": [
2283
+ "queued",
2284
+ "failed"
2285
+ ]
2286
+ },
2287
+ "error": {
2288
+ "type": [
2289
+ "string",
2290
+ "null"
2291
+ ],
2292
+ "description": "Failure reason for recipients that were not queued."
1772
2293
  }
1773
2294
  }
1774
2295
  },
@@ -2825,141 +3346,711 @@
2825
3346
  "consent_type": {
2826
3347
  "$ref": "#/components/schemas/ConsentType"
2827
3348
  },
2828
- "granted": {
2829
- "type": "boolean"
3349
+ "granted": {
3350
+ "type": "boolean"
3351
+ },
3352
+ "granted_at": {
3353
+ "type": [
3354
+ "string",
3355
+ "null"
3356
+ ],
3357
+ "format": "date-time"
3358
+ },
3359
+ "revoked_at": {
3360
+ "type": [
3361
+ "string",
3362
+ "null"
3363
+ ],
3364
+ "format": "date-time"
3365
+ },
3366
+ "source": {
3367
+ "type": "string"
3368
+ },
3369
+ "version": {
3370
+ "type": "string"
3371
+ }
3372
+ }
3373
+ },
3374
+ "ConsentResult": {
3375
+ "type": "object",
3376
+ "required": [
3377
+ "id"
3378
+ ],
3379
+ "properties": {
3380
+ "id": {
3381
+ "type": "string"
3382
+ }
3383
+ }
3384
+ },
3385
+ "CookieConsentInput": {
3386
+ "type": "object",
3387
+ "required": [
3388
+ "domain",
3389
+ "consentStatus",
3390
+ "consentTimestamp",
3391
+ "cookiePreferences"
3392
+ ],
3393
+ "properties": {
3394
+ "domain": {
3395
+ "type": "string"
3396
+ },
3397
+ "consentStatus": {
3398
+ "type": "string"
3399
+ },
3400
+ "consentTimestamp": {
3401
+ "type": "string",
3402
+ "format": "date-time"
3403
+ },
3404
+ "ipAddress": {
3405
+ "type": "string"
3406
+ },
3407
+ "userAgent": {
3408
+ "type": "string"
3409
+ },
3410
+ "cookiePreferences": {
3411
+ "type": "object",
3412
+ "additionalProperties": {
3413
+ "$ref": "#/components/schemas/CookieCategoryConsent"
3414
+ }
3415
+ }
3416
+ }
3417
+ },
3418
+ "CookieCategoryConsent": {
3419
+ "type": "object",
3420
+ "required": [
3421
+ "allowed"
3422
+ ],
3423
+ "properties": {
3424
+ "allowed": {
3425
+ "type": "boolean"
3426
+ },
3427
+ "cookieRecords": {
3428
+ "type": "array",
3429
+ "items": {
3430
+ "type": "object",
3431
+ "required": [
3432
+ "cookie",
3433
+ "duration",
3434
+ "description"
3435
+ ],
3436
+ "properties": {
3437
+ "cookie": {
3438
+ "type": "string"
3439
+ },
3440
+ "duration": {
3441
+ "type": "string"
3442
+ },
3443
+ "description": {
3444
+ "type": "string"
3445
+ }
3446
+ }
3447
+ }
3448
+ }
3449
+ }
3450
+ },
3451
+ "CookieConsentResult": {
3452
+ "type": "object",
3453
+ "required": [
3454
+ "success"
3455
+ ],
3456
+ "properties": {
3457
+ "success": {
3458
+ "type": "boolean"
3459
+ },
3460
+ "logId": {
3461
+ "type": "string"
3462
+ }
3463
+ }
3464
+ },
3465
+ "Workspace": {
3466
+ "type": "object",
3467
+ "required": [
3468
+ "id",
3469
+ "name",
3470
+ "slug"
3471
+ ],
3472
+ "properties": {
3473
+ "id": {
3474
+ "type": "string"
3475
+ },
3476
+ "name": {
3477
+ "type": "string"
3478
+ },
3479
+ "slug": {
3480
+ "type": "string"
3481
+ }
3482
+ },
3483
+ "additionalProperties": true
3484
+ },
3485
+ "HelpdeskConversationStatus": {
3486
+ "type": "string",
3487
+ "enum": [
3488
+ "open",
3489
+ "snoozed",
3490
+ "closed"
3491
+ ]
3492
+ },
3493
+ "HelpdeskMessageAuthorType": {
3494
+ "type": "string",
3495
+ "enum": [
3496
+ "visitor",
3497
+ "operator",
3498
+ "ai",
3499
+ "system"
3500
+ ]
3501
+ },
3502
+ "HelpdeskMessageType": {
3503
+ "type": "string",
3504
+ "enum": [
3505
+ "chat",
3506
+ "email",
3507
+ "note"
3508
+ ],
3509
+ "description": "`note` is operator-internal and never delivered to the customer."
3510
+ },
3511
+ "HelpdeskConversation": {
3512
+ "type": "object",
3513
+ "required": [
3514
+ "id",
3515
+ "channel",
3516
+ "channel_connection_id",
3517
+ "status",
3518
+ "subject",
3519
+ "assignee_user_id",
3520
+ "contact_id",
3521
+ "visitor_name",
3522
+ "visitor_email",
3523
+ "external_conversation_id",
3524
+ "channel_account_id",
3525
+ "message_count",
3526
+ "unread_for_operator",
3527
+ "last_message_at",
3528
+ "last_message_preview",
3529
+ "last_message_author_type",
3530
+ "created_at",
3531
+ "updated_at"
3532
+ ],
3533
+ "properties": {
3534
+ "id": {
3535
+ "type": "string"
3536
+ },
3537
+ "channel": {
3538
+ "type": "string",
3539
+ "description": "Channel type, e.g. `widget`, `instagram`, `messenger`, `whatsapp`, `email`."
3540
+ },
3541
+ "channel_connection_id": {
3542
+ "type": [
3543
+ "string",
3544
+ "null"
3545
+ ]
3546
+ },
3547
+ "status": {
3548
+ "$ref": "#/components/schemas/HelpdeskConversationStatus"
3549
+ },
3550
+ "subject": {
3551
+ "type": [
3552
+ "string",
3553
+ "null"
3554
+ ]
3555
+ },
3556
+ "assignee_user_id": {
3557
+ "type": [
3558
+ "string",
3559
+ "null"
3560
+ ]
3561
+ },
3562
+ "contact_id": {
3563
+ "type": [
3564
+ "string",
3565
+ "null"
3566
+ ]
3567
+ },
3568
+ "visitor_name": {
3569
+ "type": [
3570
+ "string",
3571
+ "null"
3572
+ ]
3573
+ },
3574
+ "visitor_email": {
3575
+ "type": [
3576
+ "string",
3577
+ "null"
3578
+ ]
3579
+ },
3580
+ "external_conversation_id": {
3581
+ "type": [
3582
+ "string",
3583
+ "null"
3584
+ ]
3585
+ },
3586
+ "channel_account_id": {
3587
+ "type": [
3588
+ "string",
3589
+ "null"
3590
+ ]
3591
+ },
3592
+ "message_count": {
3593
+ "type": "integer"
3594
+ },
3595
+ "unread_for_operator": {
3596
+ "type": "integer"
3597
+ },
3598
+ "last_message_at": {
3599
+ "type": "integer",
3600
+ "description": "Unix timestamp in milliseconds."
3601
+ },
3602
+ "last_message_preview": {
3603
+ "type": [
3604
+ "string",
3605
+ "null"
3606
+ ]
3607
+ },
3608
+ "last_message_author_type": {
3609
+ "anyOf": [
3610
+ {
3611
+ "$ref": "#/components/schemas/HelpdeskMessageAuthorType"
3612
+ },
3613
+ {
3614
+ "type": "null"
3615
+ }
3616
+ ]
3617
+ },
3618
+ "created_at": {
3619
+ "type": "integer",
3620
+ "description": "Unix timestamp in milliseconds."
3621
+ },
3622
+ "updated_at": {
3623
+ "type": "integer",
3624
+ "description": "Unix timestamp in milliseconds."
3625
+ }
3626
+ }
3627
+ },
3628
+ "HelpdeskMessage": {
3629
+ "type": "object",
3630
+ "required": [
3631
+ "id",
3632
+ "conversation_id",
3633
+ "author_type",
3634
+ "message_type",
3635
+ "author_user_id",
3636
+ "author_name",
3637
+ "body",
3638
+ "created_at"
3639
+ ],
3640
+ "properties": {
3641
+ "id": {
3642
+ "type": "string"
3643
+ },
3644
+ "conversation_id": {
3645
+ "type": "string"
3646
+ },
3647
+ "author_type": {
3648
+ "$ref": "#/components/schemas/HelpdeskMessageAuthorType"
3649
+ },
3650
+ "message_type": {
3651
+ "$ref": "#/components/schemas/HelpdeskMessageType"
3652
+ },
3653
+ "author_user_id": {
3654
+ "type": [
3655
+ "string",
3656
+ "null"
3657
+ ]
3658
+ },
3659
+ "author_name": {
3660
+ "type": [
3661
+ "string",
3662
+ "null"
3663
+ ]
3664
+ },
3665
+ "body": {
3666
+ "type": "string"
3667
+ },
3668
+ "created_at": {
3669
+ "type": "integer",
3670
+ "description": "Unix timestamp in milliseconds."
3671
+ }
3672
+ }
3673
+ },
3674
+ "UpdateHelpdeskConversationInput": {
3675
+ "type": "object",
3676
+ "minProperties": 1,
3677
+ "description": "At least one field is required.",
3678
+ "properties": {
3679
+ "status": {
3680
+ "$ref": "#/components/schemas/HelpdeskConversationStatus"
3681
+ },
3682
+ "assignee_user_id": {
3683
+ "type": [
3684
+ "string",
3685
+ "null"
3686
+ ],
3687
+ "description": "User ID to assign, or `null` to unassign."
3688
+ }
3689
+ }
3690
+ },
3691
+ "HelpdeskConversationUpdateResult": {
3692
+ "type": "object",
3693
+ "required": [
3694
+ "id",
3695
+ "status",
3696
+ "assignee_user_id"
3697
+ ],
3698
+ "properties": {
3699
+ "id": {
3700
+ "type": "string"
3701
+ },
3702
+ "status": {
3703
+ "$ref": "#/components/schemas/HelpdeskConversationStatus"
3704
+ },
3705
+ "assignee_user_id": {
3706
+ "type": [
3707
+ "string",
3708
+ "null"
3709
+ ]
3710
+ }
3711
+ }
3712
+ },
3713
+ "CreateHelpdeskReplyInput": {
3714
+ "type": "object",
3715
+ "required": [
3716
+ "conversation_id",
3717
+ "body"
3718
+ ],
3719
+ "properties": {
3720
+ "conversation_id": {
3721
+ "type": "string"
3722
+ },
3723
+ "body": {
3724
+ "type": "string",
3725
+ "maxLength": 20000
3726
+ },
3727
+ "message_type": {
3728
+ "type": "string",
3729
+ "enum": [
3730
+ "chat",
3731
+ "note"
3732
+ ],
3733
+ "description": "`note` = operator-internal note (not delivered to the customer). Default `chat`."
3734
+ },
3735
+ "author_name": {
3736
+ "type": "string",
3737
+ "description": "Agent display name for bridged replies (shown in widget + inbox)."
3738
+ }
3739
+ }
3740
+ },
3741
+ "HelpdeskReplyCreateResult": {
3742
+ "type": "object",
3743
+ "required": [
3744
+ "id",
3745
+ "conversation_id",
3746
+ "status"
3747
+ ],
3748
+ "properties": {
3749
+ "id": {
3750
+ "type": "string"
3751
+ },
3752
+ "conversation_id": {
3753
+ "type": "string"
3754
+ },
3755
+ "status": {
3756
+ "type": "string",
3757
+ "const": "created"
3758
+ }
3759
+ }
3760
+ },
3761
+ "WebhookEndpoint": {
3762
+ "type": "object",
3763
+ "required": [
3764
+ "id",
3765
+ "name",
3766
+ "url",
3767
+ "enabled",
3768
+ "event_types",
3769
+ "channels",
3770
+ "channel_connection_ids",
3771
+ "secret_last4",
3772
+ "consecutive_failures",
3773
+ "last_delivery_at",
3774
+ "last_success_at",
3775
+ "last_error_at",
3776
+ "last_error",
3777
+ "created_at",
3778
+ "updated_at"
3779
+ ],
3780
+ "properties": {
3781
+ "id": {
3782
+ "type": "string"
3783
+ },
3784
+ "name": {
3785
+ "type": "string"
3786
+ },
3787
+ "url": {
3788
+ "type": "string",
3789
+ "format": "uri",
3790
+ "description": "Destination URL (must be https)."
3791
+ },
3792
+ "enabled": {
3793
+ "type": "boolean"
3794
+ },
3795
+ "event_types": {
3796
+ "type": "array",
3797
+ "items": {
3798
+ "type": "string"
3799
+ },
3800
+ "description": "Subscribed event types. Empty array = all events."
3801
+ },
3802
+ "channels": {
3803
+ "type": [
3804
+ "array",
3805
+ "null"
3806
+ ],
3807
+ "items": {
3808
+ "type": "string"
3809
+ },
3810
+ "description": "Channel-type filter (e.g. `['widget', 'whatsapp']`), or `null` for all channels."
3811
+ },
3812
+ "channel_connection_ids": {
3813
+ "type": [
3814
+ "array",
3815
+ "null"
3816
+ ],
3817
+ "items": {
3818
+ "type": "string"
3819
+ },
3820
+ "description": "Channel-connection filter, or `null` for all connections."
3821
+ },
3822
+ "secret_last4": {
3823
+ "type": "string",
3824
+ "description": "Last 4 characters of the signing secret, for identification."
3825
+ },
3826
+ "consecutive_failures": {
3827
+ "type": "integer"
3828
+ },
3829
+ "last_delivery_at": {
3830
+ "type": [
3831
+ "integer",
3832
+ "null"
3833
+ ],
3834
+ "description": "Unix timestamp in milliseconds, or `null` if never."
3835
+ },
3836
+ "last_success_at": {
3837
+ "type": [
3838
+ "integer",
3839
+ "null"
3840
+ ],
3841
+ "description": "Unix timestamp in milliseconds, or `null` if never."
3842
+ },
3843
+ "last_error_at": {
3844
+ "type": [
3845
+ "integer",
3846
+ "null"
3847
+ ],
3848
+ "description": "Unix timestamp in milliseconds, or `null` if never."
3849
+ },
3850
+ "last_error": {
3851
+ "type": [
3852
+ "string",
3853
+ "null"
3854
+ ]
3855
+ },
3856
+ "created_at": {
3857
+ "type": "integer",
3858
+ "description": "Unix timestamp in milliseconds."
3859
+ },
3860
+ "updated_at": {
3861
+ "type": "integer",
3862
+ "description": "Unix timestamp in milliseconds."
3863
+ },
3864
+ "secret": {
3865
+ "type": "string",
3866
+ "description": "Full signing secret (`whsec_…`) — present ONLY in the create response, exactly once. It can never be retrieved again; store it securely immediately. An idempotent replay of the create request omits it."
3867
+ }
3868
+ }
3869
+ },
3870
+ "CreateWebhookInput": {
3871
+ "type": "object",
3872
+ "required": [
3873
+ "name",
3874
+ "url",
3875
+ "event_types"
3876
+ ],
3877
+ "properties": {
3878
+ "name": {
3879
+ "type": "string",
3880
+ "maxLength": 100
3881
+ },
3882
+ "url": {
3883
+ "type": "string",
3884
+ "format": "uri",
3885
+ "description": "Destination URL — must be https."
3886
+ },
3887
+ "event_types": {
3888
+ "type": "array",
3889
+ "items": {
3890
+ "type": "string"
3891
+ },
3892
+ "description": "Event types to subscribe to (e.g. `helpdesk.message_received`). Empty = all."
3893
+ },
3894
+ "channels": {
3895
+ "type": "array",
3896
+ "items": {
3897
+ "type": "string"
3898
+ },
3899
+ "description": "Restrict to these channel types (e.g. `['widget', 'whatsapp']`)."
3900
+ },
3901
+ "channel_connection_ids": {
3902
+ "type": "array",
3903
+ "items": {
3904
+ "type": "string"
3905
+ },
3906
+ "description": "Restrict to these channel connection IDs."
3907
+ }
3908
+ }
3909
+ },
3910
+ "UpdateWebhookInput": {
3911
+ "type": "object",
3912
+ "description": "Only provided fields change.",
3913
+ "properties": {
3914
+ "name": {
3915
+ "type": "string",
3916
+ "maxLength": 100
3917
+ },
3918
+ "url": {
3919
+ "type": "string",
3920
+ "format": "uri"
3921
+ },
3922
+ "event_types": {
3923
+ "type": "array",
3924
+ "items": {
3925
+ "type": "string"
3926
+ }
2830
3927
  },
2831
- "granted_at": {
3928
+ "channels": {
2832
3929
  "type": [
2833
- "string",
3930
+ "array",
2834
3931
  "null"
2835
3932
  ],
2836
- "format": "date-time"
3933
+ "items": {
3934
+ "type": "string"
3935
+ },
3936
+ "description": "New channel-type filter, or `null` to clear the filter."
2837
3937
  },
2838
- "revoked_at": {
3938
+ "channel_connection_ids": {
2839
3939
  "type": [
2840
- "string",
3940
+ "array",
2841
3941
  "null"
2842
3942
  ],
2843
- "format": "date-time"
2844
- },
2845
- "source": {
2846
- "type": "string"
3943
+ "items": {
3944
+ "type": "string"
3945
+ },
3946
+ "description": "New channel-connection filter, or `null` to clear the filter."
2847
3947
  },
2848
- "version": {
2849
- "type": "string"
3948
+ "enabled": {
3949
+ "type": "boolean"
2850
3950
  }
2851
3951
  }
2852
3952
  },
2853
- "ConsentResult": {
3953
+ "WebhookDeleteResult": {
2854
3954
  "type": "object",
2855
3955
  "required": [
2856
- "id"
3956
+ "id",
3957
+ "status"
2857
3958
  ],
2858
3959
  "properties": {
2859
3960
  "id": {
2860
3961
  "type": "string"
3962
+ },
3963
+ "status": {
3964
+ "type": "string",
3965
+ "const": "deleted"
2861
3966
  }
2862
3967
  }
2863
3968
  },
2864
- "CookieConsentInput": {
3969
+ "WebhookDelivery": {
2865
3970
  "type": "object",
2866
3971
  "required": [
2867
- "domain",
2868
- "consentStatus",
2869
- "consentTimestamp",
2870
- "cookiePreferences"
3972
+ "id",
3973
+ "event_type",
3974
+ "status",
3975
+ "attempt_count",
3976
+ "next_attempt_at",
3977
+ "response_status",
3978
+ "duration_ms",
3979
+ "last_error",
3980
+ "delivered_at",
3981
+ "created_at"
2871
3982
  ],
2872
3983
  "properties": {
2873
- "domain": {
3984
+ "id": {
2874
3985
  "type": "string"
2875
3986
  },
2876
- "consentStatus": {
3987
+ "event_type": {
2877
3988
  "type": "string"
2878
3989
  },
2879
- "consentTimestamp": {
3990
+ "status": {
2880
3991
  "type": "string",
2881
- "format": "date-time"
3992
+ "enum": [
3993
+ "pending",
3994
+ "delivered",
3995
+ "dead_letter"
3996
+ ]
2882
3997
  },
2883
- "ipAddress": {
2884
- "type": "string"
3998
+ "attempt_count": {
3999
+ "type": "integer"
2885
4000
  },
2886
- "userAgent": {
2887
- "type": "string"
4001
+ "next_attempt_at": {
4002
+ "type": [
4003
+ "integer",
4004
+ "null"
4005
+ ],
4006
+ "description": "Unix timestamp in milliseconds of the next retry, or `null`."
2888
4007
  },
2889
- "cookiePreferences": {
2890
- "type": "object",
2891
- "additionalProperties": {
2892
- "$ref": "#/components/schemas/CookieCategoryConsent"
2893
- }
2894
- }
2895
- }
2896
- },
2897
- "CookieCategoryConsent": {
2898
- "type": "object",
2899
- "required": [
2900
- "allowed"
2901
- ],
2902
- "properties": {
2903
- "allowed": {
2904
- "type": "boolean"
4008
+ "response_status": {
4009
+ "type": [
4010
+ "integer",
4011
+ "null"
4012
+ ]
2905
4013
  },
2906
- "cookieRecords": {
2907
- "type": "array",
2908
- "items": {
2909
- "type": "object",
2910
- "required": [
2911
- "cookie",
2912
- "duration",
2913
- "description"
2914
- ],
2915
- "properties": {
2916
- "cookie": {
2917
- "type": "string"
2918
- },
2919
- "duration": {
2920
- "type": "string"
2921
- },
2922
- "description": {
2923
- "type": "string"
2924
- }
2925
- }
2926
- }
2927
- }
2928
- }
2929
- },
2930
- "CookieConsentResult": {
2931
- "type": "object",
2932
- "required": [
2933
- "success"
2934
- ],
2935
- "properties": {
2936
- "success": {
2937
- "type": "boolean"
4014
+ "duration_ms": {
4015
+ "type": [
4016
+ "integer",
4017
+ "null"
4018
+ ]
2938
4019
  },
2939
- "logId": {
2940
- "type": "string"
4020
+ "last_error": {
4021
+ "type": [
4022
+ "string",
4023
+ "null"
4024
+ ]
4025
+ },
4026
+ "delivered_at": {
4027
+ "type": [
4028
+ "integer",
4029
+ "null"
4030
+ ],
4031
+ "description": "Unix timestamp in milliseconds, or `null` if not delivered."
4032
+ },
4033
+ "created_at": {
4034
+ "type": "integer",
4035
+ "description": "Unix timestamp in milliseconds."
2941
4036
  }
2942
4037
  }
2943
4038
  },
2944
- "Workspace": {
4039
+ "WebhookTestResult": {
2945
4040
  "type": "object",
2946
4041
  "required": [
2947
- "id",
2948
- "name",
2949
- "slug"
4042
+ "delivery_id",
4043
+ "status"
2950
4044
  ],
2951
4045
  "properties": {
2952
- "id": {
4046
+ "delivery_id": {
2953
4047
  "type": "string"
2954
4048
  },
2955
- "name": {
2956
- "type": "string"
2957
- },
2958
- "slug": {
2959
- "type": "string"
4049
+ "status": {
4050
+ "type": "string",
4051
+ "const": "queued"
2960
4052
  }
2961
- },
2962
- "additionalProperties": true
4053
+ }
2963
4054
  },
2964
4055
  "ApiResponse_PostCreateResult": {
2965
4056
  "$ref": "#/components/schemas/Envelope_PostCreateResult"
@@ -3042,6 +4133,30 @@
3042
4133
  "ApiResponse_WorkspaceArray": {
3043
4134
  "$ref": "#/components/schemas/Envelope_WorkspaceArray"
3044
4135
  },
4136
+ "ApiResponse_HelpdeskConversation": {
4137
+ "$ref": "#/components/schemas/Envelope_HelpdeskConversation"
4138
+ },
4139
+ "ApiResponse_HelpdeskConversationUpdateResult": {
4140
+ "$ref": "#/components/schemas/Envelope_HelpdeskConversationUpdateResult"
4141
+ },
4142
+ "ApiResponse_HelpdeskReplyCreateResult": {
4143
+ "$ref": "#/components/schemas/Envelope_HelpdeskReplyCreateResult"
4144
+ },
4145
+ "ApiResponse_WebhookEndpoint": {
4146
+ "$ref": "#/components/schemas/Envelope_WebhookEndpoint"
4147
+ },
4148
+ "ApiResponse_WebhookEndpointArray": {
4149
+ "$ref": "#/components/schemas/Envelope_WebhookEndpointArray"
4150
+ },
4151
+ "ApiResponse_WebhookDeleteResult": {
4152
+ "$ref": "#/components/schemas/Envelope_WebhookDeleteResult"
4153
+ },
4154
+ "ApiResponse_WebhookDeliveryArray": {
4155
+ "$ref": "#/components/schemas/Envelope_WebhookDeliveryArray"
4156
+ },
4157
+ "ApiResponse_WebhookTestResult": {
4158
+ "$ref": "#/components/schemas/Envelope_WebhookTestResult"
4159
+ },
3045
4160
  "PaginatedResponse_Post": {
3046
4161
  "type": "object",
3047
4162
  "required": [
@@ -3114,6 +4229,42 @@
3114
4229
  }
3115
4230
  }
3116
4231
  },
4232
+ "PaginatedResponse_HelpdeskConversation": {
4233
+ "type": "object",
4234
+ "required": [
4235
+ "data",
4236
+ "pagination"
4237
+ ],
4238
+ "properties": {
4239
+ "data": {
4240
+ "type": "array",
4241
+ "items": {
4242
+ "$ref": "#/components/schemas/HelpdeskConversation"
4243
+ }
4244
+ },
4245
+ "pagination": {
4246
+ "$ref": "#/components/schemas/Pagination"
4247
+ }
4248
+ }
4249
+ },
4250
+ "PaginatedResponse_HelpdeskMessage": {
4251
+ "type": "object",
4252
+ "required": [
4253
+ "data",
4254
+ "pagination"
4255
+ ],
4256
+ "properties": {
4257
+ "data": {
4258
+ "type": "array",
4259
+ "items": {
4260
+ "$ref": "#/components/schemas/HelpdeskMessage"
4261
+ }
4262
+ },
4263
+ "pagination": {
4264
+ "$ref": "#/components/schemas/Pagination"
4265
+ }
4266
+ }
4267
+ },
3117
4268
  "Envelope_PostCreateResult": {
3118
4269
  "type": "object",
3119
4270
  "required": [
@@ -3425,6 +4576,100 @@
3425
4576
  }
3426
4577
  }
3427
4578
  }
4579
+ },
4580
+ "Envelope_HelpdeskConversation": {
4581
+ "type": "object",
4582
+ "required": [
4583
+ "data"
4584
+ ],
4585
+ "properties": {
4586
+ "data": {
4587
+ "$ref": "#/components/schemas/HelpdeskConversation"
4588
+ }
4589
+ }
4590
+ },
4591
+ "Envelope_HelpdeskConversationUpdateResult": {
4592
+ "type": "object",
4593
+ "required": [
4594
+ "data"
4595
+ ],
4596
+ "properties": {
4597
+ "data": {
4598
+ "$ref": "#/components/schemas/HelpdeskConversationUpdateResult"
4599
+ }
4600
+ }
4601
+ },
4602
+ "Envelope_HelpdeskReplyCreateResult": {
4603
+ "type": "object",
4604
+ "required": [
4605
+ "data"
4606
+ ],
4607
+ "properties": {
4608
+ "data": {
4609
+ "$ref": "#/components/schemas/HelpdeskReplyCreateResult"
4610
+ }
4611
+ }
4612
+ },
4613
+ "Envelope_WebhookEndpoint": {
4614
+ "type": "object",
4615
+ "required": [
4616
+ "data"
4617
+ ],
4618
+ "properties": {
4619
+ "data": {
4620
+ "$ref": "#/components/schemas/WebhookEndpoint"
4621
+ }
4622
+ }
4623
+ },
4624
+ "Envelope_WebhookEndpointArray": {
4625
+ "type": "object",
4626
+ "required": [
4627
+ "data"
4628
+ ],
4629
+ "properties": {
4630
+ "data": {
4631
+ "type": "array",
4632
+ "items": {
4633
+ "$ref": "#/components/schemas/WebhookEndpoint"
4634
+ }
4635
+ }
4636
+ }
4637
+ },
4638
+ "Envelope_WebhookDeleteResult": {
4639
+ "type": "object",
4640
+ "required": [
4641
+ "data"
4642
+ ],
4643
+ "properties": {
4644
+ "data": {
4645
+ "$ref": "#/components/schemas/WebhookDeleteResult"
4646
+ }
4647
+ }
4648
+ },
4649
+ "Envelope_WebhookDeliveryArray": {
4650
+ "type": "object",
4651
+ "required": [
4652
+ "data"
4653
+ ],
4654
+ "properties": {
4655
+ "data": {
4656
+ "type": "array",
4657
+ "items": {
4658
+ "$ref": "#/components/schemas/WebhookDelivery"
4659
+ }
4660
+ }
4661
+ }
4662
+ },
4663
+ "Envelope_WebhookTestResult": {
4664
+ "type": "object",
4665
+ "required": [
4666
+ "data"
4667
+ ],
4668
+ "properties": {
4669
+ "data": {
4670
+ "$ref": "#/components/schemas/WebhookTestResult"
4671
+ }
4672
+ }
3428
4673
  }
3429
4674
  }
3430
4675
  }