Skip to content
Open
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
33 changes: 28 additions & 5 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@ paths:
/users/{accountId}/messages:
get:
summary: List Messages
description: Returns a list of messages based on query parameters.
description: >
Returns a list of messages based on query parameters.
**Rate Limit:** This endpoint is rate limited to 3500 requests per 5
minutes per Source IP address. Exceeding the limit returns HTTP 429 with
a `Retry-After` header.
operationId: listMessages
tags:
- Messages
Expand Down Expand Up @@ -207,10 +213,12 @@ paths:
$ref: '#/components/responses/messagingForbiddenError'
'404':
$ref: '#/components/responses/messagingNotFoundError'
'405':
$ref: '#/components/responses/messagingMethodNotAllowedError'
'415':
$ref: '#/components/responses/messagingInvalidMediaTypeError'
'429':
$ref: '#/components/responses/messagingTooManyRequestsError'
$ref: '#/components/responses/listMessagesTooManyRequestsError'
'500':
$ref: '#/components/responses/messagingInternalServerError'
post:
Expand Down Expand Up @@ -2257,7 +2265,9 @@ components:
type: object
properties:
media:
$ref: '#/components/schemas/rbmMessageContentFile'
type: array
items:
$ref: '#/components/schemas/rbmMessageContentFile'
suggestions:
$ref: '#/components/schemas/multiChannelFullActions'
required:
Expand Down Expand Up @@ -5875,15 +5885,13 @@ components:
type: object
internalTicketNumber:
type: string
format: uuid
description: >-
Unique identifier (UUID) generated by Bandwidth to assist in tracking
the verification status of a toll-free number - included in all webhook
payloads.
example: acde070d-8c4c-4f0d-9d8a-162843c10333
internalTicketNumberForWebhook:
type: string
format: uuid
description: >-
Unique identifier (UUID) generated by Bandwidth to assist in tracking
the verification status of a toll-free number.
Expand Down Expand Up @@ -6752,6 +6760,21 @@ components:
- type: internal-server-error
description: Internal server error. No further information available
source: {}
listMessagesTooManyRequestsError:
description: Too Many Requests
headers:
Retry-After:
description: The number of seconds to wait before retrying the request.
schema:
type: integer
example: 300
content:
application/json:
schema:
$ref: "#/components/schemas/messagingRequestError"
example:
type: rate_limit_exceeded
description: Rate limit exceeded. Wait for Retry-After time before sending another request.
createCallResponse:
description: Created
headers:
Expand Down
9 changes: 6 additions & 3 deletions bandwidth/api/messages_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def list_messages(
) -> MessagesList:
"""List Messages

Returns a list of messages based on query parameters.
Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.

:param account_id: Your Bandwidth Account ID. (required)
:type account_id: str
Expand Down Expand Up @@ -533,6 +533,7 @@ def list_messages(
'401': "MessagingRequestError",
'403': "MessagingRequestError",
'404': "MessagingRequestError",
'405': "MessagingRequestError",
'415': "MessagingRequestError",
'429': "MessagingRequestError",
'500': "MessagingRequestError",
Expand Down Expand Up @@ -594,7 +595,7 @@ def list_messages_with_http_info(
) -> ApiResponse[MessagesList]:
"""List Messages

Returns a list of messages based on query parameters.
Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.

