bandwidth-sdk 13.1.4 → 14.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +15 -12
  3. data/README.md +45 -18
  4. data/bandwidth-sdk.gemspec +1 -1
  5. data/bandwidth.yml +1638 -589
  6. data/coverage/.last_run.json +1 -1
  7. data/coverage/.resultset.json +1388 -420
  8. data/coverage/index.html +20846 -10460
  9. data/custom_templates/README.mustache +6 -6
  10. data/custom_templates/gemspec.mustache +1 -1
  11. data/docs/AdditionalDenialReason.md +22 -0
  12. data/docs/Address.md +30 -0
  13. data/docs/CallbackTypeEnum.md +15 -0
  14. data/docs/Contact.md +24 -0
  15. data/docs/Error.md +22 -0
  16. data/docs/FailureWebhook.md +28 -0
  17. data/docs/LinksObject.md +24 -0
  18. data/docs/MediaApi.md +1 -1
  19. data/docs/Message.md +1 -1
  20. data/docs/MessageCallback.md +28 -0
  21. data/docs/MessageCallbackMessage.md +40 -0
  22. data/docs/OptInWorkflow.md +20 -0
  23. data/docs/TelephoneNumber.md +18 -0
  24. data/docs/TfvBasicAuthentication.md +20 -0
  25. data/docs/TfvCallbackStatusEnum.md +15 -0
  26. data/docs/TfvError.md +22 -0
  27. data/docs/TfvStatus.md +32 -0
  28. data/docs/TfvStatusEnum.md +15 -0
  29. data/docs/TfvSubmissionInfo.md +34 -0
  30. data/docs/TfvSubmissionWrapper.md +18 -0
  31. data/docs/TollFreeVerificationApi.md +585 -0
  32. data/docs/VerificationDenialWebhook.md +32 -0
  33. data/docs/VerificationRequest.md +36 -0
  34. data/docs/VerificationUpdateRequest.md +34 -0
  35. data/docs/VerificationWebhook.md +24 -0
  36. data/docs/WebhookSubscription.md +30 -0
  37. data/docs/WebhookSubscriptionBasicAuthentication.md +20 -0
  38. data/docs/WebhookSubscriptionRequestSchema.md +22 -0
  39. data/docs/WebhookSubscriptionTypeEnum.md +15 -0
  40. data/docs/WebhookSubscriptionsListBody.md +22 -0
  41. data/lib/bandwidth-sdk/api/media_api.rb +1 -1
  42. data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +614 -0
  43. data/lib/bandwidth-sdk/configuration.rb +48 -0
  44. data/lib/bandwidth-sdk/models/additional_denial_reason.rb +254 -0
  45. data/lib/bandwidth-sdk/models/address.rb +501 -0
  46. data/lib/bandwidth-sdk/models/callback_type_enum.rb +42 -0
  47. data/lib/bandwidth-sdk/models/contact.rb +393 -0
  48. data/lib/bandwidth-sdk/models/error.rb +232 -0
  49. data/lib/bandwidth-sdk/models/failure_webhook.rb +304 -0
  50. data/lib/bandwidth-sdk/models/{transcription_metadata.rb → links_object.rb} +34 -35
  51. data/lib/bandwidth-sdk/models/{message_failed_callback.rb → message_callback.rb} +31 -13
  52. data/lib/bandwidth-sdk/models/{inbound_message_callback_message.rb → message_callback_message.rb} +6 -4
  53. data/lib/bandwidth-sdk/models/{inbound_message_callback.rb → opt_in_workflow.rb} +42 -61
  54. data/lib/bandwidth-sdk/models/telephone_number.rb +213 -0
  55. data/lib/bandwidth-sdk/models/{message_delivered_callback.rb → tfv_basic_authentication.rb} +58 -69
  56. data/lib/bandwidth-sdk/models/tfv_callback_status_enum.rb +40 -0
  57. data/lib/bandwidth-sdk/models/{message_sending_callback.rb → tfv_error.rb} +12 -64
  58. data/lib/bandwidth-sdk/models/{message_delivered_callback_message.rb → tfv_status.rb} +86 -162
  59. data/lib/bandwidth-sdk/models/tfv_status_enum.rb +43 -0
  60. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +452 -0
  61. data/lib/bandwidth-sdk/models/{transcription_list.rb → tfv_submission_wrapper.rb} +12 -14
  62. data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +325 -0
  63. data/lib/bandwidth-sdk/models/verification_request.rb +547 -0
  64. data/lib/bandwidth-sdk/models/verification_update_request.rb +501 -0
  65. data/lib/bandwidth-sdk/models/verification_webhook.rb +303 -0
  66. data/lib/bandwidth-sdk/models/{message_failed_callback_message.rb → webhook_subscription.rb} +68 -158
  67. data/lib/bandwidth-sdk/models/webhook_subscription_basic_authentication.rb +274 -0
  68. data/lib/bandwidth-sdk/models/webhook_subscription_request_schema.rb +306 -0
  69. data/lib/bandwidth-sdk/models/webhook_subscription_type_enum.rb +40 -0
  70. data/lib/bandwidth-sdk/models/webhook_subscriptions_list_body.rb +242 -0
  71. data/lib/bandwidth-sdk/version.rb +1 -1
  72. data/lib/bandwidth-sdk.rb +28 -8
  73. data/openapi-config.yml +1 -1
  74. data/spec/call_utils.rb +2 -2
  75. data/spec/smoke/toll_free_verification_api_spec.rb +69 -0
  76. data/spec/spec_helper.rb +1 -1
  77. data/spec/unit/api/mfa_api_spec.rb +1 -1
  78. data/spec/unit/api/toll_free_verification_api_spec.rb +278 -0
  79. data/spec/unit/client/api_client_spec.rb +1 -1
  80. metadata +111 -62
  81. data/lib/bandwidth-sdk/models/disconenct_callback.rb +0 -405
  82. data/lib/bandwidth-sdk/models/message_sending_callback_message.rb +0 -418
data/bandwidth.yml CHANGED
@@ -19,6 +19,7 @@ tags:
19
19
  - name: Transcriptions
20
20
  - name: MFA
21
21
  - name: Phone Number Lookup
22
+ - name: Toll-Free Verification
22
23
  paths:
23
24
  /users/{accountId}/media:
24
25
  get:
@@ -230,8 +231,6 @@ paths:
230
231
  '500':
231
232
  $ref: '#/components/responses/messagingInternalServerError'
232
233
  callbacks:
233
- inboundCallback:
234
- $ref: '#/components/callbacks/inboundCallback'
235
234
  statusCallback:
236
235
  $ref: '#/components/callbacks/statusCallback'
237
236
  servers: *ref_0
@@ -1330,8 +1329,287 @@ paths:
1330
1329
  '500':
1331
1330
  $ref: '#/components/responses/tnLookupInternalServerError'
1332
1331
  servers: *ref_3
1332
+ /accounts/{accountId}/tollFreeVerification:
1333
+ post:
1334
+ tags:
1335
+ - Toll-Free Verification
1336
+ summary: Request Toll-Free Verification
1337
+ description: Submit a request for verification of a toll-free phone number.
1338
+ operationId: requestTollFreeVerification
1339
+ parameters:
1340
+ - $ref: '#/components/parameters/accountId'
1341
+ requestBody:
1342
+ $ref: '#/components/requestBodies/requestTollFreeVerificationRequest'
1343
+ responses:
1344
+ '202':
1345
+ description: Accepted
1346
+ '400':
1347
+ $ref: '#/components/responses/tfvPostBadRequestResponse'
1348
+ '401':
1349
+ $ref: '#/components/responses/tfvUnauthorizedResponse'
1350
+ '403':
1351
+ $ref: '#/components/responses/tfvForbiddenResponse'
1352
+ '405':
1353
+ $ref: '#/components/responses/tfvNotAllowedResponse'
1354
+ '429':
1355
+ $ref: '#/components/responses/tfvTooManyRequestsResponse'
1356
+ '500':
1357
+ $ref: '#/components/responses/tfvServerErrorResponse'
1358
+ '503':
1359
+ $ref: '#/components/responses/tfvServiceUnavailableResponse'
1360
+ callbacks:
1361
+ tfVerificationStatus:
1362
+ $ref: '#/components/callbacks/tfVerificationStatus'
1363
+ servers: &ref_4
1364
+ - url: https://api.bandwidth.com/api/v2
1365
+ description: Production
1366
+ /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification:
1367
+ get:
1368
+ tags:
1369
+ - Toll-Free Verification
1370
+ summary: Get Toll-Free Verification Status
1371
+ description: >-
1372
+ Gets the verification status for a phone number that is provisioned to
1373
+ your account.
1374
+
1375
+ Submission information will be appended to the response if it is
1376
+ available.
1377
+ operationId: getTollFreeVerificationStatus
1378
+ parameters:
1379
+ - $ref: '#/components/parameters/accountId'
1380
+ - $ref: '#/components/parameters/tfPhoneNumberPathParam'
1381
+ responses:
1382
+ '200':
1383
+ $ref: '#/components/responses/getTollFreeVerificationStatusResponse'
1384
+ '400':
1385
+ $ref: '#/components/responses/tfvBadRequestResponse'
1386
+ '401':
1387
+ $ref: '#/components/responses/tfvUnauthorizedResponse'
1388
+ '403':
1389
+ $ref: '#/components/responses/tfvForbiddenResponse'
1390
+ '404':
1391
+ $ref: '#/components/responses/tfvNotFoundResponse'
1392
+ '405':
1393
+ $ref: '#/components/responses/tfvNotAllowedResponse'
1394
+ '429':
1395
+ $ref: '#/components/responses/tfvTooManyRequestsResponse'
1396
+ '500':
1397
+ $ref: '#/components/responses/tfvServerErrorResponse'
1398
+ '503':
1399
+ $ref: '#/components/responses/tfvServiceUnavailableResponse'
1400
+ put:
1401
+ tags:
1402
+ - Toll-Free Verification
1403
+ summary: Update Toll-Free Verification Request
1404
+ description: >-
1405
+ Updates a toll-free verification request.
1406
+
1407
+ Submissions are only eligible for resubmission for 7 days within being
1408
+ processed and if resubmission is allowed (resubmitAllowed field is
1409
+ true).
1410
+ operationId: updateTollFreeVerificationRequest
1411
+ parameters:
1412
+ - $ref: '#/components/parameters/accountId'
1413
+ - $ref: '#/components/parameters/tfPhoneNumberPathParam'
1414
+ requestBody:
1415
+ $ref: '#/components/requestBodies/updateTollFreeVerificationRequestRequest'
1416
+ responses:
1417
+ '202':
1418
+ description: Accepted
1419
+ '400':
1420
+ $ref: '#/components/responses/tfvPostBadRequestResponse'
1421
+ '401':
1422
+ $ref: '#/components/responses/tfvUnauthorizedResponse'
1423
+ '403':
1424
+ $ref: '#/components/responses/tfvForbiddenResponse'
1425
+ '405':
1426
+ $ref: '#/components/responses/tfvNotAllowedResponse'
1427
+ '429':
1428
+ $ref: '#/components/responses/tfvTooManyRequestsResponse'
1429
+ '500':
1430
+ $ref: '#/components/responses/tfvServerErrorResponse'
1431
+ '503':
1432
+ $ref: '#/components/responses/tfvServiceUnavailableResponse'
1433
+ callbacks:
1434
+ tfVerificationStatus:
1435
+ $ref: '#/components/callbacks/tfVerificationStatus'
1436
+ servers: *ref_4
1437
+ /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions:
1438
+ get:
1439
+ tags:
1440
+ - Toll-Free Verification
1441
+ summary: List Webhook Subscriptions
1442
+ description: >-
1443
+ Lists all webhook subscriptions that are registered to receive status
1444
+ updates for the toll-free verification requests submitted under this
1445
+ account (password will not be returned through this API
1446
+
1447
+ If `basicAuthentication` is defined, the `password` property of that
1448
+ object will be null).
1449
+ operationId: listWebhookSubscriptions
1450
+ parameters:
1451
+ - $ref: '#/components/parameters/accountId'
1452
+ responses:
1453
+ '200':
1454
+ $ref: '#/components/responses/listWebhookSubscriptionsResponse'
1455
+ '400':
1456
+ $ref: '#/components/responses/tfvPostBadRequestResponse'
1457
+ '401':
1458
+ $ref: '#/components/responses/tfvUnauthorizedResponse'
1459
+ '403':
1460
+ $ref: '#/components/responses/tfvForbiddenResponse'
1461
+ '405':
1462
+ $ref: '#/components/responses/tfvNotAllowedResponse'
1463
+ '429':
1464
+ $ref: '#/components/responses/tfvTooManyRequestsResponse'
1465
+ '500':
1466
+ $ref: '#/components/responses/tfvServerErrorResponse'
1467
+ '503':
1468
+ $ref: '#/components/responses/tfvServiceUnavailableResponse'
1469
+ post:
1470
+ tags:
1471
+ - Toll-Free Verification
1472
+ summary: Create Webhook Subscription
1473
+ description: >-
1474
+ Create a new webhook subscription (this webhook will be called for every
1475
+ update on every submission).
1476
+
1477
+ In addition to a `callbackUrl`, this subscription can provide optional
1478
+ HTTP basic authentication credentials (a username and a password).
1479
+
1480
+ The returned subscription object will contain an ID that can be used to
1481
+ modify or delete the subscription at a later time.
1482
+ operationId: createWebhookSubscription
1483
+ parameters:
1484
+ - $ref: '#/components/parameters/accountId'
1485
+ requestBody:
1486
+ $ref: '#/components/requestBodies/webhookSubscriptionRequest'
1487
+ responses:
1488
+ '201':
1489
+ $ref: '#/components/responses/createWebhookSubscriptionResponse'
1490
+ '400':
1491
+ $ref: '#/components/responses/tfvBadRequestResponse'
1492
+ '401':
1493
+ $ref: '#/components/responses/tfvUnauthorizedResponse'
1494
+ '403':
1495
+ $ref: '#/components/responses/tfvForbiddenResponse'
1496
+ '404':
1497
+ $ref: '#/components/responses/tfvNotFoundResponse'
1498
+ '405':
1499
+ $ref: '#/components/responses/tfvNotAllowedResponse'
1500
+ '429':
1501
+ $ref: '#/components/responses/tfvTooManyRequestsResponse'
1502
+ '500':
1503
+ $ref: '#/components/responses/tfvServerErrorResponse'
1504
+ '503':
1505
+ $ref: '#/components/responses/tfvServiceUnavailableResponse'
1506
+ servers: *ref_4
1507
+ /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}:
1508
+ delete:
1509
+ tags:
1510
+ - Toll-Free Verification
1511
+ summary: Delete Webhook Subscription
1512
+ description: Delete a webhook subscription by ID.
1513
+ operationId: deleteWebhookSubscription
1514
+ parameters:
1515
+ - $ref: '#/components/parameters/accountId'
1516
+ - $ref: '#/components/parameters/webhookSubscriptionIdPathParam'
1517
+ responses:
1518
+ '204':
1519
+ description: No Content
1520
+ '400':
1521
+ $ref: '#/components/responses/tfvBadRequestResponse'
1522
+ '401':
1523
+ $ref: '#/components/responses/tfvUnauthorizedResponse'
1524
+ '403':
1525
+ $ref: '#/components/responses/tfvForbiddenResponse'
1526
+ '404':
1527
+ $ref: '#/components/responses/tfvNotFoundResponse'
1528
+ '405':
1529
+ $ref: '#/components/responses/tfvNotAllowedResponse'
1530
+ '429':
1531
+ $ref: '#/components/responses/tfvTooManyRequestsResponse'
1532
+ '500':
1533
+ $ref: '#/components/responses/tfvServerErrorResponse'
1534
+ '503':
1535
+ $ref: '#/components/responses/tfvServiceUnavailableResponse'
1536
+ put:
1537
+ tags:
1538
+ - Toll-Free Verification
1539
+ summary: Update Webhook Subscription
1540
+ description: >-
1541
+ Update an existing webhook subscription (`callbackUrl` and
1542
+ `basicAuthentication` can be updated).
1543
+ operationId: updateWebhookSubscription
1544
+ parameters:
1545
+ - $ref: '#/components/parameters/accountId'
1546
+ - $ref: '#/components/parameters/webhookSubscriptionIdPathParam'
1547
+ requestBody:
1548
+ $ref: '#/components/requestBodies/webhookSubscriptionRequest'
1549
+ responses:
1550
+ '200':
1551
+ $ref: '#/components/responses/updateWebhookSubscriptionResponse'
1552
+ '400':
1553
+ $ref: '#/components/responses/tfvBadRequestResponse'
1554
+ '401':
1555
+ $ref: '#/components/responses/tfvUnauthorizedResponse'
1556
+ '403':
1557
+ $ref: '#/components/responses/tfvForbiddenResponse'
1558
+ '404':
1559
+ $ref: '#/components/responses/tfvNotFoundResponse'
1560
+ '405':
1561
+ $ref: '#/components/responses/tfvNotAllowedResponse'
1562
+ '429':
1563
+ $ref: '#/components/responses/tfvTooManyRequestsResponse'
1564
+ '500':
1565
+ $ref: '#/components/responses/tfvServerErrorResponse'
1566
+ '503':
1567
+ $ref: '#/components/responses/tfvServiceUnavailableResponse'
1568
+ servers: *ref_4
1569
+ /tollFreeVerification/useCases:
1570
+ get:
1571
+ tags:
1572
+ - Toll-Free Verification
1573
+ summary: List Toll-Free Use Cases
1574
+ description: Lists valid toll-free use cases.
1575
+ operationId: listTollFreeUseCases
1576
+ responses:
1577
+ '200':
1578
+ $ref: '#/components/responses/listTollFreeUseCasesResponse'
1579
+ '400':
1580
+ $ref: '#/components/responses/tfvBadRequestResponse'
1581
+ '401':
1582
+ $ref: '#/components/responses/tfvUnauthorizedResponse'
1583
+ '403':
1584
+ $ref: '#/components/responses/tfvForbiddenResponse'
1585
+ '404':
1586
+ $ref: '#/components/responses/tfvNotFoundResponse'
1587
+ '405':
1588
+ $ref: '#/components/responses/tfvNotAllowedResponse'
1589
+ '429':
1590
+ $ref: '#/components/responses/tfvTooManyRequestsResponse'
1591
+ '500':
1592
+ $ref: '#/components/responses/tfvServerErrorResponse'
1593
+ '503':
1594
+ $ref: '#/components/responses/tfvServiceUnavailableResponse'
1595
+ servers: *ref_4
1333
1596
  components:
1334
1597
  schemas:
1598
+ callbackTypeEnum:
1599
+ type: string
1600
+ enum:
1601
+ - message-received
1602
+ - message-sending
1603
+ - message-delivered
1604
+ - message-failed
1605
+ description: >
1606
+ Indicates the type of the callback:
1607
+
1608
+ - `message-received` for inbound callbacks.
1609
+
1610
+ - One of `message-sending`, `message-delivered`, `message-failed` for
1611
+ status callbacks.
1612
+ example: message-delivered
1335
1613
  priorityEnum:
1336
1614
  type: string
1337
1615
  description: |-
@@ -1574,7 +1852,7 @@ components:
1574
1852
  type: string
1575
1853
  format: date-time
1576
1854
  description: The datetime stamp of the message in ISO 8601
1577
- example: 2022-09-14T18:20:16.000Z
1855
+ example: 2024-12-02T20:15:57.278Z
1578
1856
  segmentCount:
1579
1857
  type: integer
1580
1858
  description: >-
@@ -1695,33 +1973,38 @@ components:
1695
1973
 
1696
1974
  Not supported on MMS.
1697
1975
  example: '2021-02-01T11:29:18-05:00'
1698
- inboundMessageCallback:
1699
- description: Inbound Message Callback
1976
+ messageCallback:
1977
+ description: Message Callback Schema
1700
1978
  type: object
1701
1979
  properties:
1702
1980
  time:
1703
1981
  type: string
1704
1982
  format: date-time
1705
- example: 2016-09-14T18:20:16.000Z
1983
+ example: 2024-12-02T20:15:57.278Z
1706
1984
  type:
1707
- type: string
1708
- example: message-received
1985
+ $ref: '#/components/schemas/callbackTypeEnum'
1709
1986
  to:
1710
1987
  type: string
1711
1988
  example: '+15552223333'
1712
1989
  description:
1713
1990
  type: string
1714
- example: Incoming message received
1991
+ description: A detailed description of the event described by the callback.
1992
+ example: rejected-unallocated-from-number
1715
1993
  message:
1716
- $ref: '#/components/schemas/inboundMessageCallbackMessage'
1994
+ $ref: '#/components/schemas/messageCallbackMessage'
1995
+ errorCode:
1996
+ type: integer
1997
+ description: Optional error code, applicable only when type is `message-failed`.
1998
+ nullable: true
1999
+ example: 4405
1717
2000
  required:
1718
2001
  - time
1719
2002
  - type
1720
2003
  - to
1721
2004
  - description
1722
2005
  - message
1723
- inboundMessageCallbackMessage:
1724
- description: Inbound Message Callback Message Schema
2006
+ messageCallbackMessage:
2007
+ description: Message payload schema within a MessageCallback
1725
2008
  type: object
1726
2009
  properties:
1727
2010
  id:
@@ -1736,7 +2019,7 @@ components:
1736
2019
  time:
1737
2020
  type: string
1738
2021
  format: date-time
1739
- example: 2016-09-14T18:20:16.000Z
2022
+ example: 2024-12-02T20:15:57.666Z
1740
2023
  segmentCount:
1741
2024
  type: integer
1742
2025
  example: 1
@@ -1760,6 +2043,8 @@ components:
1760
2043
  example: custom string
1761
2044
  media:
1762
2045
  type: array
2046
+ description: Optional media, applicable only for mms
2047
+ nullable: true
1763
2048
  items:
1764
2049
  type: string
1765
2050
  format: uri
@@ -1778,389 +2063,133 @@ components:
1778
2063
  - to
1779
2064
  - from
1780
2065
  - text
1781
- messageSendingCallback:
2066
+ callbackMethodEnum:
2067
+ type: string
2068
+ nullable: true
2069
+ default: POST
2070
+ enum:
2071
+ - GET
2072
+ - POST
2073
+ description: >-
2074
+ The HTTP method to use to deliver the callback. GET or POST. Default
2075
+ value is POST.
2076
+ example: POST
2077
+ redirectMethodEnum:
2078
+ type: string
2079
+ nullable: true
2080
+ default: POST
2081
+ enum:
2082
+ - GET
2083
+ - POST
2084
+ description: >-
2085
+ The HTTP method to use for the request to `redirectUrl`. GET
2086
+
2087
+ or POST. Default value is POST.<br><br>Not allowed if `state` is
2088
+ `completed`.
2089
+ example: POST
2090
+ recordingStateEnum:
2091
+ type: string
2092
+ enum:
2093
+ - paused
2094
+ - recording
2095
+ description: |-
2096
+ The recording state. Possible values:
2097
+
2098
+ `paused` to pause an active recording
2099
+
2100
+ `recording` to resume a paused recording
2101
+ example: paused
2102
+ callDirectionEnum:
2103
+ type: string
2104
+ enum:
2105
+ - inbound
2106
+ - outbound
2107
+ description: The direction of the call.
2108
+ example: inbound
2109
+ fileFormatEnum:
2110
+ type: string
2111
+ enum:
2112
+ - mp3
2113
+ - wav
2114
+ description: The format that the recording is stored in.
2115
+ example: wav
2116
+ callStateEnum:
2117
+ nullable: true
2118
+ type: string
2119
+ default: active
2120
+ enum:
2121
+ - active
2122
+ - completed
2123
+ description: >-
2124
+ The call state. Possible values:<br>`active` to redirect the
2125
+
2126
+ call (default)<br>`completed` to hang up the call if it is answered,
2127
+ cancel
2128
+
2129
+ it if it is an unanswered outbound call, or reject it if it an
2130
+ unanswered
2131
+
2132
+ inbound call
2133
+ example: completed
2134
+ conferenceStateEnum:
2135
+ nullable: true
2136
+ type: string
2137
+ default: active
2138
+ enum:
2139
+ - active
2140
+ - completed
2141
+ description: >-
2142
+ Setting the conference state to `completed` ends the conference and
2143
+ ejects all members.
2144
+ example: completed
2145
+ machineDetectionModeEnum:
2146
+ type: string
2147
+ default: async
2148
+ enum:
2149
+ - sync
2150
+ - async
2151
+ description: >-
2152
+ The machine detection mode. If set to 'async', the detection
2153
+
2154
+ result will be sent in a 'machineDetectionComplete' callback. If set to
2155
+
2156
+ 'sync', the 'answer' callback will wait for the machine detection to
2157
+ complete
2158
+
2159
+ and will include its result.
2160
+ example: async
2161
+ callTranscriptionDetectedLanguageEnum:
2162
+ type: string
2163
+ enum:
2164
+ - en-US
2165
+ - es-US
2166
+ - fr-FR
2167
+ description: The detected language for this transcription.
2168
+ example: en-US
2169
+ callTranscriptionTrackEnum:
2170
+ type: string
2171
+ enum:
2172
+ - inbound
2173
+ - outbound
2174
+ description: Which `track` this transcription is derived from.
2175
+ example: inbound
2176
+ createCall:
1782
2177
  type: object
1783
- description: Message Sending Callback
2178
+ required:
2179
+ - answerUrl
2180
+ - applicationId
2181
+ - from
2182
+ - to
1784
2183
  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
2184
  to:
1793
2185
  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
1951
- type: object
1952
- properties:
1953
- time:
1954
- type: string
1955
- format: date-time
1956
- example: 2016-09-14T18:20:16.000Z
1957
- type:
1958
- type: string
1959
- example: message-failed
1960
- to:
1961
- type: string
1962
- example: '+15552223333'
1963
- description:
1964
- type: string
1965
- example: rejected-unallocated-from-number
1966
- message:
1967
- $ref: '#/components/schemas/messageFailedCallbackMessage'
1968
- errorCode:
1969
- type: integer
1970
- example: 9902
1971
- required:
1972
- - time
1973
- - type
1974
- - to
1975
- - description
1976
- - message
1977
- - errorCode
1978
- messageFailedCallbackMessage:
1979
- description: Message Failed Callback Message Schema
1980
- type: object
1981
- properties:
1982
- id:
1983
- type: string
1984
- example: 1661365814859loidf7mcwd4qacn7
1985
- owner:
1986
- type: string
1987
- example: '+15553332222'
1988
- applicationId:
1989
- type: string
1990
- example: 93de2206-9669-4e07-948d-329f4b722ee2
1991
- time:
1992
- type: string
1993
- format: date-time
1994
- example: 2016-09-14T18:20:16.000Z
1995
- segmentCount:
1996
- type: integer
1997
- example: 1
1998
- direction:
1999
- $ref: '#/components/schemas/messageDirectionEnum'
2000
- to:
2001
- uniqueItems: true
2002
- type: array
2003
- items:
2004
- type: string
2005
- example:
2006
- - '+15552223333'
2007
- from:
2008
- type: string
2009
- example: '+15553332222'
2010
- text:
2011
- type: string
2012
- example: Hello world
2013
- tag:
2014
- type: string
2015
- example: custom string
2016
- media:
2017
- type: array
2018
- items:
2019
- type: string
2020
- format: uri
2021
- example:
2022
- - https://dev.bandwidth.com/images/bandwidth-logo.png
2023
- - https://dev.bandwidth.com/images/github_logo.png
2024
- priority:
2025
- $ref: '#/components/schemas/priorityEnum'
2026
- required:
2027
- - id
2028
- - owner
2029
- - applicationId
2030
- - time
2031
- - segmentCount
2032
- - direction
2033
- - to
2034
- - from
2035
- - text
2036
- - tag
2037
- callbackMethodEnum:
2038
- type: string
2039
- nullable: true
2040
- default: POST
2041
- enum:
2042
- - GET
2043
- - POST
2044
- description: >-
2045
- The HTTP method to use to deliver the callback. GET or POST. Default
2046
- value is POST.
2047
- example: POST
2048
- redirectMethodEnum:
2049
- type: string
2050
- nullable: true
2051
- default: POST
2052
- enum:
2053
- - GET
2054
- - POST
2055
- description: >-
2056
- The HTTP method to use for the request to `redirectUrl`. GET
2057
-
2058
- or POST. Default value is POST.<br><br>Not allowed if `state` is
2059
- `completed`.
2060
- example: POST
2061
- recordingStateEnum:
2062
- type: string
2063
- enum:
2064
- - paused
2065
- - recording
2066
- description: |-
2067
- The recording state. Possible values:
2068
-
2069
- `paused` to pause an active recording
2070
-
2071
- `recording` to resume a paused recording
2072
- example: paused
2073
- callDirectionEnum:
2074
- type: string
2075
- enum:
2076
- - inbound
2077
- - outbound
2078
- description: The direction of the call.
2079
- example: inbound
2080
- fileFormatEnum:
2081
- type: string
2082
- enum:
2083
- - mp3
2084
- - wav
2085
- description: The format that the recording is stored in.
2086
- example: wav
2087
- callStateEnum:
2088
- nullable: true
2089
- type: string
2090
- default: active
2091
- enum:
2092
- - active
2093
- - completed
2094
- description: >-
2095
- The call state. Possible values:<br>`active` to redirect the
2096
-
2097
- call (default)<br>`completed` to hang up the call if it is answered,
2098
- cancel
2099
-
2100
- it if it is an unanswered outbound call, or reject it if it an
2101
- unanswered
2102
-
2103
- inbound call
2104
- example: completed
2105
- conferenceStateEnum:
2106
- nullable: true
2107
- type: string
2108
- default: active
2109
- enum:
2110
- - active
2111
- - completed
2112
- description: >-
2113
- Setting the conference state to `completed` ends the conference and
2114
- ejects all members.
2115
- example: completed
2116
- machineDetectionModeEnum:
2117
- type: string
2118
- default: async
2119
- enum:
2120
- - sync
2121
- - async
2122
- description: >-
2123
- The machine detection mode. If set to 'async', the detection
2124
-
2125
- result will be sent in a 'machineDetectionComplete' callback. If set to
2126
-
2127
- 'sync', the 'answer' callback will wait for the machine detection to
2128
- complete
2129
-
2130
- and will include its result.
2131
- example: async
2132
- callTranscriptionDetectedLanguageEnum:
2133
- type: string
2134
- enum:
2135
- - en-US
2136
- - es-US
2137
- - fr-FR
2138
- description: The detected language for this transcription.
2139
- example: en-US
2140
- callTranscriptionTrackEnum:
2141
- type: string
2142
- enum:
2143
- - inbound
2144
- - outbound
2145
- description: Which `track` this transcription is derived from.
2146
- example: inbound
2147
- createCall:
2148
- type: object
2149
- required:
2150
- - answerUrl
2151
- - applicationId
2152
- - from
2153
- - to
2154
- properties:
2155
- to:
2156
- type: string
2157
- description: >-
2158
- The destination to call (must be an E.164 formatted number
2159
-
2160
- (e.g. `+15555551212`) or a SIP URI (e.g.
2161
- `sip:user@server.example`)).
2162
- example: '+19195551234'
2163
- from:
2186
+ description: >-
2187
+ The destination to call (must be an E.164 formatted number
2188
+
2189
+ (e.g. `+15555551212`) or a SIP URI (e.g.
2190
+ `sip:user@server.example`)).
2191
+ example: '+19195551234'
2192
+ from:
2164
2193
  type: string
