diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 60258aad..3dc9bc83 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 @@ -404,6 +405,7 @@ src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java src/main/java/com/bandwidth/sdk/model/RbmOpenUrlEnum.java +src/main/java/com/bandwidth/sdk/model/RbmSession.java src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java src/main/java/com/bandwidth/sdk/model/RbmWebViewEnum.java diff --git a/README.md b/README.md index 2cdd9057..989ec367 100644 --- a/README.md +++ b/README.md @@ -334,6 +334,7 @@ Class | Method | HTTP request | Description - [RbmMessageContentText](docs/RbmMessageContentText.md) - [RbmMessageMedia](docs/RbmMessageMedia.md) - [RbmOpenUrlEnum](docs/RbmOpenUrlEnum.md) + - [RbmSession](docs/RbmSession.md) - [RbmStandaloneCard](docs/RbmStandaloneCard.md) - [RbmSuggestionResponse](docs/RbmSuggestionResponse.md) - [RbmWebViewEnum](docs/RbmWebViewEnum.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 01724894..07787157 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -6536,6 +6536,8 @@ components: $ref: "#/components/examples/smsMessageReceivedCallbackExample" mmsMessageReceivedCallback: $ref: "#/components/examples/mmsMessageReceivedCallbackExample" + rbmMessageReceivedSessionCallback: + $ref: "#/components/examples/rbmMessageReceivedSessionCallbackExample" schema: $ref: "#/components/schemas/inboundCallback" description: |- @@ -6568,15 +6570,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: @@ -6734,6 +6743,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: @@ -6833,6 +6866,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: @@ -9806,20 +9910,20 @@ components: text: Hello world suggestions: - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 owner: owner - from: BandwidthRBM applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 @@ -9828,20 +9932,20 @@ components: text: Hello world suggestions: - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 owner: owner - from: BandwidthRBM applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 @@ -9850,20 +9954,20 @@ components: text: Hello world suggestions: - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 owner: owner - from: BandwidthRBM applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 @@ -9872,20 +9976,20 @@ components: text: Hello world suggestions: - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 owner: owner tag: custom string priority: default @@ -10021,20 +10125,20 @@ components: text: Hello world suggestions: - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 properties: text: description: The text associated with the message. Must be 3270 characters @@ -10260,35 +10364,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: SGVsbG8gd29ybGQ= - 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: type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 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: SGVsbG8gd29ybGQ= - format: byte + description: Payload the customer receives when the reply is clicked. + example: track-order-43654 maxLength: 2048 title: Post Back Data type: string @@ -10466,20 +10568,20 @@ components: text: Hello world suggestions: - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 owner: owner multiChannelChannelListSMSResponseObject: allOf: @@ -10570,20 +10672,20 @@ components: text: Hello world suggestions: - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 owner: owner - from: BandwidthRBM applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 @@ -10592,20 +10694,20 @@ components: text: Hello world suggestions: - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 owner: owner - from: BandwidthRBM applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 @@ -10614,20 +10716,20 @@ components: text: Hello world suggestions: - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 owner: owner - from: BandwidthRBM applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 @@ -10636,20 +10738,20 @@ components: text: Hello world suggestions: - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 - type: REPLY - text: Hello world - postbackData: SGVsbG8gd29ybGQ= + text: Track my order + postbackData: track-order-43654 owner: owner tag: custom string priority: default @@ -10715,13 +10817,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: SGVsbG8gd29ybGQ= - format: byte + description: Payload the customer receives when the reply is clicked. + example: track-order-43654 maxLength: 2048 title: Post Back Data type: string @@ -10744,6 +10845,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: @@ -10756,6 +10904,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" @@ -10853,12 +11002,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: @@ -10936,6 +11087,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 2e3fd3d2..34cfef07 100644 --- a/docs/InboundCallbackMessage.md +++ b/docs/InboundCallbackMessage.md @@ -20,6 +20,7 @@ |**media** | **List<URI>** | 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 5722238b..5201b676 100644 --- a/docs/MultiChannelAction.md +++ b/docs/MultiChannelAction.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**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 f84cebfc..27d59ddc 100644 --- a/docs/MultiChannelActionCalendarEvent.md +++ b/docs/MultiChannelActionCalendarEvent.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**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** | **OffsetDateTime** | 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** | **OffsetDateTime** | 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 33aa0670..dca01d4d 100644 --- a/docs/RbmActionBase.md +++ b/docs/RbmActionBase.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**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. | | diff --git a/docs/RbmActionDial.md b/docs/RbmActionDial.md index 617d607a..fea8bba8 100644 --- a/docs/RbmActionDial.md +++ b/docs/RbmActionDial.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**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. | | diff --git a/docs/RbmActionOpenUrl.md b/docs/RbmActionOpenUrl.md index 8059c738..980a5983 100644 --- a/docs/RbmActionOpenUrl.md +++ b/docs/RbmActionOpenUrl.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**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** | **URI** | 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 8e00e99d..9984e7eb 100644 --- a/docs/RbmActionViewLocation.md +++ b/docs/RbmActionViewLocation.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**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..0a465ed2 --- /dev/null +++ b/docs/RbmSession.md @@ -0,0 +1,18 @@ + + +# 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** | **Boolean** | 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** | **OffsetDateTime** | The time the 24-hour session window opened. Only present on `session-started` callbacks. | [optional] | +|**endTime** | **OffsetDateTime** | The time the 24-hour session window closes. Only present on `session-started` callbacks. | [optional] | + + + diff --git a/docs/RbmSuggestionResponse.md b/docs/RbmSuggestionResponse.md index 39c8dd4f..31803394 100644 --- a/docs/RbmSuggestionResponse.md +++ b/docs/RbmSuggestionResponse.md @@ -7,8 +7,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] | diff --git a/docs/StatusCallbackMessage.md b/docs/StatusCallbackMessage.md index 532e5bd1..fb41f498 100644 --- a/docs/StatusCallbackMessage.md +++ b/docs/StatusCallbackMessage.md @@ -21,6 +21,7 @@ Message payload schema within a callback |**media** | **List<URI>** | Optional media, not applicable for sms | [optional] | |**priority** | **PriorityEnum** | | [optional] | |**channel** | **MultiChannelMessageChannelEnum** | | [optional] | +|**session** | [**RbmSession**](RbmSession.md) | | [optional] | diff --git a/docs/StatusCallbackTypeEnum.md b/docs/StatusCallbackTypeEnum.md index 5c74b1be..de54d4cb 100644 --- a/docs/StatusCallbackTypeEnum.md +++ b/docs/StatusCallbackTypeEnum.md @@ -15,5 +15,7 @@ * `MESSAGE_READ` (value: `"message-read"`) +* `SESSION_STARTED` (value: `"session-started"`) + diff --git a/src/main/java/com/bandwidth/sdk/JSON.java b/src/main/java/com/bandwidth/sdk/JSON.java index e40aa483..57852275 100644 --- a/src/main/java/com/bandwidth/sdk/JSON.java +++ b/src/main/java/com/bandwidth/sdk/JSON.java @@ -72,6 +72,7 @@ public Class extends com.bandwidth.sdk.model.Callback> getClassForElement(Json classByDiscriminatorValue.put("message-sending", com.bandwidth.sdk.model.StatusCallback.class); classByDiscriminatorValue.put("message-sent", com.bandwidth.sdk.model.StatusCallback.class); classByDiscriminatorValue.put("requested-location-response", com.bandwidth.sdk.model.InboundCallback.class); + classByDiscriminatorValue.put("session-started", com.bandwidth.sdk.model.StatusCallback.class); classByDiscriminatorValue.put("suggestion-response", com.bandwidth.sdk.model.InboundCallback.class); classByDiscriminatorValue.put("callback", com.bandwidth.sdk.model.Callback.class); return getClassByDiscriminator(classByDiscriminatorValue, @@ -266,6 +267,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RbmMessageContentRichCard.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RbmMessageContentText.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RbmMessageMedia.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RbmSession.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RbmStandaloneCard.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RbmSuggestionResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RecordingAvailableCallback.CustomTypeAdapterFactory()); diff --git a/src/main/java/com/bandwidth/sdk/model/Callback.java b/src/main/java/com/bandwidth/sdk/model/Callback.java index 1a7a7c50..7faf75e4 100644 --- a/src/main/java/com/bandwidth/sdk/model/Callback.java +++ b/src/main/java/com/bandwidth/sdk/model/Callback.java @@ -142,12 +142,16 @@ public Callback read(JsonReader in) throws IOException { deserialized = adapterInboundCallback.fromJsonTree(jsonObject); newCallback.setActualInstance(deserialized); return newCallback; + case "session-started": + deserialized = adapterStatusCallback.fromJsonTree(jsonObject); + newCallback.setActualInstance(deserialized); + return newCallback; case "suggestion-response": deserialized = adapterInboundCallback.fromJsonTree(jsonObject); newCallback.setActualInstance(deserialized); return newCallback; default: - log.log(Level.WARNING, String.format(java.util.Locale.ROOT, "Failed to lookup discriminator value `%s` for Callback. Possible values: message-delivered message-failed message-read message-received message-sending message-sent requested-location-response suggestion-response", jsonObject.get("type").getAsString())); + log.log(Level.WARNING, String.format(java.util.Locale.ROOT, "Failed to lookup discriminator value `%s` for Callback. Possible values: message-delivered message-failed message-read message-received message-sending message-sent requested-location-response session-started suggestion-response", jsonObject.get("type").getAsString())); } } diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java index 41225f1f..78514385 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java @@ -19,6 +19,7 @@ import com.bandwidth.sdk.model.MultiChannelMessageContent; import com.bandwidth.sdk.model.PriorityEnum; import com.bandwidth.sdk.model.RbmLocationResponse; +import com.bandwidth.sdk.model.RbmSession; import com.bandwidth.sdk.model.RbmSuggestionResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -127,6 +128,11 @@ public class InboundCallbackMessage { @javax.annotation.Nullable private MultiChannelMessageChannelEnum channel; + public static final String SERIALIZED_NAME_SESSION = "session"; + @SerializedName(SERIALIZED_NAME_SESSION) + @javax.annotation.Nullable + private RbmSession session; + public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) @javax.annotation.Nullable @@ -408,6 +414,25 @@ public void setChannel(@javax.annotation.Nullable MultiChannelMessageChannelEnum } + public InboundCallbackMessage session(@javax.annotation.Nullable RbmSession session) { + this.session = session; + return this; + } + + /** + * Get session + * @return session + */ + @javax.annotation.Nullable + public RbmSession getSession() { + return session; + } + + public void setSession(@javax.annotation.Nullable RbmSession session) { + this.session = session; + } + + public InboundCallbackMessage content(@javax.annotation.Nullable MultiChannelMessageContent content) { this.content = content; return this; @@ -532,6 +557,7 @@ public boolean equals(Object o) { Objects.equals(this.media, inboundCallbackMessage.media) && Objects.equals(this.priority, inboundCallbackMessage.priority) && Objects.equals(this.channel, inboundCallbackMessage.channel) && + Objects.equals(this.session, inboundCallbackMessage.session) && Objects.equals(this.content, inboundCallbackMessage.content) && Objects.equals(this.suggestionResponse, inboundCallbackMessage.suggestionResponse) && Objects.equals(this.locationResponse, inboundCallbackMessage.locationResponse)&& @@ -540,7 +566,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, owner, applicationId, time, segmentCount, direction, to, from, text, tag, media, priority, channel, content, suggestionResponse, locationResponse, additionalProperties); + return Objects.hash(id, owner, applicationId, time, segmentCount, direction, to, from, text, tag, media, priority, channel, session, content, suggestionResponse, locationResponse, additionalProperties); } @Override @@ -560,6 +586,7 @@ public String toString() { sb.append(" media: ").append(toIndentedString(media)).append("\n"); sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); + sb.append(" session: ").append(toIndentedString(session)).append("\n"); sb.append(" content: ").append(toIndentedString(content)).append("\n"); sb.append(" suggestionResponse: ").append(toIndentedString(suggestionResponse)).append("\n"); sb.append(" locationResponse: ").append(toIndentedString(locationResponse)).append("\n"); @@ -582,7 +609,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet