Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 50 additions & 8 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand All @@ -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':
Expand Down Expand Up @@ -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'
Expand All @@ -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':
Expand All @@ -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'
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions bandwidth/api/media_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)],
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)],
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)],
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading