-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublic_api.openapi.json
8935 lines (8935 loc) · 247 KB
/
public_api.openapi.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.0.0",
"x-api-id": "front",
"x-explorer-enabled": false,
"x-proxy-enabled": true,
"x-samples-enabled": true,
"info": {
"version": "1.0.0",
"title": "Core API",
"contact": {
"name": "Front Platform",
"email": "[email protected]"
}
},
"security": [
{
"http": []
}
],
"servers": [
{
"url": "https://api2.frontapp.com"
}
],
"components": {
"schemas": {
"ResourceID": {
"type": "string"
},
"ShiftInterval": {
"type": "object",
"required": [
"start",
"end"
],
"properties": {
"start": {
"type": "string",
"description": "Start of shift",
"example": "09:00"
},
"end": {
"type": "string",
"description": "End of shift",
"example": "17:00"
}
}
},
"ShiftIntervals": {
"type": "object",
"properties": {
"mon": {
"$ref": "#/components/schemas/ShiftInterval"
},
"tue": {
"$ref": "#/components/schemas/ShiftInterval"
},
"wed": {
"$ref": "#/components/schemas/ShiftInterval"
},
"thu": {
"$ref": "#/components/schemas/ShiftInterval"
},
"fri": {
"$ref": "#/components/schemas/ShiftInterval"
},
"sat": {
"$ref": "#/components/schemas/ShiftInterval"
},
"sun": {
"$ref": "#/components/schemas/ShiftInterval"
}
}
},
"TagIds": {
"type": "object",
"required": [
"tag_ids"
],
"properties": {
"tag_ids": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceID"
}
}
}
},
"TeammateIds": {
"type": "object",
"required": [
"teammate_ids"
],
"properties": {
"teammate_ids": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceID"
}
}
}
},
"ChannelIds": {
"type": "object",
"required": [
"channel_ids"
],
"properties": {
"channel_ids": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceID"
}
}
}
},
"InboxIds": {
"type": "object",
"required": [
"inbox_ids"
],
"properties": {
"inbox_ids": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceID"
}
}
}
},
"TeamIds": {
"type": "object",
"required": [
"team_ids"
],
"properties": {
"team_ids": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceID"
}
}
}
},
"ContactIds": {
"type": "object",
"required": [
"contact_ids"
],
"properties": {
"contact_ids": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceID"
}
}
}
},
"AccountIds": {
"type": "object",
"required": [
"account_ids"
],
"properties": {
"account_ids": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceID"
}
}
}
},
"Account": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the account"
},
"name": {
"type": "string",
"description": "Name of the Account"
},
"description": {
"type": "string",
"description": "Account description"
},
"domains": {
"type": "array",
"items": {
"type": "string",
"description": "List of domains associated to be associated the Account"
}
},
"external_id": {
"type": "string",
"description": "ID of the Account in an external system"
},
"custom_fields": {
"type": "object",
"description": "Custom attributes for this account."
}
}
},
"ExportQuery": {
"required": [
"start",
"end"
],
"properties": {
"inbox_id": {
"type": "string",
"description": "ID of the inbox to export the analytics for. If omitted, the export will contain all the inboxes."
},
"tag_id": {
"type": "string",
"description": "ID the tag to export the analytics for. If omitted, the export will contain all the tags."
},
"start": {
"type": "integer",
"description": "Start time of the data to include in the export."
},
"end": {
"type": "integer",
"description": "End time of the data to include in the export."
},
"timezone": {
"type": "string",
"description": "[IANA name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the timezone to format the dates with. If omitted, the export will use UTC."
},
"should_export_events": {
"type": "boolean",
"default": false,
"description": "Whether to export all the events or only messages. Default to `false`."
},
"should_include_private_inboxes": {
"type": "boolean",
"default": false,
"description": "Whether to export events from individual inboxes of team members. Default to `false`."
},
"columns": {
"type": "array",
"description": "List of columns requested for the export.\nIf the string 'all' is provided, all columns will be exported.\nIf no value is provided, the legacy list of column will be used.\n",
"items": {
"type": "string"
}
}
}
},
"AnalyticsFilters": {
"description": "Resources to compute the analytics for. Defaults to all.",
"anyOf": [
{
"$ref": "#/components/schemas/TagIds"
},
{
"$ref": "#/components/schemas/TeammateIds"
},
{
"$ref": "#/components/schemas/ChannelIds"
},
{
"$ref": "#/components/schemas/InboxIds"
},
{
"$ref": "#/components/schemas/TeamIds"
},
{
"$ref": "#/components/schemas/AccountIds"
}
]
},
"AnalyticsReportRequest2": {
"properties": {
"start": {
"type": "number",
"description": "Start time of the data to include in the export (seconds since 1970-01-01T00:00:00+00). Will be rounded down to the start of the day."
},
"end": {
"type": "number",
"description": "End time of the data to include in the export (seconds since 1970-01-01T00:00:00+00). Will be rounded up to the end of the day."
},
"timezone": {
"type": "string",
"description": "[IANA name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the timezone to format the dates with. If omitted, the export will use Etc/UTC."
},
"filters": {
"$ref": "#/components/schemas/AnalyticsFilters"
},
"metrics": {
"type": "array",
"description": "List of the metrics required.",
"items": {
"$ref": "#/components/schemas/AnalyticsMetricId"
}
}
},
"required": [
"start",
"end",
"metrics"
]
},
"AnalyticsExportRequest2": {
"properties": {
"start": {
"type": "number",
"description": "Start time of the data to include in the export (seconds since 1970-01-01T00:00:00+00). Will be rounded down to the start of the day."
},
"end": {
"type": "number",
"description": "End time of the data to include in the export (seconds since 1970-01-01T00:00:00+00). Will be rounded up to the end of the day."
},
"timezone": {
"type": "string",
"description": "[IANA name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the timezone to format the dates with. If omitted, the export will use Etc/UTC."
},
"filters": {
"$ref": "#/components/schemas/AnalyticsFilters"
},
"type": {
"type": "string",
"enum": [
"activities",
"messages"
]
}
},
"required": [
"start",
"end",
"type"
]
},
"AnalyticsMetricId": {
"type": "string",
"enum": [
"avg_first_response_time",
"avg_handle_time",
"avg_response_time",
"avg_sla_breach_time",
"avg_total_reply_time",
"new_segments_count",
"num_active_segments_full",
"num_archived_segments",
"num_archived_segments_with_reply",
"num_csat_survey_response",
"num_messages_received",
"num_messages_sent",
"num_sla_breach",
"pct_csat_survey_satisfaction",
"pct_tagged_conversations",
"num_open_segments_start",
"num_closed_segments",
"num_open_segments_end",
"num_workload_segments"
]
},
"CreateMessageTemplateFolderAsChild": {
"type": "object",
"description": "A message template folder that is used to store message templates or other folders.",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the message template folder",
"example": "PTO templates"
}
}
},
"CreateMessageTemplateFolder": {
"type": "object",
"description": "A message template folder that is used to store message templates or other folders.",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the message template folder",
"example": "PTO templates"
},
"parent_folder_id": {
"type": "string",
"description": "ID of the parent folder to be placed into. Goes into the root folder if unspecified or if null.",
"example": null
}
}
},
"UpdateMessageTemplateFolder": {
"type": "object",
"description": "A message template folder that is used to store message templates or other folders.",
"properties": {
"name": {
"type": "string",
"description": "Name of the message template folder"
},
"parent_folder_id": {
"type": "string",
"description": "ID of the parent folder to be placed into. Goes into the root folder if unspecified or if null."
}
}
},
"UpdateMessageTemplate": {
"properties": {
"name": {
"type": "string",
"description": "Name of the message template"
},
"subject": {
"type": "string",
"description": "Subject of the message template"
},
"body": {
"type": "string",
"description": "Body of the message template"
},
"folder_id": {
"type": "string",
"description": "ID of the parent folder to be placed into. Goes into the root folder if unspecified or if null."
},
"inbox_ids": {
"type": "array",
"items": {
"type": "string",
"description": "The specific inboxes this template is available in. If null, then it will be available in all inboxes. Array should be non-empty. If unspecified, will retain previous value."
}
}
}
},
"CreateMessageTemplateAsChild": {
"type": "object",
"description": "A message template that is used for pre-written responses",
"required": [
"name",
"body"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the message template",
"example": "Out of Office"
},
"subject": {
"type": "string",
"description": "Subject of the message template. If not set, the name will be used to populate the subject.",
"example": "Out of Office"
},
"body": {
"type": "string",
"description": "Body of the message template",
"example": "Sorry, I'm OOO until October 25th."
},
"inbox_ids": {
"type": "array",
"items": {
"type": "string",
"description": "The specific inboxes this template is available in. If unspecified or null, then it will be available in all inboxes. Array should be non-empty."
},
"example": null
}
}
},
"CreatePrivateMessageTemplate": {
"type": "object",
"description": "A message template that is used for pre-written responses",
"required": [
"name",
"body"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the message template",
"example": "Out of Office"
},
"subject": {
"type": "string",
"description": "Subject of the message template. If not set, the name will be used to populate the subject.",
"example": "Out of Office"
},
"body": {
"type": "string",
"description": "Body of the message template",
"example": "Sorry, I'm OOO until October 25th."
},
"folder_id": {
"type": "string",
"description": "ID of the message template folder to place this message template in",
"example": null
}
}
},
"CreateSharedMessageTemplate": {
"type": "object",
"description": "A message template that is used for pre-written responses",
"required": [
"name",
"body"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the message template",
"example": "Out of Office"
},
"subject": {
"type": "string",
"description": "Subject of the message template. If not set, the name will be used to populate the subject.",
"example": "Out of Office"
},
"body": {
"type": "string",
"description": "Body of the message template",
"example": "Sorry, I'm OOO until October 25th."
},
"folder_id": {
"type": "string",
"description": "ID of the message template folder to place this message template in",
"example": null
},
"inbox_ids": {
"type": "array",
"items": {
"type": "string",
"description": "The specific inboxes this template is available in. If unspecified or null, then it will be available in all inboxes. Array should be non-empty."
},
"example": null
}
}
},
"CreateContactGroup": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the group"
}
}
},
"AddContactsToGroup": {
"required": [
"contact_ids"
],
"properties": {
"contact_ids": {
"type": "array",
"description": "List of IDs of the contacts to add in the requested group",
"items": {
"$ref": "#/components/schemas/ResourceID"
}
}
}
},
"ContactHandle": {
"type": "object",
"required": [
"handle",
"source"
],
"properties": {
"handle": {
"type": "string",
"description": "Handle used to reach the contact."
},
"source": {
"type": "string",
"enum": [
"twitter",
"email",
"phone",
"facebook",
"intercom",
"front_chat",
"custom"
],
"description": "Source of the handle. Can be `email`, `phone`, `twitter`, `facebook`, `intercom`, `front_chat`, or `custom`."
}
}
},
"CreateContact": {
"required": [
"handles"
],
"allOf": [
{
"$ref": "#/components/schemas/Contact"
},
{
"type": "object",
"properties": {
"handles": {
"type": "array",
"description": "List of the handles for this contact. Each handle object should include `handle` and `source` fields.",
"items": {
"$ref": "#/components/schemas/ContactHandle"
}
}
}
}
]
},
"Contact": {
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the contact"
},
"name": {
"type": "string",
"description": "Contact name"
},
"description": {
"type": "string",
"description": "Contact description"
},
"avatar": {
"type": "string",
"description": "Binary data of avatar. Must use `Content-Type: multipart/form-data` if specified.",
"format": "binary"
},
"is_spammer": {
"type": "boolean",
"description": "Whether or not the contact is marked as a spammer"
},
"links": {
"type": "array",
"description": "List of all the links of the contact",
"items": {
"type": "string"
}
},
"group_names": {
"type": "array",
"description": "List of all the group names the contact belongs to. It will automatically create missing groups",
"items": {
"type": "string"
}
},
"custom_fields": {
"type": "object",
"description": "Custom field attributes for this contact. Leave empty if you do not wish to update the attributes. Not sending existing attributes will automatically remove them."
}
}
},
"ContactGroup": {
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the group"
},
"name": {
"type": "string",
"description": "Name of the group"
},
"is_private": {
"type": "boolean",
"description": "Whether or not the contact is individual"
}
}
},
"DeleteContactHandle": {
"allOf": [
{
"$ref": "#/components/schemas/ContactHandle"
},
{
"type": "object",
"properties": {
"force": {
"type": "boolean",
"description": "Force the deletetion of the contact if the handle is the last one",
"default": false
}
}
}
]
},
"CreateContactNote": {
"type": "object",
"required": [
"author_id",
"body"
],
"properties": {
"author_id": {
"type": "string",
"description": "ID of teammate creating the note"
},
"body": {
"type": "string",
"description": "Content of the note"
}
}
},
"UpdateChannel": {
"properties": {
"name": {
"type": "string",
"description": "Name of the channel"
},
"settings": {
"type": "object",
"description": "Settings to replace.\nFor custom channels, all settings may be replaced.\nFor all other channels, only `undo_send_time` and `all_teammates_can_reply` may be replaced.\n",
"properties": {
"undo_send_time": {
"type": "integer",
"description": "The time (measured in seconds) that users have to undo a send operation in the channel.",
"enum": [
0,
5,
10,
15,
30,
60
]
},
"all_teammates_can_reply": {
"type": "boolean",
"description": "Whether teammates without inbox access can reply on this channel. Only allowed for shared channels."
}
}
}
}
},
"CreateChannel": {
"required": [
"type"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the channel"
},
"settings": {
"type": "object",
"description": "Settings of the channel",
"properties": {
"undo_send_time": {
"type": "integer",
"description": "The time (measured in seconds) that users have to undo a send operation in the channel.",
"enum": [
0,
5,
10,
15,
30,
60
]
},
"all_teammates_can_reply": {
"type": "boolean",
"description": "Whether teammates without inbox access can reply on this channel. Only allowed for shared channels."
}
}
},
"type": {
"type": "string",
"description": "Type of the channel",
"enum": [
"custom",
"smtp",
"twilio"
]
},
"send_as": {
"type": "string",
"description": "Sending address of your channel"
}
}
},
"CreateComment": {
"required": [
"author_id",
"body"
],
"properties": {
"author_id": {
"type": "string",
"description": "ID of the teammate creating the comment"
},
"body": {
"type": "string",
"description": "Content of the comment"
},
"attachments": {
"description": "Binary data of attached files. Must use `Content-Type: multipart/form-data` if specified. See [example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb).",
"type": "array",
"items": {
"type": "string",
"format": "binary"
}
}
}
},
"UpdateConversation": {
"properties": {
"assignee_id": {
"type": "string",
"description": "ID of the teammate to assign the conversation to. Set it to null to unassign."
},
"inbox_id": {
"type": "string",
"description": "ID of the inbox to move the conversation to."
},
"status": {
"type": "string",
"description": "New status of the conversation",
"enum": [
"archived",
"open",
"deleted",
"spam"
]
},
"tag_ids": {
"type": "array",
"description": "List of all the tag IDs replacing the old conversation tags",
"items": {
"$ref": "#/components/schemas/ResourceID"
}
}
}
},
"UpdateConversationAssignee": {
"required": [
"assignee_id"
],
"properties": {
"assignee_id": {
"type": "string",
"description": "ID of the teammate to assign the conversation to. Set it to null to unassign."
}
}
},
"UpdateConversationReminders": {
"required": [
"teammate_id",
"scheduled_at"
],
"properties": {
"teammate_id": {
"type": "string",
"description": "ID of the teammate to create a reminder for. For a private conversation, specify the id of the teammate that owns the conversation. For a shared conversation, use the id of any teammate that has access to the conversation's shared inbox."
},
"scheduled_at": {
"type": "string",
"description": "Timestamp to schedule the reminder for. Set to null to cancel."
}
}
},
"UpdateCustomField": {
"properties": {
"name": {
"type": "string",
"description": "Name of the custom field"
},
"description": {
"type": "string",
"description": "Description of the custom field"
}
}
},
"CreateDraft": {
"required": [
"author_id",
"body"
],
"properties": {
"author_id": {
"type": "string",
"description": "ID of the teammate on behalf of whom the draft will be created"
},
"to": {
"type": "array",
"items": {
"type": "string",
"description": "List of recipient handles who will receive the message once the draft is sent"
}
},
"cc": {
"type": "array",
"items": {
"type": "string",
"description": "List of recipient handles who will receive a copy of the message once the draft is sent"
}
},
"bcc": {
"type": "array",
"items": {
"type": "string",
"description": "List of the recipient handles who will receive a blind copy of the message once the draft is sent"
}
},
"subject": {
"type": "string",
"description": "Subject of the draft."
},
"body": {
"type": "string",
"description": "Body of the draft"
},
"attachments": {
"description": "Binary data of attached files. Must use `Content-Type: multipart/form-data` if specified. See [example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb).",
"type": "array",
"items": {
"type": "string",
"format": "binary"
}
},
"mode": {
"description": "Mode of the draft to create. Can be 'private' (draft is visible to the author only) or 'shared' (draft is visible to all teammates with access to the conversation).",
"type": "string",
"enum": [
"private",
"shared"
],
"default": "private"
}
}
},
"ReplyDraft": {
"required": [
"author_id",
"body",
"channel_id"
],
"allOf": [
{
"$ref": "#/components/schemas/CreateDraft"
},
{
"type": "object",
"properties": {
"channel_id": {
"type": "string",
"description": "ID of the channel from which the draft will be sent"
}
}
}
]
},
"EditDraft": {
"required": [
"author_id",
"body",
"channel_id"
],
"allOf": [
{
"$ref": "#/components/schemas/ReplyDraft"
},
{
"type": "object",
"properties": {
"version": {
"type": "string",
"description": "Version of the draft"
},
"mode": {
"description": "Mode of the draft to update. Can only be 'shared' (draft is visible to all teammates with access to the conversation).",
"type": "string",
"enum": [
"shared"
]
}
}
}
]
},
"DeleteDraft": {
"required": [
"version"
],
"properties": {
"version": {
"type": "string",
"description": "Version of the draft"
}
}
},
"CreateInbox": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"teammate_ids": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceID"
}