bandwidth-sdk 16.2.1 → 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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +18 -18
  3. data/README.md +20 -7
  4. data/bandwidth.yml +555 -279
  5. data/coverage/.last_run.json +1 -1
  6. data/coverage/.resultset.json +197 -90
  7. data/coverage/index.html +2433 -1267
  8. data/docs/AsyncLookupRequest.md +18 -0
  9. data/docs/CallState.md +2 -2
  10. data/docs/{LookupRequest.md → CompletedLookupStatusEnum.md} +2 -5
  11. data/docs/CreateAsyncBulkLookupResponse.md +22 -0
  12. data/docs/{CreateLookupResponse.md → CreateAsyncBulkLookupResponseData.md} +4 -4
  13. data/docs/CreateSyncLookupResponse.md +22 -0
  14. data/docs/CreateSyncLookupResponseData.md +22 -0
  15. data/docs/DeactivationEventEnum.md +15 -0
  16. data/docs/GetAsyncBulkLookupResponse.md +22 -0
  17. data/docs/GetAsyncBulkLookupResponseData.md +22 -0
  18. data/docs/InProgressLookupStatusEnum.md +15 -0
  19. data/docs/LatestMessageDeliveryStatusEnum.md +15 -0
  20. data/docs/{LookupStatusEnum.md → LineTypeEnum.md} +2 -2
  21. data/docs/LinkSchema.md +22 -0
  22. data/docs/LookupErrorResponse.md +22 -0
  23. data/docs/LookupErrorSchema.md +24 -0
  24. data/docs/LookupErrorSchemaMeta.md +22 -0
  25. data/docs/LookupResult.md +22 -18
  26. data/docs/PhoneNumberLookupApi.md +111 -38
  27. data/docs/RbmActionBase.md +1 -1
  28. data/docs/RbmSuggestionResponse.md +1 -1
  29. data/docs/StirShaken.md +2 -2
  30. data/docs/SyncLookupRequest.md +18 -0
  31. data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +117 -43
  32. data/lib/bandwidth-sdk/configuration.rb +10 -4
  33. data/lib/bandwidth-sdk/models/async_lookup_request.rb +232 -0
  34. data/lib/bandwidth-sdk/models/call_state.rb +1 -1
  35. data/lib/bandwidth-sdk/models/completed_lookup_status_enum.rb +41 -0
  36. data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response.rb +235 -0
  37. data/lib/bandwidth-sdk/models/{create_lookup_response.rb → create_async_bulk_lookup_response_data.rb} +5 -5
  38. data/lib/bandwidth-sdk/models/create_sync_lookup_response.rb +234 -0
  39. data/lib/bandwidth-sdk/models/{lookup_status.rb → create_sync_lookup_response_data.rb} +15 -27
  40. data/lib/bandwidth-sdk/models/deactivation_event_enum.rb +39 -0
  41. data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response.rb +234 -0
  42. data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response_data.rb +257 -0
  43. data/lib/bandwidth-sdk/models/{lookup_status_enum.rb → in_progress_lookup_status_enum.rb} +3 -3
  44. data/lib/bandwidth-sdk/models/latest_message_delivery_status_enum.rb +41 -0
  45. data/lib/bandwidth-sdk/models/line_type_enum.rb +42 -0
  46. data/lib/bandwidth-sdk/models/{lookup_request.rb → link_schema.rb} +31 -20
  47. data/lib/bandwidth-sdk/models/lookup_error_response.rb +235 -0
  48. data/lib/bandwidth-sdk/models/lookup_error_schema.rb +242 -0
  49. data/lib/bandwidth-sdk/models/{tn_lookup_request_error.rb → lookup_error_schema_meta.rb} +29 -8
  50. data/lib/bandwidth-sdk/models/lookup_result.rb +102 -63
  51. data/lib/bandwidth-sdk/models/stir_shaken.rb +1 -1
  52. data/lib/bandwidth-sdk/models/sync_lookup_request.rb +232 -0
  53. data/lib/bandwidth-sdk/version.rb +1 -1
  54. data/lib/bandwidth-sdk.rb +17 -5
  55. data/spec/smoke/multi_channel_api_spec.rb +1 -1
  56. data/spec/smoke/phone_number_lookup_api_spec.rb +65 -70
  57. data/spec/unit/api/phone_number_lookup_api_spec.rb +71 -56
  58. metadata +80 -56
  59. data/docs/LookupStatus.md +0 -24
  60. data/docs/TnLookupRequestError.md +0 -18
