@botpress/api 1.53.0 → 1.53.1

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.
@@ -1,4528 +0,0 @@
1
- // This file was generated by the Opapi Generator
2
- /* eslint-disable */
3
- /* prettier-ignore */
4
- import * as opapi from '@bpinternal/opapi'
5
- export type State = opapi.State<'User' | 'Conversation' | 'Event' | 'Message' | 'State' | 'Task' | 'Workflow', 'x-bot-id' | 'x-integration-id' | 'x-integration-alias', 'user' | 'conversation' | 'event' | 'message' | 'state' | 'hub' | 'action' | 'task' | 'workflow' | 'tag'>
6
- export const state = {
7
- "operations": {
8
- "createConversation": {
9
- "name": "createConversation",
10
- "description": "Creates a new [Conversation](#schema_conversation). When creating a new [Conversation](#schema_conversation), the required tags must be provided. See the specific integration for more details.",
11
- "method": "post",
12
- "path": "/v1/chat/conversations",
13
- "requestBody": {
14
- "description": "Conversation data",
15
- "schema": {
16
- "type": "object",
17
- "properties": {
18
- "channel": {
19
- "type": "string",
20
- "maxLength": 200,
21
- "description": "Channel name"
22
- },
23
- "tags": {
24
- "type": "object",
25
- "additionalProperties": {
26
- "type": "string",
27
- "maxLength": 500
28
- },
29
- "description": "Tags for the [Conversation](#schema_conversation)"
30
- },
31
- "integrationName": {
32
- "type": "string",
33
- "maxLength": 200,
34
- "description": "[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead.",
35
- "deprecated": true
36
- }
37
- },
38
- "required": [
39
- "channel",
40
- "tags"
41
- ],
42
- "title": "createConversationBody",
43
- "additionalProperties": false
44
- }
45
- },
46
- "section": "conversation",
47
- "response": {
48
- "description": "Returns a [Conversation](#schema_conversation) object if creation succeeds. Returns [an error](#errors) otherwise",
49
- "status": 201,
50
- "schema": {
51
- "type": "object",
52
- "properties": {
53
- "conversation": {
54
- "$ref": "#/components/schemas/Conversation"
55
- }
56
- },
57
- "required": [
58
- "conversation"
59
- ],
60
- "title": "createConversationResponse",
61
- "additionalProperties": false
62
- }
63
- },
64
- "tags": [
65
- "documented"
66
- ],
67
- "parameters": {
68
- "x-bot-id": {
69
- "in": "header",
70
- "description": "Bot id",
71
- "type": "string",
72
- "required": true
73
- },
74
- "x-integration-id": {
75
- "in": "header",
76
- "description": "Integration id",
77
- "type": "string",
78
- "required": false
79
- },
80
- "x-integration-alias": {
81
- "in": "header",
82
- "description": "Integration alias",
83
- "type": "string",
84
- "required": false
85
- }
86
- }
87
- },
88
- "getConversation": {
89
- "name": "getConversation",
90
- "description": "Retrieves the [Conversation](#schema_conversation) object for a valid identifier.",
91
- "method": "get",
92
- "path": "/v1/chat/conversations/{id}",
93
- "parameters": {
94
- "id": {
95
- "in": "path",
96
- "type": "string",
97
- "description": "Conversation id"
98
- },
99
- "x-bot-id": {
100
- "in": "header",
101
- "description": "Bot id",
102
- "type": "string",
103
- "required": true
104
- },
105
- "x-integration-id": {
106
- "in": "header",
107
- "description": "Integration id",
108
- "type": "string",
109
- "required": false
110
- },
111
- "x-integration-alias": {
112
- "in": "header",
113
- "description": "Integration alias",
114
- "type": "string",
115
- "required": false
116
- }
117
- },
118
- "section": "conversation",
119
- "response": {
120
- "description": "Returns a [Conversation](#schema_conversation) object if a valid identifier was provided. Returns [an error](#errors) otherwise",
121
- "schema": {
122
- "type": "object",
123
- "properties": {
124
- "conversation": {
125
- "$ref": "#/components/schemas/Conversation"
126
- }
127
- },
128
- "required": [
129
- "conversation"
130
- ],
131
- "title": "getConversationResponse",
132
- "additionalProperties": false
133
- }
134
- },
135
- "tags": [
136
- "documented"
137
- ]
138
- },
139
- "listConversations": {
140
- "name": "listConversations",
141
- "description": "Retrieves a list of [Conversation](#schema_conversation) you’ve previously created. The conversations are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](#tags).",
142
- "method": "get",
143
- "path": "/v1/chat/conversations",
144
- "parameters": {
145
- "nextToken": {
146
- "in": "query",
147
- "description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
148
- "type": "string"
149
- },
150
- "sortField": {
151
- "in": "query",
152
- "description": "Sort results by this field",
153
- "type": "string",
154
- "enum": [
155
- "createdAt",
156
- "updatedAt"
157
- ]
158
- },
159
- "sortDirection": {
160
- "in": "query",
161
- "description": "Sort results in this direction",
162
- "type": "string",
163
- "enum": [
164
- "asc",
165
- "desc"
166
- ]
167
- },
168
- "tags": {
169
- "in": "query",
170
- "type": "object",
171
- "schema": {
172
- "type": "object",
173
- "additionalProperties": {
174
- "type": "string"
175
- }
176
- },
177
- "description": "Filter by tags"
178
- },
179
- "participantIds": {
180
- "in": "query",
181
- "type": "string[]",
182
- "description": "Filter by participant ids"
183
- },
184
- "integrationName": {
185
- "in": "query",
186
- "type": "string",
187
- "description": "Filter by integration name"
188
- },
189
- "channel": {
190
- "in": "query",
191
- "type": "string",
192
- "description": "Filter by integration channel name"
193
- },
194
- "x-bot-id": {
195
- "in": "header",
196
- "description": "Bot id",
197
- "type": "string",
198
- "required": true
199
- },
200
- "x-integration-id": {
201
- "in": "header",
202
- "description": "Integration id",
203
- "type": "string",
204
- "required": false
205
- },
206
- "x-integration-alias": {
207
- "in": "header",
208
- "description": "Integration alias",
209
- "type": "string",
210
- "required": false
211
- }
212
- },
213
- "section": "conversation",
214
- "response": {
215
- "description": "Returns a list of [Conversation](#schema_conversation) objects",
216
- "schema": {
217
- "type": "object",
218
- "properties": {
219
- "conversations": {
220
- "type": "array",
221
- "items": {
222
- "$ref": "#/components/schemas/Conversation"
223
- }
224
- },
225
- "meta": {
226
- "type": "object",
227
- "properties": {
228
- "nextToken": {
229
- "type": "string",
230
- "description": "The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."
231
- }
232
- },
233
- "additionalProperties": false
234
- }
235
- },
236
- "required": [
237
- "conversations",
238
- "meta"
239
- ],
240
- "title": "listConversationsResponse",
241
- "additionalProperties": false
242
- }
243
- },
244
- "tags": [
245
- "documented"
246
- ]
247
- },
248
- "getOrCreateConversation": {
249
- "name": "getOrCreateConversation",
250
- "description": "Retrieves the [Conversation](#schema_conversation) object for a valid identifier. If the conversation does not exist, it will be created.",
251
- "method": "post",
252
- "path": "/v1/chat/conversations/get-or-create",
253
- "requestBody": {
254
- "description": "Conversation data",
255
- "schema": {
256
- "type": "object",
257
- "properties": {
258
- "channel": {
259
- "type": "string",
260
- "maxLength": 200,
261
- "description": "Channel name"
262
- },
263
- "tags": {
264
- "type": "object",
265
- "additionalProperties": {
266
- "type": "string",
267
- "maxLength": 500
268
- },
269
- "description": "Tags for the [Conversation](#schema_conversation)"
270
- },
271
- "integrationName": {
272
- "type": "string",
273
- "maxLength": 200,
274
- "description": "[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead.",
275
- "deprecated": true
276
- },
277
- "discriminateByTags": {
278
- "type": "array",
279
- "items": {
280
- "type": "string",
281
- "maxLength": 500
282
- },
283
- "description": "Optional list of tag names to use for strict matching when looking up existing conversations. If provided, all specified tags must match exactly for a conversation to be considered a match. For example, with an existing conversation whose tags are {\"foo\": \"a\", \"bar\": \"b\", baz: \"c\"}: Without this parameter, ALL tags must match exactly. With [\"bar\",\"baz\"], all listed tags must match their values, and other tags are not considered."
284
- }
285
- },
286
- "required": [
287
- "channel",
288
- "tags"
289
- ],
290
- "title": "getOrCreateConversationBody",
291
- "additionalProperties": false
292
- }
293
- },
294
- "section": "conversation",
295
- "response": {
296
- "description": "Returns a [Conversation](#schema_conversation) object if a valid identifier was provided. Returns [an error](#errors) otherwise",
297
- "schema": {
298
- "type": "object",
299
- "properties": {
300
- "conversation": {
301
- "$ref": "#/components/schemas/Conversation"
302
- }
303
- },
304
- "required": [
305
- "conversation"
306
- ],
307
- "title": "getOrCreateConversationResponse",
308
- "additionalProperties": false
309
- }
310
- },
311
- "tags": [
312
- "documented"
313
- ],
314
- "parameters": {
315
- "x-bot-id": {
316
- "in": "header",
317
- "description": "Bot id",
318
- "type": "string",
319
- "required": true
320
- },
321
- "x-integration-id": {
322
- "in": "header",
323
- "description": "Integration id",
324
- "type": "string",
325
- "required": false
326
- },
327
- "x-integration-alias": {
328
- "in": "header",
329
- "description": "Integration alias",
330
- "type": "string",
331
- "required": false
332
- }
333
- }
334
- },
335
- "updateConversation": {
336
- "name": "updateConversation",
337
- "description": "Update a [Conversation](#schema_conversation) object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.",
338
- "method": "put",
339
- "path": "/v1/chat/conversations/{id}",
340
- "parameters": {
341
- "id": {
342
- "in": "path",
343
- "type": "string",
344
- "description": "Conversation id"
345
- },
346
- "x-bot-id": {
347
- "in": "header",
348
- "description": "Bot id",
349
- "type": "string",
350
- "required": true
351
- },
352
- "x-integration-id": {
353
- "in": "header",
354
- "description": "Integration id",
355
- "type": "string",
356
- "required": false
357
- },
358
- "x-integration-alias": {
359
- "in": "header",
360
- "description": "Integration alias",
361
- "type": "string",
362
- "required": false
363
- }
364
- },
365
- "requestBody": {
366
- "description": "Conversation data",
367
- "schema": {
368
- "type": "object",
369
- "properties": {
370
- "currentTaskId": {
371
- "type": "string"
372
- },
373
- "tags": {
374
- "type": "object",
375
- "additionalProperties": {
376
- "type": "string"
377
- },
378
- "description": "Tags for the [Conversation](#schema_conversation)"
379
- }
380
- },
381
- "title": "updateConversationBody",
382
- "additionalProperties": false
383
- }
384
- },
385
- "section": "conversation",
386
- "response": {
387
- "description": "Returns an updated [Conversation](#schema_conversation) object if a valid identifier was provided. Returns [an error](#errors) otherwise",
388
- "schema": {
389
- "type": "object",
390
- "properties": {
391
- "conversation": {
392
- "$ref": "#/components/schemas/Conversation"
393
- }
394
- },
395
- "required": [
396
- "conversation"
397
- ],
398
- "title": "updateConversationResponse",
399
- "additionalProperties": false
400
- }
401
- },
402
- "tags": [
403
- "documented"
404
- ]
405
- },
406
- "deleteConversation": {
407
- "name": "deleteConversation",
408
- "description": "Permanently deletes a [Conversation](#schema_conversation). It cannot be undone. Also immediately deletes corresponding [Messages](#schema_message).",
409
- "method": "delete",
410
- "path": "/v1/chat/conversations/{id}",
411
- "parameters": {
412
- "id": {
413
- "in": "path",
414
- "type": "string",
415
- "description": "Conversation id"
416
- },
417
- "x-bot-id": {
418
- "in": "header",
419
- "description": "Bot id",
420
- "type": "string",
421
- "required": true
422
- },
423
- "x-integration-id": {
424
- "in": "header",
425
- "description": "Integration id",
426
- "type": "string",
427
- "required": false
428
- },
429
- "x-integration-alias": {
430
- "in": "header",
431
- "description": "Integration alias",
432
- "type": "string",
433
- "required": false
434
- }
435
- },
436
- "section": "conversation",
437
- "response": {
438
- "description": "Returns the [Conversation](#schema_conversation) object that was deleted",
439
- "schema": {
440
- "type": "object",
441
- "title": "deleteConversationResponse",
442
- "additionalProperties": false
443
- }
444
- },
445
- "tags": [
446
- "documented"
447
- ]
448
- },
449
- "listParticipants": {
450
- "name": "listParticipants",
451
- "description": "Retrieves a list of [Participant](#schema_participant) for a given [Conversation](#schema_conversation).",
452
- "method": "get",
453
- "path": "/v1/chat/conversations/{id}/participants",
454
- "parameters": {
455
- "nextToken": {
456
- "in": "query",
457
- "description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
458
- "type": "string"
459
- },
460
- "id": {
461
- "in": "path",
462
- "type": "string",
463
- "description": "Conversation id"
464
- },
465
- "x-bot-id": {
466
- "in": "header",
467
- "description": "Bot id",
468
- "type": "string",
469
- "required": true
470
- },
471
- "x-integration-id": {
472
- "in": "header",
473
- "description": "Integration id",
474
- "type": "string",
475
- "required": false
476
- },
477
- "x-integration-alias": {
478
- "in": "header",
479
- "description": "Integration alias",
480
- "type": "string",
481
- "required": false
482
- }
483
- },
484
- "section": "conversation",
485
- "response": {
486
- "description": "Returns a list of [Participant](#schema_participant) objects",
487
- "schema": {
488
- "type": "object",
489
- "properties": {
490
- "participants": {
491
- "type": "array",
492
- "items": {
493
- "$ref": "#/components/schemas/User"
494
- }
495
- },
496
- "meta": {
497
- "type": "object",
498
- "properties": {
499
- "nextToken": {
500
- "type": "string",
501
- "description": "The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."
502
- }
503
- },
504
- "additionalProperties": false
505
- }
506
- },
507
- "required": [
508
- "participants",
509
- "meta"
510
- ],
511
- "title": "listParticipantsResponse",
512
- "additionalProperties": false
513
- }
514
- },
515
- "tags": [
516
- "documented"
517
- ]
518
- },
519
- "addParticipant": {
520
- "name": "addParticipant",
521
- "description": "Add a [Participant](#schema_participant) to a [Conversation](#schema_conversation).",
522
- "method": "post",
523
- "path": "/v1/chat/conversations/{id}/participants",
524
- "parameters": {
525
- "id": {
526
- "in": "path",
527
- "type": "string",
528
- "description": "Conversation id"
529
- },
530
- "x-bot-id": {
531
- "in": "header",
532
- "description": "Bot id",
533
- "type": "string",
534
- "required": true
535
- },
536
- "x-integration-id": {
537
- "in": "header",
538
- "description": "Integration id",
539
- "type": "string",
540
- "required": false
541
- },
542
- "x-integration-alias": {
543
- "in": "header",
544
- "description": "Integration alias",
545
- "type": "string",
546
- "required": false
547
- }
548
- },
549
- "requestBody": {
550
- "description": "Participant data",
551
- "schema": {
552
- "type": "object",
553
- "properties": {
554
- "userId": {
555
- "type": "string",
556
- "minLength": 28,
557
- "maxLength": 36,
558
- "description": "User id"
559
- }
560
- },
561
- "required": [
562
- "userId"
563
- ],
564
- "title": "addParticipantBody",
565
- "additionalProperties": false
566
- }
567
- },
568
- "section": "conversation",
569
- "response": {
570
- "description": "Returns the [Participant](#schema_participant) object",
571
- "schema": {
572
- "type": "object",
573
- "properties": {
574
- "participant": {
575
- "$ref": "#/components/schemas/User"
576
- }
577
- },
578
- "required": [
579
- "participant"
580
- ],
581
- "title": "addParticipantResponse",
582
- "additionalProperties": false
583
- }
584
- },
585
- "tags": [
586
- "documented"
587
- ]
588
- },
589
- "getParticipant": {
590
- "name": "getParticipant",
591
- "description": "Retrieves a [Participant](#schema_participant) from a [Conversation](#schema_conversation).",
592
- "method": "get",
593
- "path": "/v1/chat/conversations/{id}/participants/{userId}",
594
- "parameters": {
595
- "id": {
596
- "in": "path",
597
- "type": "string",
598
- "description": "Conversation id"
599
- },
600
- "userId": {
601
- "in": "path",
602
- "type": "string",
603
- "description": "User id"
604
- },
605
- "x-bot-id": {
606
- "in": "header",
607
- "description": "Bot id",
608
- "type": "string",
609
- "required": true
610
- },
611
- "x-integration-id": {
612
- "in": "header",
613
- "description": "Integration id",
614
- "type": "string",
615
- "required": false
616
- },
617
- "x-integration-alias": {
618
- "in": "header",
619
- "description": "Integration alias",
620
- "type": "string",
621
- "required": false
622
- }
623
- },
624
- "section": "conversation",
625
- "response": {
626
- "description": "Returns the [Participant](#schema_participant) object",
627
- "schema": {
628
- "type": "object",
629
- "properties": {
630
- "participant": {
631
- "$ref": "#/components/schemas/User"
632
- }
633
- },
634
- "required": [
635
- "participant"
636
- ],
637
- "title": "getParticipantResponse",
638
- "additionalProperties": false
639
- }
640
- },
641
- "tags": [
642
- "documented"
643
- ]
644
- },
645
- "removeParticipant": {
646
- "name": "removeParticipant",
647
- "description": "Remove a [Participant](#schema_participant) from a [Conversation](#schema_conversation).",
648
- "method": "delete",
649
- "path": "/v1/chat/conversations/{id}/participants/{userId}",
650
- "parameters": {
651
- "id": {
652
- "in": "path",
653
- "type": "string",
654
- "description": "Conversation id"
655
- },
656
- "userId": {
657
- "in": "path",
658
- "type": "string",
659
- "description": "User id"
660
- },
661
- "x-bot-id": {
662
- "in": "header",
663
- "description": "Bot id",
664
- "type": "string",
665
- "required": true
666
- },
667
- "x-integration-id": {
668
- "in": "header",
669
- "description": "Integration id",
670
- "type": "string",
671
- "required": false
672
- },
673
- "x-integration-alias": {
674
- "in": "header",
675
- "description": "Integration alias",
676
- "type": "string",
677
- "required": false
678
- }
679
- },
680
- "section": "conversation",
681
- "response": {
682
- "description": "Returns an empty object",
683
- "schema": {
684
- "type": "object",
685
- "title": "removeParticipantResponse",
686
- "additionalProperties": false
687
- }
688
- },
689
- "tags": [
690
- "documented"
691
- ]
692
- },
693
- "createEvent": {
694
- "name": "createEvent",
695
- "description": "Creates a new [Event](#schema_event). When creating a new [Event](#schema_event), the required tags must be provided. See the specific integration for more details.",
696
- "method": "post",
697
- "path": "/v1/chat/events",
698
- "section": "event",
699
- "requestBody": {
700
- "description": "Event data",
701
- "schema": {
702
- "type": "object",
703
- "properties": {
704
- "type": {
705
- "type": "string",
706
- "maxLength": 200,
707
- "description": "Type of the [Event](#schema_event)."
708
- },
709
- "payload": {
710
- "type": "object",
711
- "additionalProperties": true,
712
- "description": "Payload is the content of the event defined by the integration installed on your bot or one of the default events created by our API."
713
- },
714
- "schedule": {
715
- "type": "object",
716
- "properties": {
717
- "dateTime": {
718
- "type": "string",
719
- "maxLength": 28,
720
- "minLength": 24,
721
- "description": "When the [Event](#schema_event) will be sent, in the ISO 8601 format"
722
- },
723
- "delay": {
724
- "type": "number",
725
- "description": "Delay in milliseconds before sending the [Event](#schema_event)"
726
- }
727
- },
728
- "description": "Schedule the Event to be sent at a specific time. Either dateTime or delay must be provided.",
729
- "additionalProperties": false
730
- },
731
- "conversationId": {
732
- "type": "string",
733
- "minLength": 28,
734
- "maxLength": 36,
735
- "description": "ID of the [Conversation](#schema_conversation) to link the event to."
736
- },
737
- "userId": {
738
- "type": "string",
739
- "minLength": 28,
740
- "maxLength": 36,
741
- "description": "ID of the [User](#schema_user) to link the event to."
742
- },
743
- "workflowId": {
744
- "type": "string",
745
- "minLength": 28,
746
- "maxLength": 36,
747
- "description": "ID of the [Workflow](#schema_workflow) to link the event to."
748
- },
749
- "messageId": {
750
- "type": "string",
751
- "minLength": 28,
752
- "maxLength": 36,
753
- "description": "ID of the [Message](#schema_message) to link the event to."
754
- }
755
- },
756
- "required": [
757
- "type",
758
- "payload"
759
- ],
760
- "title": "createEventBody",
761
- "additionalProperties": false
762
- }
763
- },
764
- "response": {
765
- "description": "Returns a [Event](#schema_event) object if creation succeeds. Returns [an error](#errors) otherwise",
766
- "status": 201,
767
- "schema": {
768
- "type": "object",
769
- "properties": {
770
- "event": {
771
- "$ref": "#/components/schemas/Event"
772
- }
773
- },
774
- "required": [
775
- "event"
776
- ],
777
- "title": "createEventResponse",
778
- "additionalProperties": false
779
- }
780
- },
781
- "tags": [
782
- "documented"
783
- ],
784
- "parameters": {
785
- "x-bot-id": {
786
- "in": "header",
787
- "description": "Bot id",
788
- "type": "string",
789
- "required": true
790
- },
791
- "x-integration-id": {
792
- "in": "header",
793
- "description": "Integration id",
794
- "type": "string",
795
- "required": false
796
- },
797
- "x-integration-alias": {
798
- "in": "header",
799
- "description": "Integration alias",
800
- "type": "string",
801
- "required": false
802
- }
803
- }
804
- },
805
- "getEvent": {
806
- "name": "getEvent",
807
- "description": "Retrieves the [Event](#schema_event) object for a valid identifiers.",
808
- "method": "get",
809
- "path": "/v1/chat/events/{id}",
810
- "parameters": {
811
- "id": {
812
- "in": "path",
813
- "type": "string",
814
- "description": "Event id"
815
- },
816
- "x-bot-id": {
817
- "in": "header",
818
- "description": "Bot id",
819
- "type": "string",
820
- "required": true
821
- },
822
- "x-integration-id": {
823
- "in": "header",
824
- "description": "Integration id",
825
- "type": "string",
826
- "required": false
827
- },
828
- "x-integration-alias": {
829
- "in": "header",
830
- "description": "Integration alias",
831
- "type": "string",
832
- "required": false
833
- }
834
- },
835
- "section": "event",
836
- "response": {
837
- "description": "Returns the [Event](#schema_event) object if a valid identifiers were provided. Returns [an error](#errors) otherwise",
838
- "schema": {
839
- "type": "object",
840
- "properties": {
841
- "event": {
842
- "$ref": "#/components/schemas/Event"
843
- }
844
- },
845
- "required": [
846
- "event"
847
- ],
848
- "title": "getEventResponse",
849
- "additionalProperties": false
850
- }
851
- },
852
- "tags": [
853
- "documented"
854
- ]
855
- },
856
- "listEvents": {
857
- "name": "listEvents",
858
- "description": "Retrieves a list of [Event](#schema_event) you’ve previously created. The events are returned in sorted order, with the most recent appearing first.",
859
- "method": "get",
860
- "path": "/v1/chat/events",
861
- "section": "event",
862
- "parameters": {
863
- "nextToken": {
864
- "in": "query",
865
- "description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
866
- "type": "string"
867
- },
868
- "type": {
869
- "in": "query",
870
- "type": "string",
871
- "description": "Filter by event type"
872
- },
873
- "conversationId": {
874
- "in": "query",
875
- "type": "string",
876
- "description": "Filter by conversation id"
877
- },
878
- "userId": {
879
- "in": "query",
880
- "type": "string",
881
- "description": "Filter by user id"
882
- },
883
- "messageId": {
884
- "in": "query",
885
- "type": "string",
886
- "description": "Filter by message id"
887
- },
888
- "workflowId": {
889
- "in": "query",
890
- "type": "string",
891
- "description": "Filter by workflow id"
892
- },
893
- "status": {
894
- "in": "query",
895
- "type": "string",
896
- "enum": [
897
- "pending",
898
- "ignored",
899
- "processed",
900
- "failed",
901
- "scheduled"
902
- ],
903
- "description": "Filter by status. Allowed values: pending, ignored, processed, failed."
904
- },
905
- "x-bot-id": {
906
- "in": "header",
907
- "description": "Bot id",
908
- "type": "string",
909
- "required": true
910
- },
911
- "x-integration-id": {
912
- "in": "header",
913
- "description": "Integration id",
914
- "type": "string",
915
- "required": false
916
- },
917
- "x-integration-alias": {
918
- "in": "header",
919
- "description": "Integration alias",
920
- "type": "string",
921
- "required": false
922
- }
923
- },
924
- "response": {
925
- "description": "Returns a list of [Event](#schema_event) objects",
926
- "schema": {
927
- "type": "object",
928
- "properties": {
929
- "events": {
930
- "type": "array",
931
- "items": {
932
- "$ref": "#/components/schemas/Event"
933
- }
934
- },
935
- "meta": {
936
- "type": "object",
937
- "properties": {
938
- "nextToken": {
939
- "type": "string",
940
- "description": "The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."
941
- }
942
- },
943
- "additionalProperties": false
944
- }
945
- },
946
- "required": [
947
- "events",
948
- "meta"
949
- ],
950
- "title": "listEventsResponse",
951
- "additionalProperties": false
952
- }
953
- },
954
- "tags": [
955
- "documented"
956
- ]
957
- },
958
- "cancelScheduledEvent": {
959
- "name": "cancelScheduledEvent",
960
- "description": "Permanently cancels a scheduled [Event](#schema_event). The event must be in a `scheduled` state.",
961
- "method": "delete",
962
- "path": "/v1/chat/events/scheduled/{id}",
963
- "parameters": {
964
- "id": {
965
- "in": "path",
966
- "type": "string",
967
- "description": "Event id"
968
- },
969
- "x-bot-id": {
970
- "in": "header",
971
- "description": "Bot id",
972
- "type": "string",
973
- "required": true
974
- },
975
- "x-integration-id": {
976
- "in": "header",
977
- "description": "Integration id",
978
- "type": "string",
979
- "required": false
980
- },
981
- "x-integration-alias": {
982
- "in": "header",
983
- "description": "Integration alias",
984
- "type": "string",
985
- "required": false
986
- }
987
- },
988
- "section": "event",
989
- "response": {
990
- "description": "Returns an empty object",
991
- "schema": {
992
- "type": "object",
993
- "title": "cancelScheduledEventResponse",
994
- "additionalProperties": false
995
- }
996
- },
997
- "tags": [
998
- "documented"
999
- ]
1000
- },
1001
- "createMessage": {
1002
- "name": "createMessage",
1003
- "description": "Creates a new [Message](#schema_message). When creating a new [Message](#schema_message), the required tags must be provided. See the specific integration for more details.",
1004
- "method": "post",
1005
- "path": "/v1/chat/messages",
1006
- "requestBody": {
1007
- "description": "Message data",
1008
- "schema": {
1009
- "type": "object",
1010
- "properties": {
1011
- "payload": {
1012
- "type": "object",
1013
- "additionalProperties": true,
1014
- "description": "Payload is the content type of the message. Accepted payload options: Text, Image, Choice, Dropdown, Card, Carousel, File, Audio, Video, Location"
1015
- },
1016
- "userId": {
1017
- "type": "string",
1018
- "minLength": 28,
1019
- "maxLength": 36,
1020
- "description": "ID of the [User](#schema_user)"
1021
- },
1022
- "conversationId": {
1023
- "type": "string",
1024
- "minLength": 28,
1025
- "maxLength": 36,
1026
- "description": "ID of the [Conversation](#schema_conversation)"
1027
- },
1028
- "type": {
1029
- "type": "string",
1030
- "maxLength": 200,
1031
- "description": "Type of the [Message](#schema_message) represents the resource type that the message is related to"
1032
- },
1033
- "tags": {
1034
- "type": "object",
1035
- "additionalProperties": {
1036
- "type": "string",
1037
- "maxLength": 500
1038
- },
1039
- "description": "Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Message](#schema_message). The set of [Tags](/docs/developers/concepts/tags) available on a [Message](#schema_message) is restricted by the list of [Tags](/docs/developers/concepts/tags) defined previously by the [Bot](#schema_bot). Individual keys can be unset by posting an empty value to them."
1040
- },
1041
- "schedule": {
1042
- "type": "object",
1043
- "properties": {
1044
- "dateTime": {
1045
- "type": "string",
1046
- "maxLength": 28,
1047
- "minLength": 24,
1048
- "description": "When the [Message](#schema_message) will be sent, in the ISO 8601 format"
1049
- },
1050
- "delay": {
1051
- "type": "number",
1052
- "description": "Delay in milliseconds before sending the [Message](#schema_message)"
1053
- }
1054
- },
1055
- "description": "Schedule the Message to be sent at a specific time. Either dateTime or delay must be provided.",
1056
- "additionalProperties": false
1057
- },
1058
- "origin": {
1059
- "type": "string",
1060
- "enum": [
1061
- "synthetic"
1062
- ]
1063
- }
1064
- },
1065
- "required": [
1066
- "payload",
1067
- "userId",
1068
- "conversationId",
1069
- "type",
1070
- "tags"
1071
- ],
1072
- "title": "createMessageBody",
1073
- "additionalProperties": false
1074
- }
1075
- },
1076
- "section": "message",
1077
- "response": {
1078
- "description": "Returns a [Message](#schema_message) object if creation succeeds.",
1079
- "status": 201,
1080
- "schema": {
1081
- "type": "object",
1082
- "properties": {
1083
- "message": {
1084
- "$ref": "#/components/schemas/Message"
1085
- }
1086
- },
1087
- "required": [
1088
- "message"
1089
- ],
1090
- "title": "createMessageResponse",
1091
- "additionalProperties": false
1092
- }
1093
- },
1094
- "tags": [
1095
- "documented"
1096
- ],
1097
- "parameters": {
1098
- "x-bot-id": {
1099
- "in": "header",
1100
- "description": "Bot id",
1101
- "type": "string",
1102
- "required": true
1103
- },
1104
- "x-integration-id": {
1105
- "in": "header",
1106
- "description": "Integration id",
1107
- "type": "string",
1108
- "required": false
1109
- },
1110
- "x-integration-alias": {
1111
- "in": "header",
1112
- "description": "Integration alias",
1113
- "type": "string",
1114
- "required": false
1115
- }
1116
- }
1117
- },
1118
- "getOrCreateMessage": {
1119
- "name": "getOrCreateMessage",
1120
- "description": "Retrieves the [Message](#schema_message) object for a valid identifier. If the message does not exist, it will be created.",
1121
- "method": "post",
1122
- "path": "/v1/chat/messages/get-or-create",
1123
- "requestBody": {
1124
- "description": "Message data",
1125
- "schema": {
1126
- "type": "object",
1127
- "properties": {
1128
- "payload": {
1129
- "type": "object",
1130
- "additionalProperties": true,
1131
- "description": "Payload is the content type of the message. Accepted payload options: Text, Image, Choice, Dropdown, Card, Carousel, File, Audio, Video, Location"
1132
- },
1133
- "userId": {
1134
- "type": "string",
1135
- "minLength": 28,
1136
- "maxLength": 36,
1137
- "description": "ID of the [User](#schema_user)"
1138
- },
1139
- "conversationId": {
1140
- "type": "string",
1141
- "minLength": 28,
1142
- "maxLength": 36,
1143
- "description": "ID of the [Conversation](#schema_conversation)"
1144
- },
1145
- "type": {
1146
- "type": "string",
1147
- "maxLength": 200,
1148
- "description": "Type of the [Message](#schema_message) represents the resource type that the message is related to"
1149
- },
1150
- "tags": {
1151
- "type": "object",
1152
- "additionalProperties": {
1153
- "type": "string",
1154
- "maxLength": 500
1155
- },
1156
- "description": "Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Message](#schema_message). The set of [Tags](/docs/developers/concepts/tags) available on a [Message](#schema_message) is restricted by the list of [Tags](/docs/developers/concepts/tags) defined previously by the [Bot](#schema_bot). Individual keys can be unset by posting an empty value to them."
1157
- },
1158
- "schedule": {
1159
- "type": "object",
1160
- "properties": {
1161
- "dateTime": {
1162
- "type": "string",
1163
- "maxLength": 28,
1164
- "minLength": 24,
1165
- "description": "When the [Message](#schema_message) will be sent, in the ISO 8601 format"
1166
- },
1167
- "delay": {
1168
- "type": "number",
1169
- "description": "Delay in milliseconds before sending the [Message](#schema_message)"
1170
- }
1171
- },
1172
- "description": "Schedule the Message to be sent at a specific time. Either dateTime or delay must be provided.",
1173
- "additionalProperties": false
1174
- },
1175
- "origin": {
1176
- "type": "string",
1177
- "enum": [
1178
- "synthetic"
1179
- ]
1180
- },
1181
- "discriminateByTags": {
1182
- "type": "array",
1183
- "items": {
1184
- "type": "string",
1185
- "maxLength": 500
1186
- },
1187
- "description": "Optional list of tag names to use for strict matching when looking up existing messages. If provided, all specified tags must match exactly for a message to be considered a match. For example, with an existing message whose tags are {\"foo\": \"a\", \"bar\": \"b\", baz: \"c\"}: Without this parameter, ALL tags must match exactly. With [\"bar\",\"baz\"], all listed tags must match their values, and other tags are not considered."
1188
- }
1189
- },
1190
- "required": [
1191
- "payload",
1192
- "userId",
1193
- "conversationId",
1194
- "type",
1195
- "tags"
1196
- ],
1197
- "title": "getOrCreateMessageBody",
1198
- "additionalProperties": false
1199
- }
1200
- },
1201
- "section": "message",
1202
- "response": {
1203
- "description": "Returns a [Message](#schema_message) object if a valid identifier was provided. Returns an [Error](#errors) otherwise",
1204
- "schema": {
1205
- "type": "object",
1206
- "properties": {
1207
- "message": {
1208
- "$ref": "#/components/schemas/Message"
1209
- }
1210
- },
1211
- "required": [
1212
- "message"
1213
- ],
1214
- "title": "getOrCreateMessageResponse",
1215
- "additionalProperties": false
1216
- }
1217
- },
1218
- "tags": [
1219
- "documented"
1220
- ],
1221
- "parameters": {
1222
- "x-bot-id": {
1223
- "in": "header",
1224
- "description": "Bot id",
1225
- "type": "string",
1226
- "required": true
1227
- },
1228
- "x-integration-id": {
1229
- "in": "header",
1230
- "description": "Integration id",
1231
- "type": "string",
1232
- "required": false
1233
- },
1234
- "x-integration-alias": {
1235
- "in": "header",
1236
- "description": "Integration alias",
1237
- "type": "string",
1238
- "required": false
1239
- }
1240
- }
1241
- },
1242
- "getMessage": {
1243
- "name": "getMessage",
1244
- "description": "Retrieves the [Message](#schema_message) object for a valid identifier.",
1245
- "method": "get",
1246
- "path": "/v1/chat/messages/{id}",
1247
- "parameters": {
1248
- "id": {
1249
- "in": "path",
1250
- "type": "string",
1251
- "description": "Id of the Message"
1252
- },
1253
- "x-bot-id": {
1254
- "in": "header",
1255
- "description": "Bot id",
1256
- "type": "string",
1257
- "required": true
1258
- },
1259
- "x-integration-id": {
1260
- "in": "header",
1261
- "description": "Integration id",
1262
- "type": "string",
1263
- "required": false
1264
- },
1265
- "x-integration-alias": {
1266
- "in": "header",
1267
- "description": "Integration alias",
1268
- "type": "string",
1269
- "required": false
1270
- }
1271
- },
1272
- "section": "message",
1273
- "response": {
1274
- "description": "Returns a [Message](#schema_message) object if a valid identifier was provided. Returns an [Error](#errors) otherwise",
1275
- "schema": {
1276
- "type": "object",
1277
- "properties": {
1278
- "message": {
1279
- "$ref": "#/components/schemas/Message"
1280
- }
1281
- },
1282
- "required": [
1283
- "message"
1284
- ],
1285
- "title": "getMessageResponse",
1286
- "additionalProperties": false
1287
- }
1288
- },
1289
- "tags": [
1290
- "documented"
1291
- ]
1292
- },
1293
- "updateMessage": {
1294
- "name": "updateMessage",
1295
- "description": "Updates a message tags and payload. The message type cannot be changed. Calling this operation from an integration, to update an incoming message, will not invoke the bot. The other way around it also true; Calling this operation from the bot, to update an outgoing message, will not invoke the integration.",
1296
- "method": "put",
1297
- "path": "/v1/chat/messages/{id}",
1298
- "parameters": {
1299
- "id": {
1300
- "in": "path",
1301
- "type": "string",
1302
- "description": "Message id"
1303
- },
1304
- "x-bot-id": {
1305
- "in": "header",
1306
- "description": "Bot id",
1307
- "type": "string",
1308
- "required": true
1309
- },
1310
- "x-integration-id": {
1311
- "in": "header",
1312
- "description": "Integration id",
1313
- "type": "string",
1314
- "required": false
1315
- },
1316
- "x-integration-alias": {
1317
- "in": "header",
1318
- "description": "Integration alias",
1319
- "type": "string",
1320
- "required": false
1321
- }
1322
- },
1323
- "section": "message",
1324
- "requestBody": {
1325
- "description": "Message data",
1326
- "schema": {
1327
- "type": "object",
1328
- "properties": {
1329
- "tags": {
1330
- "type": "object",
1331
- "additionalProperties": {
1332
- "type": "string"
1333
- },
1334
- "description": "Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Conversation](#schema_conversation). The set of [Tags](/docs/developers/concepts/tags) available on a [Conversation](#schema_conversation) is restricted by the list of [Tags](/docs/developers/concepts/tags) defined previously by the [Bot](#schema_bot). Individual keys can be unset by posting an empty value to them."
1335
- },
1336
- "payload": {
1337
- "type": "object",
1338
- "additionalProperties": true,
1339
- "description": "Payload is the content type of the message. Accepted payload options: Text, Image, Choice, Dropdown, Card, Carousel, File, Audio, Video, Location"
1340
- }
1341
- },
1342
- "required": [
1343
- "tags"
1344
- ],
1345
- "title": "updateMessageBody",
1346
- "additionalProperties": false
1347
- }
1348
- },
1349
- "response": {
1350
- "description": "Message information",
1351
- "schema": {
1352
- "type": "object",
1353
- "properties": {
1354
- "message": {
1355
- "$ref": "#/components/schemas/Message"
1356
- }
1357
- },
1358
- "required": [
1359
- "message"
1360
- ],
1361
- "title": "updateMessageResponse",
1362
- "additionalProperties": false
1363
- }
1364
- },
1365
- "tags": [
1366
- "documented"
1367
- ]
1368
- },
1369
- "listMessages": {
1370
- "name": "listMessages",
1371
- "description": "Retrieves a list of [Message](#schema_message) you’ve previously created. The messages are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](/docs/developers/concepts/tags).",
1372
- "method": "get",
1373
- "path": "/v1/chat/messages",
1374
- "parameters": {
1375
- "nextToken": {
1376
- "in": "query",
1377
- "description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
1378
- "type": "string"
1379
- },
1380
- "conversationId": {
1381
- "in": "query",
1382
- "type": "string",
1383
- "description": "Conversation id"
1384
- },
1385
- "tags": {
1386
- "in": "query",
1387
- "type": "object",
1388
- "schema": {
1389
- "type": "object",
1390
- "additionalProperties": {
1391
- "type": "string"
1392
- }
1393
- },
1394
- "description": "Filter by tags"
1395
- },
1396
- "x-bot-id": {
1397
- "in": "header",
1398
- "description": "Bot id",
1399
- "type": "string",
1400
- "required": true
1401
- },
1402
- "x-integration-id": {
1403
- "in": "header",
1404
- "description": "Integration id",
1405
- "type": "string",
1406
- "required": false
1407
- },
1408
- "x-integration-alias": {
1409
- "in": "header",
1410
- "description": "Integration alias",
1411
- "type": "string",
1412
- "required": false
1413
- }
1414
- },
1415
- "section": "message",
1416
- "response": {
1417
- "description": "Returns a list of [Message](#schema_message) objects.",
1418
- "schema": {
1419
- "type": "object",
1420
- "properties": {
1421
- "messages": {
1422
- "type": "array",
1423
- "items": {
1424
- "$ref": "#/components/schemas/Message"
1425
- }
1426
- },
1427
- "meta": {
1428
- "type": "object",
1429
- "properties": {
1430
- "nextToken": {
1431
- "type": "string",
1432
- "description": "The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."
1433
- }
1434
- },
1435
- "additionalProperties": false
1436
- }
1437
- },
1438
- "required": [
1439
- "messages",
1440
- "meta"
1441
- ],
1442
- "title": "listMessagesResponse",
1443
- "additionalProperties": false
1444
- }
1445
- },
1446
- "tags": [
1447
- "documented"
1448
- ]
1449
- },
1450
- "deleteMessage": {
1451
- "name": "deleteMessage",
1452
- "description": "Permanently deletes a [Message](#schema_message). It cannot be undone.",
1453
- "method": "delete",
1454
- "path": "/v1/chat/messages/{id}",
1455
- "parameters": {
1456
- "id": {
1457
- "in": "path",
1458
- "type": "string",
1459
- "description": "Message id"
1460
- },
1461
- "x-bot-id": {
1462
- "in": "header",
1463
- "description": "Bot id",
1464
- "type": "string",
1465
- "required": true
1466
- },
1467
- "x-integration-id": {
1468
- "in": "header",
1469
- "description": "Integration id",
1470
- "type": "string",
1471
- "required": false
1472
- },
1473
- "x-integration-alias": {
1474
- "in": "header",
1475
- "description": "Integration alias",
1476
- "type": "string",
1477
- "required": false
1478
- }
1479
- },
1480
- "section": "message",
1481
- "response": {
1482
- "description": "Returns the [Message](#schema_message) object that was deleted",
1483
- "schema": {
1484
- "type": "object",
1485
- "title": "deleteMessageResponse",
1486
- "additionalProperties": false
1487
- }
1488
- },
1489
- "tags": [
1490
- "documented"
1491
- ]
1492
- },
1493
- "createUser": {
1494
- "name": "createUser",
1495
- "description": "Creates a new [User](#schema_user). When creating a new [User](#schema_user), the required tags must be provided. See the specific integration for more details.",
1496
- "method": "post",
1497
- "path": "/v1/chat/users",
1498
- "requestBody": {
1499
- "description": "User data",
1500
- "schema": {
1501
- "type": "object",
1502
- "properties": {
1503
- "tags": {
1504
- "type": "object",
1505
- "additionalProperties": {
1506
- "type": "string",
1507
- "maxLength": 500
1508
- },
1509
- "description": "Tags for the [User](#schema_user)"
1510
- },
1511
- "integrationName": {
1512
- "type": "string",
1513
- "maxLength": 200,
1514
- "description": "[DEPRECATED] To create a [User](#schema_user) from within a bot, call an action of the integration instead.",
1515
- "deprecated": true
1516
- },
1517
- "name": {
1518
- "type": "string",
1519
- "maxLength": 200,
1520
- "description": "Name of the user"
1521
- },
1522
- "pictureUrl": {
1523
- "type": "string",
1524
- "maxLength": 40000,
1525
- "description": "URI of the user picture"
1526
- }
1527
- },
1528
- "required": [
1529
- "tags"
1530
- ],
1531
- "title": "createUserBody",
1532
- "additionalProperties": false
1533
- }
1534
- },
1535
- "section": "user",
1536
- "response": {
1537
- "description": "Returns a [User](#schema_user) object if creation succeeds. Returns an [Error](#errors) otherwise",
1538
- "status": 201,
1539
- "schema": {
1540
- "type": "object",
1541
- "properties": {
1542
- "user": {
1543
- "$ref": "#/components/schemas/User"
1544
- }
1545
- },
1546
- "required": [
1547
- "user"
1548
- ],
1549
- "title": "createUserResponse",
1550
- "additionalProperties": false
1551
- }
1552
- },
1553
- "tags": [
1554
- "documented"
1555
- ],
1556
- "parameters": {
1557
- "x-bot-id": {
1558
- "in": "header",
1559
- "description": "Bot id",
1560
- "type": "string",
1561
- "required": true
1562
- },
1563
- "x-integration-id": {
1564
- "in": "header",
1565
- "description": "Integration id",
1566
- "type": "string",
1567
- "required": false
1568
- },
1569
- "x-integration-alias": {
1570
- "in": "header",
1571
- "description": "Integration alias",
1572
- "type": "string",
1573
- "required": false
1574
- }
1575
- }
1576
- },
1577
- "getUser": {
1578
- "name": "getUser",
1579
- "description": "Retrieves the [User](#schema_user) object for a valid identifier.",
1580
- "method": "get",
1581
- "path": "/v1/chat/users/{id}",
1582
- "parameters": {
1583
- "id": {
1584
- "in": "path",
1585
- "type": "string",
1586
- "description": "User ID"
1587
- },
1588
- "x-bot-id": {
1589
- "in": "header",
1590
- "description": "Bot id",
1591
- "type": "string",
1592
- "required": true
1593
- },
1594
- "x-integration-id": {
1595
- "in": "header",
1596
- "description": "Integration id",
1597
- "type": "string",
1598
- "required": false
1599
- },
1600
- "x-integration-alias": {
1601
- "in": "header",
1602
- "description": "Integration alias",
1603
- "type": "string",
1604
- "required": false
1605
- }
1606
- },
1607
- "section": "user",
1608
- "response": {
1609
- "description": "Returns a [User](#schema_user) object if a valid identifier was provided. Returns an [Error](#errors) otherwise",
1610
- "schema": {
1611
- "type": "object",
1612
- "properties": {
1613
- "user": {
1614
- "$ref": "#/components/schemas/User"
1615
- }
1616
- },
1617
- "required": [
1618
- "user"
1619
- ],
1620
- "title": "getUserResponse",
1621
- "additionalProperties": false
1622
- }
1623
- },
1624
- "tags": [
1625
- "documented"
1626
- ]
1627
- },
1628
- "listUsers": {
1629
- "name": "listUsers",
1630
- "description": "Retrieves a list of [User](#schema_user) previously created. The users are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](/docs/developers/concepts/tags).",
1631
- "method": "get",
1632
- "path": "/v1/chat/users",
1633
- "parameters": {
1634
- "nextToken": {
1635
- "in": "query",
1636
- "description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
1637
- "type": "string"
1638
- },
1639
- "conversationId": {
1640
- "in": "query",
1641
- "type": "string",
1642
- "description": "Filter by conversation id. This will return all users that have participated in the conversation."
1643
- },
1644
- "tags": {
1645
- "in": "query",
1646
- "type": "object",
1647
- "schema": {
1648
- "type": "object",
1649
- "additionalProperties": {
1650
- "type": "string"
1651
- }
1652
- },
1653
- "description": "Filter by tags"
1654
- },
1655
- "x-bot-id": {
1656
- "in": "header",
1657
- "description": "Bot id",
1658
- "type": "string",
1659
- "required": true
1660
- },
1661
- "x-integration-id": {
1662
- "in": "header",
1663
- "description": "Integration id",
1664
- "type": "string",
1665
- "required": false
1666
- },
1667
- "x-integration-alias": {
1668
- "in": "header",
1669
- "description": "Integration alias",
1670
- "type": "string",
1671
- "required": false
1672
- }
1673
- },
1674
- "section": "user",
1675
- "response": {
1676
- "description": "Returns a list of [User](#schema_user) objects",
1677
- "schema": {
1678
- "type": "object",
1679
- "properties": {
1680
- "users": {
1681
- "type": "array",
1682
- "items": {
1683
- "$ref": "#/components/schemas/User"
1684
- }
1685
- },
1686
- "meta": {
1687
- "type": "object",
1688
- "properties": {
1689
- "nextToken": {
1690
- "type": "string",
1691
- "description": "The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."
1692
- }
1693
- },
1694
- "additionalProperties": false
1695
- }
1696
- },
1697
- "required": [
1698
- "users",
1699
- "meta"
1700
- ],
1701
- "title": "listUsersResponse",
1702
- "additionalProperties": false
1703
- }
1704
- },
1705
- "tags": [
1706
- "documented"
1707
- ]
1708
- },
1709
- "getOrCreateUser": {
1710
- "name": "getOrCreateUser",
1711
- "description": "Retrieves the [User](#schema_user) object for a valid identifier. If the user does not exist, it will be created.",
1712
- "method": "post",
1713
- "path": "/v1/chat/users/get-or-create",
1714
- "requestBody": {
1715
- "description": "User data",
1716
- "schema": {
1717
- "type": "object",
1718
- "properties": {
1719
- "tags": {
1720
- "type": "object",
1721
- "additionalProperties": {
1722
- "type": "string",
1723
- "maxLength": 500
1724
- },
1725
- "description": "Tags for the [User](#schema_user)"
1726
- },
1727
- "integrationName": {
1728
- "type": "string",
1729
- "maxLength": 200,
1730
- "description": "[DEPRECATED] To create a [User](#schema_user) from within a bot, call an action of the integration instead.",
1731
- "deprecated": true
1732
- },
1733
- "name": {
1734
- "type": "string",
1735
- "maxLength": 200,
1736
- "description": "Name of the user"
1737
- },
1738
- "pictureUrl": {
1739
- "type": "string",
1740
- "maxLength": 40000,
1741
- "description": "URI of the user picture"
1742
- },
1743
- "discriminateByTags": {
1744
- "type": "array",
1745
- "items": {
1746
- "type": "string",
1747
- "maxLength": 500
1748
- },
1749
- "description": "Optional list of tag names to use for strict matching when looking up existing users. If provided, all specified tags must match exactly for a user to be considered a match. For example, with an existing user whose tags are {\"foo\": \"a\", \"bar\": \"b\", baz: \"c\"}: Without this parameter, ALL tags must match exactly. With [\"bar\",\"baz\"], all listed tags must match their values, and other tags are not considered."
1750
- }
1751
- },
1752
- "required": [
1753
- "tags"
1754
- ],
1755
- "title": "getOrCreateUserBody",
1756
- "additionalProperties": false
1757
- }
1758
- },
1759
- "section": "user",
1760
- "response": {
1761
- "description": "Returns a [User](#schema_user) object if a valid identifier was provided. Returns an [Error](#errors) otherwise",
1762
- "schema": {
1763
- "type": "object",
1764
- "properties": {
1765
- "user": {
1766
- "$ref": "#/components/schemas/User"
1767
- }
1768
- },
1769
- "required": [
1770
- "user"
1771
- ],
1772
- "title": "getOrCreateUserResponse",
1773
- "additionalProperties": false
1774
- }
1775
- },
1776
- "tags": [
1777
- "documented"
1778
- ],
1779
- "parameters": {
1780
- "x-bot-id": {
1781
- "in": "header",
1782
- "description": "Bot id",
1783
- "type": "string",
1784
- "required": true
1785
- },
1786
- "x-integration-id": {
1787
- "in": "header",
1788
- "description": "Integration id",
1789
- "type": "string",
1790
- "required": false
1791
- },
1792
- "x-integration-alias": {
1793
- "in": "header",
1794
- "description": "Integration alias",
1795
- "type": "string",
1796
- "required": false
1797
- }
1798
- }
1799
- },
1800
- "updateUser": {
1801
- "name": "updateUser",
1802
- "description": "Update a [User](#schema_user) object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.",
1803
- "method": "put",
1804
- "path": "/v1/chat/users/{id}",
1805
- "parameters": {
1806
- "id": {
1807
- "in": "path",
1808
- "type": "string",
1809
- "description": "User ID"
1810
- },
1811
- "x-bot-id": {
1812
- "in": "header",
1813
- "description": "Bot id",
1814
- "type": "string",
1815
- "required": true
1816
- },
1817
- "x-integration-id": {
1818
- "in": "header",
1819
- "description": "Integration id",
1820
- "type": "string",
1821
- "required": false
1822
- },
1823
- "x-integration-alias": {
1824
- "in": "header",
1825
- "description": "Integration alias",
1826
- "type": "string",
1827
- "required": false
1828
- }
1829
- },
1830
- "requestBody": {
1831
- "description": "User data",
1832
- "schema": {
1833
- "type": "object",
1834
- "properties": {
1835
- "tags": {
1836
- "type": "object",
1837
- "additionalProperties": {
1838
- "type": "string",
1839
- "maxLength": 500
1840
- },
1841
- "description": "Tags for the [User](#schema_user)"
1842
- },
1843
- "name": {
1844
- "type": "string",
1845
- "maxLength": 200,
1846
- "nullable": true,
1847
- "description": "Name of the user"
1848
- },
1849
- "pictureUrl": {
1850
- "type": "string",
1851
- "maxLength": 40000,
1852
- "nullable": true,
1853
- "description": "URI of the user picture"
1854
- }
1855
- },
1856
- "title": "updateUserBody",
1857
- "additionalProperties": false
1858
- }
1859
- },
1860
- "section": "user",
1861
- "response": {
1862
- "description": "Returns an updated [User](#schema_user) object if a valid identifier was provided. Returns [an error](#errors) otherwise",
1863
- "schema": {
1864
- "type": "object",
1865
- "properties": {
1866
- "user": {
1867
- "$ref": "#/components/schemas/User"
1868
- }
1869
- },
1870
- "required": [
1871
- "user"
1872
- ],
1873
- "title": "updateUserResponse",
1874
- "additionalProperties": false
1875
- }
1876
- },
1877
- "tags": [
1878
- "documented"
1879
- ]
1880
- },
1881
- "deleteUser": {
1882
- "name": "deleteUser",
1883
- "description": "Permanently deletes a [User](#schema_user). It cannot be undone.",
1884
- "method": "delete",
1885
- "path": "/v1/chat/users/{id}",
1886
- "parameters": {
1887
- "id": {
1888
- "in": "path",
1889
- "type": "string",
1890
- "description": "User ID"
1891
- },
1892
- "x-bot-id": {
1893
- "in": "header",
1894
- "description": "Bot id",
1895
- "type": "string",
1896
- "required": true
1897
- },
1898
- "x-integration-id": {
1899
- "in": "header",
1900
- "description": "Integration id",
1901
- "type": "string",
1902
- "required": false
1903
- },
1904
- "x-integration-alias": {
1905
- "in": "header",
1906
- "description": "Integration alias",
1907
- "type": "string",
1908
- "required": false
1909
- }
1910
- },
1911
- "section": "user",
1912
- "response": {
1913
- "description": "Returns the [User](#schema_user) object that was deleted",
1914
- "schema": {
1915
- "type": "object",
1916
- "title": "deleteUserResponse",
1917
- "additionalProperties": false
1918
- }
1919
- },
1920
- "tags": [
1921
- "documented"
1922
- ]
1923
- },
1924
- "setStateExpiry": {
1925
- "name": "setStateExpiry",
1926
- "description": "Updates the [State](#schema_state) expiry.",
1927
- "method": "post",
1928
- "path": "/v1/chat/states/{type}/{id}/{name}/expiry",
1929
- "parameters": {
1930
- "type": {
1931
- "in": "path",
1932
- "type": "string",
1933
- "description": "Represents the resource type that the state is related to",
1934
- "enum": [
1935
- "conversation",
1936
- "user",
1937
- "bot",
1938
- "integration",
1939
- "task",
1940
- "workflow"
1941
- ]
1942
- },
1943
- "id": {
1944
- "in": "path",
1945
- "type": "string",
1946
- "description": "Id of the State which will be either the botId, the userId or the conversationId"
1947
- },
1948
- "name": {
1949
- "in": "path",
1950
- "type": "string",
1951
- "description": "Name of the State which is declared inside the bot definition"
1952
- },
1953
- "x-bot-id": {
1954
- "in": "header",
1955
- "description": "Bot id",
1956
- "type": "string",
1957
- "required": true
1958
- },
1959
- "x-integration-id": {
1960
- "in": "header",
1961
- "description": "Integration id",
1962
- "type": "string",
1963
- "required": false
1964
- },
1965
- "x-integration-alias": {
1966
- "in": "header",
1967
- "description": "Integration alias",
1968
- "type": "string",
1969
- "required": false
1970
- }
1971
- },
1972
- "requestBody": {
1973
- "description": "State expiry",
1974
- "schema": {
1975
- "type": "object",
1976
- "properties": {
1977
- "expiry": {
1978
- "type": "number",
1979
- "minimum": 1,
1980
- "maximum": 2592000000,
1981
- "nullable": true,
1982
- "description": "Expiry of the [State](#schema_state) in milliseconds. The state will expire if it is idle for the configured value. By default, a state doesn't expire."
1983
- }
1984
- },
1985
- "required": [
1986
- "expiry"
1987
- ],
1988
- "title": "setStateExpiryBody",
1989
- "additionalProperties": false
1990
- }
1991
- },
1992
- "section": "state",
1993
- "response": {
1994
- "description": "Returns the updated [State](#schema_state) object if a valid identifier was provided. Returns an [an error](#errors) otherwise",
1995
- "schema": {
1996
- "type": "object",
1997
- "properties": {
1998
- "state": {
1999
- "$ref": "#/components/schemas/State"
2000
- }
2001
- },
2002
- "required": [
2003
- "state"
2004
- ],
2005
- "title": "setStateExpiryResponse",
2006
- "additionalProperties": false
2007
- }
2008
- },
2009
- "tags": [
2010
- "documented"
2011
- ]
2012
- },
2013
- "getState": {
2014
- "name": "getState",
2015
- "description": "Retrieves the [State](#schema_state) object for a valid identifiers.",
2016
- "method": "get",
2017
- "path": "/v1/chat/states/{type}/{id}/{name}",
2018
- "parameters": {
2019
- "type": {
2020
- "in": "path",
2021
- "type": "string",
2022
- "description": "Represents the resource type that the state is related to",
2023
- "enum": [
2024
- "conversation",
2025
- "user",
2026
- "bot",
2027
- "integration",
2028
- "task",
2029
- "workflow"
2030
- ]
2031
- },
2032
- "id": {
2033
- "in": "path",
2034
- "type": "string",
2035
- "description": "Id of the State which will be either the botId, the userId or the conversationId"
2036
- },
2037
- "name": {
2038
- "in": "path",
2039
- "type": "string",
2040
- "description": "Name of the State which is declared inside the bot definition"
2041
- },
2042
- "x-bot-id": {
2043
- "in": "header",
2044
- "description": "Bot id",
2045
- "type": "string",
2046
- "required": true
2047
- },
2048
- "x-integration-id": {
2049
- "in": "header",
2050
- "description": "Integration id",
2051
- "type": "string",
2052
- "required": false
2053
- },
2054
- "x-integration-alias": {
2055
- "in": "header",
2056
- "description": "Integration alias",
2057
- "type": "string",
2058
- "required": false
2059
- }
2060
- },
2061
- "section": "state",
2062
- "response": {
2063
- "description": "Returns the [State](#schema_state) object if a valid identifiers were provided. Returns [an error](#errors) otherwise",
2064
- "schema": {
2065
- "type": "object",
2066
- "properties": {
2067
- "state": {
2068
- "$ref": "#/components/schemas/State"
2069
- },
2070
- "meta": {
2071
- "type": "object",
2072
- "properties": {
2073
- "cached": {
2074
- "type": "boolean"
2075
- }
2076
- },
2077
- "required": [
2078
- "cached"
2079
- ],
2080
- "additionalProperties": false
2081
- }
2082
- },
2083
- "required": [
2084
- "state",
2085
- "meta"
2086
- ],
2087
- "title": "getStateResponse",
2088
- "additionalProperties": false
2089
- }
2090
- },
2091
- "tags": [
2092
- "documented"
2093
- ]
2094
- },
2095
- "setState": {
2096
- "name": "setState",
2097
- "description": "Overrides the [State](#schema_state) object by setting the values of the parameters passed.",
2098
- "method": "post",
2099
- "path": "/v1/chat/states/{type}/{id}/{name}",
2100
- "parameters": {
2101
- "type": {
2102
- "in": "path",
2103
- "type": "string",
2104
- "description": "Represents the resource type that the state is related to",
2105
- "enum": [
2106
- "conversation",
2107
- "user",
2108
- "bot",
2109
- "integration",
2110
- "task",
2111
- "workflow"
2112
- ]
2113
- },
2114
- "id": {
2115
- "in": "path",
2116
- "type": "string",
2117
- "description": "Id of the State which will be either the botId, the userId or the conversationId"
2118
- },
2119
- "name": {
2120
- "in": "path",
2121
- "type": "string",
2122
- "description": "Name of the State which is declared inside the bot definition"
2123
- },
2124
- "x-bot-id": {
2125
- "in": "header",
2126
- "description": "Bot id",
2127
- "type": "string",
2128
- "required": true
2129
- },
2130
- "x-integration-id": {
2131
- "in": "header",
2132
- "description": "Integration id",
2133
- "type": "string",
2134
- "required": false
2135
- },
2136
- "x-integration-alias": {
2137
- "in": "header",
2138
- "description": "Integration alias",
2139
- "type": "string",
2140
- "required": false
2141
- }
2142
- },
2143
- "requestBody": {
2144
- "description": "State content",
2145
- "schema": {
2146
- "type": "object",
2147
- "properties": {
2148
- "payload": {
2149
- "type": "object",
2150
- "additionalProperties": true,
2151
- "nullable": true,
2152
- "description": "Payload is the content of the state defined by your bot."
2153
- },
2154
- "expiry": {
2155
- "type": "number",
2156
- "minimum": 1,
2157
- "maximum": 2592000000,
2158
- "nullable": true,
2159
- "description": "Expiry of the [State](#schema_state) in milliseconds. The state will expire if it is idle for the configured value. By default, a state doesn't expire."
2160
- }
2161
- },
2162
- "required": [
2163
- "payload"
2164
- ],
2165
- "title": "setStateBody",
2166
- "additionalProperties": false
2167
- }
2168
- },
2169
- "section": "state",
2170
- "response": {
2171
- "description": "Returns the updated [State](#schema_state) object if a valid identifier was provided. Returns an [an error](#errors) otherwise",
2172
- "schema": {
2173
- "type": "object",
2174
- "properties": {
2175
- "state": {
2176
- "$ref": "#/components/schemas/State"
2177
- }
2178
- },
2179
- "required": [
2180
- "state"
2181
- ],
2182
- "title": "setStateResponse",
2183
- "additionalProperties": false
2184
- }
2185
- },
2186
- "tags": [
2187
- "documented"
2188
- ]
2189
- },
2190
- "getOrSetState": {
2191
- "name": "getOrSetState",
2192
- "description": "Retrieves the [State](#schema_state) object for a valid identifiers. If the state does not exist, it creates a new state.",
2193
- "method": "post",
2194
- "path": "/v1/chat/states/{type}/{id}/{name}/get-or-set",
2195
- "parameters": {
2196
- "type": {
2197
- "in": "path",
2198
- "type": "string",
2199
- "description": "Represents the resource type that the state is related to",
2200
- "enum": [
2201
- "conversation",
2202
- "user",
2203
- "bot",
2204
- "integration",
2205
- "task",
2206
- "workflow"
2207
- ]
2208
- },
2209
- "id": {
2210
- "in": "path",
2211
- "type": "string",
2212
- "description": "Id of the State which will be either the botId, the userId or the conversationId"
2213
- },
2214
- "name": {
2215
- "in": "path",
2216
- "type": "string",
2217
- "description": "Name of the State which is declared inside the bot definition"
2218
- },
2219
- "x-bot-id": {
2220
- "in": "header",
2221
- "description": "Bot id",
2222
- "type": "string",
2223
- "required": true
2224
- },
2225
- "x-integration-id": {
2226
- "in": "header",
2227
- "description": "Integration id",
2228
- "type": "string",
2229
- "required": false
2230
- },
2231
- "x-integration-alias": {
2232
- "in": "header",
2233
- "description": "Integration alias",
2234
- "type": "string",
2235
- "required": false
2236
- }
2237
- },
2238
- "requestBody": {
2239
- "description": "State content",
2240
- "schema": {
2241
- "type": "object",
2242
- "properties": {
2243
- "payload": {
2244
- "type": "object",
2245
- "additionalProperties": true,
2246
- "description": "Payload is the content of the state defined by your bot."
2247
- },
2248
- "expiry": {
2249
- "type": "number",
2250
- "minimum": 1,
2251
- "maximum": 2592000000,
2252
- "nullable": true,
2253
- "description": "Expiry of the [State](#schema_state) in milliseconds. The state will expire if it is idle for the configured value. By default, a state doesn't expire."
2254
- }
2255
- },
2256
- "required": [
2257
- "payload"
2258
- ],
2259
- "title": "getOrSetStateBody",
2260
- "additionalProperties": false
2261
- }
2262
- },
2263
- "section": "state",
2264
- "response": {
2265
- "description": "Returns the [State](#schema_state) object if a valid identifiers were provided. Returns [an error](#errors) otherwise.",
2266
- "schema": {
2267
- "type": "object",
2268
- "properties": {
2269
- "state": {
2270
- "$ref": "#/components/schemas/State"
2271
- },
2272
- "meta": {
2273
- "type": "object",
2274
- "properties": {
2275
- "cached": {
2276
- "type": "boolean"
2277
- }
2278
- },
2279
- "required": [
2280
- "cached"
2281
- ],
2282
- "additionalProperties": false
2283
- }
2284
- },
2285
- "required": [
2286
- "state",
2287
- "meta"
2288
- ],
2289
- "title": "getOrSetStateResponse",
2290
- "additionalProperties": false
2291
- }
2292
- },
2293
- "tags": [
2294
- "documented"
2295
- ]
2296
- },
2297
- "patchState": {
2298
- "name": "patchState",
2299
- "description": "Updates the [State](#schema_state) object by setting the values of the parameters passed.",
2300
- "method": "patch",
2301
- "path": "/v1/chat/states/{type}/{id}/{name}",
2302
- "parameters": {
2303
- "type": {
2304
- "in": "path",
2305
- "type": "string",
2306
- "description": "Represents the resource type that the state is related to",
2307
- "enum": [
2308
- "conversation",
2309
- "user",
2310
- "bot",
2311
- "integration",
2312
- "task",
2313
- "workflow"
2314
- ]
2315
- },
2316
- "id": {
2317
- "in": "path",
2318
- "type": "string",
2319
- "description": "Id of the State which will be either the botId, the userId or the conversationId"
2320
- },
2321
- "name": {
2322
- "in": "path",
2323
- "type": "string",
2324
- "description": "Name of the State which is declared inside the bot definition"
2325
- },
2326
- "x-bot-id": {
2327
- "in": "header",
2328
- "description": "Bot id",
2329
- "type": "string",
2330
- "required": true
2331
- },
2332
- "x-integration-id": {
2333
- "in": "header",
2334
- "description": "Integration id",
2335
- "type": "string",
2336
- "required": false
2337
- },
2338
- "x-integration-alias": {
2339
- "in": "header",
2340
- "description": "Integration alias",
2341
- "type": "string",
2342
- "required": false
2343
- }
2344
- },
2345
- "requestBody": {
2346
- "description": "State content",
2347
- "schema": {
2348
- "type": "object",
2349
- "properties": {
2350
- "payload": {
2351
- "type": "object",
2352
- "additionalProperties": true,
2353
- "description": "Payload is the content of the state defined by your bot."
2354
- }
2355
- },
2356
- "required": [
2357
- "payload"
2358
- ],
2359
- "title": "patchStateBody",
2360
- "additionalProperties": false
2361
- }
2362
- },
2363
- "section": "state",
2364
- "response": {
2365
- "description": "Returns the updated [State](#schema_state) object if a valid identifier was provided. Returns an [an error](#errors) otherwise",
2366
- "schema": {
2367
- "type": "object",
2368
- "properties": {
2369
- "state": {
2370
- "$ref": "#/components/schemas/State"
2371
- }
2372
- },
2373
- "required": [
2374
- "state"
2375
- ],
2376
- "title": "patchStateResponse",
2377
- "additionalProperties": false
2378
- }
2379
- },
2380
- "tags": [
2381
- "documented"
2382
- ]
2383
- },
2384
- "callAction": {
2385
- "name": "callAction",
2386
- "description": "Call an action",
2387
- "method": "post",
2388
- "path": "/v1/chat/actions",
2389
- "section": "action",
2390
- "requestBody": {
2391
- "description": "Action payload",
2392
- "schema": {
2393
- "type": "object",
2394
- "properties": {
2395
- "type": {
2396
- "type": "string",
2397
- "maxLength": 200,
2398
- "description": "Type of the action"
2399
- },
2400
- "input": {
2401
- "type": "object",
2402
- "additionalProperties": true,
2403
- "description": "Input of the action"
2404
- }
2405
- },
2406
- "required": [
2407
- "type",
2408
- "input"
2409
- ],
2410
- "title": "callActionBody",
2411
- "additionalProperties": false
2412
- }
2413
- },
2414
- "response": {
2415
- "description": "Action payload",
2416
- "schema": {
2417
- "type": "object",
2418
- "properties": {
2419
- "output": {
2420
- "type": "object",
2421
- "additionalProperties": true,
2422
- "description": "Input of the action"
2423
- },
2424
- "meta": {
2425
- "type": "object",
2426
- "properties": {
2427
- "cached": {
2428
- "type": "boolean"
2429
- }
2430
- },
2431
- "required": [
2432
- "cached"
2433
- ],
2434
- "additionalProperties": false
2435
- }
2436
- },
2437
- "required": [
2438
- "output",
2439
- "meta"
2440
- ],
2441
- "title": "callActionResponse",
2442
- "additionalProperties": false
2443
- }
2444
- },
2445
- "tags": [
2446
- "documented"
2447
- ],
2448
- "parameters": {
2449
- "x-bot-id": {
2450
- "in": "header",
2451
- "description": "Bot id",
2452
- "type": "string",
2453
- "required": true
2454
- },
2455
- "x-integration-id": {
2456
- "in": "header",
2457
- "description": "Integration id",
2458
- "type": "string",
2459
- "required": false
2460
- },
2461
- "x-integration-alias": {
2462
- "in": "header",
2463
- "description": "Integration alias",
2464
- "type": "string",
2465
- "required": false
2466
- }
2467
- }
2468
- },
2469
- "configureIntegration": {
2470
- "name": "configureIntegration",
2471
- "description": "An integration can call this endpoint to configure itself",
2472
- "method": "post",
2473
- "path": "/v1/chat/integrations/configure",
2474
- "requestBody": {
2475
- "description": "Configuration of the integration",
2476
- "schema": {
2477
- "type": "object",
2478
- "properties": {
2479
- "identifier": {
2480
- "type": "string",
2481
- "maxLength": 200,
2482
- "nullable": true,
2483
- "description": "Unique identifier of the integration that was installed on the bot"
2484
- },
2485
- "scheduleRegisterCall": {
2486
- "type": "string",
2487
- "enum": [
2488
- "hourly",
2489
- "daily",
2490
- "weekly",
2491
- "bi-weekly",
2492
- "monthly",
2493
- "bi-monthly",
2494
- "quarterly",
2495
- "yearly"
2496
- ],
2497
- "description": "Recurring schedule on which `register()` will be called on the integration"
2498
- },
2499
- "sandboxIdentifiers": {
2500
- "type": "object",
2501
- "nullable": true,
2502
- "description": "**EXPERIMENTAL** Sandbox identifiers for the integration. Setting this to null will remove all sandbox identifiers. This is an experimental feature meant to be used by specific integrations.",
2503
- "additionalProperties": false
2504
- }
2505
- },
2506
- "title": "configureIntegrationBody",
2507
- "additionalProperties": false
2508
- }
2509
- },
2510
- "response": {
2511
- "description": "Configuration of the integration",
2512
- "schema": {
2513
- "type": "object",
2514
- "title": "configureIntegrationResponse",
2515
- "additionalProperties": false
2516
- }
2517
- },
2518
- "tags": [
2519
- "documented"
2520
- ],
2521
- "parameters": {
2522
- "x-bot-id": {
2523
- "in": "header",
2524
- "description": "Bot id",
2525
- "type": "string",
2526
- "required": true
2527
- },
2528
- "x-integration-id": {
2529
- "in": "header",
2530
- "description": "Integration id",
2531
- "type": "string",
2532
- "required": false
2533
- },
2534
- "x-integration-alias": {
2535
- "in": "header",
2536
- "description": "Integration alias",
2537
- "type": "string",
2538
- "required": false
2539
- }
2540
- }
2541
- },
2542
- "getTask": {
2543
- "name": "getTask",
2544
- "description": "Retrieves the [Task](#schema_task) object for a valid identifier.",
2545
- "method": "get",
2546
- "path": "/v1/chat/tasks/{id}",
2547
- "parameters": {
2548
- "id": {
2549
- "in": "path",
2550
- "type": "string",
2551
- "description": "Task id"
2552
- },
2553
- "x-bot-id": {
2554
- "in": "header",
2555
- "description": "Bot id",
2556
- "type": "string",
2557
- "required": true
2558
- },
2559
- "x-integration-id": {
2560
- "in": "header",
2561
- "description": "Integration id",
2562
- "type": "string",
2563
- "required": false
2564
- },
2565
- "x-integration-alias": {
2566
- "in": "header",
2567
- "description": "Integration alias",
2568
- "type": "string",
2569
- "required": false
2570
- }
2571
- },
2572
- "section": "task",
2573
- "response": {
2574
- "description": "Returns a [Task](#schema_task) object if a valid identifier was provided. Returns an [Error](#errors) otherwise",
2575
- "schema": {
2576
- "type": "object",
2577
- "properties": {
2578
- "task": {
2579
- "$ref": "#/components/schemas/Task"
2580
- }
2581
- },
2582
- "required": [
2583
- "task"
2584
- ],
2585
- "title": "getTaskResponse",
2586
- "additionalProperties": false
2587
- }
2588
- }
2589
- },
2590
- "createTask": {
2591
- "name": "createTask",
2592
- "description": "Creates a new [Task](#schema_task). When creating a new [Task](#schema_task), the required tags must be provided. See the specific integration for more details.",
2593
- "method": "post",
2594
- "path": "/v1/chat/tasks",
2595
- "requestBody": {
2596
- "description": "Task data",
2597
- "schema": {
2598
- "type": "object",
2599
- "properties": {
2600
- "title": {
2601
- "type": "string",
2602
- "maxLength": 2000,
2603
- "description": "Title describing the task"
2604
- },
2605
- "description": {
2606
- "type": "string",
2607
- "maxLength": 20000,
2608
- "description": "All the notes related to the execution of the current task"
2609
- },
2610
- "type": {
2611
- "type": "string",
2612
- "maxLength": 200,
2613
- "description": "Type of the task"
2614
- },
2615
- "data": {
2616
- "type": "object",
2617
- "additionalProperties": true,
2618
- "description": "Content related to the task"
2619
- },
2620
- "parentTaskId": {
2621
- "type": "string",
2622
- "description": "Parent task id is the parent task that created this task"
2623
- },
2624
- "conversationId": {
2625
- "type": "string",
2626
- "description": "Conversation id related to this task"
2627
- },
2628
- "userId": {
2629
- "type": "string",
2630
- "description": "Specific user related to this task"
2631
- },
2632
- "timeoutAt": {
2633
- "type": "string",
2634
- "format": "date-time",
2635
- "description": "The timeout date where the task should be failed in the ISO 8601 format"
2636
- },
2637
- "tags": {
2638
- "type": "object",
2639
- "additionalProperties": {
2640
- "type": "string",
2641
- "maxLength": 500
2642
- },
2643
- "description": "Tags for the [Task](#schema_task)"
2644
- }
2645
- },
2646
- "required": [
2647
- "type",
2648
- "conversationId"
2649
- ],
2650
- "title": "createTaskBody",
2651
- "additionalProperties": false
2652
- }
2653
- },
2654
- "section": "task",
2655
- "response": {
2656
- "description": "Returns a [Task](#schema_task) object if creation succeeds. Returns an [Error](#errors) otherwise",
2657
- "status": 201,
2658
- "schema": {
2659
- "type": "object",
2660
- "properties": {
2661
- "task": {
2662
- "$ref": "#/components/schemas/Task"
2663
- }
2664
- },
2665
- "required": [
2666
- "task"
2667
- ],
2668
- "title": "createTaskResponse",
2669
- "additionalProperties": false
2670
- }
2671
- },
2672
- "parameters": {
2673
- "x-bot-id": {
2674
- "in": "header",
2675
- "description": "Bot id",
2676
- "type": "string",
2677
- "required": true
2678
- },
2679
- "x-integration-id": {
2680
- "in": "header",
2681
- "description": "Integration id",
2682
- "type": "string",
2683
- "required": false
2684
- },
2685
- "x-integration-alias": {
2686
- "in": "header",
2687
- "description": "Integration alias",
2688
- "type": "string",
2689
- "required": false
2690
- }
2691
- }
2692
- },
2693
- "updateTask": {
2694
- "name": "updateTask",
2695
- "description": "Update a [Task](#schema_task) object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.",
2696
- "method": "put",
2697
- "path": "/v1/chat/tasks/{id}",
2698
- "parameters": {
2699
- "id": {
2700
- "in": "path",
2701
- "type": "string",
2702
- "description": "Task id"
2703
- },
2704
- "x-bot-id": {
2705
- "in": "header",
2706
- "description": "Bot id",
2707
- "type": "string",
2708
- "required": true
2709
- },
2710
- "x-integration-id": {
2711
- "in": "header",
2712
- "description": "Integration id",
2713
- "type": "string",
2714
- "required": false
2715
- },
2716
- "x-integration-alias": {
2717
- "in": "header",
2718
- "description": "Integration alias",
2719
- "type": "string",
2720
- "required": false
2721
- }
2722
- },
2723
- "requestBody": {
2724
- "description": "Task data",
2725
- "schema": {
2726
- "type": "object",
2727
- "properties": {
2728
- "title": {
2729
- "type": "string",
2730
- "description": "Title describing the task"
2731
- },
2732
- "description": {
2733
- "type": "string",
2734
- "description": "All the notes related to the execution of the current task"
2735
- },
2736
- "data": {
2737
- "type": "object",
2738
- "additionalProperties": true,
2739
- "description": "Content related to the task"
2740
- },
2741
- "timeoutAt": {
2742
- "type": "string",
2743
- "format": "date-time",
2744
- "description": "The timeout date where the task should be failed in the ISO 8601 format"
2745
- },
2746
- "status": {
2747
- "type": "string",
2748
- "enum": [
2749
- "pending",
2750
- "in_progress",
2751
- "failed",
2752
- "completed",
2753
- "blocked",
2754
- "paused",
2755
- "timeout",
2756
- "cancelled"
2757
- ],
2758
- "description": "Status of the task"
2759
- },
2760
- "tags": {
2761
- "type": "object",
2762
- "additionalProperties": {
2763
- "type": "string",
2764
- "maxLength": 500
2765
- },
2766
- "description": "Tags for the [Task](#schema_task)"
2767
- }
2768
- },
2769
- "title": "updateTaskBody",
2770
- "additionalProperties": false
2771
- }
2772
- },
2773
- "section": "task",
2774
- "response": {
2775
- "description": "Returns an updated [Task](#schema_task) object if a valid identifier was provided. Returns an [Error](#errors) otherwise",
2776
- "schema": {
2777
- "type": "object",
2778
- "properties": {
2779
- "task": {
2780
- "$ref": "#/components/schemas/Task"
2781
- }
2782
- },
2783
- "required": [
2784
- "task"
2785
- ],
2786
- "title": "updateTaskResponse",
2787
- "additionalProperties": false
2788
- }
2789
- }
2790
- },
2791
- "deleteTask": {
2792
- "name": "deleteTask",
2793
- "description": "Permanently deletes a [Task](#schema_task). It cannot be undone.",
2794
- "method": "delete",
2795
- "path": "/v1/chat/tasks/{id}",
2796
- "parameters": {
2797
- "id": {
2798
- "in": "path",
2799
- "type": "string",
2800
- "description": "Task id"
2801
- },
2802
- "x-bot-id": {
2803
- "in": "header",
2804
- "description": "Bot id",
2805
- "type": "string",
2806
- "required": true
2807
- },
2808
- "x-integration-id": {
2809
- "in": "header",
2810
- "description": "Integration id",
2811
- "type": "string",
2812
- "required": false
2813
- },
2814
- "x-integration-alias": {
2815
- "in": "header",
2816
- "description": "Integration alias",
2817
- "type": "string",
2818
- "required": false
2819
- }
2820
- },
2821
- "section": "task",
2822
- "response": {
2823
- "description": "Returns the [Task](#schema_task) object that was deleted",
2824
- "schema": {
2825
- "type": "object",
2826
- "title": "deleteTaskResponse",
2827
- "additionalProperties": false
2828
- }
2829
- }
2830
- },
2831
- "listTasks": {
2832
- "name": "listTasks",
2833
- "description": "Retrieves a list of [Task](#schema_task) you've previously created. The tasks are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](/docs/developers/concepts/tags).",
2834
- "method": "get",
2835
- "path": "/v1/chat/tasks",
2836
- "parameters": {
2837
- "nextToken": {
2838
- "in": "query",
2839
- "description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
2840
- "type": "string"
2841
- },
2842
- "tags": {
2843
- "in": "query",
2844
- "type": "object",
2845
- "schema": {
2846
- "type": "object",
2847
- "additionalProperties": {
2848
- "type": "string"
2849
- }
2850
- },
2851
- "description": "Filter by tags"
2852
- },
2853
- "conversationId": {
2854
- "in": "query",
2855
- "type": "string",
2856
- "description": "Conversation id"
2857
- },
2858
- "userId": {
2859
- "in": "query",
2860
- "type": "string",
2861
- "description": "User id"
2862
- },
2863
- "parentTaskId": {
2864
- "in": "query",
2865
- "type": "string",
2866
- "description": "Parent task id"
2867
- },
2868
- "status": {
2869
- "in": "query",
2870
- "type": "string[]",
2871
- "description": "Status",
2872
- "enum": [
2873
- "pending",
2874
- "in_progress",
2875
- "failed",
2876
- "completed",
2877
- "blocked",
2878
- "paused",
2879
- "timeout",
2880
- "cancelled"
2881
- ]
2882
- },
2883
- "type": {
2884
- "in": "query",
2885
- "type": "string",
2886
- "description": "Type"
2887
- },
2888
- "x-bot-id": {
2889
- "in": "header",
2890
- "description": "Bot id",
2891
- "type": "string",
2892
- "required": true
2893
- },
2894
- "x-integration-id": {
2895
- "in": "header",
2896
- "description": "Integration id",
2897
- "type": "string",
2898
- "required": false
2899
- },
2900
- "x-integration-alias": {
2901
- "in": "header",
2902
- "description": "Integration alias",
2903
- "type": "string",
2904
- "required": false
2905
- }
2906
- },
2907
- "section": "task",
2908
- "response": {
2909
- "description": "Returns a list of [Task](#schema_task) objects",
2910
- "schema": {
2911
- "type": "object",
2912
- "properties": {
2913
- "tasks": {
2914
- "type": "array",
2915
- "items": {
2916
- "$ref": "#/components/schemas/Task"
2917
- }
2918
- },
2919
- "meta": {
2920
- "type": "object",
2921
- "properties": {
2922
- "nextToken": {
2923
- "type": "string",
2924
- "description": "The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."
2925
- }
2926
- },
2927
- "additionalProperties": false
2928
- }
2929
- },
2930
- "required": [
2931
- "tasks",
2932
- "meta"
2933
- ],
2934
- "title": "listTasksResponse",
2935
- "additionalProperties": false
2936
- }
2937
- }
2938
- },
2939
- "createWorkflow": {
2940
- "name": "createWorkflow",
2941
- "description": "Creates a new [Workflow](#schema_workflow).",
2942
- "method": "post",
2943
- "path": "/v1/chat/workflows",
2944
- "requestBody": {
2945
- "description": "Workflow data",
2946
- "schema": {
2947
- "type": "object",
2948
- "properties": {
2949
- "name": {
2950
- "type": "string",
2951
- "description": "Name of the workflow"
2952
- },
2953
- "input": {
2954
- "type": "object",
2955
- "additionalProperties": true,
2956
- "description": "Content related to the workflow"
2957
- },
2958
- "parentWorkflowId": {
2959
- "type": "string",
2960
- "description": "Parent workflow id is the parent workflow that created this workflow"
2961
- },
2962
- "conversationId": {
2963
- "type": "string",
2964
- "description": "Conversation id related to this workflow"
2965
- },
2966
- "userId": {
2967
- "type": "string",
2968
- "description": "Specific user related to this workflow"
2969
- },
2970
- "timeoutAt": {
2971
- "type": "string",
2972
- "format": "date-time",
2973
- "description": "The timeout date where the workflow should be failed in the ISO 8601 format"
2974
- },
2975
- "tags": {
2976
- "type": "object",
2977
- "additionalProperties": {
2978
- "type": "string",
2979
- "maxLength": 500
2980
- },
2981
- "description": "Tags for the [Workflow](#schema_workflow)"
2982
- },
2983
- "status": {
2984
- "type": "string",
2985
- "enum": [
2986
- "pending",
2987
- "in_progress",
2988
- "listening"
2989
- ]
2990
- },
2991
- "eventId": {
2992
- "type": "string",
2993
- "description": "Event id must be specified if the workflow is created with the status in_progress"
2994
- }
2995
- },
2996
- "required": [
2997
- "name",
2998
- "status"
2999
- ],
3000
- "title": "createWorkflowBody",
3001
- "additionalProperties": false
3002
- }
3003
- },
3004
- "section": "workflow",
3005
- "response": {
3006
- "description": "Returns a [Workflow](#schema_workflow) object if creation succeeds. Returns an [Error](#errors) otherwise",
3007
- "status": 201,
3008
- "schema": {
3009
- "type": "object",
3010
- "properties": {
3011
- "workflow": {
3012
- "$ref": "#/components/schemas/Workflow"
3013
- }
3014
- },
3015
- "required": [
3016
- "workflow"
3017
- ],
3018
- "title": "createWorkflowResponse",
3019
- "additionalProperties": false
3020
- }
3021
- },
3022
- "parameters": {
3023
- "x-bot-id": {
3024
- "in": "header",
3025
- "description": "Bot id",
3026
- "type": "string",
3027
- "required": true
3028
- },
3029
- "x-integration-id": {
3030
- "in": "header",
3031
- "description": "Integration id",
3032
- "type": "string",
3033
- "required": false
3034
- },
3035
- "x-integration-alias": {
3036
- "in": "header",
3037
- "description": "Integration alias",
3038
- "type": "string",
3039
- "required": false
3040
- }
3041
- }
3042
- },
3043
- "getWorkflow": {
3044
- "name": "getWorkflow",
3045
- "description": "Retrieves the [Workflow](#schema_workflow) object for a valid identifier.",
3046
- "method": "get",
3047
- "path": "/v1/chat/workflows/{id}",
3048
- "parameters": {
3049
- "id": {
3050
- "in": "path",
3051
- "type": "string",
3052
- "description": "Workflow id"
3053
- },
3054
- "x-bot-id": {
3055
- "in": "header",
3056
- "description": "Bot id",
3057
- "type": "string",
3058
- "required": true
3059
- },
3060
- "x-integration-id": {
3061
- "in": "header",
3062
- "description": "Integration id",
3063
- "type": "string",
3064
- "required": false
3065
- },
3066
- "x-integration-alias": {
3067
- "in": "header",
3068
- "description": "Integration alias",
3069
- "type": "string",
3070
- "required": false
3071
- }
3072
- },
3073
- "section": "workflow",
3074
- "response": {
3075
- "description": "Returns a [Workflow](#schema_workflow) object if a valid identifier was provided. Returns an [Error](#errors) otherwise",
3076
- "schema": {
3077
- "type": "object",
3078
- "properties": {
3079
- "workflow": {
3080
- "$ref": "#/components/schemas/Workflow"
3081
- }
3082
- },
3083
- "required": [
3084
- "workflow"
3085
- ],
3086
- "title": "getWorkflowResponse",
3087
- "additionalProperties": false
3088
- }
3089
- }
3090
- },
3091
- "updateWorkflow": {
3092
- "name": "updateWorkflow",
3093
- "description": "Update a [Workflow](#schema_workflow) object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.",
3094
- "method": "put",
3095
- "path": "/v1/chat/workflows/{id}",
3096
- "parameters": {
3097
- "id": {
3098
- "in": "path",
3099
- "type": "string",
3100
- "description": "Workflow id"
3101
- },
3102
- "x-bot-id": {
3103
- "in": "header",
3104
- "description": "Bot id",
3105
- "type": "string",
3106
- "required": true
3107
- },
3108
- "x-integration-id": {
3109
- "in": "header",
3110
- "description": "Integration id",
3111
- "type": "string",
3112
- "required": false
3113
- },
3114
- "x-integration-alias": {
3115
- "in": "header",
3116
- "description": "Integration alias",
3117
- "type": "string",
3118
- "required": false
3119
- }
3120
- },
3121
- "requestBody": {
3122
- "description": "Workflow data",
3123
- "schema": {
3124
- "type": "object",
3125
- "properties": {
3126
- "output": {
3127
- "type": "object",
3128
- "additionalProperties": true,
3129
- "description": "Content related to the workflow"
3130
- },
3131
- "timeoutAt": {
3132
- "type": "string",
3133
- "format": "date-time",
3134
- "description": "The timeout date where the workflow should be failed in the ISO 8601 format"
3135
- },
3136
- "status": {
3137
- "type": "string",
3138
- "enum": [
3139
- "completed",
3140
- "cancelled",
3141
- "listening",
3142
- "paused",
3143
- "failed",
3144
- "in_progress"
3145
- ],
3146
- "description": "Status of the workflow"
3147
- },
3148
- "failureReason": {
3149
- "type": "string",
3150
- "description": "Reason why the workflow failed"
3151
- },
3152
- "tags": {
3153
- "type": "object",
3154
- "additionalProperties": {
3155
- "type": "string",
3156
- "maxLength": 500
3157
- },
3158
- "description": "Tags for the [Workflow](#schema_workflow)"
3159
- },
3160
- "userId": {
3161
- "type": "string",
3162
- "description": "Specific user related to this workflow"
3163
- },
3164
- "eventId": {
3165
- "type": "string",
3166
- "description": "Event id must be specified if the workflow is updated with the status in_progress"
3167
- }
3168
- },
3169
- "title": "updateWorkflowBody",
3170
- "additionalProperties": false
3171
- }
3172
- },
3173
- "section": "workflow",
3174
- "response": {
3175
- "description": "Returns an updated [Workflow](#schema_workflow) object if a valid identifier was provided. Returns an [Error](#errors) otherwise",
3176
- "schema": {
3177
- "type": "object",
3178
- "properties": {
3179
- "workflow": {
3180
- "$ref": "#/components/schemas/Workflow"
3181
- }
3182
- },
3183
- "required": [
3184
- "workflow"
3185
- ],
3186
- "title": "updateWorkflowResponse",
3187
- "additionalProperties": false
3188
- }
3189
- }
3190
- },
3191
- "deleteWorkflow": {
3192
- "name": "deleteWorkflow",
3193
- "description": "Permanently deletes a [Workflow](#schema_workflow). It cannot be undone.",
3194
- "method": "delete",
3195
- "path": "/v1/chat/workflows/{id}",
3196
- "parameters": {
3197
- "id": {
3198
- "in": "path",
3199
- "type": "string",
3200
- "description": "Workflow id"
3201
- },
3202
- "x-bot-id": {
3203
- "in": "header",
3204
- "description": "Bot id",
3205
- "type": "string",
3206
- "required": true
3207
- },
3208
- "x-integration-id": {
3209
- "in": "header",
3210
- "description": "Integration id",
3211
- "type": "string",
3212
- "required": false
3213
- },
3214
- "x-integration-alias": {
3215
- "in": "header",
3216
- "description": "Integration alias",
3217
- "type": "string",
3218
- "required": false
3219
- }
3220
- },
3221
- "section": "workflow",
3222
- "response": {
3223
- "description": "Returns the [Workflow](#schema_workflow) object that was deleted",
3224
- "schema": {
3225
- "type": "object",
3226
- "title": "deleteWorkflowResponse",
3227
- "additionalProperties": false
3228
- }
3229
- }
3230
- },
3231
- "listWorkflows": {
3232
- "name": "listWorkflows",
3233
- "description": "Retrieves a list of [Workflow](#schema_workflow) you've previously created. The workflows are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](/docs/developers/concepts/tags).",
3234
- "method": "get",
3235
- "path": "/v1/chat/workflows",
3236
- "parameters": {
3237
- "nextToken": {
3238
- "in": "query",
3239
- "description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
3240
- "type": "string"
3241
- },
3242
- "tags": {
3243
- "in": "query",
3244
- "type": "object",
3245
- "schema": {
3246
- "type": "object",
3247
- "additionalProperties": {
3248
- "type": "string"
3249
- }
3250
- },
3251
- "description": "Filter by tags"
3252
- },
3253
- "conversationId": {
3254
- "in": "query",
3255
- "type": "string",
3256
- "description": "Conversation id"
3257
- },
3258
- "userId": {
3259
- "in": "query",
3260
- "type": "string",
3261
- "description": "User id"
3262
- },
3263
- "parentWorkflowId": {
3264
- "in": "query",
3265
- "type": "string",
3266
- "description": "Parent workflow id"
3267
- },
3268
- "statuses": {
3269
- "in": "query",
3270
- "type": "string[]",
3271
- "description": "Status",
3272
- "enum": [
3273
- "pending",
3274
- "in_progress",
3275
- "failed",
3276
- "completed",
3277
- "listening",
3278
- "paused",
3279
- "timedout",
3280
- "cancelled"
3281
- ]
3282
- },
3283
- "name": {
3284
- "in": "query",
3285
- "description": "Workflow name",
3286
- "type": "string"
3287
- },
3288
- "x-bot-id": {
3289
- "in": "header",
3290
- "description": "Bot id",
3291
- "type": "string",
3292
- "required": true
3293
- },
3294
- "x-integration-id": {
3295
- "in": "header",
3296
- "description": "Integration id",
3297
- "type": "string",
3298
- "required": false
3299
- },
3300
- "x-integration-alias": {
3301
- "in": "header",
3302
- "description": "Integration alias",
3303
- "type": "string",
3304
- "required": false
3305
- }
3306
- },
3307
- "section": "workflow",
3308
- "response": {
3309
- "description": "Returns a list of [Workflow](#schema_workflow) objects",
3310
- "schema": {
3311
- "type": "object",
3312
- "properties": {
3313
- "workflows": {
3314
- "type": "array",
3315
- "items": {
3316
- "$ref": "#/components/schemas/Workflow"
3317
- }
3318
- },
3319
- "meta": {
3320
- "type": "object",
3321
- "properties": {
3322
- "nextToken": {
3323
- "type": "string",
3324
- "description": "The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."
3325
- }
3326
- },
3327
- "additionalProperties": false
3328
- }
3329
- },
3330
- "required": [
3331
- "workflows",
3332
- "meta"
3333
- ],
3334
- "title": "listWorkflowsResponse",
3335
- "additionalProperties": false
3336
- }
3337
- }
3338
- },
3339
- "getOrCreateWorkflow": {
3340
- "name": "getOrCreateWorkflow",
3341
- "description": "Get a workflow by tags or creates a new [Workflow](#schema_workflow) if it doesn't exists.",
3342
- "method": "post",
3343
- "path": "/v1/chat/workflows/get-or-create",
3344
- "requestBody": {
3345
- "description": "Workflow data",
3346
- "schema": {
3347
- "type": "object",
3348
- "properties": {
3349
- "name": {
3350
- "type": "string",
3351
- "description": "Name of the workflow"
3352
- },
3353
- "input": {
3354
- "type": "object",
3355
- "additionalProperties": true,
3356
- "description": "Content related to the workflow"
3357
- },
3358
- "parentWorkflowId": {
3359
- "type": "string",
3360
- "description": "Parent workflow id is the parent workflow that created this workflow"
3361
- },
3362
- "conversationId": {
3363
- "type": "string",
3364
- "description": "Conversation id related to this workflow"
3365
- },
3366
- "userId": {
3367
- "type": "string",
3368
- "description": "Specific user related to this workflow"
3369
- },
3370
- "timeoutAt": {
3371
- "type": "string",
3372
- "format": "date-time",
3373
- "description": "The timeout date where the workflow should be failed in the ISO 8601 format"
3374
- },
3375
- "tags": {
3376
- "type": "object",
3377
- "additionalProperties": {
3378
- "type": "string",
3379
- "maxLength": 500
3380
- },
3381
- "description": "Tags for the [Workflow](#schema_workflow)"
3382
- },
3383
- "status": {
3384
- "type": "string",
3385
- "enum": [
3386
- "pending",
3387
- "in_progress",
3388
- "listening"
3389
- ]
3390
- },
3391
- "eventId": {
3392
- "type": "string",
3393
- "description": "Event id must be specified if the workflow is created with the status in_progress"
3394
- },
3395
- "discriminateByTags": {
3396
- "type": "array",
3397
- "items": {
3398
- "type": "string",
3399
- "maxLength": 500
3400
- },
3401
- "description": "Optional list of tag names to use for strict matching when looking up existing workflows. If provided, all specified tags must match exactly for a workflow to be considered a match. For example, with an existing workflow whose tags are {\"foo\": \"a\", \"bar\": \"b\", baz: \"c\"}: Without this parameter, ALL tags must match exactly. With [\"bar\",\"baz\"], all listed tags must match their values, and other tags are not considered."
3402
- },
3403
- "discriminateByStatusGroup": {
3404
- "type": "string",
3405
- "enum": [
3406
- "active",
3407
- "finished"
3408
- ],
3409
- "description": "When provided, will only match workflows whose status corresponds to the status group."
3410
- }
3411
- },
3412
- "required": [
3413
- "name",
3414
- "status"
3415
- ],
3416
- "title": "getOrCreateWorkflowBody",
3417
- "additionalProperties": false
3418
- }
3419
- },
3420
- "section": "workflow",
3421
- "response": {
3422
- "description": "Returns a [Workflow](#schema_workflow) object if creation succeeds. Returns an [Error](#errors) otherwise",
3423
- "status": 200,
3424
- "schema": {
3425
- "type": "object",
3426
- "properties": {
3427
- "workflow": {
3428
- "$ref": "#/components/schemas/Workflow"
3429
- }
3430
- },
3431
- "required": [
3432
- "workflow"
3433
- ],
3434
- "title": "getOrCreateWorkflowResponse",
3435
- "additionalProperties": false
3436
- }
3437
- },
3438
- "parameters": {
3439
- "x-bot-id": {
3440
- "in": "header",
3441
- "description": "Bot id",
3442
- "type": "string",
3443
- "required": true
3444
- },
3445
- "x-integration-id": {
3446
- "in": "header",
3447
- "description": "Integration id",
3448
- "type": "string",
3449
- "required": false
3450
- },
3451
- "x-integration-alias": {
3452
- "in": "header",
3453
- "description": "Integration alias",
3454
- "type": "string",
3455
- "required": false
3456
- }
3457
- }
3458
- },
3459
- "listTagValues": {
3460
- "name": "listTagValues",
3461
- "description": "Get a bot tag values",
3462
- "method": "get",
3463
- "path": "/v1/chat/tags/{key}/values",
3464
- "section": "tag",
3465
- "parameters": {
3466
- "nextToken": {
3467
- "in": "query",
3468
- "description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
3469
- "type": "string"
3470
- },
3471
- "key": {
3472
- "in": "path",
3473
- "type": "string",
3474
- "description": "Tag key"
3475
- },
3476
- "type": {
3477
- "in": "query",
3478
- "type": "string",
3479
- "description": "Tag type",
3480
- "required": true,
3481
- "enum": [
3482
- "user",
3483
- "conversation",
3484
- "message"
3485
- ]
3486
- },
3487
- "x-bot-id": {
3488
- "in": "header",
3489
- "description": "Bot id",
3490
- "type": "string",
3491
- "required": true
3492
- },
3493
- "x-integration-id": {
3494
- "in": "header",
3495
- "description": "Integration id",
3496
- "type": "string",
3497
- "required": false
3498
- },
3499
- "x-integration-alias": {
3500
- "in": "header",
3501
- "description": "Integration alias",
3502
- "type": "string",
3503
- "required": false
3504
- }
3505
- },
3506
- "response": {
3507
- "description": "Empty response",
3508
- "schema": {
3509
- "type": "object",
3510
- "properties": {
3511
- "tags": {
3512
- "type": "array",
3513
- "items": {
3514
- "type": "object",
3515
- "properties": {
3516
- "value": {
3517
- "type": "string"
3518
- }
3519
- },
3520
- "required": [
3521
- "value"
3522
- ]
3523
- }
3524
- },
3525
- "meta": {
3526
- "type": "object",
3527
- "properties": {
3528
- "nextToken": {
3529
- "type": "string",
3530
- "description": "The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."
3531
- }
3532
- },
3533
- "additionalProperties": false
3534
- }
3535
- },
3536
- "required": [
3537
- "tags",
3538
- "meta"
3539
- ],
3540
- "title": "listTagValuesResponse",
3541
- "additionalProperties": false
3542
- }
3543
- },
3544
- "tags": [
3545
- "documented"
3546
- ]
3547
- },
3548
- "trackAnalytics": {
3549
- "name": "trackAnalytics",
3550
- "description": "Add an event to the analytics",
3551
- "method": "post",
3552
- "path": "/v1/chat/analytics",
3553
- "requestBody": {
3554
- "description": "Add an event to the analytics",
3555
- "schema": {
3556
- "type": "object",
3557
- "properties": {
3558
- "name": {
3559
- "type": "string",
3560
- "minLength": 1,
3561
- "maxLength": 200
3562
- },
3563
- "count": {
3564
- "type": "integer",
3565
- "minimum": 1
3566
- }
3567
- },
3568
- "required": [
3569
- "name",
3570
- "count"
3571
- ],
3572
- "title": "trackAnalyticsBody",
3573
- "additionalProperties": false
3574
- }
3575
- },
3576
- "response": {
3577
- "description": "Success",
3578
- "status": 200,
3579
- "schema": {
3580
- "type": "object",
3581
- "title": "trackAnalyticsResponse",
3582
- "additionalProperties": false
3583
- }
3584
- },
3585
- "parameters": {
3586
- "x-bot-id": {
3587
- "in": "header",
3588
- "description": "Bot id",
3589
- "type": "string",
3590
- "required": true
3591
- },
3592
- "x-integration-id": {
3593
- "in": "header",
3594
- "description": "Integration id",
3595
- "type": "string",
3596
- "required": false
3597
- },
3598
- "x-integration-alias": {
3599
- "in": "header",
3600
- "description": "Integration alias",
3601
- "type": "string",
3602
- "required": false
3603
- }
3604
- }
3605
- }
3606
- },
3607
- "metadata": {
3608
- "title": "Botpress Runtime API",
3609
- "description": "API for Botpress Runtime",
3610
- "server": "https://api.botpress.cloud",
3611
- "version": "1.53.0",
3612
- "prefix": "v1"
3613
- },
3614
- "defaultParameters": {
3615
- "x-bot-id": {
3616
- "in": "header",
3617
- "description": "Bot id",
3618
- "type": "string",
3619
- "required": true
3620
- },
3621
- "x-integration-id": {
3622
- "in": "header",
3623
- "description": "Integration id",
3624
- "type": "string",
3625
- "required": false
3626
- },
3627
- "x-integration-alias": {
3628
- "in": "header",
3629
- "description": "Integration alias",
3630
- "type": "string",
3631
- "required": false
3632
- }
3633
- },
3634
- "errors": [
3635
- {
3636
- "status": 500,
3637
- "type": "Unknown",
3638
- "description": "An unknown error occurred"
3639
- },
3640
- {
3641
- "status": 500,
3642
- "type": "Internal",
3643
- "description": "An internal error occurred"
3644
- },
3645
- {
3646
- "status": 401,
3647
- "type": "Unauthorized",
3648
- "description": "The request requires to be authenticated."
3649
- },
3650
- {
3651
- "status": 403,
3652
- "type": "Forbidden",
3653
- "description": "The requested action can't be peform by this resource."
3654
- },
3655
- {
3656
- "status": 413,
3657
- "type": "PayloadTooLarge",
3658
- "description": "The request payload is too large."
3659
- },
3660
- {
3661
- "status": 400,
3662
- "type": "InvalidPayload",
3663
- "description": "The request payload is invalid."
3664
- },
3665
- {
3666
- "status": 415,
3667
- "type": "UnsupportedMediaType",
3668
- "description": "The request is invalid because the content-type is not supported."
3669
- },
3670
- {
3671
- "status": 405,
3672
- "type": "MethodNotFound",
3673
- "description": "The requested method does not exist."
3674
- },
3675
- {
3676
- "status": 404,
3677
- "type": "ResourceNotFound",
3678
- "description": "The requested resource does not exist."
3679
- },
3680
- {
3681
- "status": 400,
3682
- "type": "InvalidJsonSchema",
3683
- "description": "The provided JSON schema is invalid."
3684
- },
3685
- {
3686
- "status": 400,
3687
- "type": "InvalidDataFormat",
3688
- "description": "The provided data doesn't respect the provided JSON schema."
3689
- },
3690
- {
3691
- "status": 400,
3692
- "type": "InvalidIdentifier",
3693
- "description": "The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters."
3694
- },
3695
- {
3696
- "status": 409,
3697
- "type": "RelationConflict",
3698
- "description": "The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together."
3699
- },
3700
- {
3701
- "status": 409,
3702
- "type": "ReferenceConstraint",
3703
- "description": "The resource cannot be deleted because it's referenced by another resource"
3704
- },
3705
- {
3706
- "status": 409,
3707
- "type": "ResourceLockedConflict",
3708
- "description": "The resource is current locked and cannot be operated on until the lock is released."
3709
- },
3710
- {
3711
- "status": 410,
3712
- "type": "ResourceGone",
3713
- "description": "The requested resource is no longer available."
3714
- },
3715
- {
3716
- "status": 400,
3717
- "type": "ReferenceNotFound",
3718
- "description": "The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request."
3719
- },
3720
- {
3721
- "status": 400,
3722
- "type": "InvalidQuery",
3723
- "description": "The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource."
3724
- },
3725
- {
3726
- "status": 400,
3727
- "type": "Runtime",
3728
- "description": "An error happened during the execution of a runtime (bot or integration)."
3729
- },
3730
- {
3731
- "status": 409,
3732
- "type": "AlreadyExists",
3733
- "description": "The record attempted to be created already exists."
3734
- },
3735
- {
3736
- "status": 429,
3737
- "type": "RateLimited",
3738
- "description": "The request has been rate limited."
3739
- },
3740
- {
3741
- "status": 402,
3742
- "type": "PaymentRequired",
3743
- "description": "A payment is required to perform this request."
3744
- },
3745
- {
3746
- "status": 403,
3747
- "type": "QuotaExceeded",
3748
- "description": "The request exceeds the allowed quota. Quotas are a soft limit that can be increased."
3749
- },
3750
- {
3751
- "status": 413,
3752
- "type": "LimitExceeded",
3753
- "description": "The request exceeds the allowed limit. Limits are a hard limit that cannot be increased."
3754
- },
3755
- {
3756
- "status": 400,
3757
- "type": "BreakingChanges",
3758
- "description": "Request payload contains breaking changes which is not allowed for this resource without a version increment."
3759
- }
3760
- ],
3761
- "refs": {
3762
- "parameters": {},
3763
- "requestBodies": {
3764
- "createConversationBody": true,
3765
- "getOrCreateConversationBody": true,
3766
- "updateConversationBody": true,
3767
- "addParticipantBody": true,
3768
- "createEventBody": true,
3769
- "createMessageBody": true,
3770
- "getOrCreateMessageBody": true,
3771
- "updateMessageBody": true,
3772
- "createUserBody": true,
3773
- "getOrCreateUserBody": true,
3774
- "updateUserBody": true,
3775
- "setStateExpiryBody": true,
3776
- "setStateBody": true,
3777
- "getOrSetStateBody": true,
3778
- "patchStateBody": true,
3779
- "callActionBody": true,
3780
- "configureIntegrationBody": true,
3781
- "createTaskBody": true,
3782
- "updateTaskBody": true,
3783
- "createWorkflowBody": true,
3784
- "updateWorkflowBody": true,
3785
- "getOrCreateWorkflowBody": true,
3786
- "trackAnalyticsBody": true
3787
- },
3788
- "responses": {
3789
- "createConversationResponse": true,
3790
- "getConversationResponse": true,
3791
- "listConversationsResponse": true,
3792
- "getOrCreateConversationResponse": true,
3793
- "updateConversationResponse": true,
3794
- "deleteConversationResponse": true,
3795
- "listParticipantsResponse": true,
3796
- "addParticipantResponse": true,
3797
- "getParticipantResponse": true,
3798
- "removeParticipantResponse": true,
3799
- "createEventResponse": true,
3800
- "getEventResponse": true,
3801
- "listEventsResponse": true,
3802
- "cancelScheduledEventResponse": true,
3803
- "createMessageResponse": true,
3804
- "getOrCreateMessageResponse": true,
3805
- "getMessageResponse": true,
3806
- "updateMessageResponse": true,
3807
- "listMessagesResponse": true,
3808
- "deleteMessageResponse": true,
3809
- "createUserResponse": true,
3810
- "getUserResponse": true,
3811
- "listUsersResponse": true,
3812
- "getOrCreateUserResponse": true,
3813
- "updateUserResponse": true,
3814
- "deleteUserResponse": true,
3815
- "setStateExpiryResponse": true,
3816
- "getStateResponse": true,
3817
- "setStateResponse": true,
3818
- "getOrSetStateResponse": true,
3819
- "patchStateResponse": true,
3820
- "callActionResponse": true,
3821
- "configureIntegrationResponse": true,
3822
- "getTaskResponse": true,
3823
- "createTaskResponse": true,
3824
- "updateTaskResponse": true,
3825
- "deleteTaskResponse": true,
3826
- "listTasksResponse": true,
3827
- "createWorkflowResponse": true,
3828
- "getWorkflowResponse": true,
3829
- "updateWorkflowResponse": true,
3830
- "deleteWorkflowResponse": true,
3831
- "listWorkflowsResponse": true,
3832
- "getOrCreateWorkflowResponse": true,
3833
- "listTagValuesResponse": true,
3834
- "trackAnalyticsResponse": true
3835
- },
3836
- "schemas": {
3837
- "User": true,
3838
- "Conversation": true,
3839
- "Event": true,
3840
- "Message": true,
3841
- "State": true,
3842
- "Task": true,
3843
- "Workflow": true
3844
- }
3845
- },
3846
- "schemas": {
3847
- "User": {
3848
- "section": "user",
3849
- "schema": {
3850
- "type": "object",
3851
- "properties": {
3852
- "id": {
3853
- "type": "string",
3854
- "minLength": 28,
3855
- "maxLength": 36,
3856
- "description": "Id of the [User](#schema_user)"
3857
- },
3858
- "createdAt": {
3859
- "type": "string",
3860
- "format": "date-time",
3861
- "description": "Creation date of the [User](#schema_user) in ISO 8601 format"
3862
- },
3863
- "updatedAt": {
3864
- "type": "string",
3865
- "format": "date-time",
3866
- "description": "Updating date of the [User](#schema_user) in ISO 8601 format"
3867
- },
3868
- "tags": {
3869
- "type": "object",
3870
- "additionalProperties": {
3871
- "type": "string"
3872
- },
3873
- "description": "Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [User](#schema_user). The set of [Tags](/docs/developers/concepts/tags) available on a [User](#schema_user) is restricted by the list of [Tags](/docs/developers/concepts/tags) defined previously by the [Bot](#schema_bot). Individual keys can be unset by posting an empty value to them."
3874
- },
3875
- "name": {
3876
- "type": "string",
3877
- "maxLength": 200,
3878
- "description": "Name of the [User](#schema_user)"
3879
- },
3880
- "pictureUrl": {
3881
- "type": "string",
3882
- "maxLength": 40000,
3883
- "description": "Picture URL of the [User](#schema_user)"
3884
- }
3885
- },
3886
- "required": [
3887
- "id",
3888
- "createdAt",
3889
- "updatedAt",
3890
- "tags"
3891
- ],
3892
- "description": "The user object represents someone interacting with the bot within a specific integration. The same person interacting with a bot in slack and messenger will be represented with two different users.",
3893
- "additionalProperties": false
3894
- }
3895
- },
3896
- "Conversation": {
3897
- "section": "conversation",
3898
- "schema": {
3899
- "type": "object",
3900
- "properties": {
3901
- "id": {
3902
- "type": "string",
3903
- "minLength": 28,
3904
- "maxLength": 36,
3905
- "description": "Id of the [Conversation](#schema_conversation)"
3906
- },
3907
- "currentTaskId": {
3908
- "type": "string",
3909
- "minLength": 28,
3910
- "maxLength": 36,
3911
- "description": "Id of the current [Task](#schema_task)"
3912
- },
3913
- "currentWorkflowId": {
3914
- "type": "string",
3915
- "minLength": 28,
3916
- "maxLength": 36,
3917
- "description": "Id of the current [Workflow](#schema_workflow)"
3918
- },
3919
- "createdAt": {
3920
- "type": "string",
3921
- "format": "date-time",
3922
- "description": "Creation date of the [Conversation](#schema_conversation) in ISO 8601 format"
3923
- },
3924
- "updatedAt": {
3925
- "type": "string",
3926
- "format": "date-time",
3927
- "description": "Updating date of the [Conversation](#schema_conversation) in ISO 8601 format"
3928
- },
3929
- "channel": {
3930
- "type": "string",
3931
- "description": "Name of the channel where the [Conversation](#schema_conversation) is happening"
3932
- },
3933
- "integration": {
3934
- "type": "string",
3935
- "description": "Name of the integration that created the [Conversation](#schema_conversation)"
3936
- },
3937
- "tags": {
3938
- "type": "object",
3939
- "additionalProperties": {
3940
- "type": "string"
3941
- },
3942
- "description": "Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Conversation](#schema_conversation). The set of [Tags](/docs/developers/concepts/tags) available on a [Conversation](#schema_conversation) is restricted by the list of [Tags](/docs/developers/concepts/tags) defined previously by the [Bot](#schema_bot). Individual keys can be unset by posting an empty value to them."
3943
- }
3944
- },
3945
- "required": [
3946
- "id",
3947
- "createdAt",
3948
- "updatedAt",
3949
- "channel",
3950
- "integration",
3951
- "tags"
3952
- ],
3953
- "description": "The [Conversation](#schema_conversation) object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.",
3954
- "additionalProperties": false
3955
- }
3956
- },
3957
- "Event": {
3958
- "section": "event",
3959
- "schema": {
3960
- "type": "object",
3961
- "properties": {
3962
- "id": {
3963
- "type": "string",
3964
- "minLength": 28,
3965
- "maxLength": 36,
3966
- "description": "Id of the [Event](#schema_event)"
3967
- },
3968
- "createdAt": {
3969
- "type": "string",
3970
- "format": "date-time",
3971
- "description": "Creation date of the [Event](#schema_event) in ISO 8601 format"
3972
- },
3973
- "type": {
3974
- "type": "string",
3975
- "maxLength": 200,
3976
- "description": "Type of the [Event](#schema_event)."
3977
- },
3978
- "payload": {
3979
- "type": "object",
3980
- "additionalProperties": true,
3981
- "description": "Payload is the content of the event defined by the integration installed on your bot or one of the default events created by our api."
3982
- },
3983
- "conversationId": {
3984
- "type": "string",
3985
- "minLength": 28,
3986
- "maxLength": 36,
3987
- "description": "ID of the [Conversation](#schema_conversation) to link the event to."
3988
- },
3989
- "userId": {
3990
- "type": "string",
3991
- "minLength": 28,
3992
- "maxLength": 36,
3993
- "description": "ID of the [User](#schema_user) to link the event to."
3994
- },
3995
- "messageId": {
3996
- "type": "string",
3997
- "minLength": 28,
3998
- "maxLength": 36,
3999
- "description": "ID of the [Message](#schema_message) to link the event to."
4000
- },
4001
- "status": {
4002
- "type": "string",
4003
- "enum": [
4004
- "pending",
4005
- "processed",
4006
- "ignored",
4007
- "failed",
4008
- "scheduled",
4009
- "canceled"
4010
- ]
4011
- },
4012
- "failureReason": {
4013
- "type": "string",
4014
- "maxLength": 2000,
4015
- "nullable": true,
4016
- "description": "Reason why the event failed to be processed"
4017
- }
4018
- },
4019
- "required": [
4020
- "id",
4021
- "createdAt",
4022
- "type",
4023
- "payload",
4024
- "status",
4025
- "failureReason"
4026
- ],
4027
- "description": "The event object represents an action or an occurrence.",
4028
- "additionalProperties": false
4029
- }
4030
- },
4031
- "Message": {
4032
- "section": "message",
4033
- "schema": {
4034
- "type": "object",
4035
- "properties": {
4036
- "id": {
4037
- "type": "string",
4038
- "minLength": 28,
4039
- "maxLength": 36,
4040
- "description": "Id of the [Message](#schema_message)"
4041
- },
4042
- "createdAt": {
4043
- "type": "string",
4044
- "format": "date-time",
4045
- "description": "Creation date of the [Message](#schema_message) in ISO 8601 format"
4046
- },
4047
- "updatedAt": {
4048
- "type": "string",
4049
- "format": "date-time",
4050
- "description": "Update date of the [Message](#schema_message) in ISO 8601 format"
4051
- },
4052
- "type": {
4053
- "type": "string",
4054
- "maxLength": 200,
4055
- "description": "Type of the [Message](#schema_message) represents the resource type that the message is related to"
4056
- },
4057
- "payload": {
4058
- "type": "object",
4059
- "additionalProperties": true,
4060
- "description": "Payload is the content type of the message. Accepted payload options: Text, Image, Choice, Dropdown, Card, Carousel, File, Audio, Video, Location"
4061
- },
4062
- "direction": {
4063
- "type": "string",
4064
- "enum": [
4065
- "incoming",
4066
- "outgoing"
4067
- ],
4068
- "description": "Direction of the message (`incoming` or `outgoing`)."
4069
- },
4070
- "userId": {
4071
- "type": "string",
4072
- "minLength": 28,
4073
- "maxLength": 36,
4074
- "description": "ID of the [User](#schema_user)"
4075
- },
4076
- "conversationId": {
4077
- "type": "string",
4078
- "minLength": 28,
4079
- "maxLength": 36,
4080
- "description": "ID of the [Conversation](#schema_conversation)"
4081
- },
4082
- "tags": {
4083
- "type": "object",
4084
- "additionalProperties": {
4085
- "type": "string"
4086
- },
4087
- "description": "Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Conversation](#schema_conversation). The set of [Tags](/docs/developers/concepts/tags) available on a [Conversation](#schema_conversation) is restricted by the list of [Tags](/docs/developers/concepts/tags) defined previously by the [Bot](#schema_bot). Individual keys can be unset by posting an empty value to them."
4088
- },
4089
- "origin": {
4090
- "type": "string",
4091
- "enum": [
4092
- "synthetic"
4093
- ],
4094
- "description": "Origin of the message (`synthetic`)."
4095
- }
4096
- },
4097
- "required": [
4098
- "id",
4099
- "createdAt",
4100
- "updatedAt",
4101
- "type",
4102
- "payload",
4103
- "direction",
4104
- "userId",
4105
- "conversationId",
4106
- "tags"
4107
- ],
4108
- "description": "The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).",
4109
- "additionalProperties": false
4110
- }
4111
- },
4112
- "State": {
4113
- "section": "state",
4114
- "schema": {
4115
- "type": "object",
4116
- "properties": {
4117
- "id": {
4118
- "type": "string",
4119
- "minLength": 28,
4120
- "maxLength": 36,
4121
- "description": "Id of the [State](#schema_state)"
4122
- },
4123
- "createdAt": {
4124
- "type": "string",
4125
- "format": "date-time",
4126
- "description": "Creation date of the [State](#schema_state) in ISO 8601 format"
4127
- },
4128
- "updatedAt": {
4129
- "type": "string",
4130
- "format": "date-time",
4131
- "description": "Updating date of the [State](#schema_state) in ISO 8601 format"
4132
- },
4133
- "botId": {
4134
- "type": "string",
4135
- "minLength": 28,
4136
- "maxLength": 36,
4137
- "description": "Id of the [Bot](#schema_bot)"
4138
- },
4139
- "conversationId": {
4140
- "type": "string",
4141
- "minLength": 28,
4142
- "maxLength": 36,
4143
- "description": "Id of the [Conversation](#schema_conversation)"
4144
- },
4145
- "userId": {
4146
- "type": "string",
4147
- "minLength": 28,
4148
- "maxLength": 36,
4149
- "description": "Id of the [User](#schema_user)"
4150
- },
4151
- "name": {
4152
- "type": "string",
4153
- "maxLength": 200,
4154
- "description": "Name of the [State](#schema_state) which is declared inside the bot definition"
4155
- },
4156
- "type": {
4157
- "type": "string",
4158
- "enum": [
4159
- "conversation",
4160
- "user",
4161
- "bot",
4162
- "task",
4163
- "integration",
4164
- "workflow"
4165
- ],
4166
- "description": "Type of the [State](#schema_state) represents the resource type (`conversation`, `user`, `bot`, `task`, `integration` or `workflow`) that the state is related to"
4167
- },
4168
- "payload": {
4169
- "type": "object",
4170
- "additionalProperties": true,
4171
- "description": "Payload is the content of the state defined by your bot."
4172
- }
4173
- },
4174
- "required": [
4175
- "id",
4176
- "createdAt",
4177
- "updatedAt",
4178
- "botId",
4179
- "name",
4180
- "type",
4181
- "payload"
4182
- ],
4183
- "description": "The state object represents the current payload. A state is always linked to either a bot, a conversation or a user.",
4184
- "additionalProperties": false
4185
- }
4186
- },
4187
- "Task": {
4188
- "section": "task",
4189
- "schema": {
4190
- "type": "object",
4191
- "properties": {
4192
- "id": {
4193
- "type": "string",
4194
- "minLength": 28,
4195
- "maxLength": 36,
4196
- "description": "Id of the [Task](#schema_task)"
4197
- },
4198
- "title": {
4199
- "type": "string",
4200
- "maxLength": 64,
4201
- "description": "Title describing the task"
4202
- },
4203
- "description": {
4204
- "type": "string",
4205
- "maxLength": 256,
4206
- "description": "All the notes related to the execution of the current task"
4207
- },
4208
- "type": {
4209
- "type": "string",
4210
- "description": "Type of the task"
4211
- },
4212
- "data": {
4213
- "type": "object",
4214
- "additionalProperties": true,
4215
- "description": "Content related to the task"
4216
- },
4217
- "status": {
4218
- "type": "string",
4219
- "enum": [
4220
- "pending",
4221
- "in_progress",
4222
- "failed",
4223
- "completed",
4224
- "blocked",
4225
- "paused",
4226
- "timeout",
4227
- "cancelled"
4228
- ],
4229
- "description": "Status of the task"
4230
- },
4231
- "parentTaskId": {
4232
- "type": "string",
4233
- "minLength": 28,
4234
- "maxLength": 36,
4235
- "description": "Parent task id is the parent task that created this task"
4236
- },
4237
- "conversationId": {
4238
- "type": "string",
4239
- "minLength": 28,
4240
- "maxLength": 36,
4241
- "description": "Conversation id related to this task"
4242
- },
4243
- "userId": {
4244
- "type": "string",
4245
- "minLength": 28,
4246
- "maxLength": 36,
4247
- "description": "Specific user related to this task"
4248
- },
4249
- "timeoutAt": {
4250
- "type": "string",
4251
- "format": "date-time",
4252
- "description": "The timeout date where the task should be failed in the ISO 8601 format"
4253
- },
4254
- "createdAt": {
4255
- "type": "string",
4256
- "format": "date-time",
4257
- "description": "Creation date of the task in ISO 8601 format"
4258
- },
4259
- "updatedAt": {
4260
- "type": "string",
4261
- "format": "date-time",
4262
- "description": "Updating date of the task in ISO 8601 format"
4263
- },
4264
- "failureReason": {
4265
- "type": "string",
4266
- "maxLength": 2000,
4267
- "description": "If the task fails this is the reason behind it"
4268
- },
4269
- "tags": {
4270
- "type": "object",
4271
- "additionalProperties": {
4272
- "type": "string"
4273
- },
4274
- "description": "Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Task](#schema_task). Individual keys can be unset by posting an empty value to them."
4275
- }
4276
- },
4277
- "required": [
4278
- "id",
4279
- "title",
4280
- "description",
4281
- "type",
4282
- "data",
4283
- "status",
4284
- "timeoutAt",
4285
- "createdAt",
4286
- "updatedAt",
4287
- "tags"
4288
- ],
4289
- "description": "Task definition",
4290
- "additionalProperties": false
4291
- }
4292
- },
4293
- "Workflow": {
4294
- "section": "workflow",
4295
- "schema": {
4296
- "type": "object",
4297
- "properties": {
4298
- "id": {
4299
- "type": "string",
4300
- "minLength": 28,
4301
- "maxLength": 36,
4302
- "description": "Id of the [Workflow](#schema_workflow)"
4303
- },
4304
- "name": {
4305
- "type": "string",
4306
- "maxLength": 200,
4307
- "description": "Name of the workflow"
4308
- },
4309
- "status": {
4310
- "type": "string",
4311
- "enum": [
4312
- "pending",
4313
- "in_progress",
4314
- "failed",
4315
- "completed",
4316
- "listening",
4317
- "paused",
4318
- "timedout",
4319
- "cancelled"
4320
- ],
4321
- "description": "Status of the [Workflow](#schema_workflow)"
4322
- },
4323
- "input": {
4324
- "type": "object",
4325
- "additionalProperties": true,
4326
- "description": "Input provided to the [Workflow](#schema_workflow)"
4327
- },
4328
- "output": {
4329
- "type": "object",
4330
- "additionalProperties": true,
4331
- "description": "Data returned by the [Workflow](#schema_workflow) output"
4332
- },
4333
- "parentWorkflowId": {
4334
- "type": "string",
4335
- "minLength": 28,
4336
- "maxLength": 36,
4337
- "description": "Parent [Workflow](#schema_workflow) id is the parent [Workflow](#schema_workflow) that created this [Workflow](#schema_workflow)"
4338
- },
4339
- "conversationId": {
4340
- "type": "string",
4341
- "minLength": 28,
4342
- "maxLength": 36,
4343
- "description": "Conversation id related to this [Workflow](#schema_workflow)"
4344
- },
4345
- "userId": {
4346
- "type": "string",
4347
- "minLength": 28,
4348
- "maxLength": 36,
4349
- "description": "User id related to this [Workflow](#schema_workflow)"
4350
- },
4351
- "createdAt": {
4352
- "type": "string",
4353
- "format": "date-time",
4354
- "description": "Creation date of the [Workflow](#schema_workflow) in ISO 8601 format"
4355
- },
4356
- "updatedAt": {
4357
- "type": "string",
4358
- "format": "date-time",
4359
- "description": "Updating date of the [Workflow](#schema_workflow) in ISO 8601 format"
4360
- },
4361
- "completedAt": {
4362
- "type": "string",
4363
- "format": "date-time",
4364
- "description": "The date when the [Workflow](#schema_workflow) completed in ISO 8601 format"
4365
- },
4366
- "failureReason": {
4367
- "type": "string",
4368
- "maxLength": 2000,
4369
- "description": "If the [Workflow](#schema_workflow) fails this is the reason behind it"
4370
- },
4371
- "timeoutAt": {
4372
- "type": "string",
4373
- "format": "date-time",
4374
- "description": "The timeout date when the [Workflow](#schema_workflow) will fail in the ISO 8601 format"
4375
- },
4376
- "tags": {
4377
- "type": "object",
4378
- "additionalProperties": {
4379
- "type": "string"
4380
- },
4381
- "description": "Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Workflow](#schema_workflow). Individual keys can be unset by posting an empty value to them."
4382
- }
4383
- },
4384
- "required": [
4385
- "id",
4386
- "name",
4387
- "status",
4388
- "input",
4389
- "output",
4390
- "createdAt",
4391
- "updatedAt",
4392
- "timeoutAt",
4393
- "tags"
4394
- ],
4395
- "description": "Workflow definition",
4396
- "additionalProperties": false
4397
- }
4398
- }
4399
- },
4400
- "sections": [
4401
- {
4402
- "description": "",
4403
- "title": "User",
4404
- "name": "user",
4405
- "operations": [
4406
- "createUser",
4407
- "getUser",
4408
- "listUsers",
4409
- "getOrCreateUser",
4410
- "updateUser",
4411
- "deleteUser"
4412
- ],
4413
- "schema": "User"
4414
- },
4415
- {
4416
- "description": "",
4417
- "title": "Conversation",
4418
- "name": "conversation",
4419
- "operations": [
4420
- "createConversation",
4421
- "getConversation",
4422
- "listConversations",
4423
- "getOrCreateConversation",
4424
- "updateConversation",
4425
- "deleteConversation",
4426
- "listParticipants",
4427
- "addParticipant",
4428
- "getParticipant",
4429
- "removeParticipant"
4430
- ],
4431
- "schema": "Conversation"
4432
- },
4433
- {
4434
- "description": "",
4435
- "title": "Event",
4436
- "name": "event",
4437
- "operations": [
4438
- "createEvent",
4439
- "getEvent",
4440
- "listEvents",
4441
- "cancelScheduledEvent"
4442
- ],
4443
- "schema": "Event"
4444
- },
4445
- {
4446
- "description": "",
4447
- "title": "Message",
4448
- "name": "message",
4449
- "operations": [
4450
- "createMessage",
4451
- "getOrCreateMessage",
4452
- "getMessage",
4453
- "updateMessage",
4454
- "listMessages",
4455
- "deleteMessage"
4456
- ],
4457
- "schema": "Message"
4458
- },
4459
- {
4460
- "description": "",
4461
- "title": "State",
4462
- "name": "state",
4463
- "operations": [
4464
- "setStateExpiry",
4465
- "getState",
4466
- "setState",
4467
- "getOrSetState",
4468
- "patchState"
4469
- ],
4470
- "schema": "State"
4471
- },
4472
- {
4473
- "description": "",
4474
- "title": "Hub",
4475
- "name": "hub",
4476
- "operations": []
4477
- },
4478
- {
4479
- "description": "",
4480
- "title": "Action",
4481
- "name": "action",
4482
- "operations": [
4483
- "callAction"
4484
- ]
4485
- },
4486
- {
4487
- "description": "",
4488
- "title": "Task",
4489
- "name": "task",
4490
- "operations": [
4491
- "getTask",
4492
- "createTask",
4493
- "updateTask",
4494
- "deleteTask",
4495
- "listTasks"
4496
- ],
4497
- "schema": "Task"
4498
- },
4499
- {
4500
- "description": "",
4501
- "title": "Workflow",
4502
- "name": "workflow",
4503
- "operations": [
4504
- "createWorkflow",
4505
- "getWorkflow",
4506
- "updateWorkflow",
4507
- "deleteWorkflow",
4508
- "listWorkflows",
4509
- "getOrCreateWorkflow"
4510
- ],
4511
- "schema": "Workflow"
4512
- },
4513
- {
4514
- "description": "",
4515
- "title": "Tag",
4516
- "name": "tag",
4517
- "operations": [
4518
- "listTagValues"
4519
- ]
4520
- }
4521
- ],
4522
- "options": {
4523
- "allowUnions": false
4524
- },
4525
- "security": [
4526
- "BearerAuth"
4527
- ]
4528
- } satisfies State