late-sdk 0.0.948 → 0.0.950
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.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/docs/CreateInboxConversation400Response.md +11 -3
- data/docs/CreateInboxConversation400ResponseAnyOf.md +20 -0
- data/docs/CreateInboxConversation404Response.md +11 -3
- data/docs/CreateInboxConversation404ResponseAnyOf.md +20 -0
- data/docs/CreateInboxConversation422Response.md +11 -3
- data/docs/CreateInboxConversation422ResponseAnyOf.md +20 -0
- data/docs/CreateInboxConversation429Response.md +11 -3
- data/docs/CreateInboxConversation429ResponseAnyOf.md +20 -0
- data/docs/ListTikTokCommercialMusic200ResponseTracksInner.md +3 -1
- data/docs/ListTikTokCommercialMusic200ResponseTracksInnerClip.md +2 -0
- data/docs/MessagesApi.md +2 -2
- data/docs/SendInboxMessage400Response.md +1 -1
- data/docs/SendInboxMessage502Response.md +30 -0
- data/docs/TikTokPlatformDataMusicSoundInfo.md +1 -1
- data/docs/WhatsAppTemplateLookupError.md +28 -0
- data/docs/WhatsAppTemplateLookupErrorDetails.md +24 -0
- data/docs/WhatsAppTemplateLookupErrorDetailsProviderHeaders.md +22 -0
- data/docs/WhatsAppTemplateLookupErrorPlatformError.md +22 -0
- data/docs/WhatsAppTemplateLookupErrorPlatformErrorErrorData.md +18 -0
- data/lib/zernio-sdk/api/messages_api.rb +4 -4
- data/lib/zernio-sdk/models/create_inbox_conversation400_response.rb +73 -160
- data/lib/zernio-sdk/models/create_inbox_conversation400_response_any_of.rb +190 -0
- data/lib/zernio-sdk/models/create_inbox_conversation404_response.rb +73 -160
- data/lib/zernio-sdk/models/create_inbox_conversation404_response_any_of.rb +190 -0
- data/lib/zernio-sdk/models/create_inbox_conversation422_response.rb +73 -160
- data/lib/zernio-sdk/models/create_inbox_conversation422_response_any_of.rb +190 -0
- data/lib/zernio-sdk/models/create_inbox_conversation429_response.rb +73 -160
- data/lib/zernio-sdk/models/create_inbox_conversation429_response_any_of.rb +190 -0
- data/lib/zernio-sdk/models/list_tik_tok_commercial_music200_response_tracks_inner.rb +12 -2
- data/lib/zernio-sdk/models/list_tik_tok_commercial_music200_response_tracks_inner_clip.rb +11 -2
- data/lib/zernio-sdk/models/send_inbox_message400_response.rb +3 -3
- data/lib/zernio-sdk/models/send_inbox_message400_response_platform_error.rb +1 -1
- data/lib/zernio-sdk/models/send_inbox_message502_response.rb +103 -0
- data/lib/zernio-sdk/models/tik_tok_platform_data_music_sound_info.rb +1 -1
- data/lib/zernio-sdk/models/whats_app_template_lookup_error.rb +305 -0
- data/lib/zernio-sdk/models/whats_app_template_lookup_error_details.rb +233 -0
- data/lib/zernio-sdk/models/whats_app_template_lookup_error_details_provider_headers.rb +166 -0
- data/lib/zernio-sdk/models/whats_app_template_lookup_error_platform_error.rb +166 -0
- data/lib/zernio-sdk/models/whats_app_template_lookup_error_platform_error_error_data.rb +147 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +10 -0
- data/openapi.yaml +105 -25
- data/spec/api/messages_api_spec.rb +2 -2
- data/spec/models/create_inbox_conversation400_response_any_of_spec.rb +46 -0
- data/spec/models/create_inbox_conversation400_response_spec.rb +0 -25
- data/spec/models/create_inbox_conversation404_response_any_of_spec.rb +46 -0
- data/spec/models/create_inbox_conversation404_response_spec.rb +0 -25
- data/spec/models/create_inbox_conversation422_response_any_of_spec.rb +46 -0
- data/spec/models/create_inbox_conversation422_response_spec.rb +0 -25
- data/spec/models/create_inbox_conversation429_response_any_of_spec.rb +46 -0
- data/spec/models/create_inbox_conversation429_response_spec.rb +0 -25
- data/spec/models/list_tik_tok_commercial_music200_response_tracks_inner_clip_spec.rb +6 -0
- data/spec/models/list_tik_tok_commercial_music200_response_tracks_inner_spec.rb +6 -0
- data/spec/models/send_inbox_message400_response_spec.rb +1 -1
- data/spec/models/send_inbox_message502_response_spec.rb +21 -0
- data/spec/models/whats_app_template_lookup_error_details_provider_headers_spec.rb +48 -0
- data/spec/models/whats_app_template_lookup_error_details_spec.rb +58 -0
- data/spec/models/whats_app_template_lookup_error_platform_error_error_data_spec.rb +36 -0
- data/spec/models/whats_app_template_lookup_error_platform_error_spec.rb +48 -0
- data/spec/models/whats_app_template_lookup_error_spec.rb +78 -0
- data/zernio-sdk-0.0.950.gem +0 -0
- metadata +42 -2
- data/zernio-sdk-0.0.948.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf1bb481a7fe5c23e5849ae664aa627fb8d5f0ec61144b75f03b763c3491c68f
|
|
4
|
+
data.tar.gz: 847af2ec517097eb66d1508157dc7f1b5a6f08cf59884dccfc7b8a1b9e0d6e72
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8bf11206841e21128877b0df5eea2f1dc1d1a720a62fdfd3de0859fc67c9dcfe826bcb05a0cf609ac047fe37f6b6ac35c593b83fe183fcb8cc08c057e03137ae
|
|
7
|
+
data.tar.gz: 8be02bb4adcd8701a952fee46b5c14df321984482025039b9b40363897b02b3ccd8bae014c2be671c0456b742adba402771739bdc0c94e55456b33e8230d59d6
|
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** | |
|
|
8
|
-
| **code** | **String** | |
|
|
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** | |
|
|
8
|
-
| **code** | **String** | |
|
|
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** | |
|
|
8
|
-
| **code** | **String** | |
|
|
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** | |
|
|
8
|
-
| **code** | **String** | |
|
|
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
|
+
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **id** | **String** | The
|
|
7
|
+
| **id** | **String** | The id to send as musicSoundId (the full track's song clip id). TikTok rejects the commercial music id itself at publish time. | [optional] |
|
|
8
|
+
| **commercial_music_id** | **String** | TikTok's commercial_music_id, for reference only | [optional] |
|
|
8
9
|
| **name** | **String** | | [optional] |
|
|
9
10
|
| **artist** | **String** | | [optional] |
|
|
10
11
|
| **duration_sec** | **Integer** | | [optional] |
|
|
@@ -21,6 +22,7 @@ require 'zernio-sdk'
|
|
|
21
22
|
|
|
22
23
|
instance = Zernio::ListTikTokCommercialMusic200ResponseTracksInner.new(
|
|
23
24
|
id: null,
|
|
25
|
+
commercial_music_id: null,
|
|
24
26
|
name: null,
|
|
25
27
|
artist: null,
|
|
26
28
|
duration_sec: null,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [optional] |
|
|
7
8
|
| **duration_sec** | **Integer** | | [optional] |
|
|
8
9
|
| **preview_url** | **String** | | [optional] |
|
|
9
10
|
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
require 'zernio-sdk'
|
|
14
15
|
|
|
15
16
|
instance = Zernio::ListTikTokCommercialMusic200ResponseTracksInnerClip.new(
|
|
17
|
+
id: null,
|
|
16
18
|
duration_sec: null,
|
|
17
19
|
preview_url: null
|
|
18
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
|
+
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **music_sound_id** | **String** | The
|
|
7
|
+
| **music_sound_id** | **String** | The id field of a track from GET /v1/accounts/{accountId}/tiktok/commercial-music (a song clip id). TikTok fails the publish with a generic 51065 when given the commercial music id instead. | |
|
|
8
8
|
| **music_sound_volume** | **Integer** | Track volume. TikTok defaults an omitted volume to 0, which publishes the track silently, so we default to the app's 50. Video posts only. | [optional][default to 50] |
|
|
9
9
|
| **music_sound_start** | **Integer** | Start point of the track in milliseconds (default 0). Video posts only. | [optional] |
|
|
10
10
|
| **music_sound_end** | **Integer** | End point of the track in milliseconds (default: the video length). Must be greater than musicSoundStart. Video posts only. | [optional] |
|
|
@@ -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 `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.
|
|
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 `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.
|
|
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
|