:param account_id: Your Bandwidth Account ID. (required)
:type account_id: str
Expand Down Expand Up @@ -715,6 +716,7 @@ def list_messages_with_http_info(
'401': "MessagingRequestError",
'403': "MessagingRequestError",
'404': "MessagingRequestError",
'405': "MessagingRequestError",
'415': "MessagingRequestError",
'429': "MessagingRequestError",
'500': "MessagingRequestError",
Expand Down Expand Up @@ -776,7 +778,7 @@ def list_messages_without_preload_content(
) -> RESTResponseType:
"""List Messages

Returns a list of messages based on query parameters.
Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.

:param account_id: Your Bandwidth Account ID. (required)
:type account_id: str
Expand Down Expand Up @@ -897,6 +899,7 @@ def list_messages_without_preload_content(
'401': "MessagingRequestError",
'403': "MessagingRequestError",
'404': "MessagingRequestError",
'405': "MessagingRequestError",
'415': "MessagingRequestError",
'429': "MessagingRequestError",
'500': "MessagingRequestError",
Expand Down
3 changes: 1 addition & 2 deletions bandwidth/models/blocked_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from uuid import UUID
from bandwidth.models.tfv_callback_status_enum import TfvCallbackStatusEnum
from typing import Optional, Set
from typing_extensions import Self
Expand All @@ -33,7 +32,7 @@ class BlockedWebhook(BaseModel):
account_id: Optional[StrictStr] = Field(default=None, description="User's account ID.", alias="accountId")
phone_number: Optional[Annotated[str, Field(min_length=12, strict=True, max_length=12)]] = Field(default=None, description="Toll-free telephone number in E.164 format.", alias="phoneNumber")
status: Optional[TfvCallbackStatusEnum] = None
internal_ticket_number: Optional[UUID] = Field(default=None, description="Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number.", alias="internalTicketNumber")
internal_ticket_number: Optional[StrictStr] = Field(default=None, description="Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number.", alias="internalTicketNumber")
blocked: Optional[StrictBool] = Field(default=None, description="Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.")
blocked_reason: Optional[StrictStr] = Field(default=None, description="The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.", alias="blockedReason")
additional_properties: Dict[str, Any] = {}
Expand Down
3 changes: 1 addition & 2 deletions bandwidth/models/failure_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from uuid import UUID
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -34,7 +33,7 @@ class FailureWebhook(BaseModel):
error_code: Optional[StrictStr] = Field(default=None, description="An error code indicating what error was encountered. This code can be interpreted as an HTTP status code in regards to the error that was encountered.", alias="errorCode")
error_message: Optional[StrictStr] = Field(default=None, description="A description of the error that was encountered.", alias="errorMessage")
errors: Optional[List[StrictStr]] = Field(default=None, description="Details of the errors that were encountered when processing the request.")
internal_ticket_number: Optional[UUID] = Field(default=None, description="Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number.", alias="internalTicketNumber")
internal_ticket_number: Optional[StrictStr] = Field(default=None, description="Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number.", alias="internalTicketNumber")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["accountId", "phoneNumber", "errorCode", "errorMessage", "errors", "internalTicketNumber"]

Expand Down
12 changes: 8 additions & 4 deletions bandwidth/models/rbm_message_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RbmMessageMedia(BaseModel):
"""
RbmMessageMedia
""" # noqa: E501
media: RbmMessageContentFile
media: List[RbmMessageContentFile]
suggestions: Optional[Annotated[List[MultiChannelAction], Field(max_length=11)]] = Field(default=None, description="An array of suggested actions for the recipient.")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["media", "suggestions"]
Expand Down Expand Up @@ -76,9 +76,13 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of media
# override the default output from pydantic by calling `to_dict()` of each item in media (list)
_items = []
if self.media:
_dict['media'] = self.media.to_dict()
for _item_media in self.media:
if _item_media:
_items.append(_item_media.to_dict())
_dict['media'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in suggestions (list)
_items = []
if self.suggestions:
Expand All @@ -103,7 +107,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)

_obj = cls.model_validate({
"media": RbmMessageContentFile.from_dict(obj["media"]) if obj.get("media") is not None else None,
"media": [RbmMessageContentFile.from_dict(_item) for _item in obj["media"]] if obj.get("media") is not None else None,
"suggestions": [MultiChannelAction.from_dict(_item) for _item in obj["suggestions"]] if obj.get("suggestions") is not None else None
})
# store additional fields in additional_properties
Expand Down
3 changes: 1 addition & 2 deletions bandwidth/models/tfv_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from uuid import UUID
from bandwidth.models.tfv_status_enum import TfvStatusEnum
from bandwidth.models.tfv_submission_info import TfvSubmissionInfo
from typing import Optional, Set
Expand All @@ -34,7 +33,7 @@ class TfvStatus(BaseModel):
""" # noqa: E501
phone_number: Optional[Annotated[str, Field(min_length=12, strict=True, max_length=12)]] = Field(default=None, description="Toll-free telephone number in E.164 format.", alias="phoneNumber")
status: Optional[TfvStatusEnum] = None
internal_ticket_number: Optional[UUID] = Field(default=None, description="Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number - included in all webhook payloads.", alias="internalTicketNumber")
internal_ticket_number: Optional[StrictStr] = Field(default=None, description="Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number - included in all webhook payloads.", alias="internalTicketNumber")
decline_reason_description: Optional[StrictStr] = Field(default=None, description="Explanation for why a verification request was declined.", alias="declineReasonDescription")
resubmit_allowed: Optional[StrictBool] = Field(default=None, description="Whether a Toll-Free Verification request qualifies for resubmission via PUT.", alias="resubmitAllowed")
created_date_time: Optional[datetime] = Field(default=None, description="Date and time the verification request was created.", alias="createdDateTime")
Expand Down
3 changes: 1 addition & 2 deletions bandwidth/models/verification_denial_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from uuid import UUID
from bandwidth.models.additional_denial_reason import AdditionalDenialReason
from typing import Optional, Set
from typing_extensions import Self
Expand All @@ -34,7 +33,7 @@ class VerificationDenialWebhook(BaseModel):
additional_denial_reasons: Optional[List[AdditionalDenialReason]] = Field(default=None, description="An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply.", alias="additionalDenialReasons")
decline_reason_description: Optional[StrictStr] = Field(default=None, description="Explanation for why a verification request was declined.", alias="declineReasonDescription")
denial_status_code: Optional[StrictInt] = Field(default=None, description="Reason code for denial.", alias="denialStatusCode")
internal_ticket_number: Optional[UUID] = Field(default=None, description="Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number.", alias="internalTicketNumber")
internal_ticket_number: Optional[StrictStr] = Field(default=None, description="Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number.", alias="internalTicketNumber")
phone_number: Optional[Annotated[str, Field(min_length=12, strict=True, max_length=12)]] = Field(default=None, description="Toll-free telephone number in E.164 format.", alias="phoneNumber")
resubmit_allowed: Optional[StrictBool] = Field(default=None, description="Whether a Toll-Free Verification request qualifies for resubmission via PUT.", alias="resubmitAllowed")
status: Optional[StrictStr] = 'UNVERIFIED'
Expand Down
3 changes: 1 addition & 2 deletions bandwidth/models/verification_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from uuid import UUID
from bandwidth.models.tfv_callback_status_enum import TfvCallbackStatusEnum
from typing import Optional, Set
from typing_extensions import Self
Expand All @@ -33,7 +32,7 @@ class VerificationWebhook(BaseModel):
account_id: Optional[StrictStr] = Field(default=None, description="User's account ID.", alias="accountId")
phone_number: Optional[Annotated[str, Field(min_length=12, strict=True, max_length=12)]] = Field(default=None, description="Toll-free telephone number in E.164 format.", alias="phoneNumber")
status: Optional[TfvCallbackStatusEnum] = None
internal_ticket_number: Optional[UUID] = Field(default=None, description="Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number.", alias="internalTicketNumber")
internal_ticket_number: Optional[StrictStr] = Field(default=None, description="Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number.", alias="internalTicketNumber")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["accountId", "phoneNumber", "status", "internalTicketNumber"]

Expand Down
6 changes: 5 additions & 1 deletion docs/MessagesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ List Messages

Returns a list of messages based on query parameters.

**Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header.


### Example

* Basic Authentication (Basic):
Expand Down Expand Up @@ -251,8 +254,9 @@ Name | Type | Description | Notes
**401** | Unauthorized | - |
**403** | Forbidden | - |
**404** | Not Found | - |
**405** | Method Not Allowed | - |
**415** | Unsupported Media Type | - |
**429** | Too Many Requests | - |
**429** | Too Many Requests | * Retry-After - The number of seconds to wait before retrying the request. <br> |
**500** | Internal Server Error | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/MultiChannelChannelListRBMObjectAllOfContent.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**text** | **str** | The text associated with the message. Must be 3270 characters or less |
**suggestions** | [**List[MultiChannelAction]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional]
**media** | [**RbmMessageContentFile**](RbmMessageContentFile.md) | |
**media** | [**List[RbmMessageContentFile]**](RbmMessageContentFile.md) | |
**orientation** | [**StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | |
**thumbnail_image_alignment** | [**ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | |
**card_content** | [**RbmCardContent**](RbmCardContent.md) | |
Expand Down
2 changes: 1 addition & 1 deletion docs/RbmMessageMedia.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**media** | [**RbmMessageContentFile**](RbmMessageContentFile.md) | |
**media** | [**List[RbmMessageContentFile]**](RbmMessageContentFile.md) | |
**suggestions** | [**List[MultiChannelAction]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional]

## Example
Expand Down
Loading