From 0e9d71897d7a5e3bf3d48f465a351cbbd98a7c28 Mon Sep 17 00:00:00 2001 From: "ofego.edafe" Date: Thu, 24 Jul 2025 16:49:15 +1000 Subject: [PATCH 1/5] MAPI-1382: add billing to DR and Webhooks --- spec/openapi.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/openapi.yaml b/spec/openapi.yaml index 27f75cf..a31a6e9 100644 --- a/spec/openapi.yaml +++ b/spec/openapi.yaml @@ -376,6 +376,8 @@ tags: All notifications are JSON encoded and the request expects to receive a response in the HTTP 200 range. If a valid response isn't received the request will be retried in an exponentially backing off fashion. Delivery Reports may carry an additional charge. For pricing, please contact your Account Manager or Support Team (support@app.sinch.com). + + To include billing units in your delivery receipts via webhook, ensure the "Show Billing Units" feature is enabled for your account. For delivery reports or changes in the status of a message, the POST request to the specified URL will be as follows: @@ -550,7 +552,7 @@ tags: To learn more about the benefits of the Short Trackable Links feature, [visit our feature page](https://messagemedia.com/au/feature/short-urls/). - name: Webhooks Management description: >- - Webhooks Management API allows you to manage your webhooks configuration. You can subscribe to one or several events, retrieve the webhooks, update them or even delete them if needed. + Webhooks Management API allows you to manage your webhooks configuration. You can subscribe to one or several events, retrieve the webhooks, update them or even delete them if needed. To include billing units in your delivery receipts via webhook, ensure the "Show Billing Units" feature is enabled for your account. - name: Signature Key Management description: | As a Sinch customer, you want to be able to ensure that callbacks are coming from Sinch and not from a 3rd party. Since @@ -2082,6 +2084,7 @@ paths: "date_received": "2017-05-20T06:30:37.642Z", "status": "enroute", "delay": 0, + "billing_units": 2, "submitted_date": "2017-05-20T06:30:37.639Z", "original_text": "My first message!", "message_id": "d781dcab-d9d8-4fb2-9e03-872f07ae94ba", @@ -2101,6 +2104,7 @@ paths: "date_received": "2017-05-21T01:46:42.579Z", "status": "enroute", "delay": 0, + "billing_units": 1, "submitted_date": "2017-05-21T01:46:42.574Z", "original_text": "My second message!", "message_id": "fbb3b3f5-b702-4d8b-ab44-65b2ee39a281", @@ -3463,6 +3467,7 @@ paths: "events": ["RECEIVED_SMS" ], "template": { "id":"$mtId", + "billing_units": 1, "status":"$statusCode"} "read_timeout": 5000, "retries": 3, From 3f4a7cbe8975fbf0ccb45e28b8771641e0ff8089 Mon Sep 17 00:00:00 2001 From: "ofego.edafe" Date: Fri, 25 Jul 2025 10:11:17 +1000 Subject: [PATCH 2/5] MAPI-1382: add billing units in the schema for DR --- spec/openapi.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/openapi.yaml b/spec/openapi.yaml index a31a6e9..3b23892 100644 --- a/spec/openapi.yaml +++ b/spec/openapi.yaml @@ -7259,6 +7259,11 @@ components: description: 'Deprecated, no longer in use' format: int32 example: 0 + billing_units: + type: integer + description: 'The billing units of this report' + format: int32 + example: 1 delivery_report_id: type: string description: Unique ID for this delivery report From 9869c2ac93eb57ef507500fce029931cf797ce3f Mon Sep 17 00:00:00 2001 From: "ofego.edafe" Date: Fri, 25 Jul 2025 10:19:59 +1000 Subject: [PATCH 3/5] MAPI-1382: remove billing and feature flag message from webhook page --- spec/openapi.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/openapi.yaml b/spec/openapi.yaml index 3b23892..3c19b04 100644 --- a/spec/openapi.yaml +++ b/spec/openapi.yaml @@ -552,7 +552,7 @@ tags: To learn more about the benefits of the Short Trackable Links feature, [visit our feature page](https://messagemedia.com/au/feature/short-urls/). - name: Webhooks Management description: >- - Webhooks Management API allows you to manage your webhooks configuration. You can subscribe to one or several events, retrieve the webhooks, update them or even delete them if needed. To include billing units in your delivery receipts via webhook, ensure the "Show Billing Units" feature is enabled for your account. + Webhooks Management API allows you to manage your webhooks configuration. You can subscribe to one or several events, retrieve the webhooks, update them or even delete them if needed. - name: Signature Key Management description: | As a Sinch customer, you want to be able to ensure that callbacks are coming from Sinch and not from a 3rd party. Since @@ -3467,7 +3467,6 @@ paths: "events": ["RECEIVED_SMS" ], "template": { "id":"$mtId", - "billing_units": 1, "status":"$statusCode"} "read_timeout": 5000, "retries": 3, From 6539db545f719f34013a6cdb955f29eac6d87589 Mon Sep 17 00:00:00 2001 From: "ofego.edafe" Date: Fri, 25 Jul 2025 10:21:49 +1000 Subject: [PATCH 4/5] MAPI-1382: update billing units example to 1 --- spec/openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/openapi.yaml b/spec/openapi.yaml index 3c19b04..5e49aa9 100644 --- a/spec/openapi.yaml +++ b/spec/openapi.yaml @@ -2084,7 +2084,7 @@ paths: "date_received": "2017-05-20T06:30:37.642Z", "status": "enroute", "delay": 0, - "billing_units": 2, + "billing_units": 1, "submitted_date": "2017-05-20T06:30:37.639Z", "original_text": "My first message!", "message_id": "d781dcab-d9d8-4fb2-9e03-872f07ae94ba", From 29bda26803d5e3b2e5f07ca18360edb9b7d60335 Mon Sep 17 00:00:00 2001 From: "ofego.edafe" Date: Fri, 25 Jul 2025 12:00:16 +1000 Subject: [PATCH 5/5] MAPI-1382: update billing units example to 0 --- spec/openapi.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/openapi.yaml b/spec/openapi.yaml index 5e49aa9..f6e39e7 100644 --- a/spec/openapi.yaml +++ b/spec/openapi.yaml @@ -2084,7 +2084,7 @@ paths: "date_received": "2017-05-20T06:30:37.642Z", "status": "enroute", "delay": 0, - "billing_units": 1, + "billing_units": 0, "submitted_date": "2017-05-20T06:30:37.639Z", "original_text": "My first message!", "message_id": "d781dcab-d9d8-4fb2-9e03-872f07ae94ba", @@ -2104,7 +2104,7 @@ paths: "date_received": "2017-05-21T01:46:42.579Z", "status": "enroute", "delay": 0, - "billing_units": 1, + "billing_units": 0, "submitted_date": "2017-05-21T01:46:42.574Z", "original_text": "My second message!", "message_id": "fbb3b3f5-b702-4d8b-ab44-65b2ee39a281",