2165
2194
  description: >-
2166
2195
  A Bandwidth phone number on your account the call should come
@@ -4621,31 +4650,665 @@ components:
4621
4650
  example: (919) 555-1234
4622
4651
  Country:
4623
4652
  type: string
4624
- description: The country of the telephone number.
4625
- example: US
4626
- Line Type:
4653
+ description: The country of the telephone number.
4654
+ example: US
4655
+ Line Type:
4656
+ type: string
4657
+ description: The line type of the telephone number.
4658
+ example: Mobile
4659
+ Line Provider:
4660
+ type: string
4661
+ description: The messaging service provider of the telephone number.
4662
+ example: Verizon Wireless
4663
+ Mobile Country Code:
4664
+ type: string
4665
+ description: The first half of the Home Network Identity (HNI).
4666
+ example: '310'
4667
+ Mobile Network Code:
4668
+ type: string
4669
+ description: The second half of the HNI.
4670
+ example: '010'
4671
+ tnLookupRequestError:
4672
+ type: object
4673
+ properties:
4674
+ message:
4675
+ type: string
4676
+ description: A description of what validation error occurred.
4677
+ example: example error message
4678
+ accountId1:
4679
+ type: string
4680
+ description: User's account ID.
4681
+ example: '1234567'
4682
+ tfPhoneNumber:
4683
+ type: string
4684
+ description: Toll-free telephone number in E.164 format.
4685
+ minLength: 12
4686
+ maxLength: 12
4687
+ nullable: false
4688
+ pattern: ^\+1(800|833|844|855|866|877|888)[2-9]\d{6}$
4689
+ example: '+18005555555'
4690
+ tfvWebhookErrors:
4691
+ type: array
4692
+ description: Details of the errors that were encountered when processing the request.
4693
+ items:
4694
+ type: string
4695
+ example: 'optInWorkflowImageURLs: Entries must be a valid array of objects.'
4696
+ tfvCallbackStatusEnum:
4697
+ type: string
4698
+ enum:
4699
+ - VERIFIED
4700
+ - UNVERIFIED
4701
+ example: VERIFIED
4702
+ tfvUnverifiedStatus:
4703
+ type: string
4704
+ default: UNVERIFIED
4705
+ example: UNVERIFIED
4706
+ declineReasonDescription:
4707
+ type: string
4708
+ description: Explanation for why a verification request was declined.
4709
+ nullable: false
4710
+ example: >-
4711
+ Invalid Information - Can't Validate URL - Website is not accessible /
4712
+ not available
4713
+ denialStatusCode:
4714
+ description: Reason code for denial.
4715
+ type: integer
4716
+ example: 511
4717
+ resubmitAllowed:
4718
+ description: >-
4719
+ Whether a Toll-Free Verification request qualifies for resubmission via
4720
+ PUT.
4721
+ example: true
4722
+ type: boolean
4723
+ additionalDenialReason:
4724
+ properties:
4725
+ statusCode:
4726
+ $ref: '#/components/schemas/denialStatusCode'
4727
+ reason:
4728
+ $ref: '#/components/schemas/declineReasonDescription'
4729
+ resubmitAllowed:
4730
+ $ref: '#/components/schemas/resubmitAllowed'
4731
+ required:
4732
+ - statusCode
4733
+ - reason
4734
+ - resubmitAllowed
4735
+ type: object
4736
+ internalTicketNumber:
4737
+ type: string
4738
+ format: uuid
4739
+ description: >-
4740
+ Unique identifier (UUID) generated by Bandwidth to assist in tracking
4741
+ the verification status of a toll-free number - included in all webhook
4742
+ payloads.
4743
+ example: acde070d-8c4c-4f0d-9d8a-162843c10333
4744
+ internalTicketNumberForWebhook:
4745
+ type: string
4746
+ format: uuid
4747
+ description: >-
4748
+ Unique identifier (UUID) generated by Bandwidth to assist in tracking
4749
+ the verification status of a toll-free number.
4750
+ example: acde070d-8c4c-4f0d-9d8a-162843c10333
4751
+ businessContactPhoneNumber:
4752
+ description: Contact telephone number
4753
+ type: string
4754
+ minLength: 1
4755
+ maxLength: 500
4756
+ nullable: false
4757
+ example: '+19192654500'
4758
+ verificationRequest:
4759
+ type: object
4760
+ required:
4761
+ - businessAddress
4762
+ - businessContact
4763
+ - messageVolume
4764
+ - phoneNumbers
4765
+ - useCase
4766
+ - useCaseSummary
4767
+ - productionMessageContent
4768
+ - optInWorkflow
4769
+ properties:
4770
+ businessAddress:
4771
+ $ref: '#/components/schemas/address'
4772
+ businessContact:
4773
+ $ref: '#/components/schemas/contact'
4774
+ messageVolume:
4775
+ type: integer
4776
+ description: Estimated monthly volume of messages from the toll-free number.
4777
+ minimum: 10
4778
+ maximum: 10000000
4779
+ example: 10000
4780
+ phoneNumbers:
4781
+ type: array
4782
+ minItems: 1
4783
+ maxItems: 10
4784
+ items:
4785
+ $ref: '#/components/schemas/tfPhoneNumber'
4786
+ useCase:
4787
+ $ref: '#/components/schemas/useCase'
4788
+ useCaseSummary:
4789
+ type: string
4790
+ description: A general idea of the use case and customer.
4791
+ minLength: 1
4792
+ maxLength: 500
4793
+ nullable: false
4794
+ productionMessageContent:
4795
+ type: string
4796
+ description: Example of message content.
4797
+ minLength: 1
4798
+ maxLength: 500
4799
+ nullable: false
4800
+ optInWorkflow:
4801
+ $ref: '#/components/schemas/optInWorkflow'
4802
+ additionalInformation:
4803
+ type: string
4804
+ description: Any additional information.
4805
+ minLength: 0
4806
+ maxLength: 500
4807
+ nullable: true
4808
+ isvReseller:
4809
+ $ref: '#/components/schemas/isvReseller'
4810
+ verificationUpdateRequest:
4811
+ type: object
4812
+ required:
4813
+ - businessAddress
4814
+ - businessContact
4815
+ - messageVolume
4816
+ - useCase
4817
+ - useCaseSummary
4818
+ - productionMessageContent
4819
+ - optInWorkflow
4820
+ properties:
4821
+ businessAddress:
4822
+ $ref: '#/components/schemas/address'
4823
+ businessContact:
4824
+ $ref: '#/components/schemas/contact'
4825
+ messageVolume:
4826
+ type: integer
4827
+ description: Estimated monthly volume of messages from the toll-free number.
4828
+ minimum: 10
4829
+ maximum: 10000000
4830
+ example: 10000
4831
+ useCase:
4832
+ $ref: '#/components/schemas/useCase'
4833
+ useCaseSummary:
4834
+ type: string
4835
+ description: A general idea of the use case and customer.
4836
+ minLength: 0
4837
+ maxLength: 500
4838
+ nullable: false
4839
+ productionMessageContent:
4840
+ type: string
4841
+ description: Example of message content.
4842
+ minLength: 0
4843
+ maxLength: 500
4844
+ nullable: false
4845
+ optInWorkflow:
4846
+ $ref: '#/components/schemas/optInWorkflow'
4847
+ additionalInformation:
4848
+ type: string
4849
+ description: Any additional information.
4850
+ minLength: 0
4851
+ maxLength: 500
4852
+ nullable: true
4853
+ isvReseller:
4854
+ $ref: '#/components/schemas/isvReseller'
4855
+ tfvBasicAuthentication:
4856
+ type: object
4857
+ properties:
4858
+ username:
4859
+ type: string
4860
+ maxLength: 100
4861
+ password:
4862
+ type: string
4863
+ maxLength: 200
4864
+ required:
4865
+ - username
4866
+ - password
4867
+ webhookSubscriptionRequestSchema:
4868
+ type: object
4869
+ properties:
4870
+ basicAuthentication:
4871
+ $ref: '#/components/schemas/tfvBasicAuthentication'
4872
+ callbackUrl:
4873
+ $ref: '#/components/schemas/webhookUrl'
4874
+ sharedSecretKey:
4875
+ $ref: '#/components/schemas/sharedSecretKey'
4876
+ required:
4877
+ - callbackUrl
4878
+ failureWebhook:
4879
+ type: object
4880
+ properties:
4881
+ accountId:
4882
+ $ref: '#/components/schemas/accountId1'
4883
+ phoneNumber:
4884
+ $ref: '#/components/schemas/tfPhoneNumber'
4885
+ errorCode:
4886
+ type: string
4887
+ description: >-
4888
+ An error code indicating what error was encountered. This code can
4889
+ be interpreted as an HTTP status code in regards to the error that
4890
+ was encountered.
4891
+ example: '400'
4892
+ errorDescription:
4893
+ type: string
4894
+ description: A description of the error that was encountered.
4895
+ example: cannot process request.
4896
+ errors:
4897
+ $ref: '#/components/schemas/tfvWebhookErrors'
4898
+ internalTicketNumber:
4899
+ $ref: '#/components/schemas/internalTicketNumberForWebhook'
4900
+ verificationDenialWebhook:
4901
+ type: object
4902
+ properties:
4903
+ accountId:
4904
+ $ref: '#/components/schemas/accountId1'
4905
+ additionalDenialReasons:
4906
+ description: >-
4907
+ An optional list of denial reasons in addition to
4908
+ declineReasonDescription when multiple reasons apply.
4909
+ items:
4910
+ $ref: '#/components/schemas/additionalDenialReason'
4911
+ example:
4912
+ - statusCode: 512
4913
+ reason: Reason A
4914
+ resubmitAllowed: true
4915
+ - statusCode: 513
4916
+ reason: Reason B
4917
+ resubmitAllowed: true
4918
+ type: array
4919
+ declineReasonDescription:
4920
+ $ref: '#/components/schemas/declineReasonDescription'
4921
+ denialStatusCode:
4922
+ $ref: '#/components/schemas/denialStatusCode'
4923
+ internalTicketNumber:
4924
+ $ref: '#/components/schemas/internalTicketNumberForWebhook'
4925
+ phoneNumber:
4926
+ $ref: '#/components/schemas/tfPhoneNumber'
4927
+ resubmitAllowed:
4928
+ $ref: '#/components/schemas/resubmitAllowed'
4929
+ status:
4930
+ $ref: '#/components/schemas/tfvUnverifiedStatus'
4931
+ verificationWebhook:
4932
+ type: object
4933
+ properties:
4934
+ accountId:
4935
+ $ref: '#/components/schemas/accountId1'
4936
+ phoneNumber:
4937
+ $ref: '#/components/schemas/tfPhoneNumber'
4938
+ status:
4939
+ $ref: '#/components/schemas/tfvCallbackStatusEnum'
4940
+ internalTicketNumber:
4941
+ $ref: '#/components/schemas/internalTicketNumberForWebhook'
4942
+ tfvSubmissionWrapper:
4943
+ type: object
4944
+ properties:
4945
+ submission:
4946
+ $ref: '#/components/schemas/verificationUpdateRequest'
4947
+ address:
4948
+ type: object
4949
+ nullable: false
4950
+ required:
4951
+ - name
4952
+ - addr1
4953
+ - city
4954
+ - state
4955
+ - zip
4956
+ - url
4957
+ properties:
4958
+ name:
4959
+ type: string
4960
+ description: The name of the business using the toll-free number.
4961
+ minLength: 1
4962
+ maxLength: 500
4963
+ nullable: false
4964
+ example: Bandwidth Inc.
4965
+ addr1:
4966
+ type: string
4967
+ description: The address of the business using the toll-free number.
4968
+ minLength: 1
4969
+ maxLength: 500
4970
+ nullable: false
4971
+ example: 2230 Bandmate Way
4972
+ addr2:
4973
+ type: string
4974
+ description: The address of the business using the toll-free number.
4975
+ minLength: 0
4976
+ maxLength: 500
4977
+ nullable: true
4978
+ city:
4979
+ type: string
4980
+ description: The city of the business using the toll-free number.
4981
+ minLength: 1
4982
+ maxLength: 500
4983
+ nullable: false
4984
+ example: Raleigh
4985
+ state:
4986
+ type: string
4987
+ description: The state of the business using the toll-free number.
4988
+ minLength: 1
4989
+ maxLength: 500
4990
+ nullable: false
4991
+ example: NC
4992
+ zip:
4993
+ type: string
4994
+ description: The zip of the business using the toll-free number.
4995
+ nullable: false
4996
+ example: '27606'
4997
+ pattern: '[- A-Za-z0-9]{0,500}'
4998
+ url:
4999
+ type: string
5000
+ format: url
5001
+ description: The website of the business using the toll-free number.
5002
+ minLength: 1
5003
+ maxLength: 500
5004
+ nullable: false
5005
+ example: https://www.example.com/path/to/resource
5006
+ optInWorkflow:
5007
+ type: object
5008
+ nullable: false
5009
+ required:
5010
+ - description
5011
+ - imageUrls
5012
+ properties:
5013
+ description:
5014
+ type: string
5015
+ minLength: 1
5016
+ maxLength: 500
5017
+ nullable: false
5018
+ example: Opt In Flow
5019
+ imageUrls:
5020
+ type: array
5021
+ items:
5022
+ type: string
5023
+ minLength: 1
5024
+ maxLength: 500
5025
+ nullable: false
5026
+ example: https://www.example.com/path/to/resource
5027
+ pattern: >-
5028
+ ^$|(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,253}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&//=]*)
5029
+ isvReseller:
5030
+ type: string
5031
+ description: ISV name.
5032
+ minLength: 0
5033
+ maxLength: 500
5034
+ nullable: true
5035
+ example: Test ISV
5036
+ contact:
5037
+ type: object
5038
+ nullable: false
5039
+ required:
5040
+ - firstName
5041
+ - lastName
5042
+ - email
5043
+ - phoneNumber
5044
+ properties:
5045
+ firstName:
5046
+ type: string
5047
+ description: The first name of the business contact using the toll-free number.
5048
+ minLength: 1
5049
+ maxLength: 500
5050
+ nullable: false
5051
+ example: John
5052
+ lastName:
5053
+ type: string
5054
+ description: The last name of the business contact using the toll-free number.
5055
+ minLength: 1
5056
+ maxLength: 500
5057
+ nullable: false
5058
+ example: Doe
5059
+ email:
5060
+ $ref: '#/components/schemas/email'
5061
+ phoneNumber:
5062
+ $ref: '#/components/schemas/businessContactPhoneNumber'
5063
+ email:
5064
+ type: string
5065
+ format: email
5066
+ minLength: 0
5067
+ maxLength: 500
5068
+ nullable: false
5069
+ pattern: >-
5070
+ ^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$
5071
+ example: foo@bar.com
5072
+ useCases:
5073
+ type: array
5074
+ items:
5075
+ type: string
5076
+ example:
5077
+ - 2FA
5078
+ - App Notifications
5079
+ - Appointments
5080
+ - Auctions
5081
+ - Auto Repair Services
5082
+ - Bank Transfers
5083
+ - Billing
5084
+ - Booking Confirmations
5085
+ - Business Updates
5086
+ - COVID-19 Alerts
5087
+ useCase:
5088
+ type: string
5089
+ description: The category of the use case.
5090
+ minLength: 0
5091
+ maxLength: 500
5092
+ example: 2FA
5093
+ webhookSubscriptionsListBody:
5094
+ description: >-
5095
+ A list of all webhook subscriptions registered for this account ID for
5096
+ this particular feature (unpaginated).
5097
+ type: object
5098
+ required:
5099
+ - data
5100
+ properties:
5101
+ links:
5102
+ $ref: '#/components/schemas/linksObject'
5103
+ errors:
5104
+ type: array
5105
+ items:
5106
+ $ref: '#/components/schemas/error'
5107
+ data:
5108
+ items:
5109
+ $ref: '#/components/schemas/webhookSubscription'
5110
+ type: array
5111
+ linksObject:
5112
+ type: object
5113
+ properties:
5114
+ first:
5115
+ description: The first (or only) page of results matching the query.
5116
+ type: string
5117
+ next:
5118
+ description: >-
5119
+ If more results exist than specified by 'size', this link returns
5120
+ the next page of 'size' results.
5121
+ type: string
5122
+ previous:
5123
+ description: >-
5124
+ If the results are more than one page, this link returns the
5125
+ previous page of 'size' results.
5126
+ type: string
5127
+ last:
5128
+ description: >-
5129
+ If more results exist than specified by 'size', this link return the
5130
+ last page of result.
5131
+ type: string
5132
+ error:
5133
+ type: object
5134
+ properties:
5135
+ code:
5136
+ type: integer
5137
+ description:
5138
+ type: string
5139
+ telephoneNumbers:
5140
+ type: array
5141
+ items:
5142
+ $ref: '#/components/schemas/telephoneNumber'
5143
+ telephoneNumber:
5144
+ type: object
5145
+ properties:
5146
+ telephoneNumber:
5147
+ description: Simple Telephone Number.
5148
+ type: string
5149
+ webhookSubscriptionTypeEnum:
5150
+ type: string
5151
+ enum:
5152
+ - TOLLFREE_VERIFICATION_STATUS
5153
+ - MESSAGING_PORTOUT_APPROVAL_STATUS
5154
+ example: TOLLFREE_VERIFICATION_STATUS
5155
+ webhookSubscription:
5156
+ description: >-
5157
+ Information about a webhook that Bandwidth should send upon the
5158
+ completion of event customer has subscribed to.
5159
+ type: object
5160
+ required:
5161
+ - callbackUrl
5162
+ properties:
5163
+ id:
5164
+ type: string
5165
+ example: 7hICGStfAfeGxEq3N0lQwO
5166
+ accountId:
4627
5167
  type: string
