bandwidth-sdk 14.0.0 → 14.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +9 -9
  3. data/README.md +42 -10
  4. data/bandwidth.yml +1102 -0
  5. data/coverage/.last_run.json +1 -1
  6. data/coverage/.resultset.json +1204 -231
  7. data/coverage/index.html +20499 -10053
  8. data/custom_templates/README.mustache +6 -6
  9. data/docs/AdditionalDenialReason.md +22 -0
  10. data/docs/Address.md +30 -0
  11. data/docs/Contact.md +24 -0
  12. data/docs/Error.md +22 -0
  13. data/docs/FailureWebhook.md +28 -0
  14. data/docs/LinksObject.md +24 -0
  15. data/docs/OptInWorkflow.md +20 -0
  16. data/docs/TelephoneNumber.md +18 -0
  17. data/docs/TfvBasicAuthentication.md +20 -0
  18. data/docs/TfvCallbackStatusEnum.md +15 -0
  19. data/docs/TfvError.md +22 -0
  20. data/docs/TfvStatus.md +32 -0
  21. data/docs/TfvStatusEnum.md +15 -0
  22. data/docs/TfvSubmissionInfo.md +34 -0
  23. data/docs/TfvSubmissionWrapper.md +18 -0
  24. data/docs/TollFreeVerificationApi.md +585 -0
  25. data/docs/VerificationDenialWebhook.md +32 -0
  26. data/docs/VerificationRequest.md +36 -0
  27. data/docs/VerificationUpdateRequest.md +34 -0
  28. data/docs/VerificationWebhook.md +24 -0
  29. data/docs/WebhookSubscription.md +30 -0
  30. data/docs/WebhookSubscriptionBasicAuthentication.md +20 -0
  31. data/docs/WebhookSubscriptionRequestSchema.md +22 -0
  32. data/docs/WebhookSubscriptionTypeEnum.md +15 -0
  33. data/docs/WebhookSubscriptionsListBody.md +22 -0
  34. data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +614 -0
  35. data/lib/bandwidth-sdk/configuration.rb +48 -0
  36. data/lib/bandwidth-sdk/models/additional_denial_reason.rb +254 -0
  37. data/lib/bandwidth-sdk/models/address.rb +501 -0
  38. data/lib/bandwidth-sdk/models/contact.rb +393 -0
  39. data/lib/bandwidth-sdk/models/error.rb +232 -0
  40. data/lib/bandwidth-sdk/models/failure_webhook.rb +304 -0
  41. data/lib/bandwidth-sdk/models/links_object.rb +243 -0
  42. data/lib/bandwidth-sdk/models/opt_in_workflow.rb +265 -0
  43. data/lib/bandwidth-sdk/models/telephone_number.rb +213 -0
  44. data/lib/bandwidth-sdk/models/tfv_basic_authentication.rb +273 -0
  45. data/lib/bandwidth-sdk/models/tfv_callback_status_enum.rb +40 -0
  46. data/lib/bandwidth-sdk/models/tfv_error.rb +232 -0
  47. data/lib/bandwidth-sdk/models/tfv_status.rb +342 -0
  48. data/lib/bandwidth-sdk/models/tfv_status_enum.rb +43 -0
  49. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +452 -0
  50. data/lib/bandwidth-sdk/models/tfv_submission_wrapper.rb +212 -0
  51. data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +325 -0
  52. data/lib/bandwidth-sdk/models/verification_request.rb +547 -0
  53. data/lib/bandwidth-sdk/models/verification_update_request.rb +501 -0
  54. data/lib/bandwidth-sdk/models/verification_webhook.rb +303 -0
  55. data/lib/bandwidth-sdk/models/webhook_subscription.rb +328 -0
  56. data/lib/bandwidth-sdk/models/webhook_subscription_basic_authentication.rb +274 -0
  57. data/lib/bandwidth-sdk/models/webhook_subscription_request_schema.rb +306 -0
  58. data/lib/bandwidth-sdk/models/webhook_subscription_type_enum.rb +40 -0
  59. data/lib/bandwidth-sdk/models/webhook_subscriptions_list_body.rb +242 -0
  60. data/lib/bandwidth-sdk/version.rb +1 -1
  61. data/lib/bandwidth-sdk.rb +25 -0
  62. data/openapi-config.yml +1 -1
  63. data/spec/call_utils.rb +2 -2
  64. data/spec/smoke/toll_free_verification_api_spec.rb +69 -0
  65. data/spec/spec_helper.rb +1 -1
  66. data/spec/unit/api/mfa_api_spec.rb +1 -1
  67. data/spec/unit/api/toll_free_verification_api_spec.rb +278 -0
  68. data/spec/unit/client/api_client_spec.rb +1 -1
  69. metadata +100 -46
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:
@@ -1328,6 +1329,270 @@ paths:
1328
1329
  '500':
1329
1330
  $ref: '#/components/responses/tnLookupInternalServerError'
1330
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
1331
1596
  components:
1332
1597
  schemas:
1333
1598
  callbackTypeEnum:
@@ -4410,6 +4675,640 @@ components:
4410
4675
  type: string
4411
4676
  description: A description of what validation error occurred.
4412
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:
5167
+ type: string
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:
5189
+ type: string
5190
+ format: date-time
5191
+ example: '2023-05-15T13:56:39.965Z'
5192
+ modifiedDate:
5193
+ type: string
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:
5214
+ type: string
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:
5229
+ type: object
5230
+ properties:
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:
5247
+ type: string
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
4413
5312
  responses:
4414
5313
  createMessageResponse:
4415
5314
  description: Accepted
@@ -4860,6 +5759,120 @@ components:
4860
5759
  summary: Example Internal Server Error Error
4861
5760
  value:
4862
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
4863
5876
  parameters:
4864
5877
  accountId:
4865
5878
  in: path
@@ -5227,6 +6240,22 @@ components:
5227
6240
  type: string
5228
6241
  description: The phone number lookup request ID from Bandwidth.
5229
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
5230
6259
  examples:
5231
6260
  smsMessageReceivedCallbackExample:
5232
6261
  summary: An example of a sms message-received callback body.
@@ -5843,6 +6872,39 @@ components:
5843
6872
  $ref: '#/components/examples/singleNumberRequestExample'
5844
6873
  multipleNumberRequestExample:
5845
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'
5846
6908
  securitySchemes:
5847
6909
  Basic:
5848
6910
  type: http
@@ -5913,3 +6975,43 @@ components:
5913
6975
  responses:
5914
6976
  '200':
5915
6977
  description: OK
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'