diff --git a/bandwidth.yml b/bandwidth.yml index 53949fed..6b44f54f 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -88,12 +88,11 @@ paths: put: summary: Upload Media description: >- - Upload a file. You may add headers to the request in order to provide - some control to your media file. + Upload a file. - If a file is uploaded with the same name as a file that already exists - under this account, the previous file will be overwritten. + Filename should always be unique. Reusing filenames may result in the + wrong media being sent. A list of supported media types can be found at [Bandwidth @@ -1404,7 +1403,19 @@ paths: tags: - Toll-Free Verification summary: Request Toll-Free Verification - description: Submit a request for verification of a toll-free phone number. + description: >- + Submit a request for verification of a toll-free phone number. + + + **Upcoming change (effective January 2027):** If any phone number in the + request already has a verification in progress, the request will be + rejected with a `409 Conflict`. + + This check is all-or-nothing: if a single phone number conflicts, the + entire request is rejected and **none** of the phone numbers in the + request are submitted. + + Today, these requests are accepted with a `202`. operationId: requestTollFreeVerification parameters: - $ref: '#/components/parameters/accountId4' @@ -1421,6 +1432,8 @@ paths: $ref: '#/components/responses/tfvForbiddenResponse' '405': $ref: '#/components/responses/tfvNotAllowedResponse' + '409': + $ref: '#/components/responses/tfvConflictResponse' '429': $ref: '#/components/responses/tfvTooManyRequestsResponse' '500': @@ -1477,6 +1490,14 @@ paths: Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). + + Returns a `404` if no verification request exists for the phone number, + and a `400` if the existing request is not eligible for resubmission. + + + **Upcoming change (effective January 2027):** If a verification for the + phone number is in progress, the update will be rejected with a `409 + Conflict`. operationId: updateTollFreeVerificationRequest parameters: - $ref: '#/components/parameters/accountId4' @@ -1492,8 +1513,12 @@ paths: $ref: '#/components/responses/tfvUnauthorizedResponse' '403': $ref: '#/components/responses/tfvForbiddenResponse' + '404': + $ref: '#/components/responses/tfvNotFoundResponse' '405': $ref: '#/components/responses/tfvNotAllowedResponse' + '409': + $ref: '#/components/responses/tfvConflictResponse' '429': $ref: '#/components/responses/tfvTooManyRequestsResponse' '500': @@ -1504,7 +1529,13 @@ paths: tfVerificationStatus: $ref: '#/components/callbacks/tfVerificationStatus' delete: - description: Delete a toll-free verification submission for a toll-free number. + description: >- + Delete a toll-free verification submission for a toll-free number. + + + **Upcoming change (effective January 2027):** If a verification for the + phone number is in progress, it will be cancelled and the submission + will then be deleted asynchronously. operationId: deleteVerificationRequest parameters: - $ref: '#/components/parameters/accountId4' @@ -6273,10 +6304,9 @@ components: Government-issued business identifying number. - **Note: As of October 19th, 2026 this field will be required when - `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is - provided, `businessRegistrationType` and - `businessRegistrationIssuingCountry` are also required.** + **This field is required when `businessEntityType` is _not_ + `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` + and `businessRegistrationIssuingCountry` are also required.** nullable: true maxLength: 500 example: 12-3456789 @@ -6286,8 +6316,8 @@ components: The type of business registration number. - **Note: As of October 19th, 2026 this field will be required when - `businessRegistrationNumber` is provided.** + **This field is required when `businessRegistrationNumber` is + provided.** enum: - EIN - CBN @@ -6317,8 +6347,8 @@ components: encouraged. - **Note: As of October 19th, 2026 this field will be required when - `businessRegistrationNumber` is provided.** + **This field is required when `businessRegistrationNumber` is + provided.** | Registration Type | Supported Countries | @@ -6368,9 +6398,9 @@ components: The type of registered business. - **Note: As of October 19th, 2026 submissions using a value other than - `SOLE_PROPRIETOR` must provide a value for `businessRegistrationNumber`, - `businessRegistrationType`, and `businessRegistrationIssuingCountry`. + **Submissions using a value other than `SOLE_PROPRIETOR` must provide a + value for `businessRegistrationNumber`, `businessRegistrationType`, and + `businessRegistrationIssuingCountry`. Submissions using `SOLE_PROPRIETOR` must _omit_ `businessRegistrationNumber`, `businessRegistrationType`, and @@ -6490,6 +6520,7 @@ components: - useCaseSummary - productionMessageContent - optInWorkflow + - businessEntityType properties: businessAddress: $ref: '#/components/schemas/address' @@ -8072,6 +8103,17 @@ components: example: description: Cannot find the requested resource. type: Not Found + tfvConflictResponse: + description: >- + Conflict. A toll-free verification for the phone number is already in + progress. + content: + application/json: + schema: + $ref: '#/components/schemas/tfvError' + example: + description: 'TFV request already in progress for phone number: +18005551234' + type: conflict tfvNotAllowedResponse: description: Method Not Allowed content: @@ -8256,8 +8298,8 @@ components: style: simple explode: false description: >- - General-header field is used to specify directives that MUST be obeyed - by all caching mechanisms along the request/response chain. + Pass-through header stored with the media and returned when the media is + retrieved by the user. Does not affect internal server caching behavior. example: no-cache schema: type: string diff --git a/bandwidth/api/media_api.py b/bandwidth/api/media_api.py index 1bb8b389..cee63f85 100644 --- a/bandwidth/api/media_api.py +++ b/bandwidth/api/media_api.py @@ -960,7 +960,7 @@ def upload_media( media_id: Annotated[StrictStr, Field(description="The ID of the media file.")], body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], content_type: Annotated[Optional[StrictStr], Field(description="The media type of the entity-body.")] = None, - cache_control: Annotated[Optional[StrictStr], Field(description="General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain.")] = None, + cache_control: Annotated[Optional[StrictStr], Field(description="Pass-through header stored with the media and returned when the media is retrieved by the user. Does not affect internal server caching behavior.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -976,7 +976,7 @@ def upload_media( ) -> None: """Upload Media - Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported). + Upload a file. Filename should always be unique. Reusing filenames may result in the wrong media being sent. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported). :param account_id: This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) :type account_id: str @@ -986,7 +986,7 @@ def upload_media( :type body: bytearray :param content_type: The media type of the entity-body. :type content_type: str - :param cache_control: General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. + :param cache_control: Pass-through header stored with the media and returned when the media is retrieved by the user. Does not affect internal server caching behavior. :type cache_control: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1051,7 +1051,7 @@ def upload_media_with_http_info( media_id: Annotated[StrictStr, Field(description="The ID of the media file.")], body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], content_type: Annotated[Optional[StrictStr], Field(description="The media type of the entity-body.")] = None, - cache_control: Annotated[Optional[StrictStr], Field(description="General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain.")] = None, + cache_control: Annotated[Optional[StrictStr], Field(description="Pass-through header stored with the media and returned when the media is retrieved by the user. Does not affect internal server caching behavior.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1067,7 +1067,7 @@ def upload_media_with_http_info( ) -> ApiResponse[None]: """Upload Media - Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported). + Upload a file. Filename should always be unique. Reusing filenames may result in the wrong media being sent. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported). :param account_id: This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) :type account_id: str @@ -1077,7 +1077,7 @@ def upload_media_with_http_info( :type body: bytearray :param content_type: The media type of the entity-body. :type content_type: str - :param cache_control: General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. + :param cache_control: Pass-through header stored with the media and returned when the media is retrieved by the user. Does not affect internal server caching behavior. :type cache_control: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1142,7 +1142,7 @@ def upload_media_without_preload_content( media_id: Annotated[StrictStr, Field(description="The ID of the media file.")], body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], content_type: Annotated[Optional[StrictStr], Field(description="The media type of the entity-body.")] = None, - cache_control: Annotated[Optional[StrictStr], Field(description="General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain.")] = None, + cache_control: Annotated[Optional[StrictStr], Field(description="Pass-through header stored with the media and returned when the media is retrieved by the user. Does not affect internal server caching behavior.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1158,7 +1158,7 @@ def upload_media_without_preload_content( ) -> RESTResponseType: """Upload Media - Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported). + Upload a file. Filename should always be unique. Reusing filenames may result in the wrong media being sent. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported). :param account_id: This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) :type account_id: str @@ -1168,7 +1168,7 @@ def upload_media_without_preload_content( :type body: bytearray :param content_type: The media type of the entity-body. :type content_type: str - :param cache_control: General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. + :param cache_control: Pass-through header stored with the media and returned when the media is retrieved by the user. Does not affect internal server caching behavior. :type cache_control: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/bandwidth/api/toll_free_verification_api.py b/bandwidth/api/toll_free_verification_api.py index 5c70fa94..898c5716 100644 --- a/bandwidth/api/toll_free_verification_api.py +++ b/bandwidth/api/toll_free_verification_api.py @@ -382,7 +382,7 @@ def delete_verification_request( ) -> None: """Delete a Toll-Free Verification Submission - Delete a toll-free verification submission for a toll-free number. + Delete a toll-free verification submission for a toll-free number. **Upcoming change (effective January 2027):** If a verification for the phone number is in progress, it will be cancelled and the submission will then be deleted asynchronously. :param account_id: Your Bandwidth Account ID. (required) :type account_id: str @@ -461,7 +461,7 @@ def delete_verification_request_with_http_info( ) -> ApiResponse[None]: """Delete a Toll-Free Verification Submission - Delete a toll-free verification submission for a toll-free number. + Delete a toll-free verification submission for a toll-free number. **Upcoming change (effective January 2027):** If a verification for the phone number is in progress, it will be cancelled and the submission will then be deleted asynchronously. :param account_id: Your Bandwidth Account ID. (required) :type account_id: str @@ -540,7 +540,7 @@ def delete_verification_request_without_preload_content( ) -> RESTResponseType: """Delete a Toll-Free Verification Submission - Delete a toll-free verification submission for a toll-free number. + Delete a toll-free verification submission for a toll-free number. **Upcoming change (effective January 2027):** If a verification for the phone number is in progress, it will be cancelled and the submission will then be deleted asynchronously. :param account_id: Your Bandwidth Account ID. (required) :type account_id: str @@ -1854,7 +1854,7 @@ def request_toll_free_verification( ) -> None: """Request Toll-Free Verification - Submit a request for verification of a toll-free phone number. + Submit a request for verification of a toll-free phone number. **Upcoming change (effective January 2027):** If any phone number in the request already has a verification in progress, the request will be rejected with a `409 Conflict`. This check is all-or-nothing: if a single phone number conflicts, the entire request is rejected and **none** of the phone numbers in the request are submitted. Today, these requests are accepted with a `202`. :param account_id: Your Bandwidth Account ID. (required) :type account_id: str @@ -1897,6 +1897,7 @@ def request_toll_free_verification( '401': "TfvError", '403': "TfvError", '405': "TfvError", + '409': "TfvError", '429': "TfvError", '500': "TfvError", '503': "TfvError", @@ -1932,7 +1933,7 @@ def request_toll_free_verification_with_http_info( ) -> ApiResponse[None]: """Request Toll-Free Verification - Submit a request for verification of a toll-free phone number. + Submit a request for verification of a toll-free phone number. **Upcoming change (effective January 2027):** If any phone number in the request already has a verification in progress, the request will be rejected with a `409 Conflict`. This check is all-or-nothing: if a single phone number conflicts, the entire request is rejected and **none** of the phone numbers in the request are submitted. Today, these requests are accepted with a `202`. :param account_id: Your Bandwidth Account ID. (required) :type account_id: str @@ -1975,6 +1976,7 @@ def request_toll_free_verification_with_http_info( '401': "TfvError", '403': "TfvError", '405': "TfvError", + '409': "TfvError", '429': "TfvError", '500': "TfvError", '503': "TfvError", @@ -2010,7 +2012,7 @@ def request_toll_free_verification_without_preload_content( ) -> RESTResponseType: """Request Toll-Free Verification - Submit a request for verification of a toll-free phone number. + Submit a request for verification of a toll-free phone number. **Upcoming change (effective January 2027):** If any phone number in the request already has a verification in progress, the request will be rejected with a `409 Conflict`. This check is all-or-nothing: if a single phone number conflicts, the entire request is rejected and **none** of the phone numbers in the request are submitted. Today, these requests are accepted with a `202`. :param account_id: Your Bandwidth Account ID. (required) :type account_id: str @@ -2053,6 +2055,7 @@ def request_toll_free_verification_without_preload_content( '401': "TfvError", '403': "TfvError", '405': "TfvError", + '409': "TfvError", '429': "TfvError", '500': "TfvError", '503': "TfvError", @@ -2169,7 +2172,7 @@ def update_toll_free_verification_request( ) -> None: """Update Toll-Free Verification Request - Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). + Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). Returns a `404` if no verification request exists for the phone number, and a `400` if the existing request is not eligible for resubmission. **Upcoming change (effective January 2027):** If a verification for the phone number is in progress, the update will be rejected with a `409 Conflict`. :param account_id: Your Bandwidth Account ID. (required) :type account_id: str @@ -2214,7 +2217,9 @@ def update_toll_free_verification_request( '400': "TfvError", '401': "TfvError", '403': "TfvError", + '404': "TfvError", '405': "TfvError", + '409': "TfvError", '429': "TfvError", '500': "TfvError", '503': "TfvError", @@ -2251,7 +2256,7 @@ def update_toll_free_verification_request_with_http_info( ) -> ApiResponse[None]: """Update Toll-Free Verification Request - Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). + Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). Returns a `404` if no verification request exists for the phone number, and a `400` if the existing request is not eligible for resubmission. **Upcoming change (effective January 2027):** If a verification for the phone number is in progress, the update will be rejected with a `409 Conflict`. :param account_id: Your Bandwidth Account ID. (required) :type account_id: str @@ -2296,7 +2301,9 @@ def update_toll_free_verification_request_with_http_info( '400': "TfvError", '401': "TfvError", '403': "TfvError", + '404': "TfvError", '405': "TfvError", + '409': "TfvError", '429': "TfvError", '500': "TfvError", '503': "TfvError", @@ -2333,7 +2340,7 @@ def update_toll_free_verification_request_without_preload_content( ) -> RESTResponseType: """Update Toll-Free Verification Request - Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). + Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). Returns a `404` if no verification request exists for the phone number, and a `400` if the existing request is not eligible for resubmission. **Upcoming change (effective January 2027):** If a verification for the phone number is in progress, the update will be rejected with a `409 Conflict`. :param account_id: Your Bandwidth Account ID. (required) :type account_id: str @@ -2378,7 +2385,9 @@ def update_toll_free_verification_request_without_preload_content( '400': "TfvError", '401': "TfvError", '403': "TfvError", + '404': "TfvError", '405': "TfvError", + '409': "TfvError", '429': "TfvError", '500': "TfvError", '503': "TfvError", diff --git a/bandwidth/models/business_entity_type_enum.py b/bandwidth/models/business_entity_type_enum.py index bda2ea2e..2454338e 100644 --- a/bandwidth/models/business_entity_type_enum.py +++ b/bandwidth/models/business_entity_type_enum.py @@ -21,7 +21,7 @@ class BusinessEntityTypeEnum(str, Enum): """ - The type of registered business. **Note: As of October 19th, 2026 submissions using a value other than `SOLE_PROPRIETOR` must provide a value for `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Submissions using `SOLE_PROPRIETOR` must _omit_ `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Failure to adhere to these constraints will result in a 400 Bad Request rejection.** + The type of registered business. **Submissions using a value other than `SOLE_PROPRIETOR` must provide a value for `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Submissions using `SOLE_PROPRIETOR` must _omit_ `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Failure to adhere to these constraints will result in a 400 Bad Request rejection.** """ """ diff --git a/bandwidth/models/business_registration_type_enum.py b/bandwidth/models/business_registration_type_enum.py index 9025bd25..239c07bf 100644 --- a/bandwidth/models/business_registration_type_enum.py +++ b/bandwidth/models/business_registration_type_enum.py @@ -21,7 +21,7 @@ class BusinessRegistrationTypeEnum(str, Enum): """ - The type of business registration number. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** + The type of business registration number. **This field is required when `businessRegistrationNumber` is provided.** """ """ diff --git a/bandwidth/models/tfv_submission_info.py b/bandwidth/models/tfv_submission_info.py index cbed7c01..3356513c 100644 --- a/bandwidth/models/tfv_submission_info.py +++ b/bandwidth/models/tfv_submission_info.py @@ -45,9 +45,9 @@ class TfvSubmissionInfo(BaseModel): privacy_policy_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl") terms_and_conditions_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl") business_dba: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The company 'Doing Business As'.", alias="businessDba") - business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** ", alias="businessRegistrationNumber") + business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **This field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** ", alias="businessRegistrationNumber") business_registration_type: Optional[BusinessRegistrationTypeEnum] = Field(default=None, alias="businessRegistrationType") - business_registration_issuing_country: Optional[StrictStr] = Field(default=None, description="The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |", alias="businessRegistrationIssuingCountry") + business_registration_issuing_country: Optional[StrictStr] = Field(default=None, description="The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **This field is required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |", alias="businessRegistrationIssuingCountry") business_entity_type: Optional[BusinessEntityTypeEnum] = Field(default=None, alias="businessEntityType") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessRegistrationIssuingCountry", "businessEntityType"] diff --git a/bandwidth/models/verification_request.py b/bandwidth/models/verification_request.py index 117e0363..88b232ec 100644 --- a/bandwidth/models/verification_request.py +++ b/bandwidth/models/verification_request.py @@ -46,9 +46,9 @@ class VerificationRequest(BaseModel): privacy_policy_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl") terms_and_conditions_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl") business_dba: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The company 'Doing Business As'.", alias="businessDba") - business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** ", alias="businessRegistrationNumber") + business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **This field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** ", alias="businessRegistrationNumber") business_registration_type: Optional[BusinessRegistrationTypeEnum] = Field(default=None, alias="businessRegistrationType") - business_registration_issuing_country: Optional[StrictStr] = Field(default=None, description="The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |", alias="businessRegistrationIssuingCountry") + business_registration_issuing_country: Optional[StrictStr] = Field(default=None, description="The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **This field is required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |", alias="businessRegistrationIssuingCountry") business_entity_type: BusinessEntityTypeEnum = Field(alias="businessEntityType") help_message_response: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="A message that gets sent to users requesting help.", alias="helpMessageResponse") age_gated_content: Optional[StrictBool] = Field(default=None, description="Indicates whether the content is age-gated.", alias="ageGatedContent") diff --git a/bandwidth/models/verification_update_request.py b/bandwidth/models/verification_update_request.py index f1b553b8..b8622286 100644 --- a/bandwidth/models/verification_update_request.py +++ b/bandwidth/models/verification_update_request.py @@ -45,10 +45,10 @@ class VerificationUpdateRequest(BaseModel): privacy_policy_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl") terms_and_conditions_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl") business_dba: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The company 'Doing Business As'.", alias="businessDba") - business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** ", alias="businessRegistrationNumber") + business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **This field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** ", alias="businessRegistrationNumber") business_registration_type: Optional[BusinessRegistrationTypeEnum] = Field(default=None, alias="businessRegistrationType") - business_entity_type: Optional[BusinessEntityTypeEnum] = Field(default=None, alias="businessEntityType") - business_registration_issuing_country: Optional[StrictStr] = Field(default=None, description="The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |", alias="businessRegistrationIssuingCountry") + business_entity_type: BusinessEntityTypeEnum = Field(alias="businessEntityType") + business_registration_issuing_country: Optional[StrictStr] = Field(default=None, description="The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **This field is required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |", alias="businessRegistrationIssuingCountry") help_message_response: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="A message that gets sent to users requesting help.", alias="helpMessageResponse") age_gated_content: Optional[StrictBool] = Field(default=None, description="Indicates whether the content is age-gated.", alias="ageGatedContent") cv_token: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection.", alias="cvToken") diff --git a/docs/BusinessEntityTypeEnum.md b/docs/BusinessEntityTypeEnum.md index 5915474f..1734d15f 100644 --- a/docs/BusinessEntityTypeEnum.md +++ b/docs/BusinessEntityTypeEnum.md @@ -1,6 +1,6 @@ # BusinessEntityTypeEnum -The type of registered business. **Note: As of October 19th, 2026 submissions using a value other than `SOLE_PROPRIETOR` must provide a value for `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Submissions using `SOLE_PROPRIETOR` must _omit_ `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Failure to adhere to these constraints will result in a 400 Bad Request rejection.** +The type of registered business. **Submissions using a value other than `SOLE_PROPRIETOR` must provide a value for `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Submissions using `SOLE_PROPRIETOR` must _omit_ `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Failure to adhere to these constraints will result in a 400 Bad Request rejection.** ## Enum diff --git a/docs/BusinessRegistrationTypeEnum.md b/docs/BusinessRegistrationTypeEnum.md index b7a9c923..9c6dd981 100644 --- a/docs/BusinessRegistrationTypeEnum.md +++ b/docs/BusinessRegistrationTypeEnum.md @@ -1,6 +1,6 @@ # BusinessRegistrationTypeEnum -The type of business registration number. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** +The type of business registration number. **This field is required when `businessRegistrationNumber` is provided.** ## Enum diff --git a/docs/MediaApi.md b/docs/MediaApi.md index 723f225c..85ff9630 100644 --- a/docs/MediaApi.md +++ b/docs/MediaApi.md @@ -303,9 +303,9 @@ Name | Type | Description | Notes Upload Media -Upload a file. You may add headers to the request in order to provide some control to your media file. +Upload a file. -If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. +Filename should always be unique. Reusing filenames may result in the wrong media being sent. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported). @@ -350,7 +350,7 @@ with bandwidth.ApiClient(configuration) as api_client: media_id = 'bw.png' # str | The ID of the media file. body = None # bytearray | content_type = 'audio/wav' # str | The media type of the entity-body. (optional) - cache_control = 'no-cache' # str | General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. (optional) + cache_control = 'no-cache' # str | Pass-through header stored with the media and returned when the media is retrieved by the user. Does not affect internal server caching behavior. (optional) try: # Upload Media @@ -370,7 +370,7 @@ Name | Type | Description | Notes **media_id** | **str**| The ID of the media file. | **body** | **bytearray**| | **content_type** | **str**| The media type of the entity-body. | [optional] - **cache_control** | **str**| General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. | [optional] + **cache_control** | **str**| Pass-through header stored with the media and returned when the media is retrieved by the user. Does not affect internal server caching behavior. | [optional] ### Return type diff --git a/docs/TfvSubmissionInfo.md b/docs/TfvSubmissionInfo.md index 7f1a0107..6c88fbb7 100644 --- a/docs/TfvSubmissionInfo.md +++ b/docs/TfvSubmissionInfo.md @@ -17,9 +17,9 @@ Name | Type | Description | Notes **privacy_policy_url** | **str** | The Toll-Free Verification request privacy policy URL. | [optional] **terms_and_conditions_url** | **str** | The Toll-Free Verification request terms and conditions policy URL. | [optional] **business_dba** | **str** | The company 'Doing Business As'. | [optional] -**business_registration_number** | **str** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] +**business_registration_number** | **str** | Government-issued business identifying number. **This field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] -**business_registration_issuing_country** | **str** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] +**business_registration_issuing_country** | **str** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **This field is required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] ## Example diff --git a/docs/TollFreeVerificationApi.md b/docs/TollFreeVerificationApi.md index 9d972ba1..104c3959 100644 --- a/docs/TollFreeVerificationApi.md +++ b/docs/TollFreeVerificationApi.md @@ -121,6 +121,8 @@ Delete a Toll-Free Verification Submission Delete a toll-free verification submission for a toll-free number. +**Upcoming change (effective January 2027):** If a verification for the phone number is in progress, it will be cancelled and the submission will then be deleted asynchronously. + ### Example * Basic Authentication (Basic): @@ -587,6 +589,10 @@ Request Toll-Free Verification Submit a request for verification of a toll-free phone number. +**Upcoming change (effective January 2027):** If any phone number in the request already has a verification in progress, the request will be rejected with a `409 Conflict`. +This check is all-or-nothing: if a single phone number conflicts, the entire request is rejected and **none** of the phone numbers in the request are submitted. +Today, these requests are accepted with a `202`. + ### Example * Basic Authentication (Basic): @@ -667,6 +673,7 @@ void (empty response body) **401** | Unauthorized | - | **403** | Forbidden | - | **405** | Method Not Allowed | - | +**409** | Conflict. A toll-free verification for the phone number is already in progress. | - | **429** | Too Many Requests | - | **500** | Internal Server Error | - | **503** | Service Unavailable | - | @@ -680,6 +687,9 @@ Update Toll-Free Verification Request Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). +Returns a `404` if no verification request exists for the phone number, and a `400` if the existing request is not eligible for resubmission. + +**Upcoming change (effective January 2027):** If a verification for the phone number is in progress, the update will be rejected with a `409 Conflict`. ### Example @@ -762,7 +772,9 @@ void (empty response body) **400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | +**404** | Cannot find the requested resource. | - | **405** | Method Not Allowed | - | +**409** | Conflict. A toll-free verification for the phone number is already in progress. | - | **429** | Too Many Requests | - | **500** | Internal Server Error | - | **503** | Service Unavailable | - | diff --git a/docs/VerificationRequest.md b/docs/VerificationRequest.md index 3674b18a..2300bef3 100644 --- a/docs/VerificationRequest.md +++ b/docs/VerificationRequest.md @@ -18,9 +18,9 @@ Name | Type | Description | Notes **privacy_policy_url** | **str** | The Toll-Free Verification request privacy policy URL. | [optional] **terms_and_conditions_url** | **str** | The Toll-Free Verification request terms and conditions policy URL. | [optional] **business_dba** | **str** | The company 'Doing Business As'. | [optional] -**business_registration_number** | **str** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] +**business_registration_number** | **str** | Government-issued business identifying number. **This field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] -**business_registration_issuing_country** | **str** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] +**business_registration_issuing_country** | **str** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **This field is required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | **help_message_response** | **str** | A message that gets sent to users requesting help. | [optional] **age_gated_content** | **bool** | Indicates whether the content is age-gated. | [optional] diff --git a/docs/VerificationUpdateRequest.md b/docs/VerificationUpdateRequest.md index 6148e472..a24f6d4f 100644 --- a/docs/VerificationUpdateRequest.md +++ b/docs/VerificationUpdateRequest.md @@ -17,10 +17,10 @@ Name | Type | Description | Notes **privacy_policy_url** | **str** | The Toll-Free Verification request privacy policy URL. | [optional] **terms_and_conditions_url** | **str** | The Toll-Free Verification request terms and conditions policy URL. | [optional] **business_dba** | **str** | The company 'Doing Business As'. | [optional] -**business_registration_number** | **str** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] +**business_registration_number** | **str** | Government-issued business identifying number. **This field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] -**business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] -**business_registration_issuing_country** | **str** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] +**business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | +**business_registration_issuing_country** | **str** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **This field is required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] **help_message_response** | **str** | A message that gets sent to users requesting help. | [optional] **age_gated_content** | **bool** | Indicates whether the content is age-gated. | [optional] **cv_token** | **str** | The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection. | [optional] diff --git a/test/unit/models/test_tfv_submission_wrapper.py b/test/unit/models/test_tfv_submission_wrapper.py index 75a86522..ac5bfc0a 100644 --- a/test/unit/models/test_tfv_submission_wrapper.py +++ b/test/unit/models/test_tfv_submission_wrapper.py @@ -61,6 +61,7 @@ def make_instance(self, include_optional) -> TfvSubmissionWrapper: 'https://www.example.com/path/to/resource' ], confirmation_response = 'Thank you for opting in!', ), + business_entity_type = 'SOLE_PROPRIETOR', additional_information = 'Any additional information', isv_reseller = 'Test ISV', ) ) @@ -99,6 +100,7 @@ def testTfvSubmissionWrapper(self): assert instance.submission.opt_in_workflow.confirmation_response == 'Thank you for opting in!' assert instance.submission.additional_information == 'Any additional information' assert instance.submission.isv_reseller == 'Test ISV' + assert instance.submission.business_entity_type == 'SOLE_PROPRIETOR' if __name__ == '__main__': unittest.main()