data/bandwidth.yml CHANGED
@@ -1328,60 +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
- summary: Create Lookup
1334
- description: Create a Phone Number Lookup Request.
1335
- 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
1336
1338
  tags:
1337
1339
  - Phone Number Lookup
1338
1340
  parameters:
1339
- - $ref: '#/components/parameters/accountId'
1341
+ - $ref: '#/components/parameters/accountId1'
1340
1342
  requestBody:
1341
- $ref: '#/components/requestBodies/createLookupRequest'
1343
+ $ref: '#/components/requestBodies/createSyncLookupRequest'
1342
1344
  responses:
1343
- '202':
1344
- $ref: '#/components/responses/createLookupResponse'
1345
- '400':
1346
- $ref: '#/components/responses/tnLookupBadRequestError'
1347
- '401':
1348
- $ref: '#/components/responses/tnLookupUnauthorizedError'
1349
- '403':
1350
- $ref: '#/components/responses/tnLookupForbiddenError'
1351
- '415':
1352
- $ref: '#/components/responses/tnLookupMediaTypeError'
1353
- '429':
1354
- $ref: '#/components/responses/tnLookupTooManyRequestsError'
1355
- '500':
1356
- $ref: '#/components/responses/tnLookupInternalServerError'
1345
+ '200':
1346
+ $ref: '#/components/responses/createSyncLookupResponse'
1347
+ default:
1348
+ $ref: '#/components/responses/tnLookupDefaultResponse'
1357
1349
  servers: &ref_3
1358
- - url: https://numbers.bandwidth.com/api/v1
1350
+ - url: https://api.bandwidth.com/v2
1359
1351
  description: Production
1360
- /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}:
1361
1374
  get:
1362
- summary: Get Lookup Request Status
1363
- description: Get an existing Phone Number Lookup Request.
1364
- 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
1365
1381
  tags:
1366
1382
  - Phone Number Lookup
1367
1383
  parameters:
1368
- - $ref: '#/components/parameters/accountId'
1384
+ - $ref: '#/components/parameters/accountId1'
1369
1385
  - $ref: '#/components/parameters/requestId'
1370
1386
  responses:
1371
1387
  '200':
1372
- $ref: '#/components/responses/getLookupResponse'
1373
- '400':
1374
- $ref: '#/components/responses/tnLookupBadRequestError'
1375
- '401':
1376
- $ref: '#/components/responses/tnLookupUnauthorizedError'
1377
- '403':
1378
- $ref: '#/components/responses/tnLookupForbiddenError'
1379
- '404':
1380
- $ref: '#/components/responses/tnLookupNotFoundError'
1381
- '429':
1382
- $ref: '#/components/responses/tnLookupTooManyRequestsError'
1383
- '500':
1384
- $ref: '#/components/responses/tnLookupInternalServerError'
1388
+ $ref: '#/components/responses/getAsyncBulkLookupResponse'
1389
+ default:
1390
+ $ref: '#/components/responses/tnLookupDefaultResponse'
1385
1391
  servers: *ref_3
1386
1392
  /accounts/{accountId}/tollFreeVerification:
1387
1393
  post:
@@ -3357,7 +3363,7 @@ components:
3357
3363
 
3358
3364
  | verstat | (optional) The verification status indicating whether
3359
3365
  the verification was successful or not. Possible values are
3360
- `TN-Verification-Passed` or `TN-Verification-Failed`. |
3366
+ `TN-Validation-Passed` or `TN-Validation-Failed`. |
3361
3367
 
3362
3368
  | attestationIndicator | (optional) The attestation level verified
3363
3369
  by Bandwidth. Possible values are `A` (full), `B` (partial) or `C`
@@ -3375,7 +3381,7 @@ components:
3375
3381
  additionalProperties:
