late-sdk 0.0.947 → 0.0.949

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -0
  3. data/docs/CreateInboxConversation400Response.md +11 -3
  4. data/docs/CreateInboxConversation400ResponseAnyOf.md +20 -0
  5. data/docs/CreateInboxConversation404Response.md +11 -3
  6. data/docs/CreateInboxConversation404ResponseAnyOf.md +20 -0
  7. data/docs/CreateInboxConversation422Response.md +11 -3
  8. data/docs/CreateInboxConversation422ResponseAnyOf.md +20 -0
  9. data/docs/CreateInboxConversation429Response.md +11 -3
  10. data/docs/CreateInboxConversation429ResponseAnyOf.md +20 -0
  11. data/docs/MessagesApi.md +2 -2
  12. data/docs/SendInboxMessage400Response.md +1 -1
  13. data/docs/SendInboxMessage502Response.md +30 -0
  14. data/docs/WhatsAppTemplateLookupError.md +28 -0
  15. data/docs/WhatsAppTemplateLookupErrorDetails.md +24 -0
  16. data/docs/WhatsAppTemplateLookupErrorDetailsProviderHeaders.md +22 -0
  17. data/docs/WhatsAppTemplateLookupErrorPlatformError.md +22 -0
  18. data/docs/WhatsAppTemplateLookupErrorPlatformErrorErrorData.md +18 -0
  19. data/lib/zernio-sdk/api/messages_api.rb +4 -4
  20. data/lib/zernio-sdk/models/create_inbox_conversation400_response.rb +73 -160
  21. data/lib/zernio-sdk/models/create_inbox_conversation400_response_any_of.rb +190 -0
  22. data/lib/zernio-sdk/models/create_inbox_conversation404_response.rb +73 -160
  23. data/lib/zernio-sdk/models/create_inbox_conversation404_response_any_of.rb +190 -0
  24. data/lib/zernio-sdk/models/create_inbox_conversation422_response.rb +73 -160
  25. data/lib/zernio-sdk/models/create_inbox_conversation422_response_any_of.rb +190 -0
  26. data/lib/zernio-sdk/models/create_inbox_conversation429_response.rb +73 -160
  27. data/lib/zernio-sdk/models/create_inbox_conversation429_response_any_of.rb +190 -0
  28. data/lib/zernio-sdk/models/facebook_platform_data.rb +1 -1
  29. data/lib/zernio-sdk/models/send_inbox_message400_response.rb +3 -3
  30. data/lib/zernio-sdk/models/send_inbox_message400_response_platform_error.rb +1 -1
  31. data/lib/zernio-sdk/models/send_inbox_message502_response.rb +103 -0
  32. data/lib/zernio-sdk/models/whats_app_template_lookup_error.rb +305 -0
  33. data/lib/zernio-sdk/models/whats_app_template_lookup_error_details.rb +233 -0
  34. data/lib/zernio-sdk/models/whats_app_template_lookup_error_details_provider_headers.rb +166 -0
  35. data/lib/zernio-sdk/models/whats_app_template_lookup_error_platform_error.rb +166 -0
  36. data/lib/zernio-sdk/models/whats_app_template_lookup_error_platform_error_error_data.rb +147 -0
  37. data/lib/zernio-sdk/version.rb +1 -1
  38. data/lib/zernio-sdk.rb +10 -0
  39. data/openapi.yaml +101 -23
  40. data/spec/api/messages_api_spec.rb +2 -2
  41. data/spec/models/create_inbox_conversation400_response_any_of_spec.rb +46 -0
  42. data/spec/models/create_inbox_conversation400_response_spec.rb +0 -25
  43. data/spec/models/create_inbox_conversation404_response_any_of_spec.rb +46 -0
  44. data/spec/models/create_inbox_conversation404_response_spec.rb +0 -25
  45. data/spec/models/create_inbox_conversation422_response_any_of_spec.rb +46 -0
  46. data/spec/models/create_inbox_conversation422_response_spec.rb +0 -25
  47. data/spec/models/create_inbox_conversation429_response_any_of_spec.rb +46 -0
  48. data/spec/models/create_inbox_conversation429_response_spec.rb +0 -25
  49. data/spec/models/send_inbox_message400_response_spec.rb +1 -1
  50. data/spec/models/send_inbox_message502_response_spec.rb +21 -0
  51. data/spec/models/whats_app_template_lookup_error_details_provider_headers_spec.rb +48 -0
  52. data/spec/models/whats_app_template_lookup_error_details_spec.rb +58 -0
  53. data/spec/models/whats_app_template_lookup_error_platform_error_error_data_spec.rb +36 -0
  54. data/spec/models/whats_app_template_lookup_error_platform_error_spec.rb +48 -0
  55. data/spec/models/whats_app_template_lookup_error_spec.rb +78 -0
  56. data/zernio-sdk-0.0.949.gem +0 -0
  57. metadata +42 -2
  58. data/zernio-sdk-0.0.947.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6115d87ec33f16eb6960cedd455f604ecbb3d264dbbc85f592a7f76a61e0e857
4
- data.tar.gz: b1d488ef20df3cbb8d84c760cb2185ec310cf7a2059afc44d4bfde83296d42a1
3
+ metadata.gz: 91a4de41466e990fc5ecf98123adf7b0c45921c69cd66f026bb52888044a2761
4
+ data.tar.gz: 22dcb29de2a581cb3b8e307b54e6becb0eefe58fc8c59b40683ca64538109b06
5
5
  SHA512:
6
- metadata.gz: 7e889e67901b14d657c0f1a263bb0bddaceb114fa0e0ac3dae4d2ba2234f9896dd326a528ac31e3c14785b4f9f4f3191c5087f6accd3f7f8d7b5e9a344580068
7
- data.tar.gz: c31dbabe5c3dc196bda3d2be406221fd43792299a08c7837d30b8aed4fc0531145718743c629e13e8acc6eb7373e6d87a7b774d752f101cd5ea5c4a3a5453446
6
+ metadata.gz: da20c6abbbb7b62d6e8ac1858c15067d922527075f9fc5b8be2c7f29c8202650f39361eb6ffdfc9e3e70e02c8faf9975811043b1c91a80a76f184d3bf4ded643
7
+ data.tar.gz: ea7ddf9c51ab904aadf6142f9226f3d4f3852a0b143e9cbcb309610152ba1adea90abb5b160c1bce410a85c00f0f02ebd6a32da7eee1b7042ec2eacb3469b44b
data/README.md CHANGED
@@ -1118,9 +1118,13 @@ Class | Method | HTTP request | Description
1118
1118
  - [Zernio::CreateInboxConversation201Response](docs/CreateInboxConversation201Response.md)
1119
1119
  - [Zernio::CreateInboxConversation201ResponseData](docs/CreateInboxConversation201ResponseData.md)
1120
1120
  - [Zernio::CreateInboxConversation400Response](docs/CreateInboxConversation400Response.md)
1121
+ - [Zernio::CreateInboxConversation400ResponseAnyOf](docs/CreateInboxConversation400ResponseAnyOf.md)
1121
1122
  - [Zernio::CreateInboxConversation404Response](docs/CreateInboxConversation404Response.md)
1123
+ - [Zernio::CreateInboxConversation404ResponseAnyOf](docs/CreateInboxConversation404ResponseAnyOf.md)
1122
1124
  - [Zernio::CreateInboxConversation422Response](docs/CreateInboxConversation422Response.md)
1125
+ - [Zernio::CreateInboxConversation422ResponseAnyOf](docs/CreateInboxConversation422ResponseAnyOf.md)
1123
1126
  - [Zernio::CreateInboxConversation429Response](docs/CreateInboxConversation429Response.md)
1127
+ - [Zernio::CreateInboxConversation429ResponseAnyOf](docs/CreateInboxConversation429ResponseAnyOf.md)
1124
1128
  - [Zernio::CreateInboxConversationRequest](docs/CreateInboxConversationRequest.md)
1125
1129
  - [Zernio::CreateInboxConversationRequestHeaderLocation](docs/CreateInboxConversationRequestHeaderLocation.md)
1126
1130
  - [Zernio::CreateInboxConversationRequestHeaderMedia](docs/CreateInboxConversationRequestHeaderMedia.md)
@@ -2291,6 +2295,7 @@ Class | Method | HTTP request | Description
2291
2295
  - [Zernio::SendInboxMessage200ResponseWarningsInner](docs/SendInboxMessage200ResponseWarningsInner.md)
2292
2296
  - [Zernio::SendInboxMessage400Response](docs/SendInboxMessage400Response.md)
2293
2297
  - [Zernio::SendInboxMessage400ResponsePlatformError](docs/SendInboxMessage400ResponsePlatformError.md)
2298
+ - [Zernio::SendInboxMessage502Response](docs/SendInboxMessage502Response.md)
2294
2299
  - [Zernio::SendInboxMessageRequest](docs/SendInboxMessageRequest.md)
2295
2300
  - [Zernio::SendInboxMessageRequestButtonsInner](docs/SendInboxMessageRequestButtonsInner.md)
2296
2301
  - [Zernio::SendInboxMessageRequestContactsInner](docs/SendInboxMessageRequestContactsInner.md)
@@ -2801,6 +2806,11 @@ Class | Method | HTTP request | Description
2801
2806
  - [Zernio::WhatsAppSandboxSession](docs/WhatsAppSandboxSession.md)
2802
2807
  - [Zernio::WhatsAppTemplateButton](docs/WhatsAppTemplateButton.md)
2803
2808
  - [Zernio::WhatsAppTemplateComponent](docs/WhatsAppTemplateComponent.md)
2809
+ - [Zernio::WhatsAppTemplateLookupError](docs/WhatsAppTemplateLookupError.md)
2810
+ - [Zernio::WhatsAppTemplateLookupErrorDetails](docs/WhatsAppTemplateLookupErrorDetails.md)
2811
+ - [Zernio::WhatsAppTemplateLookupErrorDetailsProviderHeaders](docs/WhatsAppTemplateLookupErrorDetailsProviderHeaders.md)
2812
+ - [Zernio::WhatsAppTemplateLookupErrorPlatformError](docs/WhatsAppTemplateLookupErrorPlatformError.md)
2813
+ - [Zernio::WhatsAppTemplateLookupErrorPlatformErrorErrorData](docs/WhatsAppTemplateLookupErrorPlatformErrorErrorData.md)
2804
2814
  - [Zernio::WorkflowEdge](docs/WorkflowEdge.md)
2805
2815
  - [Zernio::WorkflowExecutionEvent](docs/WorkflowExecutionEvent.md)
2806
2816
  - [Zernio::WorkflowNode](docs/WorkflowNode.md)
@@ -4,8 +4,12 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **error** | **String** | | [optional] |
8
- | **code** | **String** | | [optional] |
7
+ | **error** | **String** | | |
8
+ | **code** | **String** | | |
9
+ | **type** | **String** | | |
10
+ | **platform** | **String** | | |
11
+ | **platform_error** | [**WhatsAppTemplateLookupErrorPlatformError**](WhatsAppTemplateLookupErrorPlatformError.md) | | [optional] |
12
+ | **details** | [**WhatsAppTemplateLookupErrorDetails**](WhatsAppTemplateLookupErrorDetails.md) | | |
9
13
 
10
14
  ## Example
11
15
 
@@ -14,7 +18,11 @@ require 'zernio-sdk'
14
18
 
15
19
  instance = Zernio::CreateInboxConversation400Response.new(
16
20
  error: null,
17
- code: null
21
+ code: null,
22
+ type: null,
23
+ platform: null,
24
+ platform_error: null,
25
+ details: null
18
26
  )
19
27
  ```
20
28
 
@@ -0,0 +1,20 @@
1
+ # Zernio::CreateInboxConversation400ResponseAnyOf
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | [optional] |
8
+ | **code** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::CreateInboxConversation400ResponseAnyOf.new(
16
+ error: null,
17
+ code: null
18
+ )
19
+ ```
20
+
@@ -4,8 +4,12 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **error** | **String** | | [optional] |
8
- | **code** | **String** | | [optional] |
7
+ | **error** | **String** | | |
8
+ | **code** | **String** | | |
9
+ | **type** | **String** | | |
10
+ | **platform** | **String** | | |
11
+ | **platform_error** | [**WhatsAppTemplateLookupErrorPlatformError**](WhatsAppTemplateLookupErrorPlatformError.md) | | [optional] |
12
+ | **details** | [**WhatsAppTemplateLookupErrorDetails**](WhatsAppTemplateLookupErrorDetails.md) | | |
9
13
 
10
14
  ## Example
11
15
 
@@ -14,7 +18,11 @@ require 'zernio-sdk'
14
18
 
15
19
  instance = Zernio::CreateInboxConversation404Response.new(
16
20
  error: null,
17
- code: null
21
+ code: null,
22
+ type: null,
23
+ platform: null,
24
+ platform_error: null,
25
+ details: null
18
26
  )
19
27
  ```
20
28
 
@@ -0,0 +1,20 @@
1
+ # Zernio::CreateInboxConversation404ResponseAnyOf
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | [optional] |
8
+ | **code** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::CreateInboxConversation404ResponseAnyOf.new(
16
+ error: null,
17
+ code: null
18
+ )
19
+ ```
20
+
@@ -4,8 +4,12 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **error** | **String** | | [optional] |
8
- | **code** | **String** | | [optional] |
7
+ | **error** | **String** | | |
8
+ | **code** | **String** | | |
9
+ | **type** | **String** | | |
10
+ | **platform** | **String** | | |
11
+ | **platform_error** | [**WhatsAppTemplateLookupErrorPlatformError**](WhatsAppTemplateLookupErrorPlatformError.md) | | [optional] |
12
+ | **details** | [**WhatsAppTemplateLookupErrorDetails**](WhatsAppTemplateLookupErrorDetails.md) | | |
9
13
 
10
14
  ## Example
11
15
 
@@ -14,7 +18,11 @@ require 'zernio-sdk'
14
18
 
15
19
  instance = Zernio::CreateInboxConversation422Response.new(
16
20
  error: null,
17
- code: null
21
+ code: null,
22
+ type: null,
23
+ platform: null,
24
+ platform_error: null,
25
+ details: null
18
26
  )
19
27
  ```
20
28
 
@@ -0,0 +1,20 @@
1
+ # Zernio::CreateInboxConversation422ResponseAnyOf
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | [optional] |
8
+ | **code** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::CreateInboxConversation422ResponseAnyOf.new(
16
+ error: null,
17
+ code: null
18
+ )
19
+ ```
20
+
@@ -4,8 +4,12 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **error** | **String** | | [optional] |
8
- | **code** | **String** | | [optional] |
7
+ | **error** | **String** | | |
8
+ | **code** | **String** | | |
9
+ | **type** | **String** | | |
10
+ | **platform** | **String** | | |
11
+ | **platform_error** | [**WhatsAppTemplateLookupErrorPlatformError**](WhatsAppTemplateLookupErrorPlatformError.md) | | [optional] |
12
+ | **details** | [**WhatsAppTemplateLookupErrorDetails**](WhatsAppTemplateLookupErrorDetails.md) | | |
9
13
 
10
14
  ## Example
11
15
 
@@ -14,7 +18,11 @@ require 'zernio-sdk'
14
18
 
