bandwidth-sdk 13.1.4 → 14.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/bandwidth.yml CHANGED
@@ -230,8 +230,6 @@ paths:
230
230
  '500':
231
231
  $ref: '#/components/responses/messagingInternalServerError'
232
232
  callbacks:
233
- inboundCallback:
234
- $ref: '#/components/callbacks/inboundCallback'
235
233
  statusCallback:
236
234
  $ref: '#/components/callbacks/statusCallback'
237
235
  servers: *ref_0
@@ -1332,6 +1330,21 @@ paths:
1332
1330
  servers: *ref_3
1333
1331
  components:
1334
1332
  schemas:
1333
+ callbackTypeEnum:
1334
+ type: string
1335
+ enum:
1336
+ - message-received
1337
+ - message-sending
1338
+ - message-delivered
1339
+ - message-failed
1340
+ description: >
1341
+ Indicates the type of the callback:
1342
+
1343
+ - `message-received` for inbound callbacks.
1344
+
1345
+ - One of `message-sending`, `message-delivered`, `message-failed` for
1346
+ status callbacks.
1347
+ example: message-delivered
1335
1348
  priorityEnum:
1336
1349
  type: string
1337
1350
  description: |-
@@ -1574,7 +1587,7 @@ components:
1574
1587
  type: string
1575
1588
  format: date-time
1576
1589
  description: The datetime stamp of the message in ISO 8601
1577
- example: 2022-09-14T18:20:16.000Z
1590
+ example: 2024-12-02T20:15:57.278Z
1578
1591
  segmentCount:
1579
1592
  type: integer
1580
1593
  description: >-
@@ -1695,288 +1708,38 @@ components:
1695
1708
 
1696
1709
  Not supported on MMS.
1697
1710
  example: '2021-02-01T11:29:18-05:00'
1698
- inboundMessageCallback:
1699
- description: Inbound Message Callback
1700
- type: object
1701
- properties:
1702
- time:
1703
- type: string
1704
- format: date-time
1705
- example: 2016-09-14T18:20:16.000Z
1706
- type:
1707
- type: string
1708
- example: message-received
1709
- to:
1710
- type: string
1711
- example: '+15552223333'
1712
- description:
1713
- type: string
1714
- example: Incoming message received
1715
- message:
1716
- $ref: '#/components/schemas/inboundMessageCallbackMessage'
1717
- required:
1718
- - time
1719
- - type
1720
- - to
1721
- - description
1722
- - message
1723
- inboundMessageCallbackMessage:
1724
- description: Inbound Message Callback Message Schema
1725
- type: object
1726
- properties:
1727
- id:
1728
- type: string
1729
- example: 1661365814859loidf7mcwd4qacn7
1730
- owner:
1731
- type: string
1732
- example: '+15553332222'
1733
- applicationId:
1734
- type: string
1735
- example: 93de2206-9669-4e07-948d-329f4b722ee2
1736
- time:
1737
- type: string
1738
- format: date-time
1739
- example: 2016-09-14T18:20:16.000Z
1740
- segmentCount:
1741
- type: integer
1742
- example: 1
1743
- direction:
1744
- $ref: '#/components/schemas/messageDirectionEnum'
1745
- to:
1746
- uniqueItems: true
1747
- type: array
1748
- items:
1749
- type: string
1750
- example:
1751
- - '+15552223333'
1752
- from:
1753
- type: string
1754
- example: '+15553332222'
1755
- text:
1756
- type: string
1757
- example: Hello world
1758
- tag:
1759
- type: string
1760
- example: custom string
1761
- media:
1762
- type: array
1763
- items:
1764
- type: string
1765
- format: uri
1766
- example:
1767
- - https://dev.bandwidth.com/images/bandwidth-logo.png
1768
- - https://dev.bandwidth.com/images/github_logo.png
1769
- priority:
1770
- $ref: '#/components/schemas/priorityEnum'
1771
- required:
1772
- - id
1773
- - owner
1774
- - applicationId
1775
- - time
1776
- - segmentCount
1777
- - direction
1778
- - to
1779
- - from
1780
- - text
1781
- messageSendingCallback:
1782
- type: object
1783
- description: Message Sending Callback
1784
- properties:
1785
- time:
1786
- type: string
1787
- format: date-time
1788
- example: 2016-09-14T18:20:16.000Z
1789
- type:
1790
- type: string
1791
- example: message-sending
1792
- to:
1793
- type: string
1794
- example: '+15552223333'
1795
- description:
1796
- type: string
1797
- example: Message is sending to carrier
1798
- message:
1799
- $ref: '#/components/schemas/messageSendingCallbackMessage'
1800
- required:
1801
- - time
1802
- - type
1803
- - to
1804
- - description
1805
- - message
1806
- messageSendingCallbackMessage:
1807
- description: Message Sending Callback Message Schema
1808
- type: object
1809
- properties:
1810
- id:
1811
- type: string
1812
- example: 1661365814859loidf7mcwd4qacn7
1813
- owner:
1814
- type: string
1815
- example: '+15553332222'
1816
- applicationId:
1817
- type: string
1818
- example: 93de2206-9669-4e07-948d-329f4b722ee2
1819
- time:
1820
- type: string
1821
- format: date-time
1822
- example: 2016-09-14T18:20:16.000Z
1823
- segmentCount:
1824
- type: integer
1825
- example: 1
1826
- direction:
1827
- $ref: '#/components/schemas/messageDirectionEnum'
1828
- to:
1829
- uniqueItems: true
1830
- type: array
1831
- items:
1832
- type: string
1833
- example:
1834
- - '+15552223333'
1835
- from:
1836
- type: string
1837
- example: '+15553332222'
1838
- text:
1839
- type: string
1840
- example: Hello world
1841
- tag:
1842
- type: string
1843
- example: custom string
1844
- media:
1845
- type: array
1846
- items:
1847
- type: string
1848
- format: uri
1849
- example:
1850
- - https://dev.bandwidth.com/images/bandwidth-logo.png
1851
- - https://dev.bandwidth.com/images/github_logo.png
1852
- priority:
1853
- $ref: '#/components/schemas/priorityEnum'
1854
- required:
1855
- - id
1856
- - owner
1857
- - applicationId
1858
- - time
1859
- - segmentCount
1860
- - direction
1861
- - to
1862
- - from
1863
- - text
1864
- - media
1865
- messageDeliveredCallback:
1866
- description: Message Delivered Callback
1867
- type: object
1868
- properties:
1869
- time:
1870
- type: string
1871
- format: date-time
1872
- example: 2016-09-14T18:20:16.000Z
1873
- type:
1874
- type: string
1875
- example: message-delivered
1876
- to:
1877
- type: string
1878
- example: '+15552223333'
1879
- description:
1880
- type: string
1881
- example: Message delivered to carrier.
1882
- message:
1883
- $ref: '#/components/schemas/messageDeliveredCallbackMessage'
1884
- required:
1885
- - time
1886
- - type
1887
- - to
1888
- - description
1889
- - message
1890
- messageDeliveredCallbackMessage:
1891
- description: Message Delivered Callback Message Schema
1892
- type: object
1893
- properties:
1894
- id:
1895
- type: string
1896
- example: 1661365814859loidf7mcwd4qacn7
1897
- owner:
1898
- type: string
1899
- example: '+15553332222'
1900
- applicationId:
1901
- type: string
1902
- example: 93de2206-9669-4e07-948d-329f4b722ee2
1903
- time:
1904
- type: string
1905
- format: date-time
1906
- example: 2016-09-14T18:20:16.000Z
1907
- segmentCount:
1908
- type: integer
1909
- example: 1
1910
- direction:
1911
- $ref: '#/components/schemas/messageDirectionEnum'
1912
- to:
1913
- uniqueItems: true
1914
- type: array
1915
- items:
1916
- type: string
1917
- example:
1918
- - '+15552223333'
1919
- from:
1920
- type: string
1921
- example: '+15553332222'
1922
- text:
1923
- type: string
1924
- example: Hello world
1925
- tag:
1926
- type: string
1927
- example: custom string
1928
- media:
1929
- type: array
1930
- items:
1931
- type: string
1932
- format: uri
1933
- example:
1934
- - https://dev.bandwidth.com/images/bandwidth-logo.png
1935
- - https://dev.bandwidth.com/images/github_logo.png
1936
- priority:
1937
- $ref: '#/components/schemas/priorityEnum'
1938
- required:
1939
- - id
1940
- - owner
1941
- - applicationId
1942
- - time
1943
- - segmentCount
1944
- - direction
1945
- - to
1946
- - from
1947
- - text
1948
- - tag
1949
- messageFailedCallback:
1950
- description: Message Failed Callback
1711
+ messageCallback:
1712
+ description: Message Callback Schema
1951
1713
  type: object
1952
1714
  properties:
1953
1715
  time:
1954
1716
  type: string
1955
1717
  format: date-time
1956
- example: 2016-09-14T18:20:16.000Z
1718
+ example: 2024-12-02T20:15:57.278Z
1957
1719
  type:
1958
- type: string
1959
- example: message-failed
1720
+ $ref: '#/components/schemas/callbackTypeEnum'
1960
1721
  to:
1961
1722
  type: string
1962
1723
  example: '+15552223333'
1963
1724
  description:
1964
1725
  type: string
1726
+ description: A detailed description of the event described by the callback.
1965
1727
  example: rejected-unallocated-from-number
1966
1728
  message:
1967
- $ref: '#/components/schemas/messageFailedCallbackMessage'
1729
+ $ref: '#/components/schemas/messageCallbackMessage'
1968
1730
  errorCode:
1969
1731
  type: integer
1970
- example: 9902
1732
+ description: Optional error code, applicable only when type is `message-failed`.
1733
+ nullable: true
1734
+ example: 4405
1971
1735
  required:
1972
1736
  - time
1973
1737
  - type
1974
1738
  - to
1975
1739
  - description
1976
1740
  - message
1977
- - errorCode
1978
- messageFailedCallbackMessage:
1979
- description: Message Failed Callback Message Schema
1741
+ messageCallbackMessage:
1742
+ description: Message payload schema within a MessageCallback
1980
1743
  type: object
1981
1744
  properties:
1982
1745
  id:
@@ -1991,7 +1754,7 @@ components:
1991
1754
  time:
1992
1755
  type: string
1993
1756
  format: date-time
1994
- example: 2016-09-14T18:20:16.000Z
1757
+ example: 2024-12-02T20:15:57.666Z
1995
1758
  segmentCount:
1996
1759
  type: integer
1997
1760
  example: 1
@@ -2015,6 +1778,8 @@ components:
2015
1778
  example: custom string
2016
1779
  media:
2017
1780
  type: array
1781
+ description: Optional media, applicable only for mms
1782
+ nullable: true
2018
1783
  items:
2019
1784
  type: string
2020
1785
  format: uri
@@ -2033,7 +1798,6 @@ components:
2033
1798
  - to
2034
1799
  - from
2035
1800
  - text
2036
- - tag
2037
1801
  callbackMethodEnum:
2038
1802
  type: string
2039
1803
  nullable: true
@@ -5463,34 +5227,345 @@ components:
5463
5227
  type: string
5464
5228
  description: The phone number lookup request ID from Bandwidth.
5465
5229
  example: 004223a0-8b17-41b1-bf81-20732adf5590
