bandwidth-sdk 16.2.2 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +8 -8
  3. data/README.md +20 -7
  4. data/bandwidth.yml +551 -277
  5. data/coverage/.last_run.json +1 -1
  6. data/coverage/.resultset.json +197 -94
  7. data/coverage/index.html +2425 -1307
  8. data/docs/AsyncLookupRequest.md +18 -0
  9. data/docs/{LookupRequest.md → CompletedLookupStatusEnum.md} +2 -5
  10. data/docs/CreateAsyncBulkLookupResponse.md +22 -0
  11. data/docs/{CreateLookupResponse.md → CreateAsyncBulkLookupResponseData.md} +4 -4
  12. data/docs/CreateSyncLookupResponse.md +22 -0
  13. data/docs/CreateSyncLookupResponseData.md +22 -0
  14. data/docs/DeactivationEventEnum.md +15 -0
  15. data/docs/GetAsyncBulkLookupResponse.md +22 -0
  16. data/docs/GetAsyncBulkLookupResponseData.md +22 -0
  17. data/docs/InProgressLookupStatusEnum.md +15 -0
  18. data/docs/LatestMessageDeliveryStatusEnum.md +15 -0
  19. data/docs/{LookupStatusEnum.md → LineTypeEnum.md} +2 -2
  20. data/docs/LinkSchema.md +22 -0
  21. data/docs/LookupErrorResponse.md +22 -0
  22. data/docs/LookupErrorSchema.md +24 -0
  23. data/docs/LookupErrorSchemaMeta.md +22 -0
  24. data/docs/LookupResult.md +22 -18
  25. data/docs/PhoneNumberLookupApi.md +111 -38
  26. data/docs/RbmActionBase.md +1 -1
  27. data/docs/RbmSuggestionResponse.md +1 -1
  28. data/docs/SyncLookupRequest.md +18 -0
  29. data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +117 -47
  30. data/lib/bandwidth-sdk/configuration.rb +10 -4
  31. data/lib/bandwidth-sdk/models/async_lookup_request.rb +232 -0
  32. data/lib/bandwidth-sdk/models/completed_lookup_status_enum.rb +41 -0
  33. data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response.rb +235 -0
  34. data/lib/bandwidth-sdk/models/{create_lookup_response.rb → create_async_bulk_lookup_response_data.rb} +5 -5
  35. data/lib/bandwidth-sdk/models/create_sync_lookup_response.rb +234 -0
  36. data/lib/bandwidth-sdk/models/{lookup_status.rb → create_sync_lookup_response_data.rb} +15 -27
  37. data/lib/bandwidth-sdk/models/deactivation_event_enum.rb +39 -0
  38. data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response.rb +234 -0
  39. data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response_data.rb +257 -0
  40. data/lib/bandwidth-sdk/models/{lookup_status_enum.rb → in_progress_lookup_status_enum.rb} +3 -3
  41. data/lib/bandwidth-sdk/models/latest_message_delivery_status_enum.rb +41 -0
  42. data/lib/bandwidth-sdk/models/line_type_enum.rb +42 -0
  43. data/lib/bandwidth-sdk/models/{lookup_request.rb → link_schema.rb} +31 -20
  44. data/lib/bandwidth-sdk/models/lookup_error_response.rb +235 -0
  45. data/lib/bandwidth-sdk/models/lookup_error_schema.rb +242 -0
  46. data/lib/bandwidth-sdk/models/{tn_lookup_request_error.rb → lookup_error_schema_meta.rb} +29 -8
  47. data/lib/bandwidth-sdk/models/lookup_result.rb +102 -63
  48. data/lib/bandwidth-sdk/models/sync_lookup_request.rb +232 -0
  49. data/lib/bandwidth-sdk/version.rb +1 -1
  50. data/lib/bandwidth-sdk.rb +17 -5
  51. data/spec/smoke/multi_channel_api_spec.rb +1 -1
  52. data/spec/smoke/phone_number_lookup_api_spec.rb +65 -70
  53. data/spec/unit/api/phone_number_lookup_api_spec.rb +71 -56
  54. metadata +36 -12
  55. data/docs/LookupStatus.md +0 -24
  56. data/docs/TnLookupRequestError.md +0 -18
data/bandwidth.yml CHANGED
@@ -1328,62 +1328,66 @@ paths:
1328
1328
  '500':
1329
1329
  $ref: '#/components/responses/mfaInternalServerError'
1330
1330
  servers: *ref_2
1331
- /accounts/{accountId}/tnlookup:
1331
+ /accounts/{accountId}/phoneNumberLookup:
1332
1332
  post:
1333
- deprecated: true
1334
- summary: Create Lookup
1335
- description: Create a Phone Number Lookup Request.
1336
- operationId: createLookup
1333
+ summary: Create Synchronous Number Lookup
1334
+ description: >-
1335
+ Creates a synchronous phone number lookup request. Maximum of 100
1336
+ telephone numbers per request.
1337
+ operationId: createSyncLookup
1337
1338
  tags:
1338
1339
  - Phone Number Lookup
1339
1340
  parameters:
1340
- - $ref: '#/components/parameters/accountId'
1341
+ - $ref: '#/components/parameters/accountId1'
1341
1342
  requestBody:
1342
- $ref: '#/components/requestBodies/createLookupRequest'
1343
+ $ref: '#/components/requestBodies/createSyncLookupRequest'
1343
1344
  responses:
1344
- '202':
1345
- $ref: '#/components/responses/createLookupResponse'
1346
- '400':
1347
- $ref: '#/components/responses/tnLookupBadRequestError'
1348
- '401':
1349
- $ref: '#/components/responses/tnLookupUnauthorizedError'
1350
- '403':
1351
- $ref: '#/components/responses/tnLookupForbiddenError'
1352
- '415':
1353
- $ref: '#/components/responses/tnLookupMediaTypeError'
1354
- '429':
1355
- $ref: '#/components/responses/tnLookupTooManyRequestsError'
1356
- '500':
1357
- $ref: '#/components/responses/tnLookupInternalServerError'
1345
+ '200':
1346
+ $ref: '#/components/responses/createSyncLookupResponse'
1347
+ default:
1348
+ $ref: '#/components/responses/tnLookupDefaultResponse'
1358
1349
  servers: &ref_3
1359
- - url: https://numbers.bandwidth.com/api/v1
1350
+ - url: https://api.bandwidth.com/v2
1360
1351
  description: Production
1361
- /accounts/{accountId}/tnlookup/{requestId}:
1352
+ /accounts/{accountId}/phoneNumberLookup/bulk:
1353
+ post:
1354
+ summary: Create Asynchronous Bulk Number Lookup
1355
+ description: >-
1356
+ Creates an asynchronous bulk phone number lookup request. Maximum of
1357
+ 15,000 telephone numbers per request. Use the [Get Asynchronous Bulk
1358
+ Number Lookup](#tag/Phone-Number-Lookup/operation/getAsyncBulkLookup)
1359
+ endpoint to check the status of the request and view the results.
1360
+ operationId: createAsyncBulkLookup
1361
+ tags:
1362
+ - Phone Number Lookup
1363
+ parameters:
1364
+ - $ref: '#/components/parameters/accountId1'
1365
+ requestBody:
1366
+ $ref: '#/components/requestBodies/createAsyncBulkLookupRequest'
1367
+ responses:
1368
+ '202':
1369
+ $ref: '#/components/responses/createAsyncBulkLookupResponse'
1370
+ default:
1371
+ $ref: '#/components/responses/tnLookupDefaultResponse'
1372
+ servers: *ref_3
1373
+ /accounts/{accountId}/phoneNumberLookup/bulk/{requestId}:
1362
1374
  get:
1363
- deprecated: true
1364
- summary: Get Lookup Request Status
1365
- description: Get an existing Phone Number Lookup Request.
1366
- operationId: getLookupStatus
1375
+ summary: Get Asynchronous Bulk Number Lookup
1376
+ description: >-
1377
+ Get an existing [Asynchronous Bulk Number
1378
+ Lookup](#tag/Phone-Number-Lookup/operation/createAsyncBulkLookup). Use
1379
+ this endpoint to check the status of the request and view the results.
1380
+ operationId: getAsyncBulkLookup
1367
1381
  tags:
1368
1382
  - Phone Number Lookup
1369
1383
  parameters:
1370
- - $ref: '#/components/parameters/accountId'
1384
+ - $ref: '#/components/parameters/accountId1'
1371
1385
  - $ref: '#/components/parameters/requestId'
1372
1386
  responses:
1373
1387
  '200':
1374
- $ref: '#/components/responses/getLookupResponse'
1375
- '400':
1376
- $ref: '#/components/responses/tnLookupBadRequestError'
1377
- '401':
1378
- $ref: '#/components/responses/tnLookupUnauthorizedError'
1379
- '403':
1380
- $ref: '#/components/responses/tnLookupForbiddenError'
1381
- '404':
1382
- $ref: '#/components/responses/tnLookupNotFoundError'
1383
- '429':
1384
- $ref: '#/components/responses/tnLookupTooManyRequestsError'
1385
- '500':
1386
- $ref: '#/components/responses/tnLookupInternalServerError'
1388
+ $ref: '#/components/responses/getAsyncBulkLookupResponse'
1389
+ default:
1390
+ $ref: '#/components/responses/tnLookupDefaultResponse'
1387
1391
  servers: *ref_3
1388
1392
  /accounts/{accountId}/tollFreeVerification:
1389
1393
  post:
@@ -5368,112 +5372,291 @@ components:
5368
5372
  The message containing the reason behind the request being
5369
5373
  forbidden.
5370
5374
  example: Missing Authentication Token
5371
- lookupStatusEnum:
5375
+ completedLookupStatusEnum:
5376
+ type: string
5377
+ enum:
5378
+ - COMPLETE
5379
+ - PARTIAL_COMPLETE
5380
+ - FAILED
5381
+ example: COMPLETE
5382
+ inProgressLookupStatusEnum:
5372
5383
  type: string
5373
- description: >-
5374
- The status of the request (IN_PROGRESS, COMPLETE, PARTIAL_COMPLETE, or
5375
- FAILED).
5376
5384
  enum:
5377
5385
  - IN_PROGRESS
5378
5386
  - COMPLETE
5379
5387
  - PARTIAL_COMPLETE
5380
5388
  - FAILED
5381
5389
  example: COMPLETE
5382
- lookupRequest:
5390
+ deactivationEventEnum:
5391
+ type: string
5392
+ description: >
5393
+ [DNI-Only](#section/DNI-Only).
5394
+
5395
+ `DEACTIVATED` if the carrier reported a deactivation event for this
5396
+ phone number.
5397
+ enum:
5398
+ - DEACTIVATED
5399
+ latestMessageDeliveryStatusEnum:
5400
+ type: string
5401
+ description: >-
5402
+ [DNI-Only](#section/DNI-Only). The current delivery status of the phone
5403
+ number.
5404
+
5405
+ - ACTIVE: A message was successfully sent to the number (delivery code
5406
+ 0).
5407
+
5408
+ - DEACTIVATED: A message was not delivered to a number (delivery code
5409
+ 720)
5410
+
5411
+ - UNKNOWN: Bandwidth cannot find an delivery status entry for the
5412
+ number.
5413
+ enum:
5414
+ - ACTIVE
5415
+ - DEACTIVATED
5416
+ - UNKNOWN
5417
+ lineTypeEnum:
5418
+ type: string
5419
+ enum:
5420
+ - FIXED
5421
+ - VOIP-FIXED
5422
+ - MOBILE
5423
+ - VOIP
5424
+ example: MOBILE
5425
+ requestId:
5426
+ type: string
5427
+ format: uuid
5428
+ description: The phone number lookup request ID from Bandwidth.
5429
+ example: 004223a0-8b17-41b1-bf81-20732adf5590
5430
+ linkSchema:
5431
+ title: Link
5383
5432
  type: object
5384
- description: Create phone number lookup request.
5385
5433
  properties:
5386
- tns:
5434
+ href:
5435
+ type: string
5436
+ description: URI of the link.
5437
+ example: /relative/uri
5438
+ rel:
5439
+ type: string
5440
+ description: Specifies the relationship between this link and the resource.
5441
+ example: aRelatedResource
5442
+ method:
5443
+ type: string
5444
+ description: HTTP method to be used.
5445
+ example: GET
5446
+ lookupErrorSchema:
5447
+ type: object
5448
+ properties:
5449
+ code:
5450
+ type: string
5451
+ description: Validation error code
5452
+ example: NO-MATCH
5453
+ description:
5454
+ type: string
5455
+ description: Description of validation error
5456
+ example: Example error description
5457
+ type:
5458
+ type: string
5459
+ description: Type of validation error
5460
+ example: NumberInventory
5461
+ meta:
5462
+ type: object
5463
+ properties:
5464
+ phoneNumbers:
5465
+ type: array
5466
+ items:
5467
+ type: string
5468
+ description: Phone number experiencing the error.
5469
+ example:
5470
+ - '+13992077164'
5471
+ - '+19196104424'
5472
+ message:
5473
+ type: string
5474
+ description: Message describing the error
5475
+ example: Invalid TNs
5476
+ code:
5477
+ type: integer
5478
+ description: Error code associated with the message
5479
+ example: 1001
5480
+ syncLookupRequest:
5481
+ type: object
5482
+ properties:
5483
+ phoneNumbers:
5484
+ description: Telephone numbers in E.164 format.
5387
5485
  type: array
5486
+ minimum: 1
5487
+ maximum: 100
5388
5488
  items:
5389
5489
  type: string
5490
+ pattern: ^\+[1-9]\d{1,14}$
5390
5491
  required:
5391
- - tns
5392
- createLookupResponse:
5492
+ - phoneNumbers
5493
+ asyncLookupRequest:
5393
5494
  type: object
5394
- description: >-
5395
- The request has been accepted for processing but not yet finished and in
5396
- a terminal state (COMPLETE, PARTIAL_COMPLETE, or FAILED).
5397
5495
  properties:
5398
- requestId:
5399
- type: string
5400
- description: The phone number lookup request ID from Bandwidth.
5401
- status:
5402
- $ref: '#/components/schemas/lookupStatusEnum'
5403
- lookupStatus:
5496
+ phoneNumbers:
5497
+ description: Telephone numbers in E.164 format.
5498
+ type: array
5499
+ minimum: 1
5500
+ maximum: 15000
5501
+ items:
5502
+ type: string
5503
+ pattern: ^\+[1-9]\d{1,14}$
5504
+ required:
5505
+ - phoneNumbers
5506
+ createSyncLookupResponse:
5404
5507
  type: object
5405
- description: >-
5406
- If requestId exists, the result for that request is returned. See the
5407
- Examples for details on the various responses that you can receive.
5408
- Generally, if you see a Response Code of 0 in a result for a TN,
5409
- information will be available for it. Any other Response Code will
5410
- indicate no information was available for the TN.
5411
5508
  properties:
5412
- requestId:
5413
- type: string
5414
- description: The requestId.
5415
- example: 004223a0-8b17-41b1-bf81-20732adf5590
5416
- status:
5417
- $ref: '#/components/schemas/lookupStatusEnum'
5418
- result:
5509
+ links:
5510
+ type: array
5511
+ items:
5512
+ $ref: '#/components/schemas/linkSchema'
5513
+ example: []
5514
+ data:
5515
+ type: object
5516
+ description: The phone number lookup response data
5517
+ properties:
5518
+ requestId:
5519
+ $ref: '#/components/schemas/requestId'
5520
+ status:
5521
+ $ref: '#/components/schemas/completedLookupStatusEnum'
5522
+ results:
5523
+ type: array
5524
+ description: >-
5525
+ The carrier information results for the specified telephone
5526
+ numbers.
5527
+ items:
5528
+ $ref: '#/components/schemas/lookupResult'
5529
+ errors:
5419
5530
  type: array
5420
- description: The carrier information results for the specified telephone number.
5421
5531
  items:
5422
- $ref: '#/components/schemas/lookupResult'
5423
- failedTelephoneNumbers:
5532
+ $ref: '#/components/schemas/lookupErrorSchema'
5533
+ createAsyncBulkLookupResponse:
5534
+ type: object
5535
+ properties:
5536
+ links:
5424
5537
  type: array
5425
- description: The telephone numbers whose lookup failed.
5538
+ description: Links for pagination (if applicable)
5426
5539
  items:
5427
- type: string
5428
- example:
5429
- - '+191955512345'
5540
+ $ref: '#/components/schemas/linkSchema'
5541
+ data:
5542
+ type: object
5543
+ description: The phone number lookup response data
5544
+ properties:
5545
+ requestId:
5546
+ $ref: '#/components/schemas/requestId'
5547
+ status:
5548
+ $ref: '#/components/schemas/inProgressLookupStatusEnum'
5549
+ errors:
5550
+ type: array
5551
+ items:
5552
+ $ref: '#/components/schemas/lookupErrorSchema'
5553
+ getAsyncBulkLookupResponse:
5554
+ type: object
5555
+ properties:
5556
+ links:
5557
+ type: array
5558
+ items:
5559
+ $ref: '#/components/schemas/linkSchema'
5560
+ example: []
5561
+ data:
5562
+ type: object
5563
+ description: The phone number lookup response data
5564
+ properties:
5565
+ requestId:
5566
+ $ref: '#/components/schemas/requestId'
5567
+ status:
5568
+ $ref: '#/components/schemas/inProgressLookupStatusEnum'
5569
+ results:
5570
+ type: array
5571
+ description: >-
5572
+ The carrier information results for the specified telephone
5573
+ number.
5574
+ items:
5575
+ $ref: '#/components/schemas/lookupResult'
5576
+ errors:
5577
+ type: array
5578
+ items:
5579
+ $ref: '#/components/schemas/lookupErrorSchema'
5580
+ lookupErrorResponse:
5581
+ type: object
5582
+ properties:
5583
+ links:
5584
+ type: array
5585
+ items:
5586
+ $ref: '#/components/schemas/linkSchema'
5587
+ example: []
5588
+ data:
5589
+ type: object
5590
+ description: The phone number lookup response data
5591
+ errors:
5592
+ type: array
5593
+ items:
5594
+ $ref: '#/components/schemas/lookupErrorSchema'
5430
5595
  lookupResult:
5431
5596
  type: object
5432
5597
  description: Carrier information results for the specified telephone number.
5433
5598
  properties:
5434
- Response Code:
5435
- type: integer
5436
- description: Our vendor's response code.
5437
- example: 0
5438
- Message:
5439
- type: string
5440
- description: Message associated with the response code.
5441
- example: NOERROR
5442
- E.164 Format:
5599
+ phoneNumber:
5443
5600
  type: string
5444
5601
  description: The telephone number in E.164 format.
5445
- example: '+19195551234'
5446
- Formatted:
5447
- type: string
5448
- description: The formatted version of the telephone number.
5449
- example: (919) 555-1234
5450
- Country:
5451
- type: string
5452
- description: The country of the telephone number.
5453
- example: US
5454
- Line Type:
5455
- type: string
5456
- description: The line type of the telephone number.
5457
- example: Mobile
5458
- Line Provider:
5602
+ example: '+10072904498'
5603
+ lineType:
5604
+ $ref: '#/components/schemas/lineTypeEnum'
5605
+ messagingProvider:
5459
5606
  type: string
5460
5607
  description: The messaging service provider of the telephone number.
5461
5608
  example: Verizon Wireless
5462
- Mobile Country Code:
5609
+ voiceProvider:
5463
5610
  type: string
5464
- description: The first half of the Home Network Identity (HNI).
5465
- example: '310'
5466
- Mobile Network Code:
5611
+ description: The voice service provider of the telephone number.
5612
+ example: Verizon Wireless
5613
+ countryCodeA3:
5467
5614
  type: string
5468
- description: The second half of the HNI.
5469
- example: '010'
5470
- tnLookupRequestError:
5471
- type: object
5472
- properties:
5473
- message:
5615
+ description: >-
5616
+ The country code of the telephone number in ISO 3166-1 alpha-3
5617
+ format.
5618
+ example: USA
5619
+ deactivationReporter:
5620
+ type: string
5621
+ description: >
5622
+ [DNI-Only](#section/DNI-Only).
5623
+
5624
+ The carrier that reported a deactivation event for this phone
5625
+ number.
5626
+ deactivationDate:
5627
+ type: string
5628
+ format: date-time-local
5629
+ description: >-
5630
+ [DNI-Only](#section/DNI-Only). The datetime the carrier reported a
5631
+ deactivation event.
5632
+ example: 2025-06-20 18:35
5633
+ deactivationEvent:
5634
+ $ref: '#/components/schemas/deactivationEventEnum'
5635
+ latestMessageDeliveryStatus:
5636
+ $ref: '#/components/schemas/latestMessageDeliveryStatusEnum'
5637
+ initialMessageDeliveryStatusDate:
5638
+ type: string
5639
+ format: date
5640
+ description: >-
5641
+ [DNI-Only](#section/DNI-Only). The date the phone number entered the
5642
+ status described in `latestMessageDeliveryStatus`.
5643
+
5644
+ Think of this as the "start time" for that status.
5645
+
5646
+ Value resets every time the `latestMessageDeliveryStatus` changes.
5647
+ example: '2025-06-20'
5648
+ latestMessageDeliveryStatusDate:
5474
5649
  type: string
5475
- description: A description of what validation error occurred.
5476
- example: example error message
5650
+ format: date
5651
+ description: >-
5652
+ [DNI-Only](#section/DNI-Only). The date bandwidth last received
5653
+ delivery status information for this phone number.
5654
+
5655
+ Use this field to understand how up-to-date the
5656
+ `latestMessageDeliveryStatus` is.
5657
+
5658
+ Value resets every time the `latestMessageDeliveryStatus` changes.
5659
+ example: '2025-06-21'
5477
5660
  accountId1:
5478
5661
  type: string
5479
5662
  description: User's account ID.
@@ -6720,109 +6903,68 @@ components:
6720
6903
  application/json:
6721
6904
  schema:
6722
6905
  $ref: '#/components/schemas/mfaRequestError'
6723
- createLookupResponse:
6906
+ createSyncLookupResponse:
6907
+ description: OK
6908
+ content:
6909
+ application/json:
6910
+ schema:
6911
+ $ref: '#/components/schemas/createSyncLookupResponse'
6912
+ examples:
6913
+ lookupCompleteWithDniExample:
6914
+ $ref: '#/components/examples/lookupCompleteWithDniExample'
6915
+ lookupCompleteExample:
6916
+ $ref: '#/components/examples/lookupCompleteExample'
6917
+ lookupPartialExample:
6918
+ $ref: '#/components/examples/lookupPartialExample'
6919
+ lookupFailedExample:
6920
+ $ref: '#/components/examples/lookupFailedExample'
6921
+ createAsyncBulkLookupResponse:
6724
6922
  description: Accepted
6725
6923
  content:
6726
6924
  application/json:
6727
6925
  schema:
6728
- $ref: '#/components/schemas/createLookupResponse'
6926
+ $ref: '#/components/schemas/createAsyncBulkLookupResponse'
6729
6927
  examples:
6730
- lookupResponseExample:
6928
+ lookupInProgressExample:
6731
6929
  $ref: '#/components/examples/lookupInProgressExample'
6732
- getLookupResponse:
6930
+ getAsyncBulkLookupResponse:
6733
6931
  description: OK
6734
6932
  content:
6735
6933
  application/json:
6736
6934
  schema:
6737
- $ref: '#/components/schemas/lookupStatus'
6935
+ $ref: '#/components/schemas/getAsyncBulkLookupResponse'
6738
6936
  examples:
6937
+ lookupCompleteWithDniExample:
6938
+ $ref: '#/components/examples/lookupCompleteWithDniExample'
6939
+ lookupCompleteExample:
6940
+ $ref: '#/components/examples/lookupCompleteExample'
6739
6941
  lookupInProgressExample:
6740
6942
  $ref: '#/components/examples/lookupInProgressExample'
6943
+ lookupPartialExample:
6944
+ $ref: '#/components/examples/lookupPartialExample'
6741
6945
  lookupFailedExample:
6742
6946
  $ref: '#/components/examples/lookupFailedExample'
6743
- lookupSingleNumberCompleteExample:
6744
- $ref: '#/components/examples/lookupSingleNumberCompleteExample'
6745
- lookupMultipleNumbersCompleteExample:
6746
- $ref: '#/components/examples/lookupMultipleNumbersCompleteExample'
6747
- lookupMultipleNumbersPartialCompleteExample:
6748
- $ref: >-
6749
- #/components/examples/lookupMultipleNumbersPartialCompleteExample
6750
- lookupSingleNumberCompleteNoInfoExample:
6751
- $ref: '#/components/examples/lookupSingleNumberCompleteNoInfoExample'
6752
- tnLookupBadRequestError:
6947
+ tnLookupDefaultResponse:
6753
6948
  description: Bad Request
6754
6949
  content:
6755
6950
  application/json:
6756
6951
  schema:
6757
- $ref: '#/components/schemas/tnLookupRequestError'
6952
+ $ref: '#/components/schemas/lookupErrorResponse'
6758
6953
  examples:
6759
6954
  badRequest:
6760
- summary: Example Bad Request Error
6761
- value:
6762
- message: 'Some tns do not match e164 format: 1234'
6763
- tnLookupUnauthorizedError:
6764
- description: Unauthorized
6765
- content:
6766
- application/json:
6767
- schema:
6768
- $ref: '#/components/schemas/tnLookupRequestError'
6769
- examples:
6955
+ $ref: '#/components/examples/badRequestExample'
6770
6956
  unauthorized:
6771
- summary: Example Unauthorized Error
6772
- value:
6773
- message: Unauthorized
6774
- tnLookupForbiddenError:
6775
- description: Forbidden
6776
- content:
6777
- application/json:
6778
- schema:
6779
- $ref: '#/components/schemas/tnLookupRequestError'
6780
- examples:
6957
+ $ref: '#/components/examples/unauthorizedExample'
6781
6958
  forbidden:
6782
- summary: Example Forbidden Error
6783
- value:
6784
- message: >-
6785
- Authorization header requires 'Credential' parameter.
6786
- Authorization header requires 'Signature' parameter.
6787
- Authorization header requires 'SignedHeaders' parameter.
6788
- Authorization header requires existence of either a
6789
- 'X-Amz-Date' or a 'Date' header. Authorization=Basic
6790
- Y2tvZloPTGhHgywYIzGlcGVlcGvvcGovYTIGIt=='
6791
- tnLookupMediaTypeError:
6792
- description: Unsupported Media Type
6793
- content:
6794
- application/json:
6795
- schema:
6796
- $ref: '#/components/schemas/tnLookupRequestError'
6797
- examples:
6798
- mediaType:
6799
- summary: Example Unsupported Media Type Error
6800
- value:
6801
- message: Content-Type must be application/json.
6802
- tnLookupNotFoundError:
6803
- description: Not Found
6804
- tnLookupTooManyRequestsError:
6805
- description: Too Many Requests
6806
- content:
6807
- application/json:
6808
- schema:
6809
- $ref: '#/components/schemas/tnLookupRequestError'
6810
- examples:
6959
+ $ref: '#/components/examples/forbiddenExample'
6811
6960
  mediaType:
6812
- summary: Example Too Many Requests Error
6813
- value:
6814
- message: Too many requests.
6815
- tnLookupInternalServerError:
6816
- description: Internal Server Error
6817
- content:
6818
- application/json:
6819
- schema:
6820
- $ref: '#/components/schemas/tnLookupRequestError'
6821
- examples:
6822
- mediaType:
6823
- summary: Example Internal Server Error Error
6824
- value:
6825
- message: Request has not been passed further.
6961
+ $ref: '#/components/examples/unsupportedMediaTypeExample'
6962
+ notFound:
6963
+ $ref: '#/components/examples/notFoundExample'
6964
+ tooManyRequests:
6965
+ $ref: '#/components/examples/tooManyRequestsExample'
6966
+ internalServer:
6967
+ $ref: '#/components/examples/internalServerErrorExample'
6826
6968
  getTollFreeVerificationStatusResponse:
6827
6969
  description: OK
6828
6970
  content:
@@ -7405,14 +7547,23 @@ components:
7405
7547
  type: string
7406
7548
  description: Filter results to calls with specified call Disconnect Cause.
7407
7549
  example: hangup
7550
+ accountId1:
7551
+ in: path
7552
+ name: accountId
7553
+ required: true
7554
+ schema:
7555
+ type: string
7556
+ description: Your Bandwidth Account ID.
7557
+ example: '9900000'
7408
7558
  requestId:
7409
- name: requestId
7410
7559
  in: path
7560
+ name: requestId
7411
7561
  required: true
7412
7562
  schema:
7413
7563
  type: string
7414
- description: The phone number lookup request ID from Bandwidth.
7415
- example: 004223a0-8b17-41b1-bf81-20732adf5590
7564
+ format: uuid
7565
+ description: The phone number lookup request ID from Bandwidth.
7566
+ example: 004223a0-8b17-41b1-bf81-20732adf5590
7416
7567
  tfPhoneNumberPathParam:
7417
7568
  in: path
7418
7569
  name: phoneNumber
@@ -7651,95 +7802,208 @@ components:
7651
7802
  type: validation
7652
7803
  description: 'Invalid answerUrl: only http and https are allowed.'
7653
7804
  singleNumberRequestExample:
7654
- summary: Example Number Lookup Request for One Number
7805
+ summary: Number Lookup Request
7655
7806
  value:
7656
- tns:
7657
- - '+19195551234'
7807
+ phoneNumbers:
7808
+ - '+19196104423'
7658
7809
  multipleNumberRequestExample:
7659
- summary: Example Number Lookup Request for Multiple Numbers
7810
+ summary: Number Lookup Request for Multiple Numbers
7660
7811
  value:
7661
- tns:
7662
- - '+19195551234'
7663
- - '+19195554321'
7812
+ phoneNumbers:
7813
+ - '+19196104423'
7814
+ - '+19196104424'
7664
7815
  lookupInProgressExample:
7665
- summary: Example Lookup In Progress Response
7816
+ summary: Numbers Lookup In Progress
7666
7817
  value:
7667
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7668
- status: IN_PROGRESS
7818
+ links:
7819
+ - href: href
7820
+ rel: rel
7821
+ method: GET
7822
+ data:
7823
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7824
+ status: IN_PROGRESS
7825
+ results: []
7826
+ errors: []
7669
7827
  lookupFailedExample:
7670
- summary: Example Lookup Failed Response
7828
+ summary: Numbers Lookup Failed
7829
+ value:
7830
+ links:
7831
+ - href: href
7832
+ rel: rel
7833
+ method: GET
7834
+ data:
7835
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7836
+ status: FAILED
7837
+ results: []
7838
+ errors:
7839
+ - code: NO-MATCH
7840
+ description: The following TNs could not be found in the Number Industry data
7841
+ meta:
7842
+ phoneNumbers:
7843
+ - '+13992077164'
7844
+ message: Invalid TNs
7845
+ code: 1001
7846
+ type: NumberInventory
7847
+ lookupPartialExample:
7848
+ summary: Numbers Lookup Partial Complete
7849
+ value:
7850
+ links:
7851
+ - href: href
7852
+ rel: rel
7853
+ method: GET
7854
+ data:
7855
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7856
+ status: PARTIAL_COMPLETE
7857
+ results:
7858
+ - phoneNumber: '+19196104423'
7859
+ lineType: MOBILE
7860
+ messagingProvider: Verizon Wireless
7861
+ voiceProvider: Verizon Wireless
7862
+ countryCodeA3: USA
7863
+ - phoneNumber: '+19196104424'
7864
+ lineType: MOBILE
7865
+ messagingProvider: T-Mobile USA
7866
+ voiceProvider: T-Mobile USA
7867
+ countryCodeA3: USA
7868
+ errors:
7869
+ - code: NO-MATCH
7870
+ description: The following TNs could not be found in the Number Industry data
7871
+ meta:
7872
+ phoneNumbers:
7873
+ - '+13992077164'
7874
+ message: Invalid TNs
7875
+ code: 1001
7876
+ type: NumberInventory
7877
+ lookupCompleteExample:
7878
+ summary: Numbers Lookup Complete (without DNI)
7879
+ value:
7880
+ links:
7881
+ - href: href
7882
+ rel: rel
7883
+ method: GET
7884
+ data:
7885
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7886
+ status: COMPLETE
7887
+ results:
7888
+ - phoneNumber: '+10072904497'
7889
+ lineType: MOBILE
7890
+ messagingProvider: Verizon Wireless
7891
+ voiceProvider: Verizon Wireless
7892
+ countryCodeA3: USA
7893
+ - phoneNumber: '+10072904498'
7894
+ lineType: MOBILE
7895
+ messagingProvider: T-Mobile USA
7896
+ voiceProvider: T-Mobile USA
7897
+ countryCodeA3: USA
7898
+ errors: []
7899
+ lookupCompleteWithDniExample:
7900
+ summary: Numbers Lookup Complete (with DNI)
7671
7901
  value:
7672
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7673
- status: FAILED
7674
- failedTelephoneNumbers:
7675
- - '+191955512345'
7676
- lookupSingleNumberCompleteExample:
7677
- summary: Example Single Number Lookup Complete Response
7902
+ links:
7903
+ - href: href
7904
+ rel: rel
7905
+ method: GET
7906
+ data:
7907
+ requestId: 20732adf-bf81-8b17-41b1-004223a05590
7908
+ status: COMPLETE
7909
+ results:
7910
+ - phoneNumber: '+10072904497'
7911
+ countryCodeA3: USA
7912
+ lineType: MOBILE
7913
+ messagingProvider: T-MOBILE USA INC
7914
+ voiceProvider: T-MOBILE USA INC
7915
+ latestMessageDeliveryStatus: ACTIVE
7916
+ initialMessageDeliveryStatusDate: '2025-05-14'
7917
+ latestMessageDeliveryStatusDate: '2025-05-18'
7918
+ - phoneNumber: '+10072904498'
7919
+ countryCodeA3: USA
7920
+ lineType: FIXED
7921
+ voiceProvider: VERIZON
7922
+ latestMessageDeliveryStatus: DEACTIVATED
7923
+ initialMessageDeliveryStatusDate: '2025-09-05'
7924
+ latestMessageDeliveryStatusDate: '2025-09-05'
7925
+ - phoneNumber: '+10072904499'
7926
+ lineType: MOBILE
7927
+ countryCodeA3: USA
7928
+ messagingProvider: VERIZON
7929
+ voiceProvider: VERIZON
7930
+ deactivationReporter: Verizon Wireless
7931
+ deactivationDate: '2025-09-29 01:23:00'
7932
+ deactivationEvent: DEACTIVATED
7933
+ latestMessageDeliveryStatus: UNKNOWN
7934
+ errors: []
7935
+ badRequestExample:
7936
+ summary: Example Bad Request Error
7937
+ value:
7938
+ links: []
7939
+ data: {}
7940
+ errors:
7941
+ - type: bad-request
7942
+ description: >-
7943
+ Bad Request. Ensure that you have set the requestId as a URL path
7944
+ parameter.
7945
+ unauthorizedExample:
7946
+ summary: Unauthorized Error
7947
+ value:
7948
+ links: []
7949
+ data: {}
7950
+ errors:
7951
+ - type: Unauthorized
7952
+ description: You are not authorized to access this resource.
7953
+ code: '1'
7954
+ page: null
7955
+ forbiddenExample:
7956
+ summary: Forbidden Error
7957
+ value:
7958
+ links: []
7959
+ data: {}
7960
+ errors:
7961
+ - type: Forbidden
7962
+ description: You do not have permission to access this resource.
7963
+ code: '2'
7964
+ page: null
7965
+ unsupportedMediaTypeExample:
7966
+ summary: Unsupported Media Type Error
7678
7967
  value:
7679
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7680
- status: COMPLETE
7681
- result:
7682
- - Response Code: 0
7683
- Message: NOERROR
7684
- E.164 Format: '+19195551234'
7685
- Formatted: (919) 555-1234
7686
- Country: US
7687
- Line Type: Mobile
7688
- Line Provider: Verizon Wireless
7689
- Mobile Country Code: '310'
7690
- Mobile Network Code: '010'
7691
- lookupMultipleNumbersCompleteExample:
7692
- summary: Example Multiple Numbers Lookup Complete Response
7968
+ links: []
7969
+ data: {}
7970
+ errors:
7971
+ - type: invalid-content-type
7972
+ description: >-
7973
+ Invalid content-type. Ensure that your content-type header is set
7974
+ to application/json.
7975
+ notFoundExample:
7976
+ summary: Not Found Error
7693
7977
  value:
7694
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7695
- status: COMPLETE
7696
- result:
7697
- - Response Code: 0
7698
- Message: NOERROR
7699
- E.164 Format: '+19195551234'
7700
- Formatted: (919) 555-1234
7701
- Country: US
7702
- Line Type: Mobile
7703
- Line Provider: Verizon Wireless
7704
- Mobile Country Code: '310'
7705
- Mobile Network Code: '010'
7706
- - Response Code: 0
7707
- Message: NOERROR
7708
- E.164 Format: '+19195554321'
7709
- Formatted: (919) 555-4321
7710
- Country: US
7711
- Line Type: Mobile
7712
- Line Provider: T-Mobile USA
7713
- Mobile Country Code: '310'
7714
- Mobile Network Code: '160'
7715
- lookupMultipleNumbersPartialCompleteExample:
7716
- summary: Example Multiple Numbers Lookup Partial Complete Response
7978
+ links: []
7979
+ data: {}
7980
+ errors:
7981
+ - type: not-found
7982
+ description: >-
7983
+ RequestId not found. Ensure that the requestId used in the URL
7984
+ path is valid and maps to a previous request that was submitted.
7985
+ tooManyRequestsExample:
7986
+ summary: Too Many Requests Error
7717
7987
  value:
7718
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7719
- status: PARTIAL_COMPLETE
7720
- result:
7721
- - Response Code: 0
7722
- Message: NOERROR
7723
- E.164 Format: '+19195551234'
7724
- Formatted: (919) 555-1234
7725
- Country: US
7726
- Line Type: Mobile
7727
- Line Provider: Verizon Wireless
7728
- Mobile Country Code: '310'
7729
- Mobile Network Code: '010'
7730
- failedTelephoneNumbers:
7731
- - '+191955512345'
7732
- lookupSingleNumberCompleteNoInfoExample:
7733
- summary: Example Single Number Lookup Complete with No Information Response
7988
+ links: []
7989
+ data: {}
7990
+ errors:
7991
+ - type: rate-limiting
7992
+ description: >-
7993
+ Rate limit exceeded. Wait for the time specified in the
7994
+ Retry-After header before sending another request.
7995
+ internalServerErrorExample:
7996
+ summary: Internal Server Error
7734
7997
  value:
7735
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7736
- status: COMPLETE
7737
- result:
7738
- - Response Code: 3
7739
- Message: NXDOMAIN
7740
- E.164 Format: '+19195550000'
7741
- Formatted: (919) 555-0000
7742
- Country: US
7998
+ links: []
7999
+ data: {}
8000
+ errors:
8001
+ - code: '500'
8002
+ type: unexpected-error
8003
+ description: >-
8004
+ Unexpected error. Please contact Bandwidth Support if your
8005
+ requests are receiving this status code for an extended period of
8006
+ time.
7743
8007
  requestBodies:
7744
8008
  createMessageRequest:
7745
8009
  content:
@@ -8039,18 +8303,28 @@ components:
8039
8303
  application/json:
8040
8304
  schema:
8041
8305
  $ref: '#/components/schemas/verifyCodeRequest'
8042
- createLookupRequest:
8043
- description: Phone number lookup request.
8306
+ createSyncLookupRequest:
8307
+ description: Synchronous phone number lookup request.
8044
8308
  required: true
8045
8309
  content:
8046
8310
  application/json:
8047
8311
  schema:
8048
- $ref: '#/components/schemas/lookupRequest'
8312
+ $ref: '#/components/schemas/syncLookupRequest'
8049
8313
  examples:
8050
8314
  singleNumberRequestExample:
8051
8315
  $ref: '#/components/examples/singleNumberRequestExample'
8052
8316
  multipleNumberRequestExample:
8053
8317
  $ref: '#/components/examples/multipleNumberRequestExample'
8318
+ createAsyncBulkLookupRequest:
8319
+ description: Asynchronous bulk phone number lookup request.
8320
+ required: true
8321
+ content:
8322
+ application/json:
8323
+ schema:
8324
+ $ref: '#/components/schemas/asyncLookupRequest'
8325
+ examples:
8326
+ multipleNumberRequestExample:
8327
+ $ref: '#/components/examples/multipleNumberRequestExample'
8054
8328
  requestTollFreeVerificationRequest:
8055
8329
  description: Request for verification of a toll-free phone number.
8056
8330
  required: true