4628
- description: The line type of the telephone number.
4629
- example: Mobile
4630
- Line Provider:
5168
+ example: '1234567'
5169
+ callbackUrl:
5170
+ $ref: '#/components/schemas/webhookUrl'
5171
+ type:
5172
+ $ref: '#/components/schemas/webhookSubscriptionTypeEnum'
5173
+ basicAuthentication:
5174
+ description: >-
5175
+ Basic authentication credentials are not required, but if present,
5176
+ both username and password must be provided.
5177
+ type: object
5178
+ required:
5179
+ - username
5180
+ - password
5181
+ properties:
5182
+ username:
5183
+ type: string
5184
+ maxLength: 100
5185
+ password:
5186
+ type: string
5187
+ maxLength: 200
5188
+ createdDate:
4631
5189
  type: string
4632
- description: The messaging service provider of the telephone number.
4633
- example: Verizon Wireless
4634
- Mobile Country Code:
5190
+ format: date-time
5191
+ example: '2023-05-15T13:56:39.965Z'
5192
+ modifiedDate:
4635
5193
  type: string
4636
- description: The first half of the Home Network Identity (HNI).
4637
- example: '310'
4638
- Mobile Network Code:
5194
+ format: date-time
5195
+ example: '2023-05-15T13:56:39.965Z'
5196
+ webhookUrl:
5197
+ description: >-
5198
+ Callback URL to receive status updates from Bandwidth. When a webhook
5199
+ subscription is registered with Bandwidth under a given account ID, it
5200
+ will be used to send status updates for all requests submitted under
5201
+ that account ID.
5202
+ type: string
5203
+ format: url
5204
+ minLength: 0
5205
+ maxLength: 2000
5206
+ nullable: true
5207
+ example: https://www.example.com/path/to/resource
5208
+ pattern: >-
5209
+ ^$|(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,253}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&//=]*)
5210
+ tfvError:
5211
+ description: A generic error object.
5212
+ properties:
5213
+ type:
4639
5214
  type: string
4640
- description: The second half of the HNI.
4641
- example: '010'
4642
- tnLookupRequestError:
5215
+ example: Error Type
5216
+ description:
5217
+ type: string
5218
+ example: Error Message
5219
+ errors:
5220
+ type: object
5221
+ description: >-
5222
+ Each key of this errors object refers to a field of the submitted
5223
+ object (using dot notation for nested objects), with the field being
5224
+ a key to an array of one or more errors for that field.
5225
+ example:
5226
+ field: error message
5227
+ type: object
5228
+ tfvStatus:
4643
5229
  type: object
4644
5230
  properties:
4645
- message:
5231
+ phoneNumber:
5232
+ $ref: '#/components/schemas/tfPhoneNumber'
5233
+ status:
5234
+ $ref: '#/components/schemas/tfvStatusEnum'
5235
+ internalTicketNumber:
5236
+ $ref: '#/components/schemas/internalTicketNumber'
5237
+ declineReasonDescription:
5238
+ $ref: '#/components/schemas/declineReasonDescription'
5239
+ resubmitAllowed:
5240
+ $ref: '#/components/schemas/resubmitAllowed'
5241
+ createdDateTime:
5242
+ type: string
5243
+ description: Date and time the verification request was created.
5244
+ format: date-time
5245
+ example: '2021-06-08T06:45:13.0Z'
5246
+ modifiedDateTime:
4646
5247
  type: string
4647
- description: A description of what validation error occurred.
4648
- example: example error message
5248
+ description: Date and time the verification request was last modified.
5249
+ format: date-time
5250
+ example: '2021-06-08T06:45:13.0Z'
5251
+ submission:
5252
+ $ref: '#/components/schemas/tfvSubmissionInfo'
5253
+ tfvSubmissionInfo:
5254
+ type: object
5255
+ properties:
5256
+ businessAddress:
5257
+ $ref: '#/components/schemas/address'
5258
+ businessContact:
5259
+ $ref: '#/components/schemas/contact'
5260
+ messageVolume:
5261
+ type: integer
5262
+ description: Estimated monthly volume of messages from the toll-free number.
5263
+ minimum: 10
5264
+ maximum: 10000000
5265
+ example: 10000
5266
+ useCase:
5267
+ $ref: '#/components/schemas/useCase'
5268
+ useCaseSummary:
5269
+ type: string
5270
+ description: A general idea of the use case and customer.
5271
+ minLength: 0
5272
+ maxLength: 500
5273
+ nullable: false
5274
+ example: Text summarizing the use case for the toll-free number
5275
+ productionMessageContent:
5276
+ type: string
5277
+ description: Example of message content.
5278
+ minLength: 0
5279
+ maxLength: 500
5280
+ nullable: false
5281
+ example: Production message content
5282
+ optInWorkflow:
5283
+ $ref: '#/components/schemas/optInWorkflow'
5284
+ additionalInformation:
5285
+ type: string
5286
+ description: Any additional information.
5287
+ minLength: 0
5288
+ maxLength: 500
5289
+ nullable: true
5290
+ example: Any additional information
5291
+ isvReseller:
5292
+ $ref: '#/components/schemas/isvReseller'
5293
+ tfvStatusEnum:
5294
+ type: string
5295
+ enum:
5296
+ - VERIFIED
5297
+ - UNVERIFIED
5298
+ - PENDING
5299
+ - PARTIALLY_VERIFIED
5300
+ - INVALID_STATUS
5301
+ example: VERIFIED
5302
+ sharedSecretKey:
5303
+ description: >-
5304
+ An ASCII string submitted by the user as a shared secret key for
5305
+ generating an HMAC header for callbacks.
5306
+ example: This is my $3cret
5307
+ maxLength: 64
5308
+ minLength: 16
5309
+ nullable: true
5310
+ pattern: ^[ -~]{16,64}$
5311
+ type: string
4649
5312
  responses:
4650
5313
  createMessageResponse:
4651
5314
  description: Accepted
@@ -5096,6 +5759,120 @@ components:
5096
5759
  summary: Example Internal Server Error Error
5097
5760
  value:
5098
5761
  message: Request has not been passed further.
5762
+ getTollFreeVerificationStatusResponse:
5763
+ description: OK
5764
+ content:
5765
+ application/json:
5766
+ schema:
5767
+ $ref: '#/components/schemas/tfvStatus'
5768
+ listWebhookSubscriptionsResponse:
5769
+ description: OK
5770
+ content:
5771
+ application/json:
5772
+ schema:
5773
+ $ref: '#/components/schemas/webhookSubscriptionsListBody'
5774
+ createWebhookSubscriptionResponse:
5775
+ description: Created
5776
+ content:
5777
+ application/json:
5778
+ schema:
5779
+ $ref: '#/components/schemas/webhookSubscription'
5780
+ updateWebhookSubscriptionResponse:
5781
+ description: OK
5782
+ content:
5783
+ application/json:
5784
+ schema:
5785
+ $ref: '#/components/schemas/webhookSubscription'
5786
+ listTollFreeUseCasesResponse:
5787
+ description: OK
5788
+ content:
5789
+ application/json:
5790
+ schema:
5791
+ $ref: '#/components/schemas/useCases'
5792
+ tfvBadRequestResponse:
5793
+ description: Bad Request
5794
+ content:
5795
+ application/json:
5796
+ schema:
5797
+ $ref: '#/components/schemas/tfvError'
5798
+ example:
5799
+ description: Cannot process request.
5800
+ type: bad request
5801
+ tfvPostBadRequestResponse:
5802
+ description: Bad Request
5803
+ content:
5804
+ application/json:
5805
+ schema:
5806
+ $ref: '#/components/schemas/tfvError'
5807
+ example:
5808
+ description: cannot process request.
5809
+ errors:
5810
+ businessName: Business name is required.
5811
+ businessContactEmail: Business contact email is not a valid email address.
5812
+ optInWorkflowImageURLs: Entries must be a valid array of objects.
5813
+ tfvUnauthorizedResponse:
5814
+ description: Unauthorized
5815
+ content:
5816
+ application/json:
5817
+ schema:
5818
+ $ref: '#/components/schemas/tfvError'
5819
+ example:
5820
+ description: Client is providing incorrect or invalid credentials.
5821
+ type: unauthorized
5822
+ tfvForbiddenResponse:
5823
+ description: Forbidden
5824
+ content:
5825
+ application/json:
5826
+ schema:
5827
+ $ref: '#/components/schemas/tfvError'
5828
+ example:
5829
+ description: Client is not authorized for the action.
5830
+ type: forbidden
5831
+ tfvNotFoundResponse:
5832
+ description: Cannot find the requested resource.
5833
+ content:
5834
+ application/json:
5835
+ schema:
5836
+ $ref: '#/components/schemas/tfvError'
5837
+ example:
5838
+ description: Cannot find the requested resource.
5839
+ type: Not Found
5840
+ tfvNotAllowedResponse:
5841
+ description: Method Not Allowed
5842
+ content:
5843
+ application/json:
5844
+ schema:
5845
+ $ref: '#/components/schemas/tfvError'
5846
+ example:
5847
+ description: Method is not allowed.
5848
+ type: Method Not Allowed
5849
+ tfvTooManyRequestsResponse:
5850
+ description: Too Many Requests
5851
+ content:
5852
+ application/json:
5853
+ schema:
5854
+ $ref: '#/components/schemas/tfvError'
5855
+ example:
5856
+ description: Throttling error. Too many requests.
5857
+ type: Too Many Requests
5858
+ tfvServerErrorResponse:
5859
+ description: Internal Server Error
5860
+ content:
5861
+ application/json:
5862
+ schema:
5863
+ $ref: '#/components/schemas/tfvError'
5864
+ example:
5865
+ description: Internal Server Error.
5866
+ type: Internal Server Error
5867
+ tfvServiceUnavailableResponse:
5868
+ description: Service Unavailable
5869
+ content:
5870
+ application/json:
5871
+ schema:
5872
+ $ref: '#/components/schemas/tfvError'
5873
+ example:
5874
+ description: Service Unavailable Error.
5875
+ type: Service Unavailable
5099
5876
  parameters:
5100
5877
  accountId:
5101
5878
  in: path
@@ -5463,6 +6240,333 @@ components:
5463
6240
  type: string
5464
6241
  description: The phone number lookup request ID from Bandwidth.
5465
6242
  example: 004223a0-8b17-41b1-bf81-20732adf5590