3376
3382
  type: string
3377
3383
  example:
3378
- verstat: TN-Verification-Passed
3384
+ verstat: TN-Validation-Passed
3379
3385
  attestationIndicator: A
3380
3386
  originatingId: abc123
3381
3387
  identity:
@@ -5211,8 +5217,8 @@ components:
5211
5217
  description: >-
5212
5218
  (optional) The verification status indicating whether the
5213
5219
  verification was successful or not. Possible values are
5214
- TN-Verification-Passed and TN-Verification-Failed.
5215
- example: Tn-Verification-Passed
5220
+ TN-Validation-Passed and TN-Validation-Failed.
5221
+ example: Tn-Validation-Passed
5216
5222
  attestationIndicator:
5217
5223
  type: string
5218
5224
  description: >-
@@ -5366,112 +5372,291 @@ components:
5366
5372
  The message containing the reason behind the request being
5367
5373
  forbidden.
5368
5374
  example: Missing Authentication Token
5369
- lookupStatusEnum:
5375
+ completedLookupStatusEnum:
5376
+ type: string
5377
+ enum:
5378
+ - COMPLETE
5379
+ - PARTIAL_COMPLETE
5380
+ - FAILED
5381
+ example: COMPLETE
5382
+ inProgressLookupStatusEnum:
5370
5383
  type: string
5371
- description: >-
5372
- The status of the request (IN_PROGRESS, COMPLETE, PARTIAL_COMPLETE, or
5373
- FAILED).
5374
5384
  enum:
5375
5385
  - IN_PROGRESS
5376
5386
  - COMPLETE
5377
5387
  - PARTIAL_COMPLETE
5378
5388
  - FAILED
5379
5389
  example: COMPLETE
5380
- 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
5381
5432
  type: object
5382
- description: Create phone number lookup request.
5383
5433
  properties:
5384
- 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.
5385
5485
  type: array
5486
+ minimum: 1
5487
+ maximum: 100
5386
5488
  items:
5387
5489
  type: string
5490
+ pattern: ^\+[1-9]\d{1,14}$
5388
5491
  required:
5389
- - tns
5390
- createLookupResponse:
5492
+ - phoneNumbers
5493
+ asyncLookupRequest:
5391
5494
  type: object
5392
- description: >-
5393
- The request has been accepted for processing but not yet finished and in
5394
- a terminal state (COMPLETE, PARTIAL_COMPLETE, or FAILED).
5395
5495
  properties:
5396
- requestId:
5397
- type: string
5398
- description: The phone number lookup request ID from Bandwidth.
5399
- status:
5400
- $ref: '#/components/schemas/lookupStatusEnum'
5401
- 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:
5402
5507
  type: object
5403
- description: >-
5404
- If requestId exists, the result for that request is returned. See the
5405
- Examples for details on the various responses that you can receive.
5406
- Generally, if you see a Response Code of 0 in a result for a TN,
5407
- information will be available for it. Any other Response Code will
5408
- indicate no information was available for the TN.
5409
5508
  properties:
5410
- requestId:
5411
- type: string
5412
- description: The requestId.
5413
- example: 004223a0-8b17-41b1-bf81-20732adf5590
5414
- status:
5415
- $ref: '#/components/schemas/lookupStatusEnum'
5416
- 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:
5417
5530
  type: array
5418
- description: The carrier information results for the specified telephone number.
5419
5531
  items:
5420
- $ref: '#/components/schemas/lookupResult'
5421
- failedTelephoneNumbers:
5532
+ $ref: '#/components/schemas/lookupErrorSchema'
5533
+ createAsyncBulkLookupResponse:
5534
+ type: object
5535
+ properties:
5536
+ links:
5422
5537
  type: array
5423
- description: The telephone numbers whose lookup failed.
5538
+ description: Links for pagination (if applicable)
5424
5539
  items:
5425
- type: string
5426
- example:
5427
- - '+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'
5428
5595
  lookupResult:
5429
5596
  type: object
5430
5597
  description: Carrier information results for the specified telephone number.
5431
5598
  properties:
5432
- Response Code:
5433
- type: integer
5434
- description: Our vendor's response code.
5435
- example: 0
5436
- Message:
5437
- type: string
5438
- description: Message associated with the response code.
5439
- example: NOERROR
5440
- E.164 Format:
5599
+ phoneNumber:
5441
5600
  type: string
5442
5601
  description: The telephone number in E.164 format.
5443
- example: '+19195551234'
5444
- Formatted:
5445
- type: string
5446
- description: The formatted version of the telephone number.
5447
- example: (919) 555-1234
5448
- Country:
5449
- type: string
5450
- description: The country of the telephone number.
5451
- example: US
5452
- Line Type:
5453
- type: string
5454
- description: The line type of the telephone number.
5455
- example: Mobile
5456
- Line Provider:
5602
+ example: '+10072904498'
5603
+ lineType:
5604
+ $ref: '#/components/schemas/lineTypeEnum'
5605
+ messagingProvider:
5457
5606
  type: string
5458
5607
  description: The messaging service provider of the telephone number.
5459
5608
  example: Verizon Wireless
5460
- Mobile Country Code:
5609
+ voiceProvider:
5461
5610
  type: string
5462
- description: The first half of the Home Network Identity (HNI).
5463
- example: '310'
5464
- Mobile Network Code:
5611
+ description: The voice service provider of the telephone number.
5612
+ example: Verizon Wireless
5613
+ countryCodeA3:
5465
5614
  type: string
5466
- description: The second half of the HNI.
5467
- example: '010'
5468
- tnLookupRequestError:
5469
- type: object
5470
- properties:
5471
- 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:
5472
5649
  type: string
5473
- description: A description of what validation error occurred.
5474
- 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'
5475
5660
  accountId1:
5476
5661
  type: string
5477
5662
  description: User's account ID.
@@ -6718,109 +6903,68 @@ components:
6718
6903
  application/json:
6719
6904
  schema:
6720
6905
  $ref: '#/components/schemas/mfaRequestError'
6721
- 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:
6722
6922
  description: Accepted
6723
6923
  content:
6724
6924
  application/json:
6725
6925
  schema:
6726
- $ref: '#/components/schemas/createLookupResponse'
6926
+ $ref: '#/components/schemas/createAsyncBulkLookupResponse'
6727
6927
  examples:
6728
- lookupResponseExample:
6928
+ lookupInProgressExample:
6729
6929
  $ref: '#/components/examples/lookupInProgressExample'
6730
- getLookupResponse:
6930
+ getAsyncBulkLookupResponse:
6731
6931
  description: OK
6732
6932
  content:
6733
6933
  application/json:
6734
6934
  schema:
6735
- $ref: '#/components/schemas/lookupStatus'
6935
+ $ref: '#/components/schemas/getAsyncBulkLookupResponse'
6736
6936
  examples:
6937
+ lookupCompleteWithDniExample:
6938
+ $ref: '#/components/examples/lookupCompleteWithDniExample'
6939
+ lookupCompleteExample:
6940
+ $ref: '#/components/examples/lookupCompleteExample'
6737
6941
  lookupInProgressExample:
6738
6942
  $ref: '#/components/examples/lookupInProgressExample'
6943
+ lookupPartialExample:
6944
+ $ref: '#/components/examples/lookupPartialExample'
6739
6945
  lookupFailedExample:
6740
6946
  $ref: '#/components/examples/lookupFailedExample'
6741
- lookupSingleNumberCompleteExample:
6742
- $ref: '#/components/examples/lookupSingleNumberCompleteExample'
6743
- lookupMultipleNumbersCompleteExample:
6744
- $ref: '#/components/examples/lookupMultipleNumbersCompleteExample'
6745
- lookupMultipleNumbersPartialCompleteExample:
6746
- $ref: >-
6747
- #/components/examples/lookupMultipleNumbersPartialCompleteExample
6748
- lookupSingleNumberCompleteNoInfoExample:
6749
- $ref: '#/components/examples/lookupSingleNumberCompleteNoInfoExample'
6750
- tnLookupBadRequestError:
6947
+ tnLookupDefaultResponse:
6751
6948
  description: Bad Request