5466
- requestBodies:
5467
- createMessageRequest:
5468
- content:
5469
- application/json:
5470
- schema:
5471
- $ref: '#/components/schemas/messageRequest'
5472
- required: true
5473
- uploadMediaRequest:
5474
- content:
5475
- application/json:
5476
- schema:
5477
- type: string
5478
- format: binary
5479
- application/ogg:
5480
- schema:
5481
- type: string
5482
- format: binary
5483
- application/pdf:
5484
- schema:
5485
- type: string
5486
- format: binary
5487
- application/rtf:
5488
- schema:
5489
- type: string
5490
- format: binary
5491
- application/zip:
5492
- schema:
5493
- type: string
5230
+ examples:
5231
+ smsMessageReceivedCallbackExample:
5232
+ summary: An example of a sms message-received callback body.
5233
+ value:
5234
+ time: '2025-01-06T15:43:35.502180Z'
5235
+ type: message-received
5236
+ to: '+12345678902'
5237
+ description: Incoming message received
5238
+ message:
5239
+ id: 14762070468292kw2fuqty55yp2b2
5240
+ owner: '+12345678902'
5241
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
5242
+ time: '2025-01-06T15:43:34.000000Z'
5243
+ segmentCount: 1
5244
+ direction: in
5245
+ to:
5246
+ - '+12345678902'
5247
+ from: '+12345678901'
5248
+ text: Hey, check out this SMS!
5249
+ mmsMessageReceivedCallbackExample:
5250
+ summary: An example of a mms message-received callback body.
5251
+ value:
5252
+ time: '2024-09-14T18:20:45.160744Z'
5253
+ type: message-received
5254
+ to: '+12345678902'
5255
+ description: Incoming message received
5256
+ message:
5257
+ id: 14762070468292kw2fuqty55yp2b2
5258
+ owner: '+12345678902'
5259
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
5260
+ time: '2024-09-14T18:20:45.160744Z'
5261
+ segmentCount: 1
5262
+ direction: in
5263
+ to:
5264
+ - '+12345678902'
5265
+ - '+12345678903'
5266
+ from: '+12345678901'
5267
+ text: Hey, check out the MMS!
5268
+ media:
5269
+ - >-
5270
+ https://messaging.bandwidth.com/api/v2/users/9900902/media/14762070468292kw2fuqty55yp2b2/0/bw.png
5271
+ messageSendingCallbackExample:
5272
+ summary: An example of a message-sending callback body.
5273
+ value:
5274
+ time: '2024-06-25T18:42:36.979456Z'
5275
+ type: message-sending
5276
+ to: '+15554443333'
5277
+ description: Message is sending to carrier.
5278
+ message:
5279
+ id: 1593110555875xo7watq5px6rbe5d
5280
+ owner: '+15552221111'
5281
+ applicationId: cfd4fb83-7531-4acc-b471-42d0bb76a65c
5282
+ time: '2024-06-25T18:42:35.876906Z'
5283
+ segmentCount: 1
5284
+ direction: out
5285
+ to:
5286
+ - '+15554443333'
5287
+ from: '+15552221111'
5288
+ text: ''
5289
+ media:
5290
+ - https://dev.bandwidth.com/images/bandwidth-logo.png
5291
+ tag: your tag here
5292
+ smsMessageDeliveredCallbackExample:
5293
+ summary: An example of a sms message-delivered callback body.
5294
+ value:
5295
+ type: message-delivered
5296
+ time: '2024-09-14T18:20:11.160744Z'
5297
+ description: Message delivered to carrier.
5298
+ to: '+12345678902'
5299
+ message:
5300
+ id: 14762070468292kw2fuqty55yp2b2
5301
+ time: '2024-09-14T18:20:11.160744Z'
5302
+ to:
5303
+ - '+12345678902'
5304
+ from: '+12345678901'
5305
+ text: ''
5306
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
5307
+ owner: '+12345678902'
5308
+ direction: out
5309
+ segmentCount: 1
5310
+ mmsMessageDeliveredCallbackExample:
5311
+ summary: An example of a mms message-delivered callback body.
5312
+ value:
5313
+ type: message-delivered
5314
+ time: '2024-09-14T18:20:24.160544Z'
5315
+ description: Message delivered to carrier.
5316
+ to: '+12345678902'
5317
+ message:
5318
+ id: 14762070468292kw2fuqty55yp2b2
5319
+ time: '2024-09-14T18:20:24.160544Z'
5320
+ to:
5321
+ - '+12345678902'
5322
+ from: '+12345678901'
5323
+ text: ''
5324
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
5325
+ owner: '+12345678902'
5326
+ direction: out
5327
+ segmentCount: 1
5328
+ media:
5329
+ - https://dev.bandwidth.com/images/bandwidth-logo.png
5330
+ groupMmsMessageDeliveredCallbackExample:
5331
+ summary: An example of a group mms message-delivered callback body.
5332
+ value:
5333
+ type: message-delivered
5334
+ time: '2024-09-14T18:20:17.160544Z'
5335
+ description: Message delivered to carrier.
5336
+ to: '+12345678902'
5337
+ message:
5338
+ id: 14762070468292kw2fuqty55yp2b2
5339
+ time: '2024-09-14T18:20:17.160544Z'
5340
+ to:
5341
+ - '+12345678902'
5342
+ - '+12345678903'
5343
+ from: '+12345678901'
5344
+ text: ''
5345
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
5346
+ owner: '+12345678902'
5347
+ direction: out
5348
+ segmentCount: 1
5349
+ messageFailedCallbackExample:
5350
+ summary: An example of a message-failed callback body.
5351
+ value:
5352
+ type: message-failed
5353
+ time: '2024-12-18T16:51:27.704450Z'
5354
+ description: forbidden to country
5355
+ to: '+52345678903'
5356
+ errorCode: 4432
5357
+ message:
5358
+ id: 14762070468292kw2fuqty55yp2b2
5359
+ time: '2024-12-18T16:51:27.704450Z'
5360
+ to:
5361
+ - '+12345678902'
5362
+ - '+52345678903'
5363
+ from: '+12345678901'
5364
+ text: ''
5365
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
5366
+ media:
5367
+ - https://dev.bandwidth.com/images/bandwidth-logo.png
5368
+ owner: '+12345678901'
5369
+ direction: out
5370
+ segmentCount: 1
5371
+ createCallResponseExample:
5372
+ summary: Example of a createCall Response
5373
+ value:
5374
+ applicationId: 04e88489-df02-4e34-a0ee-27a91849555f
5375
+ accountId: '9900000'
5376
+ callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
5377
+ to: '+19195551234'
5378
+ from: '+19195554312'
5379
+ enqueuedTime: '2022-06-16T13:15:07.160Z'
5380
+ callUrl: >-
5381
+ https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
5382
+ callTimeout: 30
5383
+ callbackTimeout: 15
5384
+ tag: My custom tag value
5385
+ answerMethod: POST
5386
+ answerUrl: https://myServer.example/bandwidth/webhooks/answer
5387
+ answerFallbackMethod: POST
5388
+ answerFallbackUrl: https://myServer.example/bandwidth/webhooks/answerFallback
5389
+ disconnectMethod: POST
5390
+ disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect
5391
+ username: mySecretUsername
5392
+ password: '*****'
5393
+ fallbackUsername: mySecretUsername
5394
+ fallbackPassword: '*****'
5395
+ priority: 5
5396
+ listConferencesResponseExample:
5397
+ summary: Example of a listConferences Response
5398
+ value:
5399
+ - id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9
5400
+ name: my-conference-name
5401
+ createdTime: '2022-06-17T22:19:40.375Z'
5402
+ completedTime: '2022-06-17T22:20:00.000Z'
5403
+ conferenceEventUrl: https://myServer.example/bandwidth/webhooks/conferenceEvent
5404
+ conferenceEventMethod: POST
5405
+ tag: my custom tag
5406
+ voiceBadRequestErrorExample:
5407
+ summary: Example of a Bad Request (400) Error
5408
+ value:
5409
+ type: validation
5410
+ description: 'Invalid answerUrl: only http and https are allowed.'
5411
+ voiceUnauthorizedErrorExample:
5412
+ summary: Example of an Unauthorized (401) Error
5413
+ value:
5414
+ type: validation
5415
+ description: 'Invalid answerUrl: only http and https are allowed.'
5416
+ voiceForbiddenErrorExample:
5417
+ summary: Example of a Forbidden (403) Error
5418
+ value:
5419
+ type: validation
5420
+ description: 'Invalid answerUrl: only http and https are allowed.'
5421
+ voiceNotFoundErrorExample:
5422
+ summary: Example of a Not Found (404) Error
5423
+ value:
5424
+ type: validation
5425
+ description: 'Invalid answerUrl: only http and https are allowed.'
5426
+ voiceNotAllowedErrorExample:
5427
+ summary: Example of a Not Allowed (405) Error
5428
+ value:
5429
+ type: validation
5430
+ description: 'Invalid answerUrl: only http and https are allowed.'
5431
+ voiceConflictErrorExample:
5432
+ summary: Example of a Conflict (409) Error
5433
+ value:
5434
+ type: validation
5435
+ description: 'Invalid answerUrl: only http and https are allowed.'
5436
+ voiceUnsupportedMediaTypeErrorExample:
5437
+ summary: Example of an Unsupported Media Type (415) Error
5438
+ value:
5439
+ type: validation
5440
+ description: 'Invalid answerUrl: only http and https are allowed.'
5441
+ voiceTooManyRequestsErrorExample:
5442
+ summary: Example of a Too Many Requests (429) Error
5443
+ value:
5444
+ type: validation
5445
+ description: 'Invalid answerUrl: only http and https are allowed.'
5446
+ voiceInternalServerErrorExample:
5447
+ summary: Example of an Internal Server (500) Error
5448
+ value:
5449
+ type: validation
5450
+ description: 'Invalid answerUrl: only http and https are allowed.'
5451
+ singleNumberRequestExample:
5452
+ summary: Example Number Lookup Request for One Number
5453
+ value:
5454
+ tns:
5455
+ - '+19195551234'
5456
+ multipleNumberRequestExample:
5457
+ summary: Example Number Lookup Request for Multiple Numbers
5458
+ value:
5459
+ tns:
5460
+ - '+19195551234'
5461
+ - '+19195554321'
5462
+ lookupInProgressExample:
5463
+ summary: Example Lookup In Progress Response
5464
+ value:
5465
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
5466
+ status: IN_PROGRESS
5467
+ lookupFailedExample:
5468
+ summary: Example Lookup Failed Response
5469
+ value:
5470
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
5471
+ status: FAILED
5472
+ failedTelephoneNumbers:
5473
+ - '+191955512345'
5474
+ lookupSingleNumberCompleteExample:
5475
+ summary: Example Single Number Lookup Complete Response
5476
+ value:
5477
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
5478
+ status: COMPLETE
5479
+ result:
5480
+ - Response Code: 0
5481
+ Message: NOERROR
5482
+ E.164 Format: '+19195551234'
5483
+ Formatted: (919) 555-1234
5484
+ Country: US
5485
+ Line Type: Mobile
5486
+ Line Provider: Verizon Wireless
5487
+ Mobile Country Code: '310'
5488
+ Mobile Network Code: '010'
5489
+ lookupMultipleNumbersCompleteExample:
5490
+ summary: Example Multiple Numbers Lookup Complete Response
5491
+ value:
5492
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
5493
+ status: COMPLETE
5494
+ result:
5495
+ - Response Code: 0
5496
+ Message: NOERROR
5497
+ E.164 Format: '+19195551234'
5498
+ Formatted: (919) 555-1234
5499
+ Country: US
5500
+ Line Type: Mobile
5501
+ Line Provider: Verizon Wireless
5502
+ Mobile Country Code: '310'
5503
+ Mobile Network Code: '010'
5504
+ - Response Code: 0
5505
+ Message: NOERROR
5506
+ E.164 Format: '+19195554321'
5507
+ Formatted: (919) 555-4321
5508
+ Country: US
5509
+ Line Type: Mobile
5510
+ Line Provider: T-Mobile USA
5511
+ Mobile Country Code: '310'
5512
+ Mobile Network Code: '160'
5513
+ lookupMultipleNumbersPartialCompleteExample:
5514
+ summary: Example Multiple Numbers Lookup Partial Complete Response
5515
+ value:
5516
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
5517
+ status: PARTIAL_COMPLETE
5518
+ result:
5519
+ - Response Code: 0
5520
+ Message: NOERROR
5521
+ E.164 Format: '+19195551234'
5522
+ Formatted: (919) 555-1234
5523
+ Country: US
5524
+ Line Type: Mobile
5525
+ Line Provider: Verizon Wireless
5526
+ Mobile Country Code: '310'
5527
+ Mobile Network Code: '010'
5528
+ failedTelephoneNumbers:
5529
+ - '+191955512345'
5530
+ lookupSingleNumberCompleteNoInfoExample:
5531
+ summary: Example Single Number Lookup Complete with No Information Response
5532
+ value:
5533
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
5534
+ status: COMPLETE
5535
+ result:
5536
+ - Response Code: 3
5537
+ Message: NXDOMAIN
5538
+ E.164 Format: '+19195550000'
5539
+ Formatted: (919) 555-0000
5540
+ Country: US
5541
+ requestBodies:
5542
+ createMessageRequest:
5543
+ content:
5544
+ application/json:
5545
+ schema:
5546
+ $ref: '#/components/schemas/messageRequest'
5547
+ required: true
5548
+ uploadMediaRequest:
5549
+ content:
5550
+ application/json:
5551
+ schema:
5552
+ type: string
5553
+ format: binary
5554
+ application/ogg:
5555
+ schema:
5556
+ type: string
5557
+ format: binary
5558
+ application/pdf:
5559
+ schema:
5560
+ type: string
5561
+ format: binary
5562
+ application/rtf:
5563
+ schema:
5564
+ type: string
5565
+ format: binary
5566
+ application/zip:
5567
+ schema:
5568
+ type: string
5494
5569
  format: binary