15
19
  instance = Zernio::CreateInboxConversation429Response.new(
16
20
  error: null,
17
- code: null
21
+ code: null,
22
+ type: null,
23
+ platform: null,
24
+ platform_error: null,
25
+ details: null
18
26
  )
19
27
  ```
20
28
 
@@ -0,0 +1,20 @@
1
+ # Zernio::CreateInboxConversation429ResponseAnyOf
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | [optional] |
8
+ | **code** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::CreateInboxConversation429ResponseAnyOf.new(
16
+ error: null,
17
+ code: null
18
+ )
19
+ ```
20
+
data/docs/MessagesApi.md CHANGED
@@ -101,7 +101,7 @@ end
101
101
 
102
102
  Create conversation
103
103
 
104
- Start a direct message conversation with a user. If a conversation with that recipient already exists, the message is added to the existing thread. Supported platforms: X, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. **Slack.** Pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. **WhatsApp.** This is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. - Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. - A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. - A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. - CAROUSEL templates take per-card overrides via templateCards, each addressed by the card's card_index, because card body variables restart at {{1}} per card and cannot be expressed in the flat templateParams order. - Template fields are accepted on the JSON body only, not on multipart requests. For a number you already have a thread with, this sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. **DM eligibility (X).** Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. **X API tier requirement.** DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. **Rate limits (X only).** X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
104
+ Start a direct message conversation with a user. If a conversation with that recipient already exists, the message is added to the existing thread. Supported platforms: X, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. **Slack.** Pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. **WhatsApp.** This is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Before sending, Zernio must resolve an exact APPROVED template definition matching both templateName and templateLanguage. If Meta rejects that lookup, or the exact approved definition is absent, Zernio sends no message and returns the canonical platform error instead. Lookup errors use code `platform_api_error`, type `platform_error`, and platform `whatsapp`. Sanitized Meta code, message, and `error_data.details` are returned in `platformError`; `details` identifies `phase: template_lookup`, the query-free endpoint, upstream status, and only safe provider usage or retry headers. - Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. - A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. - A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. - CAROUSEL templates take per-card overrides via templateCards, each addressed by the card's card_index, because card body variables restart at {{1}} per card and cannot be expressed in the flat templateParams order. - Template fields are accepted on the JSON body only, not on multipart requests. For a number you already have a thread with, this sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. **DM eligibility (X).** Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. **X API tier requirement.** DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. **Rate limits (X only).** X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
105
105
 
106
106
  ### Examples
107
107
 
@@ -855,7 +855,7 @@ end
855
855
 
856
856
  Send message
857
857
 
858
- Send a message in a conversation. Supports text, attachments, quick replies, buttons, templates, and message tags. Attachment and interactive message support varies by platform. WhatsApp per-recipient rate limit: WhatsApp caps how many messages you may send to the same recipient in a short window and rejects the excess with error code `131056` (\"Too many messages sent to this recipient\"). Pace sends to a single recipient at roughly 10 per minute; bursts above that return a `400` with code `131056`. Sends to other recipients are unaffected, so parallelise across recipients rather than flooding one. WhatsApp template messages: to send an approved template into this conversation (required when the 24-hour customer-service window is closed), use the `template` field with a single element carrying the template reference: `{ \"elements\": [{ \"name\": ..., \"language\": ..., \"components\": [...] }] }`. See the `template` field below for the exact shape. To send a template to a phone number you have no conversation with yet, use the create-conversation endpoint (POST /v1/inbox/conversations) instead. WhatsApp rich interactive messages (list, CTA URL, Flow, location request) are available via the `interactive` field. Tap events are delivered through the `message.received` webhook with WhatsApp-specific `metadata` fields (`interactiveType`, `interactiveId`, `flowResponseJson`, `flowResponseData`). **Idempotency:** send an `Idempotency-Key` header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with `Idempotent-Replayed: true`) instead of sending the message a second time; same key + different body returns 422; a key still in flight returns 409. Works for JSON and multipart (file upload) requests alike. Keys are retained for 24 hours. Only successful (2xx) responses are stored for replay: if the request throws or returns a non-2xx status, the key is released so the same key can be retried once the problem is fixed. The header therefore protects the \"request succeeded but the response was lost\" case. For an ambiguous failure (a 5xx or a network timeout), reconcile before retrying: a failure after the platform already accepted the message also releases the key, and a blind retry could send it twice. List the conversation's messages first, and treat an empty result as inconclusive rather than as proof nothing was sent, since a send that failed while being recorded leaves no trace on our side.
858
+ Send a message in a conversation. Supports text, attachments, quick replies, buttons, templates, and message tags. Attachment and interactive message support varies by platform. WhatsApp per-recipient rate limit: WhatsApp caps how many messages you may send to the same recipient in a short window and rejects the excess with error code `131056` (\"Too many messages sent to this recipient\"). Pace sends to a single recipient at roughly 10 per minute; bursts above that return a `400` with code `131056`. Sends to other recipients are unaffected, so parallelise across recipients rather than flooding one. WhatsApp template messages: to send an approved template into this conversation (required when the 24-hour customer-service window is closed), use the `template` field with a single element carrying the template reference: `{ \"elements\": [{ \"name\": ..., \"language\": ..., \"components\": [...] }] }`. See the `template` field below for the exact shape. To send a template to a phone number you have no conversation with yet, use the create-conversation endpoint (POST /v1/inbox/conversations) instead. Zernio resolves the exact APPROVED template name and language before any WhatsApp template send. A failed lookup or missing exact definition sends no message and returns code `platform_api_error`, type `platform_error`, and platform `whatsapp`. Sanitized Meta code, message, and `error_data.details` are returned in `platformError`; `details` identifies `phase: template_lookup`, the query-free endpoint, upstream status, and only safe provider usage or retry headers. WhatsApp rich interactive messages (list, CTA URL, Flow, location request) are available via the `interactive` field. Tap events are delivered through the `message.received` webhook with WhatsApp-specific `metadata` fields (`interactiveType`, `interactiveId`, `flowResponseJson`, `flowResponseData`). **Idempotency:** send an `Idempotency-Key` header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with `Idempotent-Replayed: true`) instead of sending the message a second time; same key + different body returns 422; a key still in flight returns 409. Works for JSON and multipart (file upload) requests alike. Keys are retained for 24 hours. Only successful (2xx) responses are stored for replay: if the request throws or returns a non-2xx status, the key is released so the same key can be retried once the problem is fixed. The header therefore protects the \"request succeeded but the response was lost\" case. For an ambiguous failure (a 5xx or a network timeout), reconcile before retrying: a failure after the platform already accepted the message also releases the key, and a blind retry could send it twice. List the conversation's messages first, and treat an empty result as inconclusive rather than as proof nothing was sent, since a send that failed while being recorded leaves no trace on our side.
859
859
 
860
860
  ### Examples
861
861
 
@@ -7,7 +7,7 @@
7
7
  | **error** | **String** | | [optional] |
8
8
  | **type** | **String** | Present on Meta pass-through rejections: platform_error when Meta rejected the send (see platform/platformError below), invalid_request_error for validation failures. | [optional] |
9
9
  | **code** | **String** | Stable machine-readable reason. PLATFORM_LIMITATION covers a capability the platform does not offer (e.g. Bluesky and Reddit DMs reject media); MISSING_PARTICIPANT means the stored conversation has no recipient to send to; DIRECT_SEND_NOT_ELIGIBLE and DIRECT_SEND_BLOCKED mean the WhatsApp Business Account needs Meta to grant or restore Direct Send access; DIRECT_SEND_LIMITED is temporary, Meta lifts it on its own; platform_api_error means Meta itself rejected the send (see platformError). | [optional] |
10
- | **platform** | **String** | Present alongside code platform_api_error. The platform that rejected the send (e.g. instagram, facebook). | [optional] |
10
+ | **platform** | **String** | Present alongside code platform_api_error. The platform that rejected the send (e.g. instagram, facebook, whatsapp). | [optional] |
11
11
  | **platform_error** | [**SendInboxMessage400ResponsePlatformError**](SendInboxMessage400ResponsePlatformError.md) | | [optional] |
12
12
 
13
13
  ## Example
@@ -0,0 +1,30 @@
1
+ # Zernio::SendInboxMessage502Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | |
8
+ | **type** | **String** | Error class for programmatic handling. | |
9
+ | **code** | **String** | | |
10
+ | **param** | **String** | The request field that caused the error, when applicable. | [optional] |
11
+ | **platform** | **String** | | |
12
+ | **platform_error** | [**WhatsAppTemplateLookupErrorPlatformError**](WhatsAppTemplateLookupErrorPlatformError.md) | | [optional] |
13
+ | **details** | [**WhatsAppTemplateLookupErrorDetails**](WhatsAppTemplateLookupErrorDetails.md) | | |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'zernio-sdk'
19
+
20
+ instance = Zernio::SendInboxMessage502Response.new(
21
+ error: null,
22
+ type: null,
23
+ code: null,
24
+ param: null,
25
+ platform: null,
26
+ platform_error: null,
27
+ details: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,28 @@
1
+ # Zernio::WhatsAppTemplateLookupError
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | |
8
+ | **type** | **String** | | |
9
+ | **code** | **String** | | |
10
+ | **platform** | **String** | | |
11
+ | **platform_error** | [**WhatsAppTemplateLookupErrorPlatformError**](WhatsAppTemplateLookupErrorPlatformError.md) | | [optional] |
12
+ | **details** | [**WhatsAppTemplateLookupErrorDetails**](WhatsAppTemplateLookupErrorDetails.md) | | |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'zernio-sdk'
18
+
19
+ instance = Zernio::WhatsAppTemplateLookupError.new(
20
+ error: null,
21
+ type: null,
22
+ code: null,
23
+ platform: null,
24
+ platform_error: null,
25
+ details: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,24 @@
1
+ # Zernio::WhatsAppTemplateLookupErrorDetails
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **phase** | **String** | | |
8
+ | **endpoint** | **String** | Meta endpoint path without query parameters or access tokens | |
9
+ | **upstream_status** | **Integer** | | [optional] |
10
+ | **provider_headers** | [**WhatsAppTemplateLookupErrorDetailsProviderHeaders**](WhatsAppTemplateLookupErrorDetailsProviderHeaders.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::WhatsAppTemplateLookupErrorDetails.new(
18
+ phase: null,
19
+ endpoint: null,
20
+ upstream_status: null,
21
+ provider_headers: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,22 @@
1
+ # Zernio::WhatsAppTemplateLookupErrorDetailsProviderHeaders
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **retry_after** | **String** | | [optional] |
8
+ | **x_app_usage** | **String** | | [optional] |
9
+ | **x_business_use_case_usage** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::WhatsAppTemplateLookupErrorDetailsProviderHeaders.new(
17
+ retry_after: null,
18
+ x_app_usage: null,
19
+ x_business_use_case_usage: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,22 @@
1
+ # Zernio::WhatsAppTemplateLookupErrorPlatformError
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **Integer** | | [optional] |
8
+ | **message** | **String** | | [optional] |
9
+ | **error_data** | [**WhatsAppTemplateLookupErrorPlatformErrorErrorData**](WhatsAppTemplateLookupErrorPlatformErrorErrorData.md) | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::WhatsAppTemplateLookupErrorPlatformError.new(
17
+ code: null,
18
+ message: null,
19
+ error_data: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,18 @@
1
+ # Zernio::WhatsAppTemplateLookupErrorPlatformErrorErrorData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **details** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ instance = Zernio::WhatsAppTemplateLookupErrorPlatformErrorErrorData.new(
15
+ details: null
16
+ )
17
+ ```
18
+
@@ -100,7 +100,7 @@ module Zernio
100
100
  end
101
101
 
102
102
  # Create conversation
103
- # Start a direct message conversation with a user. If a conversation with that recipient already exists, the message is added to the existing thread. Supported platforms: X, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. **Slack.** Pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. **WhatsApp.** This is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. - Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. - A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. - A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. - CAROUSEL templates take per-card overrides via templateCards, each addressed by the card's card_index, because card body variables restart at {{1}} per card and cannot be expressed in the flat templateParams order. - Template fields are accepted on the JSON body only, not on multipart requests. For a number you already have a thread with, this sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. **DM eligibility (X).** Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. **X API tier requirement.** DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. **Rate limits (X only).** X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
103
+ # Start a direct message conversation with a user. If a conversation with that recipient already exists, the message is added to the existing thread. Supported platforms: X, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. **Slack.** Pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. **WhatsApp.** This is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Before sending, Zernio must resolve an exact APPROVED template definition matching both templateName and templateLanguage. If Meta rejects that lookup, or the exact approved definition is absent, Zernio sends no message and returns the canonical platform error instead. Lookup errors use code `platform_api_error`, type `platform_error`, and platform `whatsapp`. Sanitized Meta code, message, and `error_data.details` are returned in `platformError`; `details` identifies `phase: template_lookup`, the query-free endpoint, upstream status, and only safe provider usage or retry headers. - Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. - A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. - A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. - CAROUSEL templates take per-card overrides via templateCards, each addressed by the card's card_index, because card body variables restart at {{1}} per card and cannot be expressed in the flat templateParams order. - Template fields are accepted on the JSON body only, not on multipart requests. For a number you already have a thread with, this sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. **DM eligibility (X).** Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. **X API tier requirement.** DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. **Rate limits (X only).** X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
104
104
  # @param create_inbox_conversation_request [CreateInboxConversationRequest]
105
105
  # @param [Hash] opts the optional parameters
106
106
  # @return [CreateInboxConversation201Response]
@@ -110,7 +110,7 @@ module Zernio
110
110
  end
111
111
 
112
112
  # Create conversation
113
- # Start a direct message conversation with a user. If a conversation with that recipient already exists, the message is added to the existing thread. Supported platforms: X, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. **Slack.** Pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. **WhatsApp.** This is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. - Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. - A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. - A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. - CAROUSEL templates take per-card overrides via templateCards, each addressed by the card's card_index, because card body variables restart at {{1}} per card and cannot be expressed in the flat templateParams order. - Template fields are accepted on the JSON body only, not on multipart requests. For a number you already have a thread with, this sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. **DM eligibility (X).** Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. **X API tier requirement.** DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. **Rate limits (X only).** X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
113
+ # Start a direct message conversation with a user. If a conversation with that recipient already exists, the message is added to the existing thread. Supported platforms: X, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. **Slack.** Pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. **WhatsApp.** This is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Before sending, Zernio must resolve an exact APPROVED template definition matching both templateName and templateLanguage. If Meta rejects that lookup, or the exact approved definition is absent, Zernio sends no message and returns the canonical platform error instead. Lookup errors use code `platform_api_error`, type `platform_error`, and platform `whatsapp`. Sanitized Meta code, message, and `error_data.details` are returned in `platformError`; `details` identifies `phase: template_lookup`, the query-free endpoint, upstream status, and only safe provider usage or retry headers. - Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. - A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. - A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. - CAROUSEL templates take per-card overrides via templateCards, each addressed by the card's card_index, because card body variables restart at {{1}} per card and cannot be expressed in the flat templateParams order. - Template fields are accepted on the JSON body only, not on multipart requests. For a number you already have a thread with, this sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. **DM eligibility (X).** Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. **X API tier requirement.** DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. **Rate limits (X only).** X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
114
114
  # @param create_inbox_conversation_request [CreateInboxConversationRequest]
115
115
  # @param [Hash] opts the optional parameters
116
116
  # @return [Array<(CreateInboxConversation201Response, Integer, Hash)>] CreateInboxConversation201Response data, response status code and response headers
@@ -932,7 +932,7 @@ module Zernio
932
932
  end
933
933
 
934
934
  # Send message
935
- # Send a message in a conversation. Supports text, attachments, quick replies, buttons, templates, and message tags. Attachment and interactive message support varies by platform. WhatsApp per-recipient rate limit: WhatsApp caps how many messages you may send to the same recipient in a short window and rejects the excess with error code `131056` (\"Too many messages sent to this recipient\"). Pace sends to a single recipient at roughly 10 per minute; bursts above that return a `400` with code `131056`. Sends to other recipients are unaffected, so parallelise across recipients rather than flooding one. WhatsApp template messages: to send an approved template into this conversation (required when the 24-hour customer-service window is closed), use the `template` field with a single element carrying the template reference: `{ \"elements\": [{ \"name\": ..., \"language\": ..., \"components\": [...] }] }`. See the `template` field below for the exact shape. To send a template to a phone number you have no conversation with yet, use the create-conversation endpoint (POST /v1/inbox/conversations) instead. WhatsApp rich interactive messages (list, CTA URL, Flow, location request) are available via the `interactive` field. Tap events are delivered through the `message.received` webhook with WhatsApp-specific `metadata` fields (`interactiveType`, `interactiveId`, `flowResponseJson`, `flowResponseData`). **Idempotency:** send an `Idempotency-Key` header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with `Idempotent-Replayed: true`) instead of sending the message a second time; same key + different body returns 422; a key still in flight returns 409. Works for JSON and multipart (file upload) requests alike. Keys are retained for 24 hours. Only successful (2xx) responses are stored for replay: if the request throws or returns a non-2xx status, the key is released so the same key can be retried once the problem is fixed. The header therefore protects the \"request succeeded but the response was lost\" case. For an ambiguous failure (a 5xx or a network timeout), reconcile before retrying: a failure after the platform already accepted the message also releases the key, and a blind retry could send it twice. List the conversation's messages first, and treat an empty result as inconclusive rather than as proof nothing was sent, since a send that failed while being recorded leaves no trace on our side.
935
+ # Send a message in a conversation. Supports text, attachments, quick replies, buttons, templates, and message tags. Attachment and interactive message support varies by platform. WhatsApp per-recipient rate limit: WhatsApp caps how many messages you may send to the same recipient in a short window and rejects the excess with error code `131056` (\"Too many messages sent to this recipient\"). Pace sends to a single recipient at roughly 10 per minute; bursts above that return a `400` with code `131056`. Sends to other recipients are unaffected, so parallelise across recipients rather than flooding one. WhatsApp template messages: to send an approved template into this conversation (required when the 24-hour customer-service window is closed), use the `template` field with a single element carrying the template reference: `{ \"elements\": [{ \"name\": ..., \"language\": ..., \"components\": [...] }] }`. See the `template` field below for the exact shape. To send a template to a phone number you have no conversation with yet, use the create-conversation endpoint (POST /v1/inbox/conversations) instead. Zernio resolves the exact APPROVED template name and language before any WhatsApp template send. A failed lookup or missing exact definition sends no message and returns code `platform_api_error`, type `platform_error`, and platform `whatsapp`. Sanitized Meta code, message, and `error_data.details` are returned in `platformError`; `details` identifies `phase: template_lookup`, the query-free endpoint, upstream status, and only safe provider usage or retry headers. WhatsApp rich interactive messages (list, CTA URL, Flow, location request) are available via the `interactive` field. Tap events are delivered through the `message.received` webhook with WhatsApp-specific `metadata` fields (`interactiveType`, `interactiveId`, `flowResponseJson`, `flowResponseData`). **Idempotency:** send an `Idempotency-Key` header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with `Idempotent-Replayed: true`) instead of sending the message a second time; same key + different body returns 422; a key still in flight returns 409. Works for JSON and multipart (file upload) requests alike. Keys are retained for 24 hours. Only successful (2xx) responses are stored for replay: if the request throws or returns a non-2xx status, the key is released so the same key can be retried once the problem is fixed. The header therefore protects the \"request succeeded but the response was lost\" case. For an ambiguous failure (a 5xx or a network timeout), reconcile before retrying: a failure after the platform already accepted the message also releases the key, and a blind retry could send it twice. List the conversation's messages first, and treat an empty result as inconclusive rather than as proof nothing was sent, since a send that failed while being recorded leaves no trace on our side.
936
936
  # @param conversation_id [String] Opaque conversation identifier, accepted verbatim from the list endpoint or from the conversationId on inbox webhooks. Format not to be assumed.
937
937
  # @param send_inbox_message_request [SendInboxMessageRequest]
938
938
  # @param [Hash] opts the optional parameters
@@ -944,7 +944,7 @@ module Zernio
944
944
  end
945
945
 
946
946
  # Send message
947
- # Send a message in a conversation. Supports text, attachments, quick replies, buttons, templates, and message tags. Attachment and interactive message support varies by platform. WhatsApp per-recipient rate limit: WhatsApp caps how many messages you may send to the same recipient in a short window and rejects the excess with error code &#x60;131056&#x60; (\&quot;Too many messages sent to this recipient\&quot;). Pace sends to a single recipient at roughly 10 per minute; bursts above that return a &#x60;400&#x60; with code &#x60;131056&#x60;. Sends to other recipients are unaffected, so parallelise across recipients rather than flooding one. WhatsApp template messages: to send an approved template into this conversation (required when the 24-hour customer-service window is closed), use the &#x60;template&#x60; field with a single element carrying the template reference: &#x60;{ \&quot;elements\&quot;: [{ \&quot;name\&quot;: ..., \&quot;language\&quot;: ..., \&quot;components\&quot;: [...] }] }&#x60;. See the &#x60;template&#x60; field below for the exact shape. To send a template to a phone number you have no conversation with yet, use the create-conversation endpoint (POST /v1/inbox/conversations) instead. WhatsApp rich interactive messages (list, CTA URL, Flow, location request) are available via the &#x60;interactive&#x60; field. Tap events are delivered through the &#x60;message.received&#x60; webhook with WhatsApp-specific &#x60;metadata&#x60; fields (&#x60;interactiveType&#x60;, &#x60;interactiveId&#x60;, &#x60;flowResponseJson&#x60;, &#x60;flowResponseData&#x60;). **Idempotency:** send an &#x60;Idempotency-Key&#x60; header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with &#x60;Idempotent-Replayed: true&#x60;) instead of sending the message a second time; same key + different body returns 422; a key still in flight returns 409. Works for JSON and multipart (file upload) requests alike. Keys are retained for 24 hours. Only successful (2xx) responses are stored for replay: if the request throws or returns a non-2xx status, the key is released so the same key can be retried once the problem is fixed. The header therefore protects the \&quot;request succeeded but the response was lost\&quot; case. For an ambiguous failure (a 5xx or a network timeout), reconcile before retrying: a failure after the platform already accepted the message also releases the key, and a blind retry could send it twice. List the conversation&#39;s messages first, and treat an empty result as inconclusive rather than as proof nothing was sent, since a send that failed while being recorded leaves no trace on our side.
947
+ # Send a message in a conversation. Supports text, attachments, quick replies, buttons, templates, and message tags. Attachment and interactive message support varies by platform. WhatsApp per-recipient rate limit: WhatsApp caps how many messages you may send to the same recipient in a short window and rejects the excess with error code &#x60;131056&#x60; (\&quot;Too many messages sent to this recipient\&quot;). Pace sends to a single recipient at roughly 10 per minute; bursts above that return a &#x60;400&#x60; with code &#x60;131056&#x60;. Sends to other recipients are unaffected, so parallelise across recipients rather than flooding one. WhatsApp template messages: to send an approved template into this conversation (required when the 24-hour customer-service window is closed), use the &#x60;template&#x60; field with a single element carrying the template reference: &#x60;{ \&quot;elements\&quot;: [{ \&quot;name\&quot;: ..., \&quot;language\&quot;: ..., \&quot;components\&quot;: [...] }] }&#x60;. See the &#x60;template&#x60; field below for the exact shape. To send a template to a phone number you have no conversation with yet, use the create-conversation endpoint (POST /v1/inbox/conversations) instead. Zernio resolves the exact APPROVED template name and language before any WhatsApp template send. A failed lookup or missing exact definition sends no message and returns code &#x60;platform_api_error&#x60;, type &#x60;platform_error&#x60;, and platform &#x60;whatsapp&#x60;. Sanitized Meta code, message, and &#x60;error_data.details&#x60; are returned in &#x60;platformError&#x60;; &#x60;details&#x60; identifies &#x60;phase: template_lookup&#x60;, the query-free endpoint, upstream status, and only safe provider usage or retry headers. WhatsApp rich interactive messages (list, CTA URL, Flow, location request) are available via the &#x60;interactive&#x60; field. Tap events are delivered through the &#x60;message.received&#x60; webhook with WhatsApp-specific &#x60;metadata&#x60; fields (&#x60;interactiveType&#x60;, &#x60;interactiveId&#x60;, &#x60;flowResponseJson&#x60;, &#x60;flowResponseData&#x60;). **Idempotency:** send an &#x60;Idempotency-Key&#x60; header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with &#x60;Idempotent-Replayed: true&#x60;) instead of sending the message a second time; same key + different body returns 422; a key still in flight returns 409. Works for JSON and multipart (file upload) requests alike. Keys are retained for 24 hours. Only successful (2xx) responses are stored for replay: if the request throws or returns a non-2xx status, the key is released so the same key can be retried once the problem is fixed. The header therefore protects the \&quot;request succeeded but the response was lost\&quot; case. For an ambiguous failure (a 5xx or a network timeout), reconcile before retrying: a failure after the platform already accepted the message also releases the key, and a blind retry could send it twice. List the conversation&#39;s messages first, and treat an empty result as inconclusive rather than as proof nothing was sent, since a send that failed while being recorded leaves no trace on our side.
948
948
  # @param conversation_id [String] Opaque conversation identifier, accepted verbatim from the list endpoint or from the conversationId on inbox webhooks. Format not to be assumed.
949
949
  # @param send_inbox_message_request [SendInboxMessageRequest]
950
950
  # @param [Hash] opts the optional parameters