6243
+ tfPhoneNumberPathParam:
6244
+ in: path
6245
+ name: phoneNumber
6246
+ required: true
6247
+ schema:
6248
+ $ref: '#/components/schemas/tfPhoneNumber'
6249
+ description: Valid Toll-Free telephone number in E.164 format.
6250
+ example: '+18885555555'
6251
+ webhookSubscriptionIdPathParam:
6252
+ in: path
6253
+ name: id
6254
+ required: true
6255
+ schema:
6256
+ type: string
6257
+ description: Webhook subscription ID
6258
+ example: 7bt57JcsVYJrN9K1OcV1Nu
6259
+ examples:
6260
+ smsMessageReceivedCallbackExample:
6261
+ summary: An example of a sms message-received callback body.
6262
+ value:
6263
+ time: '2025-01-06T15:43:35.502180Z'
6264
+ type: message-received
6265
+ to: '+12345678902'
6266
+ description: Incoming message received
6267
+ message:
6268
+ id: 14762070468292kw2fuqty55yp2b2
6269
+ owner: '+12345678902'
6270
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
6271
+ time: '2025-01-06T15:43:34.000000Z'
6272
+ segmentCount: 1
6273
+ direction: in
6274
+ to:
6275
+ - '+12345678902'
6276
+ from: '+12345678901'
6277
+ text: Hey, check out this SMS!
6278
+ mmsMessageReceivedCallbackExample:
6279
+ summary: An example of a mms message-received callback body.
6280
+ value:
6281
+ time: '2024-09-14T18:20:45.160744Z'
6282
+ type: message-received
6283
+ to: '+12345678902'
6284
+ description: Incoming message received
6285
+ message:
6286
+ id: 14762070468292kw2fuqty55yp2b2
6287
+ owner: '+12345678902'
6288
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
6289
+ time: '2024-09-14T18:20:45.160744Z'
6290
+ segmentCount: 1
6291
+ direction: in
6292
+ to:
6293
+ - '+12345678902'
6294
+ - '+12345678903'
6295
+ from: '+12345678901'
6296
+ text: Hey, check out the MMS!
6297
+ media:
6298
+ - >-
6299
+ https://messaging.bandwidth.com/api/v2/users/9900902/media/14762070468292kw2fuqty55yp2b2/0/bw.png
6300
+ messageSendingCallbackExample:
6301
+ summary: An example of a message-sending callback body.
6302
+ value:
6303
+ time: '2024-06-25T18:42:36.979456Z'
6304
+ type: message-sending
6305
+ to: '+15554443333'
6306
+ description: Message is sending to carrier.
6307
+ message:
6308
+ id: 1593110555875xo7watq5px6rbe5d
6309
+ owner: '+15552221111'
6310
+ applicationId: cfd4fb83-7531-4acc-b471-42d0bb76a65c
6311
+ time: '2024-06-25T18:42:35.876906Z'
6312
+ segmentCount: 1
6313
+ direction: out
6314
+ to:
6315
+ - '+15554443333'
6316
+ from: '+15552221111'
6317
+ text: ''
6318
+ media:
6319
+ - https://dev.bandwidth.com/images/bandwidth-logo.png
6320
+ tag: your tag here
6321
+ smsMessageDeliveredCallbackExample:
6322
+ summary: An example of a sms message-delivered callback body.
6323
+ value:
6324
+ type: message-delivered
6325
+ time: '2024-09-14T18:20:11.160744Z'
6326
+ description: Message delivered to carrier.
6327
+ to: '+12345678902'
6328
+ message:
6329
+ id: 14762070468292kw2fuqty55yp2b2
6330
+ time: '2024-09-14T18:20:11.160744Z'
6331
+ to:
6332
+ - '+12345678902'
6333
+ from: '+12345678901'
6334
+ text: ''
6335
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
6336
+ owner: '+12345678902'
6337
+ direction: out
6338
+ segmentCount: 1
6339
+ mmsMessageDeliveredCallbackExample:
6340
+ summary: An example of a mms message-delivered callback body.
6341
+ value:
6342
+ type: message-delivered
6343
+ time: '2024-09-14T18:20:24.160544Z'
6344
+ description: Message delivered to carrier.
6345
+ to: '+12345678902'
6346
+ message:
6347
+ id: 14762070468292kw2fuqty55yp2b2
6348
+ time: '2024-09-14T18:20:24.160544Z'
6349
+ to:
6350
+ - '+12345678902'
6351
+ from: '+12345678901'
6352
+ text: ''
6353
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
6354
+ owner: '+12345678902'
6355
+ direction: out
6356
+ segmentCount: 1
6357
+ media:
6358
+ - https://dev.bandwidth.com/images/bandwidth-logo.png
6359
+ groupMmsMessageDeliveredCallbackExample:
6360
+ summary: An example of a group mms message-delivered callback body.
6361
+ value:
6362
+ type: message-delivered
6363
+ time: '2024-09-14T18:20:17.160544Z'
6364
+ description: Message delivered to carrier.
6365
+ to: '+12345678902'
6366
+ message:
6367
+ id: 14762070468292kw2fuqty55yp2b2
6368
+ time: '2024-09-14T18:20:17.160544Z'
6369
+ to:
6370
+ - '+12345678902'
6371
+ - '+12345678903'
6372
+ from: '+12345678901'
6373
+ text: ''
6374
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
6375
+ owner: '+12345678902'
6376
+ direction: out
6377
+ segmentCount: 1
6378
+ messageFailedCallbackExample:
6379
+ summary: An example of a message-failed callback body.
6380
+ value:
6381
+ type: message-failed
6382
+ time: '2024-12-18T16:51:27.704450Z'
6383
+ description: forbidden to country
6384
+ to: '+52345678903'
6385
+ errorCode: 4432
6386
+ message:
6387
+ id: 14762070468292kw2fuqty55yp2b2
6388
+ time: '2024-12-18T16:51:27.704450Z'
6389
+ to:
6390
+ - '+12345678902'
6391
+ - '+52345678903'
6392
+ from: '+12345678901'
6393
+ text: ''
6394
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
6395
+ media:
6396
+ - https://dev.bandwidth.com/images/bandwidth-logo.png
6397
+ owner: '+12345678901'
6398
+ direction: out
6399
+ segmentCount: 1
6400
+ createCallResponseExample:
6401
+ summary: Example of a createCall Response
6402
+ value:
6403
+ applicationId: 04e88489-df02-4e34-a0ee-27a91849555f
6404
+ accountId: '9900000'
6405
+ callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
6406
+ to: '+19195551234'
6407
+ from: '+19195554312'
6408
+ enqueuedTime: '2022-06-16T13:15:07.160Z'
6409
+ callUrl: >-
6410
+ https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
6411
+ callTimeout: 30
6412
+ callbackTimeout: 15
6413
+ tag: My custom tag value
6414
+ answerMethod: POST
6415
+ answerUrl: https://myServer.example/bandwidth/webhooks/answer
6416
+ answerFallbackMethod: POST
6417
+ answerFallbackUrl: https://myServer.example/bandwidth/webhooks/answerFallback
6418
+ disconnectMethod: POST
6419
+ disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect
6420
+ username: mySecretUsername
6421
+ password: '*****'
6422
+ fallbackUsername: mySecretUsername
6423
+ fallbackPassword: '*****'
6424
+ priority: 5
6425
+ listConferencesResponseExample:
6426
+ summary: Example of a listConferences Response
6427
+ value:
6428
+ - id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9
6429
+ name: my-conference-name
6430
+ createdTime: '2022-06-17T22:19:40.375Z'
6431
+ completedTime: '2022-06-17T22:20:00.000Z'
6432
+ conferenceEventUrl: https://myServer.example/bandwidth/webhooks/conferenceEvent
6433
+ conferenceEventMethod: POST
6434
+ tag: my custom tag
6435
+ voiceBadRequestErrorExample:
6436
+ summary: Example of a Bad Request (400) Error
6437
+ value:
6438
+ type: validation
6439
+ description: 'Invalid answerUrl: only http and https are allowed.'
6440
+ voiceUnauthorizedErrorExample:
6441
+ summary: Example of an Unauthorized (401) Error
6442
+ value:
6443
+ type: validation
6444
+ description: 'Invalid answerUrl: only http and https are allowed.'
6445
+ voiceForbiddenErrorExample:
6446
+ summary: Example of a Forbidden (403) Error
6447
+ value:
6448
+ type: validation
6449
+ description: 'Invalid answerUrl: only http and https are allowed.'
6450
+ voiceNotFoundErrorExample:
6451
+ summary: Example of a Not Found (404) Error
6452
+ value:
6453
+ type: validation
6454
+ description: 'Invalid answerUrl: only http and https are allowed.'
6455
+ voiceNotAllowedErrorExample:
6456
+ summary: Example of a Not Allowed (405) Error
6457
+ value:
6458
+ type: validation
6459
+ description: 'Invalid answerUrl: only http and https are allowed.'
6460
+ voiceConflictErrorExample:
6461
+ summary: Example of a Conflict (409) Error
6462
+ value:
6463
+ type: validation
6464
+ description: 'Invalid answerUrl: only http and https are allowed.'
6465
+ voiceUnsupportedMediaTypeErrorExample:
6466
+ summary: Example of an Unsupported Media Type (415) Error
6467
+ value:
6468
+ type: validation
6469
+ description: 'Invalid answerUrl: only http and https are allowed.'
6470
+ voiceTooManyRequestsErrorExample:
6471
+ summary: Example of a Too Many Requests (429) Error
6472
+ value:
6473
+ type: validation
6474
+ description: 'Invalid answerUrl: only http and https are allowed.'
6475
+ voiceInternalServerErrorExample:
6476
+ summary: Example of an Internal Server (500) Error
6477
+ value:
6478
+ type: validation
6479
+ description: 'Invalid answerUrl: only http and https are allowed.'
6480
+ singleNumberRequestExample:
6481
+ summary: Example Number Lookup Request for One Number
6482
+ value:
6483
+ tns:
6484
+ - '+19195551234'
6485
+ multipleNumberRequestExample:
6486
+ summary: Example Number Lookup Request for Multiple Numbers
6487
+ value:
6488
+ tns:
6489
+ - '+19195551234'
6490
+ - '+19195554321'
6491
+ lookupInProgressExample:
6492
+ summary: Example Lookup In Progress Response
6493
+ value:
6494
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
6495
+ status: IN_PROGRESS
6496
+ lookupFailedExample:
6497
+ summary: Example Lookup Failed Response
6498
+ value:
6499
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
6500
+ status: FAILED
6501
+ failedTelephoneNumbers:
6502
+ - '+191955512345'
6503
+ lookupSingleNumberCompleteExample:
6504
+ summary: Example Single Number Lookup Complete Response
6505
+ value:
6506
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
6507
+ status: COMPLETE
6508
+ result:
6509
+ - Response Code: 0
6510
+ Message: NOERROR
6511
+ E.164 Format: '+19195551234'
6512
+ Formatted: (919) 555-1234
6513
+ Country: US
6514
+ Line Type: Mobile
6515
+ Line Provider: Verizon Wireless
6516
+ Mobile Country Code: '310'
6517
+ Mobile Network Code: '010'
6518
+ lookupMultipleNumbersCompleteExample:
6519
+ summary: Example Multiple Numbers Lookup Complete Response
6520
+ value:
6521
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
6522
+ status: COMPLETE
6523
+ result:
6524
+ - Response Code: 0
6525
+ Message: NOERROR
6526
+ E.164 Format: '+19195551234'
6527
+ Formatted: (919) 555-1234
6528
+ Country: US
6529
+ Line Type: Mobile
6530
+ Line Provider: Verizon Wireless
6531
+ Mobile Country Code: '310'
6532
+ Mobile Network Code: '010'
6533
+ - Response Code: 0
6534
+ Message: NOERROR
6535
+ E.164 Format: '+19195554321'
6536
+ Formatted: (919) 555-4321
6537
+ Country: US
6538
+ Line Type: Mobile
6539
+ Line Provider: T-Mobile USA
6540
+ Mobile Country Code: '310'
6541
+ Mobile Network Code: '160'
6542
+ lookupMultipleNumbersPartialCompleteExample:
6543
+ summary: Example Multiple Numbers Lookup Partial Complete Response
6544
+ value:
6545
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
6546
+ status: PARTIAL_COMPLETE
6547
+ result:
6548
+ - Response Code: 0
6549
+ Message: NOERROR
6550
+ E.164 Format: '+19195551234'
6551
+ Formatted: (919) 555-1234
6552
+ Country: US
6553
+ Line Type: Mobile
6554
+ Line Provider: Verizon Wireless
6555
+ Mobile Country Code: '310'
6556
+ Mobile Network Code: '010'
6557
+ failedTelephoneNumbers:
6558
+ - '+191955512345'
6559
+ lookupSingleNumberCompleteNoInfoExample:
6560
+ summary: Example Single Number Lookup Complete with No Information Response
6561
+ value:
6562
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
6563
+ status: COMPLETE
6564
+ result:
6565
+ - Response Code: 3
6566
+ Message: NXDOMAIN
6567
+ E.164 Format: '+19195550000'
6568
+ Formatted: (919) 555-0000
6569
+ Country: US
5466
6570
  requestBodies:
5467
6571
  createMessageRequest:
5468
6572
  content:
@@ -5560,6 +6664,14 @@ components:
5560
6664
  schema:
5561
6665
  type: string
5562
6666
  format: binary
6667
+ image/heic:
6668
+ schema:
6669
+ type: string
6670
+ format: binary
6671
+ image/heif:
6672
+ schema:
6673
+ type: string
6674
+ format: binary
5563
6675
  image/jpeg:
5564
6676
  schema:
5565
6677
  type: string
@@ -5600,6 +6712,10 @@ components:
5600
6712
  schema:
5601
6713
  type: string
5602
6714
  format: binary
6715
+ text/html:
6716
+ schema:
6717
+ type: string
6718
+ format: binary
5603
6719
  text/plain:
5604
6720
  schema:
5605
6721
  type: string
@@ -5648,6 +6764,10 @@ components:
5648
6764
  schema:
5649
6765
  type: string
5650
6766
  format: binary
6767
+ video/x-flv:
6768
+ schema:
6769
+ type: string
6770
+ format: binary
5651
6771
  required: true
5652
6772
  createCallRequest:
5653
6773
  description: JSON object containing information to create an outbound call
@@ -5752,6 +6872,39 @@ components:
5752
6872
  $ref: '#/components/examples/singleNumberRequestExample'
5753
6873
  multipleNumberRequestExample:
5754
6874
  $ref: '#/components/examples/multipleNumberRequestExample'
6875
+ requestTollFreeVerificationRequest:
6876
+ description: Request for verification of a toll-free phone number.
6877
+ required: true
6878
+ content:
6879
+ application/json:
6880
+ schema:
6881
+ $ref: '#/components/schemas/verificationRequest'
6882
+ updateTollFreeVerificationRequestRequest:
6883
+ description: Update a request for verification of a toll-free phone number.
6884
+ required: true
6885
+ content:
6886
+ application/json:
6887
+ schema:
6888
+ $ref: '#/components/schemas/tfvSubmissionWrapper'
6889
+ verificationWebhookRequest:
6890
+ description: Verification callback status of a toll-free phone number.
6891
+ required: true
6892
+ content:
6893
+ application/json:
6894
+ schema:
6895
+ oneOf:
6896
+ - $ref: '#/components/schemas/verificationWebhook'
6897
+ - $ref: '#/components/schemas/verificationDenialWebhook'
6898
+ - $ref: '#/components/schemas/failureWebhook'
6899
+ webhookSubscriptionRequest:
6900
+ description: >-
6901
+ Information about a webhook that Bandwidth should send upon the
6902
+ completion of event customer is trying to subscribe to.
6903
+ required: true
6904
+ content:
6905
+ application/json:
6906
+ schema:
6907
+ $ref: '#/components/schemas/webhookSubscriptionRequestSchema'
5755
6908
  securitySchemes:
5756
6909
  Basic:
5757
6910
  type: http
@@ -5770,11 +6923,22 @@ components:
5770
6923
  post:
5771
6924
  requestBody:
5772
6925
  required: true
5773
- description: Inbound Message Callback Payload
6926
+ description: >
6927
+ <p>This Inbound Message Webhook is an envelope containing a
6928
+ received (MO) message to your message-enabled Bandwidth telephone
6929
+ number. The payload type will always indicate "message-received".
6930
+
6931
+ </p><p>Please visit <a
6932
+ href='/docs/messaging/webhooks/'>Webhooks</a></p>
5774
6933
  content:
5775
6934
  application/json:
5776
6935
  schema:
5777
- $ref: '#/components/schemas/inboundMessageCallback'
6936
+ $ref: '#/components/schemas/messageCallback'
6937
+ examples:
6938
+ smsMessageReceivedCallback:
6939
+ $ref: '#/components/examples/smsMessageReceivedCallbackExample'
6940
+ mmsMessageReceivedCallback:
6941
+ $ref: '#/components/examples/mmsMessageReceivedCallbackExample'
5778
6942
  responses:
5779
6943
  '200':
5780
6944
  description: OK
@@ -5783,186 +6947,71 @@ components:
5783
6947
  post:
5784
6948
  requestBody:
5785
6949
  required: true
5786
- description: Status Callback Payload
6950
+ description: >
6951
+ <p>This Outbound Message Webhook is an envelope containing status
6952
+ information regarding a message sent (MT) from your
6953
+ message-enabled Bandwidth telephone number. The payload type will
6954
+ be one of "message-sending", "message-delivered", or
6955
+ "message-failed".
6956
+
6957
+ </p><p>Please visit <a
6958
+ href='/docs/messaging/webhooks/'>Webhooks</a></p>
5787
6959
  content:
5788
6960
  application/json:
5789
6961
  schema:
5790
- type: object
5791
- oneOf:
5792
- - $ref: '#/components/schemas/messageSendingCallback'
5793
- - $ref: '#/components/schemas/messageDeliveredCallback'
5794
- - $ref: '#/components/schemas/messageFailedCallback'
6962
+ $ref: '#/components/schemas/messageCallback'
6963
+ examples:
6964
+ messageSendingCallback:
6965
+ $ref: '#/components/examples/messageSendingCallbackExample'
6966
+ smsMessageDeliveredCallback:
6967
+ $ref: '#/components/examples/smsMessageDeliveredCallbackExample'
6968
+ mmsMessageDeliveredCallback:
6969
+ $ref: '#/components/examples/mmsMessageDeliveredCallbackExample'
6970
+ groupMmsMessageDeliveredCallback:
6971
+ $ref: >-
6972
+ #/components/examples/groupMmsMessageDeliveredCallbackExample
6973
+ messageFailedCallback:
6974
+ $ref: '#/components/examples/messageFailedCallbackExample'
5795
6975
  responses:
5796
6976
  '200':
5797
6977
  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
6978
+ tfVerificationStatus:
6979
+ your_url.com/webhookService:
6980
+ post:
6981
+ summary: TFV status updates sent to customer's webhook URL.
6982
+ description: >-
6983
+ Unique webhook URL provided by customers to which Bandwidth sends a
6984
+ POST request to notify customer regarding TFV status updates.
6985
+ operationId: tfvRequest
6986
+ parameters:
6987
+ - description: >-
6988
+ 64-character lowercase hexidecimal HMAC calculated with a shared
6989
+ secret key, the canonicalized request body, and SHA256. It is
6990
+ only included when a shared secret key is set through webhook
6991
+ subscription.
6992
+ example: ca7b9e9816c90d336f5dca529e733354b81535c7af027b81878ac98afb2dbaa2
6993
+ in: header
6994
+ name: x-bandwidth-signature-hmac-sha256
6995
+ schema:
6996
+ type: string
6997
+ requestBody:
6998
+ $ref: '#/components/requestBodies/verificationWebhookRequest'
6999
+ responses:
7000
+ '204':
7001
+ description: No Content
7002
+ '400':
7003
+ $ref: '#/components/responses/tfvBadRequestResponse'
7004
+ '401':
7005
+ $ref: '#/components/responses/tfvUnauthorizedResponse'
7006
+ '403':
7007
+ $ref: '#/components/responses/tfvForbiddenResponse'
7008
+ '404':
7009
+ $ref: '#/components/responses/tfvNotFoundResponse'
7010
+ '405':
7011
+ $ref: '#/components/responses/tfvNotAllowedResponse'
7012
+ '429':
7013
+ $ref: '#/components/responses/tfvTooManyRequestsResponse'
7014
+ '500':
7015
+ $ref: '#/components/responses/tfvServerErrorResponse'
7016
+ '503':
7017
+ $ref: '#/components/responses/tfvServiceUnavailableResponse'