5495
5570
  application/x-tar:
5496
5571
  schema:
@@ -5560,6 +5635,14 @@ components:
5560
5635
  schema:
5561
5636
  type: string
5562
5637
  format: binary
5638
+ image/heic:
5639
+ schema:
5640
+ type: string
5641
+ format: binary
5642
+ image/heif:
5643
+ schema:
5644
+ type: string
5645
+ format: binary
5563
5646
  image/jpeg:
5564
5647
  schema:
5565
5648
  type: string
@@ -5600,6 +5683,10 @@ components:
5600
5683
  schema:
5601
5684
  type: string
5602
5685
  format: binary
5686
+ text/html:
5687
+ schema:
5688
+ type: string
5689
+ format: binary
5603
5690
  text/plain:
5604
5691
  schema:
5605
5692
  type: string
@@ -5648,6 +5735,10 @@ components:
5648
5735
  schema:
5649
5736
  type: string
5650
5737
  format: binary
5738
+ video/x-flv:
5739
+ schema:
5740
+ type: string
5741
+ format: binary
5651
5742
  required: true
5652
5743
  createCallRequest:
5653
5744
  description: JSON object containing information to create an outbound call
@@ -5770,11 +5861,22 @@ components:
5770
5861
  post:
5771
5862
  requestBody:
5772
5863
  required: true
5773
- description: Inbound Message Callback Payload
5864
+ description: >
5865
+ <p>This Inbound Message Webhook is an envelope containing a
5866
+ received (MO) message to your message-enabled Bandwidth telephone
5867
+ number. The payload type will always indicate "message-received".
5868
+
5869
+ </p><p>Please visit <a
5870
+ href='/docs/messaging/webhooks/'>Webhooks</a></p>
5774
5871
  content:
5775
5872
  application/json:
5776
5873
  schema:
5777
- $ref: '#/components/schemas/inboundMessageCallback'
5874
+ $ref: '#/components/schemas/messageCallback'
5875
+ examples:
5876
+ smsMessageReceivedCallback:
5877
+ $ref: '#/components/examples/smsMessageReceivedCallbackExample'
5878
+ mmsMessageReceivedCallback:
5879
+ $ref: '#/components/examples/mmsMessageReceivedCallbackExample'
5778
5880
  responses:
5779
5881
  '200':
5780
5882
  description: OK
@@ -5783,186 +5885,31 @@ components:
5783
5885
  post:
5784
5886
  requestBody:
5785
5887
  required: true
5786
- description: Status Callback Payload
5888
+ description: >
5889
+ <p>This Outbound Message Webhook is an envelope containing status
5890
+ information regarding a message sent (MT) from your
5891
+ message-enabled Bandwidth telephone number. The payload type will
5892
+ be one of "message-sending", "message-delivered", or
5893
+ "message-failed".
5894
+
5895
+ </p><p>Please visit <a
5896
+ href='/docs/messaging/webhooks/'>Webhooks</a></p>
5787
5897
  content:
5788
5898
  application/json:
5789
5899
  schema:
5790
- type: object
5791
- oneOf:
5792
- - $ref: '#/components/schemas/messageSendingCallback'
5793
- - $ref: '#/components/schemas/messageDeliveredCallback'
5794
- - $ref: '#/components/schemas/messageFailedCallback'
5900
+ $ref: '#/components/schemas/messageCallback'
5901
+ examples:
5902
+ messageSendingCallback:
5903
+ $ref: '#/components/examples/messageSendingCallbackExample'
5904
+ smsMessageDeliveredCallback:
5905
+ $ref: '#/components/examples/smsMessageDeliveredCallbackExample'
5906
+ mmsMessageDeliveredCallback:
5907
+ $ref: '#/components/examples/mmsMessageDeliveredCallbackExample'
5908
+ groupMmsMessageDeliveredCallback:
5909
+ $ref: >-
5910
+ #/components/examples/groupMmsMessageDeliveredCallbackExample
5911
+ messageFailedCallback:
5912
+ $ref: '#/components/examples/messageFailedCallbackExample'
5795
5913
  responses:
5796
5914
  '200':
5797
5915
  description: OK
5798
- examples:
5799
- createCallResponseExample:
5800
- summary: Example of a createCall Response
5801
- value:
5802
- applicationId: 04e88489-df02-4e34-a0ee-27a91849555f
5803
- accountId: '9900000'
5804
- callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
5805
- to: '+19195551234'
5806
- from: '+19195554312'
5807
- enqueuedTime: '2022-06-16T13:15:07.160Z'
5808
- callUrl: >-
5809
- https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
5810
- callTimeout: 30
5811
- callbackTimeout: 15
5812
- tag: My custom tag value
5813
- answerMethod: POST
5814
- answerUrl: https://myServer.example/bandwidth/webhooks/answer
5815
- answerFallbackMethod: POST
5816
- answerFallbackUrl: https://myServer.example/bandwidth/webhooks/answerFallback
5817
- disconnectMethod: POST
5818
- disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect
5819
- username: mySecretUsername
5820
- password: '*****'
5821
- fallbackUsername: mySecretUsername
5822
- fallbackPassword: '*****'
5823
- priority: 5
5824
- listConferencesResponseExample:
5825
- summary: Example of a listConferences Response
5826
- value:
5827
- - id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9
5828
- name: my-conference-name
5829
- createdTime: '2022-06-17T22:19:40.375Z'
5830
- completedTime: '2022-06-17T22:20:00.000Z'
5831
- conferenceEventUrl: https://myServer.example/bandwidth/webhooks/conferenceEvent
5832
- conferenceEventMethod: POST
5833
- tag: my custom tag
5834
- voiceBadRequestErrorExample:
5835
- summary: Example of a Bad Request (400) Error
5836
- value:
5837
- type: validation
5838
- description: 'Invalid answerUrl: only http and https are allowed.'
5839
- voiceUnauthorizedErrorExample:
5840
- summary: Example of an Unauthorized (401) Error
5841
- value:
5842
- type: validation
5843
- description: 'Invalid answerUrl: only http and https are allowed.'
5844
- voiceForbiddenErrorExample:
5845
- summary: Example of a Forbidden (403) Error
5846
- value:
5847
- type: validation
5848
- description: 'Invalid answerUrl: only http and https are allowed.'
5849
- voiceNotFoundErrorExample:
5850
- summary: Example of a Not Found (404) Error
5851
- value:
5852
- type: validation
5853
- description: 'Invalid answerUrl: only http and https are allowed.'
5854
- voiceNotAllowedErrorExample:
5855
- summary: Example of a Not Allowed (405) Error
5856
- value:
5857
- type: validation
5858
- description: 'Invalid answerUrl: only http and https are allowed.'
5859
- voiceConflictErrorExample:
5860
- summary: Example of a Conflict (409) Error
5861
- value:
5862
- type: validation
5863
- description: 'Invalid answerUrl: only http and https are allowed.'
5864
- voiceUnsupportedMediaTypeErrorExample:
5865
- summary: Example of an Unsupported Media Type (415) Error
5866
- value:
5867
- type: validation
5868
- description: 'Invalid answerUrl: only http and https are allowed.'
5869
- voiceTooManyRequestsErrorExample:
5870
- summary: Example of a Too Many Requests (429) Error
5871
- value:
5872
- type: validation
5873
- description: 'Invalid answerUrl: only http and https are allowed.'
5874
- voiceInternalServerErrorExample:
5875
- summary: Example of an Internal Server (500) Error
5876
- value:
5877
- type: validation
5878
- description: 'Invalid answerUrl: only http and https are allowed.'
5879
- singleNumberRequestExample:
5880
- summary: Example Number Lookup Request for One Number
5881
- value:
5882
- tns:
5883
- - '+19195551234'
5884
- multipleNumberRequestExample:
5885
- summary: Example Number Lookup Request for Multiple Numbers
5886
- value:
5887
- tns:
5888
- - '+19195551234'
5889
- - '+19195554321'
5890
- lookupInProgressExample:
5891
- summary: Example Lookup In Progress Response
5892
- value:
5893
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
5894
- status: IN_PROGRESS
5895
- lookupFailedExample:
5896
- summary: Example Lookup Failed Response
5897
- value:
5898
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
5899
- status: FAILED
5900
- failedTelephoneNumbers:
5901
- - '+191955512345'
5902
- lookupSingleNumberCompleteExample:
5903
- summary: Example Single Number Lookup Complete Response
5904
- value:
5905
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
5906
- status: COMPLETE
5907
- result:
5908
- - Response Code: 0
5909
- Message: NOERROR
5910
- E.164 Format: '+19195551234'
5911
- Formatted: (919) 555-1234
5912
- Country: US
5913
- Line Type: Mobile
5914
- Line Provider: Verizon Wireless
5915
- Mobile Country Code: '310'
5916
- Mobile Network Code: '010'
5917
- lookupMultipleNumbersCompleteExample:
5918
- summary: Example Multiple Numbers Lookup Complete Response
5919
- value:
5920
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
5921
- status: COMPLETE
5922
- result:
5923
- - Response Code: 0
5924
- Message: NOERROR
5925
- E.164 Format: '+19195551234'
5926
- Formatted: (919) 555-1234
5927
- Country: US
5928
- Line Type: Mobile
5929
- Line Provider: Verizon Wireless
5930
- Mobile Country Code: '310'
5931
- Mobile Network Code: '010'
5932
- - Response Code: 0
5933
- Message: NOERROR
5934
- E.164 Format: '+19195554321'
5935
- Formatted: (919) 555-4321
5936
- Country: US
5937
- Line Type: Mobile
5938
- Line Provider: T-Mobile USA
5939
- Mobile Country Code: '310'
5940
- Mobile Network Code: '160'
5941
- lookupMultipleNumbersPartialCompleteExample:
5942
- summary: Example Multiple Numbers Lookup Partial Complete Response
5943
- value:
5944
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
5945
- status: PARTIAL_COMPLETE
5946
- result:
5947
- - Response Code: 0
5948
- Message: NOERROR
5949
- E.164 Format: '+19195551234'
5950
- Formatted: (919) 555-1234
5951
- Country: US
5952
- Line Type: Mobile
5953
- Line Provider: Verizon Wireless
5954
- Mobile Country Code: '310'
5955
- Mobile Network Code: '010'
5956
- failedTelephoneNumbers:
5957
- - '+191955512345'
5958
- lookupSingleNumberCompleteNoInfoExample:
5959
- summary: Example Single Number Lookup Complete with No Information Response
5960
- value:
5961
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
5962
- status: COMPLETE
5963
- result:
5964
- - Response Code: 3
5965
- Message: NXDOMAIN
5966
- E.164 Format: '+19195550000'
5967
- Formatted: (919) 555-0000
5968
- Country: US