6752
6949
  content:
6753
6950
  application/json:
6754
6951
  schema:
6755
- $ref: '#/components/schemas/tnLookupRequestError'
6952
+ $ref: '#/components/schemas/lookupErrorResponse'
6756
6953
  examples:
6757
6954
  badRequest:
6758
- summary: Example Bad Request Error
6759
- value:
6760
- message: 'Some tns do not match e164 format: 1234'
6761
- tnLookupUnauthorizedError:
6762
- description: Unauthorized
6763
- content:
6764
- application/json:
6765
- schema:
6766
- $ref: '#/components/schemas/tnLookupRequestError'
6767
- examples:
6955
+ $ref: '#/components/examples/badRequestExample'
6768
6956
  unauthorized:
6769
- summary: Example Unauthorized Error
6770
- value:
6771
- message: Unauthorized
6772
- tnLookupForbiddenError:
6773
- description: Forbidden
6774
- content:
6775
- application/json:
6776
- schema:
6777
- $ref: '#/components/schemas/tnLookupRequestError'
6778
- examples:
6957
+ $ref: '#/components/examples/unauthorizedExample'
6779
6958
  forbidden:
6780
- summary: Example Forbidden Error
6781
- value:
6782
- message: >-
6783
- Authorization header requires 'Credential' parameter.
6784
- Authorization header requires 'Signature' parameter.
6785
- Authorization header requires 'SignedHeaders' parameter.
6786
- Authorization header requires existence of either a
6787
- 'X-Amz-Date' or a 'Date' header. Authorization=Basic
6788
- Y2tvZloPTGhHgywYIzGlcGVlcGvvcGovYTIGIt=='
6789
- tnLookupMediaTypeError:
6790
- description: Unsupported Media Type
6791
- content:
6792
- application/json:
6793
- schema:
6794
- $ref: '#/components/schemas/tnLookupRequestError'
6795
- examples:
6796
- mediaType:
6797
- summary: Example Unsupported Media Type Error
6798
- value:
6799
- message: Content-Type must be application/json.
6800
- tnLookupNotFoundError:
6801
- description: Not Found
6802
- tnLookupTooManyRequestsError:
6803
- description: Too Many Requests
6804
- content:
6805
- application/json:
6806
- schema:
6807
- $ref: '#/components/schemas/tnLookupRequestError'
6808
- examples:
6959
+ $ref: '#/components/examples/forbiddenExample'
6809
6960
  mediaType:
6810
- summary: Example Too Many Requests Error
6811
- value:
6812
- message: Too many requests.
6813
- tnLookupInternalServerError:
6814
- description: Internal Server Error
6815
- content:
6816
- application/json:
6817
- schema:
6818
- $ref: '#/components/schemas/tnLookupRequestError'
6819
- examples:
6820
- mediaType:
6821
- summary: Example Internal Server Error Error
6822
- value:
6823
- 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'
6824
6968
  getTollFreeVerificationStatusResponse:
6825
6969
  description: OK
6826
6970
  content:
@@ -7403,14 +7547,23 @@ components:
7403
7547
  type: string
7404
7548
  description: Filter results to calls with specified call Disconnect Cause.
7405
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'
7406
7558
  requestId:
7407
- name: requestId
7408
7559
  in: path
7560
+ name: requestId
7409
7561
  required: true
7410
7562
  schema:
7411
7563
  type: string
7412
- description: The phone number lookup request ID from Bandwidth.
7413
- 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
7414
7567
  tfPhoneNumberPathParam:
7415
7568
  in: path
7416
7569
  name: phoneNumber
@@ -7649,95 +7802,208 @@ components:
7649
7802
  type: validation
7650
7803
  description: 'Invalid answerUrl: only http and https are allowed.'
7651
7804
  singleNumberRequestExample:
7652
- summary: Example Number Lookup Request for One Number
7805
+ summary: Number Lookup Request
7653
7806
  value:
7654
- tns:
7655
- - '+19195551234'
7807
+ phoneNumbers:
7808
+ - '+19196104423'
7656
7809
  multipleNumberRequestExample:
7657
- summary: Example Number Lookup Request for Multiple Numbers
7810
+ summary: Number Lookup Request for Multiple Numbers
7658
7811
  value:
7659
- tns:
7660
- - '+19195551234'
7661
- - '+19195554321'
7812
+ phoneNumbers:
7813
+ - '+19196104423'
7814
+ - '+19196104424'
7662
7815
  lookupInProgressExample:
7663
- summary: Example Lookup In Progress Response
7816
+ summary: Numbers Lookup In Progress
7664
7817
  value:
7665
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7666
- 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: []
7667
7827
  lookupFailedExample:
7668
- 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)
7669
7901
  value:
7670
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7671
- status: FAILED
7672
- failedTelephoneNumbers:
7673
- - '+191955512345'
7674
- lookupSingleNumberCompleteExample:
7675
- 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
7676
7967
  value:
7677
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7678
- status: COMPLETE
7679
- result:
7680
- - Response Code: 0
7681
- Message: NOERROR
7682
- E.164 Format: '+19195551234'
7683
- Formatted: (919) 555-1234
7684
- Country: US
7685
- Line Type: Mobile
7686
- Line Provider: Verizon Wireless
7687
- Mobile Country Code: '310'
7688
- Mobile Network Code: '010'
7689
- lookupMultipleNumbersCompleteExample:
7690
- 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
7691
7977
  value:
7692
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7693
- status: COMPLETE
7694
- result:
7695
- - Response Code: 0
7696
- Message: NOERROR
7697
- E.164 Format: '+19195551234'
7698
- Formatted: (919) 555-1234
7699
- Country: US
7700
- Line Type: Mobile
7701
- Line Provider: Verizon Wireless
7702
- Mobile Country Code: '310'
7703
- Mobile Network Code: '010'
7704
- - Response Code: 0
7705
- Message: NOERROR
7706
- E.164 Format: '+19195554321'
7707
- Formatted: (919) 555-4321
7708
- Country: US
7709
- Line Type: Mobile
7710
- Line Provider: T-Mobile USA
7711
- Mobile Country Code: '310'
7712
- Mobile Network Code: '160'
7713
- lookupMultipleNumbersPartialCompleteExample:
7714
- 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
7715
7987
  value:
7716
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7717
- status: PARTIAL_COMPLETE
7718
- result:
7719
- - Response Code: 0
7720
- Message: NOERROR
7721
- E.164 Format: '+19195551234'
7722
- Formatted: (919) 555-1234
7723
- Country: US
7724
- Line Type: Mobile
7725
- Line Provider: Verizon Wireless
7726
- Mobile Country Code: '310'
7727
- Mobile Network Code: '010'
7728
- failedTelephoneNumbers:
7729
- - '+191955512345'
7730
- lookupSingleNumberCompleteNoInfoExample:
7731
- 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
7732
7997
  value:
7733
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
7734
- status: COMPLETE
7735
- result:
7736
- - Response Code: 3
7737
- Message: NXDOMAIN
7738
- E.164 Format: '+19195550000'
7739
- Formatted: (919) 555-0000
7740
- 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.
7741
8007
  requestBodies:
7742
8008
  createMessageRequest:
7743
8009
  content:
@@ -8037,18 +8303,28 @@ components:
8037
8303
  application/json:
8038
8304
  schema:
8039
8305
  $ref: '#/components/schemas/verifyCodeRequest'
8040
- createLookupRequest:
8041
- description: Phone number lookup request.
8306
+ createSyncLookupRequest:
8307
+ description: Synchronous phone number lookup request.
8042
8308
  required: true
8043
8309
  content:
8044
8310
  application/json:
8045
8311
  schema:
8046
- $ref: '#/components/schemas/lookupRequest'
8312
+ $ref: '#/components/schemas/syncLookupRequest'
8047
8313
  examples:
8048
8314
  singleNumberRequestExample:
8049
8315
  $ref: '#/components/examples/singleNumberRequestExample'
8050
8316
  multipleNumberRequestExample:
8051
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'
8052
8328
  requestTollFreeVerificationRequest:
8053
8329
  description: Request for verification of a toll-free phone number.
8054
8330
  required: true