-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphonecom-apiv4.swagger.json
9749 lines (9749 loc) · 281 KB
/
phonecom-apiv4.swagger.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
{
"swagger": "2.0",
"info": {
"description": "This is a Phone.com api Swagger definition",
"version": "1.0.0",
"title": "Phone.com API",
"contact": {
"email": "apisupport@phone.com"
}
},
"host": "api.phone.com",
"basePath": "/v4",
"tags": [
{
"name": "calls",
"description": "This API places a call to the caller phone number (or caller extension ID). If that number (or extension) answers within the timeout period, then the callee DID (or extension) will be connected to the call. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Calls API with the following definition: https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/calls",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-calls"
}
},
{
"name": "oauth",
"description": "The OAuth 2.0 Authorization Framework enables a third-party application to obtain limited access to HTTP API requests which require an access token. This page describes how to use the /oauth/authorization and /oauth/access-token API's to generate an access token.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/oauth"
}
},
{
"name": "accounts",
"description": "This page gives an overview of how to interact with your accounts.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/accounts"
}
},
{
"name": "applications",
"description": "Applications are references to your own software integrations that are registered to interact with your Phone.com account.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-applications"
}
},
{
"name": "call-logs",
"description": "The Call Logs API returns a list of call detail records for the account. The result includes the id, start time, creation time, caller ID, called number, direction of call, and duration in seconds. If applicable, the result may also include final action, final action duration, listen URL, and/or transcription. Since the call logs usually contains many calls, API users may use filters such as start_time, created_at and direction to limit the result set to calls interested. Users may also use the sorting parameters such as start_time and created_at to list result in ascending or descending order.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-call-logs"
}
},
{
"name": "devices",
"description": "Your Phone.com account may have one or more physical handsets or other VoIP devices associated with it. This service only shows generic VoIP devices at this time. If you have any physical handsets or virtualized software-based devices, you will need to continue using the Control Panel to manage them.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-devices"
}
},
{
"name": "listeners",
"description": "Call Event Listeners. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Extension level Listeners API with the following definition: https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/listeners At the heart of every telephony system is the Events Engine. At Phone.com, our customers (and their call traffic) emit millions of events per day. These events play a key role in advanced integration opportunities such as CRM integration, security/auditing, and real-time contextual call control. The Listeners API Services aim to simplify and standardize the method in which events are extracted from our systems and processed. These services provide consistent interfaces for internal systems to log events, manage subscriptions, and provide interfaces for external systems (e.g. customer applications or integrations such as Salesforce CRM) to subscribe to account-specific events and manage the subscriptions. As of today, Phone.com supports the following events. More events will be added as we continue to upgrade our phone services. - call.new - call.update - call.complete - call.log - sms.in - sms.out The \"call\" events help customers know when a call starts, when the callee answers the call, when a call ends and when a call entry is recorded and ready for retrieval. The \"sms\" events help customers know when a sms is sent or received. This provides enough information for applications such as Incoming Call / SMS Notification and others to improve productivities. More events will be added once we understand more about customer needs. The Listeners service provides an interface for internal and external applications to subscribe to events. Listeners can be added by customers to their Phone.com account using the Phoenix API. A listener sets up an event type and a callback URL, when the event is emitted, it will be forwarded to the URL. For example, a call.new event may be setup with a callback URL http://newcall.phone.com, when an inbound call comes in, the event with all the call info (payload) will be forwarded to http://newcall.phone.com.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-listeners"
}
},
{
"name": "express-service-codes",
"description": "An Express Service Code is required when a customer calls Phone.com for support. With the following services, customer may retrieve the Express Service Code associated with his/her account.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-express-srv-codes"
}
},
{
"name": "extensions",
"description": "Your Phone.com account will have one or more extensions.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-extensions"
}
},
{
"name": "caller-ids",
"description": "API users with Extension scope access token does not have access to the Phone Number API. This API helps user to retrieve available account phone numbers to be used as caller id via the /Calls API. Outgoing calls via the Post /calls API supports Caller ID settings. This page gives an overview on how to retrieve the list of available account phone number to be used as caller ID.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-extension-caller-ids"
}
},
{
"name": "contacts",
"description": "Each extension at Phone.com can have its own address book with any number of contacts. This page gives an overview.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-extension-contacts"
}
},
{
"name": "groups",
"description": "The entries in an extension's address book can be divided into any number of groups. This page gives an overview.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-extension-contact-groups"
}
},
{
"name": "media",
"description": "Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Extension level Media API with the following definition: https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/media. Your Phone.com account has two kinds of media that can be used in various ways: Hold Music and Greetings. Hold Music can be used in routes, queues, and anywhere the caller might be placed on hold. Your account has access to a set of standard hold music options, and optionally another set of premium hold music options. You can also upload your own hold music, subject to copyright limitations. Greetings are verbal messages that can be played in various places to provide the caller with important information. For example, greetings are used when a caller first enters a menu or if they enter an invalid option. You also might use a greeting to alert the user to the fact that their call is being recorded.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/list-account-media"
}
},
{
"name": "menus",
"description": "We've all been on the consuming side of a phone menu before. You call a company and hear, \"Press '1' for Sales. Press '2' for Support. Press '0' for the operator.\" With Phone.com you can create your own menus!",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-menus"
}
},
{
"name": "oauth-clients",
"description": "Phone.com API supports OAuth 2.0 Authorization Framework, which enables a third-party application (client) to obtain limited access to HTTP API requests. This page describes how to use the /oauth/clients API to list, get and delete client.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-oauth-clients"
}
},
{
"name": "oauth-clients-redirect-uris",
"description": "The Account OAuth Clients API supports redirect-uri. Since an OAuth Client is created by a Phone.com admin who does not know what redirect uris should be assigned, API users may use the OAuth Client Redirect URIs API to create, list, get and delete redirect uris.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-oauth-clients-redirect-uris"
}
},
{
"name": "payment-methods",
"description": "Phone.com accepts credit card payment, and the Account Payment Methods API allows users to add, list, get, update and delete a credit card payment method.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-payment-methods"
}
},
{
"name": "phone-numbers",
"description": "Your Phone.com account has one or more phone numbers registered to it.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-phone-numbers"
}
},
{
"name": "queues",
"description": "Queues are used when you want to direct calls to a pool of phone numbers and/or extensions. A common utilization of queues is for Customer Service call centers. When a queue is configured on your phone number, Phone.com will route incoming calls to members of the queue. If a queue member is already on another call, our service rings the next phone number or extension in the queue. While your callers are waiting to be connected, you can choose to play Hold Music.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-queues"
}
},
{
"name": "routes",
"description": "Routes, a.k.a. \"Call Handling Rules\" or \"Presets\", are used to tell Phone.com how to handle incoming phone calls. They can be used to connect your Phone.com phone number to an extension, a menu, a calling queue, or many other things. The fundamental element of a route is an action. We support many different actions such as forward, menu, and voicemail. See below for the full details. In general, actions are processed one at a time in the order you specify, until the call is answered or disconnected. Answering or disconnecting stops any additional actions from being performed. Note that several actions such as voicemail, menu, and fax completely take over processing the call and do not result in processing any subsequent actions. Actions are grouped into rule sets. Rule sets can be filtered based on the time of day or the caller's phone number. When processing an incoming call, Phone.com's routing engine will evaluate each rule set in the order that was specified when the route was created or updated. The first matching rule set will be used, and all other rule sets will be ignored. Each route must have at least one unfiltered rule set. Note that if your route contains multiple unfiltered rule sets, only the first one will be used.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-routes"
}
},
{
"name": "schedules",
"description": "Schedules are used at various places in your Phone.com account. A schedule can specify a recurring weekly pattern such as \"Monday through Friday\" or a single time period such as \"Thanksgiving Weekend 2015\".",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-schedules"
}
},
{
"name": "sms",
"description": "The Phone.com /sms service lets you send and show history of SMS messages. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Extension level SMS API with the following definition: https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/sms. Phone.com’s standard phone service lets you send and receive SMS messages using your Phone.com numbers. The Phone.com API extends this functionality, letting you send SMS messages from your application (through your phone number and our API server) to your users. You can also use the API to retrieve the history of sms sent from / delivered to your account.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-sms"
}
},
{
"name": "subaccounts",
"description": "This page gives an overview of how to interact with your subaccounts. Subaccounts are the same as master accounts in terms of the functionality Phone.com supports. The main difference is that subaccounts are grouped with their master account for invoicing purposes.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/subaccounts"
}
},
{
"name": "pricing",
"description": "This page gives an overview of how a Phone.com Master Account manages its pricing plan (coupon code) for its Subaccounts. API Token with Billing Scope: Your Phone.com account API token must have Billing Scope enabled in order to use any of our pricing services. Please contact Support if you need this.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-subaccount-pricing"
}
},
{
"name": "trunks",
"description": "SIP Trunks are used to connect your Phone.com account to your PBX. SIP Trunking Customers Only: Your Phone.com account must have SIP Trunking enabled in order to use any of our trunking features. Please contact Support if you need this. Otherwise, all requests to these services will result in a 403 Forbidden error.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-trunks"
}
},
{
"name": "voicemail",
"description": "Phone.com’s standard phone service allows callers leave voicemail if the incoming call was not answered. The /voicemail services show history of voicemail and allow users download voicemail for offline playback. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Voicemail API with the following definition: https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/voicemail",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/account-voicemail"
}
},
{
"name": "available-numbers",
"description": "This service lists phone numbers that are available for purchase through Phone.com.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/available-phone-numbers"
}
},
{
"name": "number-regions",
"description": "This service shows the quantities of phone numbers available for purchase, using region-based grouping.",
"externalDocs": {
"description": "Find out more",
"url": "https://apidocs.phone.com/docs/available-phone-number-regions"
}
}
],
"securityDefinitions": {
"apiKey": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
},
"schemes": [
"https"
],
"paths": {
"/ping": {
"get": {
"tags": [
"default"
],
"summary": "The default API command",
"description": "The default API command",
"operationId": "ping",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/PingResponse"
}
},
"404": {
"$ref": "#/responses/response404"
}
},
"security": [
{
"apiKey": []
}
]
}
},
"/oauth/access-token": {
"get": {
"tags": [
"oauth"
],
"summary": "Retrieve details of an access token, such as scope, expiration and extension ID.",
"description": "Retrieve details of an access token, such as scope, expiration and extension ID. Voip ID will be returned as well if scope contains account-owner scope.",
"operationId": "get-oauth-access-token",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/GetOauthAccessToken"
}
},
"401": {
"$ref": "#/responses/response401"
}
},
"security": [
{
"apiKey": []
}
]
},
"post": {
"security": [
{
"apiKey": []
}
],
"tags": [
"oauth"
],
"summary": "To create an access token via the /oauth/access-token API, an API user may choose any one of the grant types it supports: Authorization Code Grant, Client Credential Grant, Password Credential Grant or Refresh Token Grant.",
"description": "To create an access token via the /oauth/access-token API, an API user may choose any one of the grant types it supports: Authorization Code Grant, Client Credential Grant, Password Credential Grant or Refresh Token Grant. For Authorization Code Grant, the input parameter 'code' is generated via the Create Authorization API. NOTE: The Create Access Token API now accepts requests in query string format as well as JSON body format. See OAuth for more details on how to obtain client id and client secret to create an access token at real time.",
"operationId": "create-oauth-access-token",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "data",
"in": "body",
"description": "Oauth data",
"required": false,
"schema": {
"$ref": "#/definitions/CreateOauthParams"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/OauthAccessToken"
}
},
"401": {
"$ref": "#/responses/response401"
},
"403": {
"$ref": "#/responses/response403"
},
"422": {
"$ref": "#/responses/response422"
}
}
}
},
"/oauth/authorization": {
"get": {
"tags": [
"oauth"
],
"summary": "Create Authorization Code or Access Token.",
"description": "Create Authorization Code or Access Token. The /oauth/authorization API supports Authorization Grant and Implicit Grant. In Authorization Grant, this API returns a code (response_type=code) for clients implemented in a browser using a scripting language such as JavaScript. Users may then use the code via the Create Access Token API to create an access token. The Implicit Grant is a simplified authorization code flow. In the implicit flow, instead of issuing the client an authorization code, the client is issued an access token (response_type=token) directly. See OAuth for more details on how to obtain client id and client secret to create authorization code access token at real time.",
"operationId": "create-oauth-authorization",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "client_id",
"in": "query",
"description": "Client ID",
"required": true,
"type": "string"
},
{
"name": "response_type",
"in": "query",
"description": "'token' for Implicit Grant; 'code' for Authorization Code Grant",
"required": true,
"type": "string"
},
{
"name": "scope",
"in": "query",
"description": "account-owner, extension-user and/or methods:ALL, separated by space (%20)",
"required": true,
"type": "string"
},
{
"name": "redirect_uri",
"in": "query",
"description": "The URL where the response data of this API is redirected to",
"required": true,
"type": "string"
}
],
"responses": {
"302": {
"description": "http://localhost/?code=mRxUuwgl0Xgjg8fIjweikoJPb1aaMBU8bt706656~6&state="
},
"401": {
"$ref": "#/responses/response401"
}
},
"security": [
{
"apiKey": []
}
]
}
},
"/accounts": {
"get": {
"tags": [
"accounts"
],
"summary": "Get a list of accounts visible to the authenticated user or client.",
"description": "Get a list of accounts visible to the authenticated user or client. In most cases, there will only be one such account. See Accounts for more info on the properties.",
"operationId": "list-accounts",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/filterIdParam"
},
{
"$ref": "#/parameters/sortIdParam"
},
{
"$ref": "#/parameters/limitParam"
},
{
"$ref": "#/parameters/offsetParam"
},
{
"$ref": "#/parameters/fieldsParam"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ListAccounts"
}
},
"401": {
"$ref": "#/responses/response401"
}
},
"security": [
{
"apiKey": []
}
]
}
},
"/accounts/{account_id}": {
"get": {
"tags": [
"accounts"
],
"summary": "Retrieve details of an individual account",
"description": "Retrieve details of an individual account. See Accounts for more info on the properties.",
"operationId": "get-account",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/accountIdParam"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/AccountFull"
}
},
"401": {
"$ref": "#/responses/response401"
},
"403": {
"$ref": "#/responses/response403"
}
},
"security": [
{
"apiKey": []
}
]
}
},
"/accounts/{account_id}/applications": {
"get": {
"security": [
{
"apiKey": []
}
],
"tags": [
"applications"
],
"summary": "This service lists the Applications on a given account",
"description": "Show details of an individual Application on a given account.",
"operationId": "list-account-applications",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/accountIdParam"
},
{
"$ref": "#/parameters/filterIdParam"
},
{
"$ref": "#/parameters/filterNameParam"
},
{
"$ref": "#/parameters/sortIdParam"
},
{
"$ref": "#/parameters/sortNameParam"
},
{
"$ref": "#/parameters/limitParam"
},
{
"$ref": "#/parameters/offsetParam"
},
{
"$ref": "#/parameters/fieldsParam"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ListApplications"
}
},
"401": {
"$ref": "#/responses/response401"
},
"403": {
"$ref": "#/responses/response403"
}
}
}
},
"/accounts/{account_id}/applications/{application_id}": {
"get": {
"security": [
{
"apiKey": []
}
],
"tags": [
"applications"
],
"summary": "Show details of an individual Application on a given account.",
"description": "Show details of an individual Application on a given account.",
"operationId": "get-account-application",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/accountIdParam"
},
{
"name": "application_id",
"in": "path",
"description": "Application ID",
"required": true,
"type": "integer"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ApplicationFull"
}
},
"401": {
"$ref": "#/responses/response401"
},
"403": {
"$ref": "#/responses/response403"
},
"404": {
"$ref": "#/responses/response404"
}
}
}
},
"/accounts/{account_id}/calls": {
"post": {
"security": [
{
"apiKey": []
}
],
"tags": [
"calls"
],
"summary": "Make a phone call",
"description": "Make a phone call. See Calls for more details and how to setup caller id's. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Calls API with the following definition: POST https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/calls",
"operationId": "create-account-call",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/accountIdParam"
},
{
"name": "data",
"in": "body",
"description": "Call data",
"required": false,
"schema": {
"$ref": "#/definitions/CreateCallParams"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/CallFull"
}
},
"401": {
"$ref": "#/responses/response401"
},
"403": {
"$ref": "#/responses/response403"
},
"422": {
"$ref": "#/responses/response422"
}
}
}
},
"/accounts/{account_id}/call-logs": {
"get": {
"tags": [
"call-logs"
],
"summary": "Get a list of call details associated with your account",
"description": "Get a list of call details associated with your account. See Call Logs for more detail.",
"operationId": "list-account-call-logs",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/accountIdParam"
},
{
"$ref": "#/parameters/filterIdParam"
},
{
"$ref": "#/parameters/filterStartTimeParam"
},
{
"$ref": "#/parameters/filterCreatedAtCallLogsParam"
},
{
"$ref": "#/parameters/filterDirectionCallLogs"
},
{
"$ref": "#/parameters/filterCalledNumber"
},
{
"$ref": "#/parameters/filterType"
},
{
"$ref": "#/parameters/filterExtension"
},
{
"$ref": "#/parameters/sortIdParam"
},
{
"$ref": "#/parameters/sortStartTime"
},
{
"$ref": "#/parameters/sortCreatedAtCallLogs"
},
{
"$ref": "#/parameters/limitParam"
},
{
"$ref": "#/parameters/offsetParam"
},
{
"$ref": "#/parameters/fieldsParam"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ListCallLogs"
}
},
"401": {
"$ref": "#/responses/response401"
},
"403": {
"$ref": "#/responses/response403"
}
},
"security": [
{
"apiKey": []
}
]
}
},
"/accounts/{account_id}/call-logs/{call_id}": {
"get": {
"tags": [
"call-logs"
],
"summary": "Show details of an individual Call Log entry",
"description": "Show details of an individual Call Log entry. See Call Logs for more detail.",
"operationId": "get-account-call-logs",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/accountIdParam"
},
{
"$ref": "#/parameters/callIdParam"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/CallLogFull"
}
},
"401": {
"$ref": "#/responses/response401"
},
"403": {
"$ref": "#/responses/response403"
},
"404": {
"$ref": "#/responses/response404"
}
},
"security": [
{
"apiKey": []
}
]
}
},
"/accounts/{account_id}/devices": {
"get": {
"security": [
{
"apiKey": []
}
],
"tags": [
"devices"
],
"summary": "Get a list of VoIP devices associated with your account.",
"description": "Get a list of VoIP devices associated with your account. See Devices for more detail.",
"operationId": "list-account-devices",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/accountIdParam"
},
{
"$ref": "#/parameters/filterIdParam"
},
{
"$ref": "#/parameters/filterNameParam"
},
{
"$ref": "#/parameters/sortIdParam"
},
{
"$ref": "#/parameters/sortNameParam"
},
{
"$ref": "#/parameters/limitParam"
},
{
"$ref": "#/parameters/offsetParam"
},
{
"$ref": "#/parameters/fieldsParam"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ListDevices"
}
},
"401": {
"$ref": "#/responses/response401"
},
"403": {
"$ref": "#/responses/response403"
}
}
},
"post": {
"security": [
{
"apiKey": []
}
],
"tags": [
"devices"
],
"summary": "Register a generic VoIP device.",
"description": "Register a generic VoIP device. See Devices for more detail.",
"operationId": "create-account-device",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/accountIdParam"
},
{
"name": "data",
"in": "body",
"description": "Device data",
"required": false,
"schema": {
"$ref": "#/definitions/CreateDeviceParams"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/DeviceFull"
}
},
"401": {
"$ref": "#/responses/response401"
},
"403": {
"$ref": "#/responses/response403"
},
"422": {
"$ref": "#/responses/response422"
}
}
}
},
"/accounts/{account_id}/devices/{device_id}": {
"get": {
"security": [
{
"apiKey": []
}
],
"tags": [
"devices"
],
"summary": "Show details of an individual VoIP device.",
"description": "Show details of an individual VoIP device. See Devices for more detail.",
"operationId": "get-account-device",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/accountIdParam"
},
{
"$ref": "#/parameters/deviceIdParam"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/DeviceFull"
}
},
"401": {
"$ref": "#/responses/response401"
},
"403": {
"$ref": "#/responses/response403"
},
"404": {
"$ref": "#/responses/response404"
}
}
},
"put": {
"security": [
{
"apiKey": []
}
],
"tags": [
"devices"
],
"summary": "Update the details of an individual VoIP device.",
"description": "Update the details of an individual VoIP device. See Devices for more detail.",
"operationId": "replace-account-device",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/accountIdParam"
},
{
"$ref": "#/parameters/deviceIdParam"
},
{
"name": "data",
"in": "body",
"description": "Device data",
"required": false,
"schema": {
"$ref": "#/definitions/CreateDeviceParams"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/DeviceFull"
}
},
"401": {
"$ref": "#/responses/response401"
},
"403": {
"$ref": "#/responses/response403"