From eaacaf08fbc2bdd5dd22f2b9db7ee0c42cdc49d7 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 20 Oct 2026 14:10:40 +0000 Subject: [PATCH] Generate SDK with OpenAPI Generator Version 7.7.0 --- .openapi-generator/FILES | 2 + README.md | 1 + api/openapi.yaml | 441 +++++++++++------- bandwidth.yml | 197 +++++++- docs/InboundCallbackMessage.md | 1 + docs/MultiChannelAction.md | 2 +- docs/MultiChannelActionCalendarEvent.md | 2 +- docs/RbmActionBase.md | 2 +- docs/RbmActionDial.md | 2 +- docs/RbmActionOpenUrl.md | 2 +- docs/RbmActionViewLocation.md | 2 +- docs/RbmSession.md | 15 + docs/RbmSuggestionResponse.md | 4 +- docs/StatusCallbackMessage.md | 1 + docs/StatusCallbackTypeEnum.md | 2 +- .../Model/InboundCallbackMessage.cs | 11 +- .../Model/MultiChannelActionCalendarEvent.cs | 16 +- src/Bandwidth.Standard/Model/RbmActionBase.cs | 16 +- src/Bandwidth.Standard/Model/RbmActionDial.cs | 16 +- .../Model/RbmActionOpenUrl.cs | 16 +- .../Model/RbmActionViewLocation.cs | 16 +- src/Bandwidth.Standard/Model/RbmSession.cs | 134 ++++++ .../Model/RbmSuggestionResponse.cs | 22 +- .../Model/StatusCallbackMessage.cs | 11 +- .../Model/StatusCallbackTypeEnum.cs | 30 +- 25 files changed, 711 insertions(+), 253 deletions(-) create mode 100644 docs/RbmSession.md create mode 100644 src/Bandwidth.Standard/Model/RbmSession.cs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 8a73cae2..c4e029ab 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -157,6 +157,7 @@ docs/RbmMessageContentRichCard.md docs/RbmMessageContentText.md docs/RbmMessageMedia.md docs/RbmOpenUrlEnum.md +docs/RbmSession.md docs/RbmStandaloneCard.md docs/RbmSuggestionResponse.md docs/RbmWebViewEnum.md @@ -396,6 +397,7 @@ src/Bandwidth.Standard/Model/RbmMessageContentRichCard.cs src/Bandwidth.Standard/Model/RbmMessageContentText.cs src/Bandwidth.Standard/Model/RbmMessageMedia.cs src/Bandwidth.Standard/Model/RbmOpenUrlEnum.cs +src/Bandwidth.Standard/Model/RbmSession.cs src/Bandwidth.Standard/Model/RbmStandaloneCard.cs src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs src/Bandwidth.Standard/Model/RbmWebViewEnum.cs diff --git a/README.md b/README.md index e7749571..c022b1f3 100644 --- a/README.md +++ b/README.md @@ -320,6 +320,7 @@ Class | Method | HTTP request | Description - [Model.RbmMessageContentText](docs/RbmMessageContentText.md) - [Model.RbmMessageMedia](docs/RbmMessageMedia.md) - [Model.RbmOpenUrlEnum](docs/RbmOpenUrlEnum.md) + - [Model.RbmSession](docs/RbmSession.md) - [Model.RbmStandaloneCard](docs/RbmStandaloneCard.md) - [Model.RbmSuggestionResponse](docs/RbmSuggestionResponse.md) - [Model.RbmWebViewEnum](docs/RbmWebViewEnum.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 5f8c70d3..e7997f79 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -6399,6 +6399,8 @@ components: $ref: '#/components/examples/smsMessageReceivedCallbackExample' mmsMessageReceivedCallback: $ref: '#/components/examples/mmsMessageReceivedCallbackExample' + rbmMessageReceivedSessionCallback: + $ref: '#/components/examples/rbmMessageReceivedSessionCallbackExample' schema: $ref: '#/components/schemas/inboundCallback' description: |- @@ -6431,15 +6433,22 @@ components: $ref: '#/components/examples/mmsMessageDeliveredCallbackExample' groupMmsMessageDeliveredCallback: $ref: '#/components/examples/groupMmsMessageDeliveredCallbackExample' + rbmMessageDeliveredSessionCallback: + $ref: '#/components/examples/rbmMessageDeliveredSessionCallbackExample' + rbmMessageDeliveredCanInitiateSessionCallback: + $ref: '#/components/examples/rbmMessageDeliveredCanInitiateSessionCallbackExample' messageFailedCallback: $ref: '#/components/examples/messageFailedCallbackExample' + sessionStartedCallback: + $ref: '#/components/examples/sessionStartedCallbackExample' schema: $ref: '#/components/schemas/statusCallback' description: |-

This Outbound Message Webhook is an envelope containing status information regarding a message sent (MT) from your message-enabled Bandwidth telephone number. -

The payload type will be one of message-sending, message-sent, message-delivered, message-failed or message-read. -

Note that message-read callbacks are pertinent only for RBM messages sent from the /messages/multiChannel endpoint. +

The payload type will be one of message-sending, message-sent, message-delivered, message-failed, message-read or session-started. +

Note that message-read and session-started callbacks are pertinent only for RBM messages sent from the /messages/multiChannel endpoint. +

Note that session-started callbacks are pertinent only for RBM messages of agents with the Conversational billing category.

Please visit Webhooks

required: true responses: @@ -6597,6 +6606,30 @@ components: text: "Hey, check out the MMS!" media: - https://messaging.bandwidth.com/api/v2/users/9900902/media/14762070468292kw2fuqty55yp2b2/0/bw.png + rbmMessageReceivedSessionCallbackExample: + summary: An example of a rbm message-received callback body for a message that + is part of an RCS interactive session. + value: + time: 2026-08-06T10:00:05.502180Z + type: message-received + to: BandwidthRBM + description: Incoming message received + message: + id: 1786010405502l2ntaoajuqjhqnxu + owner: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + time: 2026-08-06T10:00:05.302180Z + segmentCount: 1 + direction: in + to: + - BandwidthRBM + from: "+12345678902" + channel: RBM + content: + text: "Yes, please book it for tomorrow." + session: + canInitiate: false + id: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d messageSendingCallbackExample: summary: An example of a message-sending callback body. value: @@ -6696,6 +6729,77 @@ components: owner: "+12345678902" direction: out segmentCount: 1 + rbmMessageDeliveredSessionCallbackExample: + summary: An example of a rbm message-delivered callback body for a message that + is part of an RCS interactive session. + value: + type: message-delivered + time: 2026-08-06T10:01:11.160744Z + description: Message delivered to handset. + to: "+12345678902" + message: + id: 1786010470868ty55yp2b2kw2fuq + time: 2026-08-06T10:01:10.868292Z + to: + - "+12345678902" + from: BandwidthRBM + text: "" + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + owner: BandwidthRBM + direction: out + segmentCount: 1 + channel: RBM + session: + canInitiate: false + id: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d + rbmMessageDeliveredCanInitiateSessionCallbackExample: + summary: An example of a rbm message-delivered callback body for a message that + is not yet part of an RCS interactive session. + value: + type: message-delivered + time: 2026-08-06T09:59:56.160744Z + description: Message delivered to handset. + to: "+12345678902" + message: + id: 1786010395000kw2fuqty55yp2b2 + time: 2026-08-06T09:59:55.000000Z + to: + - "+12345678902" + from: BandwidthRBM + text: "" + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + owner: BandwidthRBM + direction: out + segmentCount: 1 + channel: RBM + session: + canInitiate: true + sessionStartedCallbackExample: + summary: An example of a session-started callback body. + value: + type: session-started + time: 2026-08-06T10:00:00.123000Z + description: Message is now part of an RCS interactive session. + to: "+12345678902" + message: + id: 1786010395000kw2fuqty55yp2b2 + owner: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + time: 2026-08-06T10:00:00.120000Z + segmentCount: 1 + direction: out + to: + - "+12345678902" + from: BandwidthRBM + text: "" + tag: "" + channel: RBM + session: + canInitiate: false + id: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d + type: INTERACTIVE_SESSION + startTime: 2026-08-06T09:59:55Z + endTime: 2026-08-07T09:59:55Z messageFailedCallbackExample: summary: An example of a message-failed callback body. value: @@ -9662,25 +9766,20 @@ components: applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: suggestions: - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY text: Hello world - owner: owner @@ -9689,25 +9788,20 @@ components: applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: suggestions: - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY text: Hello world - owner: owner @@ -9716,25 +9810,20 @@ components: applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: suggestions: - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY text: Hello world - owner: owner @@ -9743,25 +9832,20 @@ components: applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: suggestions: - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY text: Hello world expiration: 2021-02-01T11:29:18-05:00 @@ -9902,25 +9986,20 @@ components: rbmMessageContentText: example: suggestions: - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY text: Hello world properties: @@ -10148,38 +10227,33 @@ components: type: string rbmActionText: description: Displayed text for user to click - example: Hello world + example: Track my order maxLength: 25 title: Text type: string rbmActionPostbackData: - description: Base64 payload the customer receives when the reply is clicked. - example: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - format: byte + description: Payload the customer receives when the reply is clicked. + example: track-order-43654 maxLength: 2048 title: Post Back Data type: string rbmActionBase: example: - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + postbackData: track-order-43654 + text: Track my order type: REPLY properties: type: $ref: '#/components/schemas/rbmActionTypeEnum' text: description: Displayed text for user to click - example: Hello world + example: Track my order maxLength: 25 title: Text type: string postbackData: - description: Base64 payload the customer receives when the reply is clicked. - example: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - format: byte + description: Payload the customer receives when the reply is clicked. + example: track-order-43654 maxLength: 2048 title: Post Back Data type: string @@ -10356,25 +10430,20 @@ components: applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: suggestions: - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY text: Hello world multiChannelChannelListSMSResponseObject: @@ -10460,25 +10529,20 @@ components: applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: suggestions: - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY text: Hello world - owner: owner @@ -10487,25 +10551,20 @@ components: applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: suggestions: - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY text: Hello world - owner: owner @@ -10514,25 +10573,20 @@ components: applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: suggestions: - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY text: Hello world - owner: owner @@ -10541,25 +10595,20 @@ components: applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 content: suggestions: - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world + - postbackData: track-order-43654 + text: Track my order type: REPLY text: Hello world expiration: 2021-02-01T11:29:18-05:00 @@ -10631,14 +10680,12 @@ components: rbmSuggestionResponse: properties: text: - description: The text associated with the suggestion response. - example: "Yes, I would like to proceed" + description: The text of the suggestion the user tapped. + example: Track my order type: string postbackData: - description: Base64 payload the customer receives when the reply is clicked. - example: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - format: byte + description: Payload the customer receives when the reply is clicked. + example: track-order-43654 maxLength: 2048 title: Post Back Data type: string @@ -10661,6 +10708,53 @@ components: format: double type: string type: object + rbmSession: + description: |- + RCS interactive session information for the message. + An interactive session is a 24-hour window covering all Rich and Rich Media messages exchanged between an + RCS agent and a specific end user mobile number. It is triggered when at least 4 messages are exchanged within + 24 hours, at least 2 of them mobile-originated and at least 1 mobile-terminated. + Only present on `message-delivered`, `message-received` and `session-started` callbacks for RBM messages of + US agents with the Conversational billing category. Omitted for all other messages. + properties: + canInitiate: + description: |- + Whether the message can start an interactive session. + `false` if the message is already part of an active session, or if the agent is not eligible for + interactive session billing. + example: false + type: boolean + id: + description: |- + The unique identifier of the interactive session the message is part of. This is not a message ID. + Omitted if the message is not part of a session. + example: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d + nullable: true + type: string + type: + description: |- + The type of the interactive session. + Only present on `session-started` callbacks. + example: INTERACTIVE_SESSION + nullable: true + type: string + startTime: + description: The time the 24-hour session window opened. Only present on + `session-started` callbacks. + example: 2026-08-06T09:59:55Z + format: date-time + nullable: true + type: string + endTime: + description: The time the 24-hour session window closes. Only present on + `session-started` callbacks. + example: 2026-08-07T09:59:55Z + format: date-time + nullable: true + type: string + required: + - canInitiate + type: object callback: description: |- Callbacks are divided into two types based on direction of the related message: @@ -10673,6 +10767,7 @@ components: message-delivered: '#/components/schemas/statusCallback' message-failed: '#/components/schemas/statusCallback' message-read: '#/components/schemas/statusCallback' + session-started: '#/components/schemas/statusCallback' message-received: '#/components/schemas/inboundCallback' requested-location-response: '#/components/schemas/inboundCallback' suggestion-response: '#/components/schemas/inboundCallback' @@ -10770,12 +10865,14 @@ components: - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. + - `session-started` indicates that a previously exchanged RBM message is now part of an RCS interactive session and is no longer billed individually. enum: - message-sending - message-sent - message-delivered - message-failed - message-read + - session-started example: message-delivered type: string inboundCallbackTypeEnum: @@ -10853,6 +10950,8 @@ components: $ref: '#/components/schemas/priorityEnum' channel: $ref: '#/components/schemas/multiChannelMessageChannelEnum' + session: + $ref: '#/components/schemas/rbmSession' required: - applicationId - direction diff --git a/bandwidth.yml b/bandwidth.yml index 350b6217..a33be21b 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -2620,14 +2620,13 @@ components: type: string description: Displayed text for user to click maxLength: 25 - example: Hello world + example: Track my order rbmActionPostbackData: title: Post Back Data type: string - format: byte - description: Base64 payload the customer receives when the reply is clicked. + description: Payload the customer receives when the reply is clicked. maxLength: 2048 - example: SGVsbG8gd29ybGQ= + example: track-order-43654 rbmActionBase: type: object properties: @@ -2916,8 +2915,8 @@ components: properties: text: type: string - description: The text associated with the suggestion response. - example: Yes, I would like to proceed + description: The text of the suggestion the user tapped. + example: Track my order postbackData: $ref: '#/components/schemas/rbmActionPostbackData' pairedMessageId: @@ -2938,6 +2937,70 @@ components: format: double description: The longitude of the client's location. example: '-122.4194' + rbmSession: + type: object + description: >- + RCS interactive session information for the message. + + An interactive session is a 24-hour window covering all Rich and Rich + Media messages exchanged between an + + RCS agent and a specific end user mobile number. It is triggered when at + least 4 messages are exchanged within + + 24 hours, at least 2 of them mobile-originated and at least 1 + mobile-terminated. + + Only present on `message-delivered`, `message-received` and + `session-started` callbacks for RBM messages of + + US agents with the Conversational billing category. Omitted for all + other messages. + properties: + canInitiate: + type: boolean + description: >- + Whether the message can start an interactive session. + + `false` if the message is already part of an active session, or if + the agent is not eligible for + + interactive session billing. + example: false + id: + type: string + nullable: true + description: >- + The unique identifier of the interactive session the message is part + of. This is not a message ID. + + Omitted if the message is not part of a session. + example: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d + type: + type: string + nullable: true + description: |- + The type of the interactive session. + Only present on `session-started` callbacks. + example: INTERACTIVE_SESSION + startTime: + type: string + nullable: true + format: date-time + description: >- + The time the 24-hour session window opened. Only present on + `session-started` callbacks. + example: '2026-08-06T09:59:55Z' + endTime: + type: string + nullable: true + format: date-time + description: >- + The time the 24-hour session window closes. Only present on + `session-started` callbacks. + example: '2026-08-07T09:59:55Z' + required: + - canInitiate callback: description: >- Callbacks are divided into two types based on direction of the related @@ -2960,6 +3023,7 @@ components: message-delivered: '#/components/schemas/statusCallback' message-failed: '#/components/schemas/statusCallback' message-read: '#/components/schemas/statusCallback' + session-started: '#/components/schemas/statusCallback' message-received: '#/components/schemas/inboundCallback' requested-location-response: '#/components/schemas/inboundCallback' suggestion-response: '#/components/schemas/inboundCallback' @@ -3060,12 +3124,17 @@ components: - `message-read` indicates that the RBM message was read by the recipient. + + - `session-started` indicates that a previously exchanged RBM message is + now part of an RCS interactive session and is no longer billed + individually. enum: - message-sending - message-sent - message-delivered - message-failed - message-read + - session-started example: message-delivered inboundCallbackTypeEnum: type: string @@ -3143,6 +3212,8 @@ components: $ref: '#/components/schemas/priorityEnum' channel: $ref: '#/components/schemas/multiChannelMessageChannelEnum' + session: + $ref: '#/components/schemas/rbmSession' required: - id - owner @@ -8878,6 +8949,31 @@ components: media: - >- https://messaging.bandwidth.com/api/v2/users/9900902/media/14762070468292kw2fuqty55yp2b2/0/bw.png + rbmMessageReceivedSessionCallbackExample: + summary: >- + An example of a rbm message-received callback body for a message that is + part of an RCS interactive session. + value: + time: '2026-08-06T10:00:05.502180Z' + type: message-received + to: BandwidthRBM + description: Incoming message received + message: + id: 1786010405502l2ntaoajuqjhqnxu + owner: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + time: '2026-08-06T10:00:05.302180Z' + segmentCount: 1 + direction: in + to: + - BandwidthRBM + from: '+12345678902' + channel: RBM + content: + text: Yes, please book it for tomorrow. + session: + canInitiate: false + id: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d messageSendingCallbackExample: summary: An example of a message-sending callback body. value: @@ -8977,6 +9073,79 @@ components: owner: '+12345678902' direction: out segmentCount: 1 + rbmMessageDeliveredSessionCallbackExample: + summary: >- + An example of a rbm message-delivered callback body for a message that + is part of an RCS interactive session. + value: + type: message-delivered + time: '2026-08-06T10:01:11.160744Z' + description: Message delivered to handset. + to: '+12345678902' + message: + id: 1786010470868ty55yp2b2kw2fuq + time: '2026-08-06T10:01:10.868292Z' + to: + - '+12345678902' + from: BandwidthRBM + text: '' + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + owner: BandwidthRBM + direction: out + segmentCount: 1 + channel: RBM + session: + canInitiate: false + id: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d + rbmMessageDeliveredCanInitiateSessionCallbackExample: + summary: >- + An example of a rbm message-delivered callback body for a message that + is not yet part of an RCS interactive session. + value: + type: message-delivered + time: '2026-08-06T09:59:56.160744Z' + description: Message delivered to handset. + to: '+12345678902' + message: + id: 1786010395000kw2fuqty55yp2b2 + time: '2026-08-06T09:59:55.000000Z' + to: + - '+12345678902' + from: BandwidthRBM + text: '' + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + owner: BandwidthRBM + direction: out + segmentCount: 1 + channel: RBM + session: + canInitiate: true + sessionStartedCallbackExample: + summary: An example of a session-started callback body. + value: + type: session-started + time: '2026-08-06T10:00:00.123000Z' + description: Message is now part of an RCS interactive session. + to: '+12345678902' + message: + id: 1786010395000kw2fuqty55yp2b2 + owner: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + time: '2026-08-06T10:00:00.120000Z' + segmentCount: 1 + direction: out + to: + - '+12345678902' + from: BandwidthRBM + text: '' + tag: '' + channel: RBM + session: + canInitiate: false + id: 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d + type: INTERACTIVE_SESSION + startTime: '2026-08-06T09:59:55Z' + endTime: '2026-08-07T09:59:55Z' messageFailedCallbackExample: summary: An example of a message-failed callback body. value: @@ -9980,6 +10149,9 @@ components: $ref: '#/components/examples/smsMessageReceivedCallbackExample' mmsMessageReceivedCallback: $ref: '#/components/examples/mmsMessageReceivedCallbackExample' + rbmMessageReceivedSessionCallback: + $ref: >- + #/components/examples/rbmMessageReceivedSessionCallbackExample responses: '200': description: OK @@ -9995,8 +10167,9 @@ components: information regarding a message sent (MT) from your message-enabled Bandwidth telephone number. -

The payload type will be one of message-sending, message-sent, message-delivered, message-failed or message-read. -

Note that message-read callbacks are pertinent only for RBM messages sent from the /messages/multiChannel endpoint. +

The payload type will be one of message-sending, message-sent, message-delivered, message-failed, message-read or session-started. +

Note that message-read and session-started callbacks are pertinent only for RBM messages sent from the /messages/multiChannel endpoint. +

Note that session-started callbacks are pertinent only for RBM messages of agents with the Conversational billing category.

Please visit Webhooks

content: @@ -10015,8 +10188,16 @@ components: groupMmsMessageDeliveredCallback: $ref: >- #/components/examples/groupMmsMessageDeliveredCallbackExample + rbmMessageDeliveredSessionCallback: + $ref: >- + #/components/examples/rbmMessageDeliveredSessionCallbackExample + rbmMessageDeliveredCanInitiateSessionCallback: + $ref: >- + #/components/examples/rbmMessageDeliveredCanInitiateSessionCallbackExample messageFailedCallback: $ref: '#/components/examples/messageFailedCallbackExample' + sessionStartedCallback: + $ref: '#/components/examples/sessionStartedCallbackExample' responses: '200': description: OK diff --git a/docs/InboundCallbackMessage.md b/docs/InboundCallbackMessage.md index 6230db30..82ad9c1d 100644 --- a/docs/InboundCallbackMessage.md +++ b/docs/InboundCallbackMessage.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **Media** | **List<string>** | Optional media, not applicable for sms | [optional] **Priority** | **PriorityEnum** | | [optional] **Channel** | **MultiChannelMessageChannelEnum** | | [optional] +**Session** | [**RbmSession**](RbmSession.md) | | [optional] **Content** | [**MultiChannelMessageContent**](MultiChannelMessageContent.md) | | [optional] **SuggestionResponse** | [**RbmSuggestionResponse**](RbmSuggestionResponse.md) | | [optional] **LocationResponse** | [**RbmLocationResponse**](RbmLocationResponse.md) | | [optional] diff --git a/docs/MultiChannelAction.md b/docs/MultiChannelAction.md index 83f3b1d3..82b7c25c 100644 --- a/docs/MultiChannelAction.md +++ b/docs/MultiChannelAction.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **RbmActionTypeEnum** | | **Text** | **string** | Displayed text for user to click | -**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | +**PostbackData** | **string** | Payload the customer receives when the reply is clicked. | **PhoneNumber** | **string** | The phone number to dial. Must be E164 format. | **Latitude** | **double** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | **Longitude** | **double** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | diff --git a/docs/MultiChannelActionCalendarEvent.md b/docs/MultiChannelActionCalendarEvent.md index 26d7b33b..460104ac 100644 --- a/docs/MultiChannelActionCalendarEvent.md +++ b/docs/MultiChannelActionCalendarEvent.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **RbmActionTypeEnum** | | **Text** | **string** | Displayed text for user to click | -**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | +**PostbackData** | **string** | Payload the customer receives when the reply is clicked. | **Title** | **string** | The title of the event. | **StartTime** | **DateTime** | The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | **EndTime** | **DateTime** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | diff --git a/docs/RbmActionBase.md b/docs/RbmActionBase.md index 704de253..0e686200 100644 --- a/docs/RbmActionBase.md +++ b/docs/RbmActionBase.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **RbmActionTypeEnum** | | **Text** | **string** | Displayed text for user to click | -**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | +**PostbackData** | **string** | Payload the customer receives when the reply is clicked. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RbmActionDial.md b/docs/RbmActionDial.md index 33ceb529..56db447a 100644 --- a/docs/RbmActionDial.md +++ b/docs/RbmActionDial.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **RbmActionTypeEnum** | | **Text** | **string** | Displayed text for user to click | -**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | +**PostbackData** | **string** | Payload the customer receives when the reply is clicked. | **PhoneNumber** | **string** | The phone number to dial. Must be E164 format. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RbmActionOpenUrl.md b/docs/RbmActionOpenUrl.md index e201ae7e..173c2d69 100644 --- a/docs/RbmActionOpenUrl.md +++ b/docs/RbmActionOpenUrl.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **RbmActionTypeEnum** | | **Text** | **string** | Displayed text for user to click | -**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | +**PostbackData** | **string** | Payload the customer receives when the reply is clicked. | **Url** | **string** | The URL to open in browser. Must use http:// or https:// scheme. | **Application** | **RbmOpenUrlEnum** | | [optional] **WebviewViewMode** | **RbmWebViewEnum** | | [optional] diff --git a/docs/RbmActionViewLocation.md b/docs/RbmActionViewLocation.md index 44cb3c37..e4ecdc96 100644 --- a/docs/RbmActionViewLocation.md +++ b/docs/RbmActionViewLocation.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **RbmActionTypeEnum** | | **Text** | **string** | Displayed text for user to click | -**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | +**PostbackData** | **string** | Payload the customer receives when the reply is clicked. | **Latitude** | **double** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | **Longitude** | **double** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | **Label** | **string** | The label of the location. | [optional] diff --git a/docs/RbmSession.md b/docs/RbmSession.md new file mode 100644 index 00000000..c671110e --- /dev/null +++ b/docs/RbmSession.md @@ -0,0 +1,15 @@ +# Bandwidth.Standard.Model.RbmSession +RCS interactive session information for the message. An interactive session is a 24-hour window covering all Rich and Rich Media messages exchanged between an RCS agent and a specific end user mobile number. It is triggered when at least 4 messages are exchanged within 24 hours, at least 2 of them mobile-originated and at least 1 mobile-terminated. Only present on `message-delivered`, `message-received` and `session-started` callbacks for RBM messages of US agents with the Conversational billing category. Omitted for all other messages. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CanInitiate** | **bool** | Whether the message can start an interactive session. `false` if the message is already part of an active session, or if the agent is not eligible for interactive session billing. | +**Id** | **string** | The unique identifier of the interactive session the message is part of. This is not a message ID. Omitted if the message is not part of a session. | [optional] +**Type** | **string** | The type of the interactive session. Only present on `session-started` callbacks. | [optional] +**StartTime** | **DateTime?** | The time the 24-hour session window opened. Only present on `session-started` callbacks. | [optional] +**EndTime** | **DateTime?** | The time the 24-hour session window closes. Only present on `session-started` callbacks. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RbmSuggestionResponse.md b/docs/RbmSuggestionResponse.md index 0e83472c..de1ec41d 100644 --- a/docs/RbmSuggestionResponse.md +++ b/docs/RbmSuggestionResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Text** | **string** | The text associated with the suggestion response. | [optional] -**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | [optional] +**Text** | **string** | The text of the suggestion the user tapped. | [optional] +**PostbackData** | **string** | Payload the customer receives when the reply is clicked. | [optional] **PairedMessageId** | **string** | Corresponding parent message ID (MT). | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StatusCallbackMessage.md b/docs/StatusCallbackMessage.md index db416400..b8e94889 100644 --- a/docs/StatusCallbackMessage.md +++ b/docs/StatusCallbackMessage.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **Media** | **List<string>** | Optional media, not applicable for sms | [optional] **Priority** | **PriorityEnum** | | [optional] **Channel** | **MultiChannelMessageChannelEnum** | | [optional] +**Session** | [**RbmSession**](RbmSession.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StatusCallbackTypeEnum.md b/docs/StatusCallbackTypeEnum.md index 3acb3d0c..960810d0 100644 --- a/docs/StatusCallbackTypeEnum.md +++ b/docs/StatusCallbackTypeEnum.md @@ -1,5 +1,5 @@ # Bandwidth.Standard.Model.StatusCallbackTypeEnum -The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. +The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. - `session-started` indicates that a previously exchanged RBM message is now part of an RCS interactive session and is no longer billed individually. ## Properties diff --git a/src/Bandwidth.Standard/Model/InboundCallbackMessage.cs b/src/Bandwidth.Standard/Model/InboundCallbackMessage.cs index 95cda1e0..aff29370 100644 --- a/src/Bandwidth.Standard/Model/InboundCallbackMessage.cs +++ b/src/Bandwidth.Standard/Model/InboundCallbackMessage.cs @@ -71,10 +71,11 @@ protected InboundCallbackMessage() { } /// Optional media, not applicable for sms. /// priority. /// channel. + /// session. /// content. /// suggestionResponse. /// locationResponse. - public InboundCallbackMessage(string id = default(string), string owner = default(string), string applicationId = default(string), DateTime time = default(DateTime), int segmentCount = default(int), MessageDirectionEnum direction = default(MessageDirectionEnum), List to = default(List), string from = default(string), string text = default(string), string tag = default(string), List media = default(List), PriorityEnum? priority = default(PriorityEnum?), MultiChannelMessageChannelEnum? channel = default(MultiChannelMessageChannelEnum?), MultiChannelMessageContent content = default(MultiChannelMessageContent), RbmSuggestionResponse suggestionResponse = default(RbmSuggestionResponse), RbmLocationResponse locationResponse = default(RbmLocationResponse)) + public InboundCallbackMessage(string id = default(string), string owner = default(string), string applicationId = default(string), DateTime time = default(DateTime), int segmentCount = default(int), MessageDirectionEnum direction = default(MessageDirectionEnum), List to = default(List), string from = default(string), string text = default(string), string tag = default(string), List media = default(List), PriorityEnum? priority = default(PriorityEnum?), MultiChannelMessageChannelEnum? channel = default(MultiChannelMessageChannelEnum?), RbmSession session = default(RbmSession), MultiChannelMessageContent content = default(MultiChannelMessageContent), RbmSuggestionResponse suggestionResponse = default(RbmSuggestionResponse), RbmLocationResponse locationResponse = default(RbmLocationResponse)) { // to ensure "id" is required (not null) if (id == null) @@ -114,6 +115,7 @@ protected InboundCallbackMessage() { } this.Media = media; this.Priority = priority; this.Channel = channel; + this.Session = session; this.Content = content; this.SuggestionResponse = suggestionResponse; this.LocationResponse = locationResponse; @@ -197,6 +199,12 @@ protected InboundCallbackMessage() { } [DataMember(Name = "media", EmitDefaultValue = false)] public List Media { get; set; } + /// + /// Gets or Sets Session + /// + [DataMember(Name = "session", EmitDefaultValue = false)] + public RbmSession Session { get; set; } + /// /// Gets or Sets Content /// @@ -236,6 +244,7 @@ public override string ToString() sb.Append(" Media: ").Append(Media).Append("\n"); sb.Append(" Priority: ").Append(Priority).Append("\n"); sb.Append(" Channel: ").Append(Channel).Append("\n"); + sb.Append(" Session: ").Append(Session).Append("\n"); sb.Append(" Content: ").Append(Content).Append("\n"); sb.Append(" SuggestionResponse: ").Append(SuggestionResponse).Append("\n"); sb.Append(" LocationResponse: ").Append(LocationResponse).Append("\n"); diff --git a/src/Bandwidth.Standard/Model/MultiChannelActionCalendarEvent.cs b/src/Bandwidth.Standard/Model/MultiChannelActionCalendarEvent.cs index f8ecd054..c199c78c 100644 --- a/src/Bandwidth.Standard/Model/MultiChannelActionCalendarEvent.cs +++ b/src/Bandwidth.Standard/Model/MultiChannelActionCalendarEvent.cs @@ -48,12 +48,12 @@ protected MultiChannelActionCalendarEvent() { } /// /// type (required). /// Displayed text for user to click (required). - /// Base64 payload the customer receives when the reply is clicked. (required). + /// Payload the customer receives when the reply is clicked. (required). /// The title of the event. (required). /// The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. (required). /// The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. (required). /// The description of the event.. - public MultiChannelActionCalendarEvent(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[]), string title = default(string), DateTime startTime = default(DateTime), DateTime endTime = default(DateTime), string description = default(string)) + public MultiChannelActionCalendarEvent(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), string postbackData = default(string), string title = default(string), DateTime startTime = default(DateTime), DateTime endTime = default(DateTime), string description = default(string)) { this.Type = type; // to ensure "text" is required (not null) @@ -83,17 +83,17 @@ protected MultiChannelActionCalendarEvent() { } /// Displayed text for user to click /// /// Displayed text for user to click - /// Hello world + /// Track my order [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] public string Text { get; set; } /// - /// Base64 payload the customer receives when the reply is clicked. + /// Payload the customer receives when the reply is clicked. /// - /// Base64 payload the customer receives when the reply is clicked. - /// U0dWc2JHOGdkMjl5YkdRPQ== + /// Payload the customer receives when the reply is clicked. + /// track-order-43654 [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] - public byte[] PostbackData { get; set; } + public string PostbackData { get; set; } /// /// The title of the event. @@ -168,7 +168,7 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali yield return new ValidationResult("Invalid value for Text, length must be less than 25.", new [] { "Text" }); } - // PostbackData (byte[]) maxLength + // PostbackData (string) maxLength if (this.PostbackData != null && this.PostbackData.Length > 2048) { yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); diff --git a/src/Bandwidth.Standard/Model/RbmActionBase.cs b/src/Bandwidth.Standard/Model/RbmActionBase.cs index e5275709..3182c6f3 100644 --- a/src/Bandwidth.Standard/Model/RbmActionBase.cs +++ b/src/Bandwidth.Standard/Model/RbmActionBase.cs @@ -48,8 +48,8 @@ protected RbmActionBase() { } /// /// type (required). /// Displayed text for user to click (required). - /// Base64 payload the customer receives when the reply is clicked. (required). - public RbmActionBase(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[])) + /// Payload the customer receives when the reply is clicked. (required). + public RbmActionBase(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), string postbackData = default(string)) { this.Type = type; // to ensure "text" is required (not null) @@ -70,17 +70,17 @@ protected RbmActionBase() { } /// Displayed text for user to click /// /// Displayed text for user to click - /// Hello world + /// Track my order [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] public string Text { get; set; } /// - /// Base64 payload the customer receives when the reply is clicked. + /// Payload the customer receives when the reply is clicked. /// - /// Base64 payload the customer receives when the reply is clicked. - /// [B@458704ee + /// Payload the customer receives when the reply is clicked. + /// track-order-43654 [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] - public byte[] PostbackData { get; set; } + public string PostbackData { get; set; } /// /// Returns the string presentation of the object @@ -119,7 +119,7 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali yield return new ValidationResult("Invalid value for Text, length must be less than 25.", new [] { "Text" }); } - // PostbackData (byte[]) maxLength + // PostbackData (string) maxLength if (this.PostbackData != null && this.PostbackData.Length > 2048) { yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); diff --git a/src/Bandwidth.Standard/Model/RbmActionDial.cs b/src/Bandwidth.Standard/Model/RbmActionDial.cs index 54785d1a..a61c50a8 100644 --- a/src/Bandwidth.Standard/Model/RbmActionDial.cs +++ b/src/Bandwidth.Standard/Model/RbmActionDial.cs @@ -48,9 +48,9 @@ protected RbmActionDial() { } /// /// type (required). /// Displayed text for user to click (required). - /// Base64 payload the customer receives when the reply is clicked. (required). + /// Payload the customer receives when the reply is clicked. (required). /// The phone number to dial. Must be E164 format. (required). - public RbmActionDial(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[]), string phoneNumber = default(string)) + public RbmActionDial(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), string postbackData = default(string), string phoneNumber = default(string)) { this.Type = type; // to ensure "text" is required (not null) @@ -77,17 +77,17 @@ protected RbmActionDial() { } /// Displayed text for user to click /// /// Displayed text for user to click - /// Hello world + /// Track my order [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] public string Text { get; set; } /// - /// Base64 payload the customer receives when the reply is clicked. + /// Payload the customer receives when the reply is clicked. /// - /// Base64 payload the customer receives when the reply is clicked. - /// U0dWc2JHOGdkMjl5YkdRPQ== + /// Payload the customer receives when the reply is clicked. + /// track-order-43654 [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] - public byte[] PostbackData { get; set; } + public string PostbackData { get; set; } /// /// The phone number to dial. Must be E164 format. @@ -135,7 +135,7 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali yield return new ValidationResult("Invalid value for Text, length must be less than 25.", new [] { "Text" }); } - // PostbackData (byte[]) maxLength + // PostbackData (string) maxLength if (this.PostbackData != null && this.PostbackData.Length > 2048) { yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); diff --git a/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs b/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs index 5ec32407..0ed521b2 100644 --- a/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs +++ b/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs @@ -60,11 +60,11 @@ protected RbmActionOpenUrl() { } /// /// type (required). /// Displayed text for user to click (required). - /// Base64 payload the customer receives when the reply is clicked. (required). + /// Payload the customer receives when the reply is clicked. (required). /// The URL to open in browser. Must use http:// or https:// scheme. (required). /// application. /// webviewViewMode. - public RbmActionOpenUrl(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[]), string url = default(string), RbmOpenUrlEnum? application = default(RbmOpenUrlEnum?), RbmWebViewEnum? webviewViewMode = default(RbmWebViewEnum?)) + public RbmActionOpenUrl(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), string postbackData = default(string), string url = default(string), RbmOpenUrlEnum? application = default(RbmOpenUrlEnum?), RbmWebViewEnum? webviewViewMode = default(RbmWebViewEnum?)) { this.Type = type; // to ensure "text" is required (not null) @@ -93,17 +93,17 @@ protected RbmActionOpenUrl() { } /// Displayed text for user to click /// /// Displayed text for user to click - /// Hello world + /// Track my order [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] public string Text { get; set; } /// - /// Base64 payload the customer receives when the reply is clicked. + /// Payload the customer receives when the reply is clicked. /// - /// Base64 payload the customer receives when the reply is clicked. - /// U0dWc2JHOGdkMjl5YkdRPQ== + /// Payload the customer receives when the reply is clicked. + /// track-order-43654 [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] - public byte[] PostbackData { get; set; } + public string PostbackData { get; set; } /// /// The URL to open in browser. Must use http:// or https:// scheme. @@ -153,7 +153,7 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali yield return new ValidationResult("Invalid value for Text, length must be less than 25.", new [] { "Text" }); } - // PostbackData (byte[]) maxLength + // PostbackData (string) maxLength if (this.PostbackData != null && this.PostbackData.Length > 2048) { yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); diff --git a/src/Bandwidth.Standard/Model/RbmActionViewLocation.cs b/src/Bandwidth.Standard/Model/RbmActionViewLocation.cs index 29047423..f19dd9a3 100644 --- a/src/Bandwidth.Standard/Model/RbmActionViewLocation.cs +++ b/src/Bandwidth.Standard/Model/RbmActionViewLocation.cs @@ -48,11 +48,11 @@ protected RbmActionViewLocation() { } /// /// type (required). /// Displayed text for user to click (required). - /// Base64 payload the customer receives when the reply is clicked. (required). + /// Payload the customer receives when the reply is clicked. (required). /// The latitude of the location. Must be in range [-90.000000, 90.000000]. (required). /// The longitude of the location. Must be in range [-180.000000, 180.000000]. (required). /// The label of the location.. - public RbmActionViewLocation(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[]), double latitude = default(double), double longitude = default(double), string label = default(string)) + public RbmActionViewLocation(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), string postbackData = default(string), double latitude = default(double), double longitude = default(double), string label = default(string)) { this.Type = type; // to ensure "text" is required (not null) @@ -76,17 +76,17 @@ protected RbmActionViewLocation() { } /// Displayed text for user to click /// /// Displayed text for user to click - /// Hello world + /// Track my order [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] public string Text { get; set; } /// - /// Base64 payload the customer receives when the reply is clicked. + /// Payload the customer receives when the reply is clicked. /// - /// Base64 payload the customer receives when the reply is clicked. - /// U0dWc2JHOGdkMjl5YkdRPQ== + /// Payload the customer receives when the reply is clicked. + /// track-order-43654 [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] - public byte[] PostbackData { get; set; } + public string PostbackData { get; set; } /// /// The latitude of the location. Must be in range [-90.000000, 90.000000]. @@ -152,7 +152,7 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali yield return new ValidationResult("Invalid value for Text, length must be less than 25.", new [] { "Text" }); } - // PostbackData (byte[]) maxLength + // PostbackData (string) maxLength if (this.PostbackData != null && this.PostbackData.Length > 2048) { yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); diff --git a/src/Bandwidth.Standard/Model/RbmSession.cs b/src/Bandwidth.Standard/Model/RbmSession.cs new file mode 100644 index 00000000..8bb091f2 --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmSession.cs @@ -0,0 +1,134 @@ +/* + * Bandwidth + * + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter; + +namespace Bandwidth.Standard.Model +{ + /// + /// RCS interactive session information for the message. An interactive session is a 24-hour window covering all Rich and Rich Media messages exchanged between an RCS agent and a specific end user mobile number. It is triggered when at least 4 messages are exchanged within 24 hours, at least 2 of them mobile-originated and at least 1 mobile-terminated. Only present on `message-delivered`, `message-received` and `session-started` callbacks for RBM messages of US agents with the Conversational billing category. Omitted for all other messages. + /// + [DataContract(Name = "rbmSession")] + public partial class RbmSession : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RbmSession() { } + /// + /// Initializes a new instance of the class. + /// + /// Whether the message can start an interactive session. `false` if the message is already part of an active session, or if the agent is not eligible for interactive session billing. (required). + /// The unique identifier of the interactive session the message is part of. This is not a message ID. Omitted if the message is not part of a session.. + /// The type of the interactive session. Only present on `session-started` callbacks.. + /// The time the 24-hour session window opened. Only present on `session-started` callbacks.. + /// The time the 24-hour session window closes. Only present on `session-started` callbacks.. + public RbmSession(bool canInitiate = default(bool), string id = default(string), string type = default(string), DateTime? startTime = default(DateTime?), DateTime? endTime = default(DateTime?)) + { + this.CanInitiate = canInitiate; + this.Id = id; + this.Type = type; + this.StartTime = startTime; + this.EndTime = endTime; + } + + /// + /// Whether the message can start an interactive session. `false` if the message is already part of an active session, or if the agent is not eligible for interactive session billing. + /// + /// Whether the message can start an interactive session. `false` if the message is already part of an active session, or if the agent is not eligible for interactive session billing. + /// false + [DataMember(Name = "canInitiate", IsRequired = true, EmitDefaultValue = true)] + public bool CanInitiate { get; set; } + + /// + /// The unique identifier of the interactive session the message is part of. This is not a message ID. Omitted if the message is not part of a session. + /// + /// The unique identifier of the interactive session the message is part of. This is not a message ID. Omitted if the message is not part of a session. + /// 0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d + [DataMember(Name = "id", EmitDefaultValue = true)] + public string Id { get; set; } + + /// + /// The type of the interactive session. Only present on `session-started` callbacks. + /// + /// The type of the interactive session. Only present on `session-started` callbacks. + /// INTERACTIVE_SESSION + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; set; } + + /// + /// The time the 24-hour session window opened. Only present on `session-started` callbacks. + /// + /// The time the 24-hour session window opened. Only present on `session-started` callbacks. + /// 2026-08-06T09:59:55Z + [DataMember(Name = "startTime", EmitDefaultValue = true)] + public DateTime? StartTime { get; set; } + + /// + /// The time the 24-hour session window closes. Only present on `session-started` callbacks. + /// + /// The time the 24-hour session window closes. Only present on `session-started` callbacks. + /// 2026-08-07T09:59:55Z + [DataMember(Name = "endTime", EmitDefaultValue = true)] + public DateTime? EndTime { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RbmSession {\n"); + sb.Append(" CanInitiate: ").Append(CanInitiate).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" StartTime: ").Append(StartTime).Append("\n"); + sb.Append(" EndTime: ").Append(EndTime).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs b/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs index eea52dd9..1eb4ea4d 100644 --- a/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs +++ b/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs @@ -35,10 +35,10 @@ public partial class RbmSuggestionResponse : IValidatableObject /// /// Initializes a new instance of the class. /// - /// The text associated with the suggestion response.. - /// Base64 payload the customer receives when the reply is clicked.. + /// The text of the suggestion the user tapped.. + /// Payload the customer receives when the reply is clicked.. /// Corresponding parent message ID (MT).. - public RbmSuggestionResponse(string text = default(string), byte[] postbackData = default(byte[]), string pairedMessageId = default(string)) + public RbmSuggestionResponse(string text = default(string), string postbackData = default(string), string pairedMessageId = default(string)) { this.Text = text; this.PostbackData = postbackData; @@ -46,20 +46,20 @@ public partial class RbmSuggestionResponse : IValidatableObject } /// - /// The text associated with the suggestion response. + /// The text of the suggestion the user tapped. /// - /// The text associated with the suggestion response. - /// Yes, I would like to proceed + /// The text of the suggestion the user tapped. + /// Track my order [DataMember(Name = "text", EmitDefaultValue = false)] public string Text { get; set; } /// - /// Base64 payload the customer receives when the reply is clicked. + /// Payload the customer receives when the reply is clicked. /// - /// Base64 payload the customer receives when the reply is clicked. - /// [B@458704ee + /// Payload the customer receives when the reply is clicked. + /// track-order-43654 [DataMember(Name = "postbackData", EmitDefaultValue = false)] - public byte[] PostbackData { get; set; } + public string PostbackData { get; set; } /// /// Corresponding parent message ID (MT). @@ -100,7 +100,7 @@ public virtual string ToJson() /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - // PostbackData (byte[]) maxLength + // PostbackData (string) maxLength if (this.PostbackData != null && this.PostbackData.Length > 2048) { yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); diff --git a/src/Bandwidth.Standard/Model/StatusCallbackMessage.cs b/src/Bandwidth.Standard/Model/StatusCallbackMessage.cs index 39df60a3..76dde63c 100644 --- a/src/Bandwidth.Standard/Model/StatusCallbackMessage.cs +++ b/src/Bandwidth.Standard/Model/StatusCallbackMessage.cs @@ -71,7 +71,8 @@ protected StatusCallbackMessage() { } /// Optional media, not applicable for sms. /// priority. /// channel. - public StatusCallbackMessage(string id = default(string), string owner = default(string), string applicationId = default(string), DateTime time = default(DateTime), int segmentCount = default(int), MessageDirectionEnum direction = default(MessageDirectionEnum), List to = default(List), string from = default(string), string text = default(string), string tag = default(string), List media = default(List), PriorityEnum? priority = default(PriorityEnum?), MultiChannelMessageChannelEnum? channel = default(MultiChannelMessageChannelEnum?)) + /// session. + public StatusCallbackMessage(string id = default(string), string owner = default(string), string applicationId = default(string), DateTime time = default(DateTime), int segmentCount = default(int), MessageDirectionEnum direction = default(MessageDirectionEnum), List to = default(List), string from = default(string), string text = default(string), string tag = default(string), List media = default(List), PriorityEnum? priority = default(PriorityEnum?), MultiChannelMessageChannelEnum? channel = default(MultiChannelMessageChannelEnum?), RbmSession session = default(RbmSession)) { // to ensure "id" is required (not null) if (id == null) @@ -111,6 +112,7 @@ protected StatusCallbackMessage() { } this.Media = media; this.Priority = priority; this.Channel = channel; + this.Session = session; } /// @@ -191,6 +193,12 @@ protected StatusCallbackMessage() { } [DataMember(Name = "media", EmitDefaultValue = false)] public List Media { get; set; } + /// + /// Gets or Sets Session + /// + [DataMember(Name = "session", EmitDefaultValue = false)] + public RbmSession Session { get; set; } + /// /// Returns the string presentation of the object /// @@ -212,6 +220,7 @@ public override string ToString() sb.Append(" Media: ").Append(Media).Append("\n"); sb.Append(" Priority: ").Append(Priority).Append("\n"); sb.Append(" Channel: ").Append(Channel).Append("\n"); + sb.Append(" Session: ").Append(Session).Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/src/Bandwidth.Standard/Model/StatusCallbackTypeEnum.cs b/src/Bandwidth.Standard/Model/StatusCallbackTypeEnum.cs index 663c2a9c..1e749070 100644 --- a/src/Bandwidth.Standard/Model/StatusCallbackTypeEnum.cs +++ b/src/Bandwidth.Standard/Model/StatusCallbackTypeEnum.cs @@ -27,41 +27,47 @@ namespace Bandwidth.Standard.Model { /// - /// The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. + /// The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. - `session-started` indicates that a previously exchanged RBM message is now part of an RCS interactive session and is no longer billed individually. /// - /// The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. + /// The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. - `session-started` indicates that a previously exchanged RBM message is now part of an RCS interactive session and is no longer billed individually. [JsonConverter(typeof(StringEnumConverter))] public enum StatusCallbackTypeEnum { /// - /// Enum Sending for value: message-sending + /// Enum MessageSending for value: message-sending /// [EnumMember(Value = "message-sending")] - Sending = 1, + MessageSending = 1, /// - /// Enum Sent for value: message-sent + /// Enum MessageSent for value: message-sent /// [EnumMember(Value = "message-sent")] - Sent = 2, + MessageSent = 2, /// - /// Enum Delivered for value: message-delivered + /// Enum MessageDelivered for value: message-delivered /// [EnumMember(Value = "message-delivered")] - Delivered = 3, + MessageDelivered = 3, /// - /// Enum Failed for value: message-failed + /// Enum MessageFailed for value: message-failed /// [EnumMember(Value = "message-failed")] - Failed = 4, + MessageFailed = 4, /// - /// Enum Read for value: message-read + /// Enum MessageRead for value: message-read /// [EnumMember(Value = "message-read")] - Read = 5 + MessageRead = 5, + + /// + /// Enum SessionStarted for value: session-started + /// + [EnumMember(Value = "session-started")] + SessionStarted = 6 } }