one_msg_sdk 2.0.1 → 2.0.3

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 (298) hide show
  1. checksums.yaml +4 -4
  2. data/AGENTS.md +65 -19
  3. data/README.md +102 -34
  4. data/docs/AddTemplate200Response.md +18 -0
  5. data/docs/AddTemplateRequest.md +7 -7
  6. data/docs/CallingApi.md +27 -31
  7. data/docs/CallingSettings.md +18 -0
  8. data/docs/CallingSettingsCalling.md +38 -0
  9. data/docs/CallingSettingsCallingAudio.md +18 -0
  10. data/docs/CallingSettingsCallingCallHours.md +22 -0
  11. data/docs/CallingSettingsCallingSip.md +20 -0
  12. data/docs/CallingSettingsCallingSipServersInner.md +28 -0
  13. data/docs/CallingSettingsCallingVideo.md +18 -0
  14. data/docs/CatalogApi.md +1 -1
  15. data/docs/ChannelApi.md +151 -5
  16. data/docs/CreateFlowsRequest.md +26 -0
  17. data/docs/CreateGroupsGroupIdRequest.md +22 -0
  18. data/docs/CreateGroupsRequest.md +20 -0
  19. data/docs/CreateSettingsRequest.md +28 -0
  20. data/docs/CreateSettingsRequestWebhookUrl.md +49 -0
  21. data/docs/CreateUploadMedia200Response.md +18 -0
  22. data/docs/CreateUploadMediaRequest.md +20 -0
  23. data/docs/FlowsApi.md +32 -16
  24. data/docs/GetStatus200Response.md +26 -0
  25. data/docs/GetWebhook200Response.md +24 -2
  26. data/docs/GetWebhook200ResponseWebhookUrl.md +49 -0
  27. data/docs/GroupsApi.md +38 -18
  28. data/docs/InitiateCallRequest.md +28 -0
  29. data/docs/InitiateCallRequestSession.md +20 -0
  30. data/docs/InitiateCallResponse.md +26 -0
  31. data/docs/InitiateCallResponseCallsInner.md +18 -0
  32. data/docs/InitiateCallResponseResponse.md +18 -0
  33. data/docs/ListSettings200Response.md +52 -0
  34. data/docs/ListSettings200ResponseWebhookUrl.md +49 -0
  35. data/docs/MessagingApi.md +140 -35
  36. data/docs/PatchFlowsFlowIdAssetsRequest.md +18 -0
  37. data/docs/PatchFlowsFlowIdMetadataRequest.md +22 -0
  38. data/docs/ProfileApi.md +9 -11
  39. data/docs/RemoveTemplateRequest.md +18 -0
  40. data/docs/SendButtonRequest.md +9 -1
  41. data/docs/SendCarouselRequest1.md +4 -2
  42. data/docs/SendContactInfoRequest.md +26 -0
  43. data/docs/SendContactRequest.md +7 -1
  44. data/docs/SendContactRequestContact.md +26 -0
  45. data/docs/SendContactRequestContactName.md +49 -0
  46. data/docs/SendContactRequestContactsInner.md +3 -3
  47. data/docs/SendContactRequestContactsInnerPhonesInner.md +1 -1
  48. data/docs/SendListRequest.md +5 -1
  49. data/docs/SendLocationRequestRequest.md +5 -1
  50. data/docs/SendMessageRequest.md +6 -2
  51. data/docs/SendMessageRequestDirectSend.md +20 -0
  52. data/docs/SendProductRequest.md +30 -0
  53. data/docs/SendReactionRequest.md +3 -1
  54. data/docs/SendTemplateRequest.md +9 -5
  55. data/docs/SendTemplateRequestLanguage.md +3 -3
  56. data/docs/SetWebhook200Response.md +20 -0
  57. data/docs/SetWebhook200ResponseWebhookUrl.md +49 -0
  58. data/docs/SetWebhookRequest.md +18 -0
  59. data/docs/SetWebhookRequestWebhookUrl.md +49 -0
  60. data/docs/TemplatesApi.md +29 -17
  61. data/docs/UpdateCallingSettings200Response.md +22 -0
  62. data/docs/UpdateCallingSettings200ResponseResponse.md +18 -0
  63. data/docs/UpdateMe200Response.md +18 -0
  64. data/docs/UpdateMeRequest.md +6 -6
  65. data/docs/WebhookUrlStatus.md +34 -0
  66. data/docs/WebhooksApi.md +10 -12
  67. data/lib/one_msg_sdk/api/calling_api.rb +39 -31
  68. data/lib/one_msg_sdk/api/catalog_api.rb +4 -4
  69. data/lib/one_msg_sdk/api/channel_api.rb +146 -7
  70. data/lib/one_msg_sdk/api/flows_api.rb +58 -14
  71. data/lib/one_msg_sdk/api/groups_api.rb +48 -10
  72. data/lib/one_msg_sdk/api/messaging_api.rb +163 -38
  73. data/lib/one_msg_sdk/api/profile_api.rb +17 -13
  74. data/lib/one_msg_sdk/api/templates_api.rb +36 -13
  75. data/lib/one_msg_sdk/api/users_api.rb +2 -2
  76. data/lib/one_msg_sdk/api/webhooks_api.rb +19 -15
  77. data/lib/one_msg_sdk/api_client.rb +2 -2
  78. data/lib/one_msg_sdk/api_error.rb +2 -2
  79. data/lib/one_msg_sdk/api_model_base.rb +2 -2
  80. data/lib/one_msg_sdk/configuration.rb +2 -2
  81. data/lib/one_msg_sdk/models/add_template200_response.rb +150 -0
  82. data/lib/one_msg_sdk/models/add_template_request.rb +6 -2
  83. data/lib/one_msg_sdk/models/block_user_request.rb +2 -2
  84. data/lib/one_msg_sdk/models/calling_settings.rb +148 -0
  85. data/lib/one_msg_sdk/models/calling_settings_calling.rb +321 -0
  86. data/lib/one_msg_sdk/models/calling_settings_calling_audio.rb +148 -0
  87. data/lib/one_msg_sdk/models/calling_settings_calling_call_hours.rb +166 -0
  88. data/lib/one_msg_sdk/models/calling_settings_calling_sip.rb +193 -0
  89. data/lib/one_msg_sdk/models/calling_settings_calling_sip_servers_inner.rb +196 -0
  90. data/lib/one_msg_sdk/models/calling_settings_calling_video.rb +182 -0
  91. data/lib/one_msg_sdk/models/conversational_automation.rb +2 -2
  92. data/lib/one_msg_sdk/models/conversational_automation_commands_inner.rb +2 -2
  93. data/lib/one_msg_sdk/models/create_commerce200_response.rb +2 -2
  94. data/lib/one_msg_sdk/models/create_commerce_request.rb +2 -2
  95. data/lib/one_msg_sdk/models/create_commerce_request_params.rb +2 -2
  96. data/lib/one_msg_sdk/models/create_flows_request.rb +238 -0
  97. data/lib/one_msg_sdk/models/create_groups200_response.rb +2 -2
  98. data/lib/one_msg_sdk/models/create_groups_group_id_request.rb +168 -0
  99. data/lib/one_msg_sdk/models/create_groups_request.rb +175 -0
  100. data/lib/one_msg_sdk/models/create_read_message200_response.rb +2 -2
  101. data/lib/one_msg_sdk/models/create_read_message401_response.rb +2 -2
  102. data/lib/one_msg_sdk/models/create_read_message_request.rb +2 -2
  103. data/lib/one_msg_sdk/models/create_settings_request.rb +192 -0
  104. data/lib/one_msg_sdk/models/create_settings_request_webhook_url.rb +105 -0
  105. data/lib/one_msg_sdk/models/create_upload_media200_response.rb +147 -0
  106. data/lib/one_msg_sdk/models/create_upload_media_request.rb +158 -0
  107. data/lib/one_msg_sdk/models/delete_flows_flow_id200_response.rb +2 -2
  108. data/lib/one_msg_sdk/models/delete_groups_group_id200_response.rb +2 -2
  109. data/lib/one_msg_sdk/models/delete_media_legacy_request.rb +2 -2
  110. data/lib/one_msg_sdk/models/error_response.rb +2 -2
  111. data/lib/one_msg_sdk/models/get_commerce200_response_inner.rb +2 -2
  112. data/lib/one_msg_sdk/models/get_mm_lite_status200_response.rb +2 -2
  113. data/lib/one_msg_sdk/models/get_status200_response.rb +185 -0
  114. data/lib/one_msg_sdk/models/get_webhook200_response.rb +155 -6
  115. data/lib/one_msg_sdk/models/get_webhook200_response_webhook_url.rb +105 -0
  116. data/lib/one_msg_sdk/models/get_whatsapp_business_encryption200_response.rb +2 -2
  117. data/lib/one_msg_sdk/models/initiate_call_request.rb +277 -0
  118. data/lib/one_msg_sdk/models/initiate_call_request_session.rb +217 -0
  119. data/lib/one_msg_sdk/models/initiate_call_response.rb +188 -0
  120. data/lib/one_msg_sdk/models/initiate_call_response_calls_inner.rb +147 -0
  121. data/lib/one_msg_sdk/models/initiate_call_response_response.rb +148 -0
  122. data/lib/one_msg_sdk/models/list_blocked_users200_response.rb +2 -2
  123. data/lib/one_msg_sdk/models/list_flows200_response.rb +2 -2
  124. data/lib/one_msg_sdk/models/list_messages200_response.rb +2 -2
  125. data/lib/one_msg_sdk/models/list_settings200_response.rb +352 -0
  126. data/lib/one_msg_sdk/models/list_settings200_response_webhook_url.rb +105 -0
  127. data/lib/one_msg_sdk/models/list_templates200_response.rb +2 -2
  128. data/lib/one_msg_sdk/models/message_sent_response.rb +2 -2
  129. data/lib/one_msg_sdk/models/patch_flows_flow_id_assets200_response.rb +2 -2
  130. data/lib/one_msg_sdk/models/patch_flows_flow_id_assets_request.rb +167 -0
  131. data/lib/one_msg_sdk/models/patch_flows_flow_id_metadata_request.rb +190 -0
  132. data/lib/one_msg_sdk/models/profile_info.rb +2 -2
  133. data/lib/one_msg_sdk/models/remove_template_request.rb +165 -0
  134. data/lib/one_msg_sdk/models/retrieve_media200_response.rb +2 -2
  135. data/lib/one_msg_sdk/models/send_address_message_request.rb +2 -2
  136. data/lib/one_msg_sdk/models/send_button_request.rb +48 -3
  137. data/lib/one_msg_sdk/models/send_button_request_sections_inner.rb +2 -2
  138. data/lib/one_msg_sdk/models/send_button_request_sections_inner_reply.rb +2 -2
  139. data/lib/one_msg_sdk/models/send_carousel_request1.rb +38 -13
  140. data/lib/one_msg_sdk/models/send_contact_info_request.rb +222 -0
  141. data/lib/one_msg_sdk/models/send_contact_request.rb +32 -3
  142. data/lib/one_msg_sdk/models/send_contact_request_contact.rb +221 -0
  143. data/lib/one_msg_sdk/models/send_contact_request_contact_name.rb +105 -0
  144. data/lib/one_msg_sdk/models/send_contact_request_contacts_inner.rb +5 -5
  145. data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_name.rb +2 -2
  146. data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_org.rb +2 -2
  147. data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_phones_inner.rb +3 -2
  148. data/lib/one_msg_sdk/models/send_cta_url_request.rb +2 -2
  149. data/lib/one_msg_sdk/models/send_file_request.rb +2 -2
  150. data/lib/one_msg_sdk/models/send_flow_request1.rb +2 -2
  151. data/lib/one_msg_sdk/models/send_flow_request1_header.rb +2 -2
  152. data/lib/one_msg_sdk/models/send_flow_request_header.rb +2 -2
  153. data/lib/one_msg_sdk/models/send_list_request.rb +23 -3
  154. data/lib/one_msg_sdk/models/send_list_request_sections_inner.rb +2 -2
  155. data/lib/one_msg_sdk/models/send_list_request_sections_inner_rows_inner.rb +2 -2
  156. data/lib/one_msg_sdk/models/send_location_request1.rb +2 -2
  157. data/lib/one_msg_sdk/models/send_location_request_request.rb +23 -3
  158. data/lib/one_msg_sdk/models/send_message_request.rb +60 -28
  159. data/lib/one_msg_sdk/models/send_message_request_direct_send.rb +189 -0
  160. data/lib/one_msg_sdk/models/send_order_details_request.rb +2 -2
  161. data/lib/one_msg_sdk/models/send_order_details_request_language.rb +2 -2
  162. data/lib/one_msg_sdk/models/send_order_details_request_order.rb +2 -2
  163. data/lib/one_msg_sdk/models/send_order_details_request_order_items_inner.rb +2 -2
  164. data/lib/one_msg_sdk/models/send_order_details_request_order_items_inner_amount.rb +2 -2
  165. data/lib/one_msg_sdk/models/send_payment_request_request.rb +2 -2
  166. data/lib/one_msg_sdk/models/send_product_request.rb +225 -0
  167. data/lib/one_msg_sdk/models/send_reaction_request.rb +14 -3
  168. data/lib/one_msg_sdk/models/send_sticker_request.rb +2 -2
  169. data/lib/one_msg_sdk/models/send_template_request.rb +29 -5
  170. data/lib/one_msg_sdk/models/send_template_request_language.rb +6 -2
  171. data/lib/one_msg_sdk/models/set_webhook200_response.rb +157 -0
  172. data/lib/one_msg_sdk/models/set_webhook200_response_webhook_url.rb +105 -0
  173. data/lib/one_msg_sdk/models/set_webhook_request.rb +164 -0
  174. data/lib/one_msg_sdk/models/set_webhook_request_webhook_url.rb +105 -0
  175. data/lib/one_msg_sdk/models/set_whatsapp_business_encryption_request.rb +2 -2
  176. data/lib/one_msg_sdk/models/success_response.rb +2 -2
  177. data/lib/one_msg_sdk/models/update_calling_settings200_response.rb +165 -0
  178. data/lib/one_msg_sdk/models/update_calling_settings200_response_response.rb +147 -0
  179. data/lib/one_msg_sdk/models/update_me200_response.rb +147 -0
  180. data/lib/one_msg_sdk/models/update_me_request.rb +6 -3
  181. data/lib/one_msg_sdk/models/webhook_url_status.rb +287 -0
  182. data/lib/one_msg_sdk/platform_client.rb +182 -0
  183. data/lib/one_msg_sdk/version.rb +3 -3
  184. data/lib/one_msg_sdk.rb +44 -2
  185. data/one_msg_sdk.gemspec +2 -2
  186. data/spec/api/calling_api_spec.rb +11 -11
  187. data/spec/api/catalog_api_spec.rb +3 -3
  188. data/spec/api/channel_api_spec.rb +29 -4
  189. data/spec/api/flows_api_spec.rb +10 -2
  190. data/spec/api/groups_api_spec.rb +10 -2
  191. data/spec/api/messaging_api_spec.rb +37 -9
  192. data/spec/api/profile_api_spec.rb +5 -5
  193. data/spec/api/templates_api_spec.rb +11 -5
  194. data/spec/api/users_api_spec.rb +2 -2
  195. data/spec/api/webhooks_api_spec.rb +6 -6
  196. data/spec/models/add_template200_response_spec.rb +36 -0
  197. data/spec/models/add_template_request_spec.rb +2 -2
  198. data/spec/models/block_user_request_spec.rb +2 -2
  199. data/spec/models/calling_settings_calling_audio_spec.rb +36 -0
  200. data/spec/models/calling_settings_calling_call_hours_spec.rb +48 -0
  201. data/spec/models/calling_settings_calling_sip_servers_inner_spec.rb +66 -0
  202. data/spec/models/calling_settings_calling_sip_spec.rb +46 -0
  203. data/spec/models/calling_settings_calling_spec.rb +112 -0
  204. data/spec/models/calling_settings_calling_video_spec.rb +40 -0
  205. data/spec/models/calling_settings_spec.rb +36 -0
  206. data/spec/models/conversational_automation_commands_inner_spec.rb +2 -2
  207. data/spec/models/conversational_automation_spec.rb +2 -2
  208. data/spec/models/create_commerce200_response_spec.rb +2 -2
  209. data/spec/models/create_commerce_request_params_spec.rb +2 -2
  210. data/spec/models/create_commerce_request_spec.rb +2 -2
  211. data/spec/models/create_flows_request_spec.rb +64 -0
  212. data/spec/models/create_groups200_response_spec.rb +2 -2
  213. data/spec/models/create_groups_group_id_request_spec.rb +48 -0
  214. data/spec/models/create_groups_request_spec.rb +42 -0
  215. data/spec/models/create_read_message200_response_spec.rb +2 -2
  216. data/spec/models/create_read_message401_response_spec.rb +2 -2
  217. data/spec/models/create_read_message_request_spec.rb +2 -2
  218. data/spec/models/create_settings_request_spec.rb +66 -0
  219. data/spec/models/create_settings_request_webhook_url_spec.rb +32 -0
  220. data/spec/models/create_upload_media200_response_spec.rb +36 -0
  221. data/spec/models/create_upload_media_request_spec.rb +42 -0
  222. data/spec/models/delete_flows_flow_id200_response_spec.rb +2 -2
  223. data/spec/models/delete_groups_group_id200_response_spec.rb +2 -2
  224. data/spec/models/delete_media_legacy_request_spec.rb +2 -2
  225. data/spec/models/error_response_spec.rb +2 -2
  226. data/spec/models/get_commerce200_response_inner_spec.rb +2 -2
  227. data/spec/models/get_mm_lite_status200_response_spec.rb +2 -2
  228. data/spec/models/get_status200_response_spec.rb +60 -0
  229. data/spec/models/get_webhook200_response_spec.rb +72 -2
  230. data/spec/models/get_webhook200_response_webhook_url_spec.rb +32 -0
  231. data/spec/models/get_whatsapp_business_encryption200_response_spec.rb +2 -2
  232. data/spec/models/initiate_call_request_session_spec.rb +46 -0
  233. data/spec/models/initiate_call_request_spec.rb +74 -0
  234. data/spec/models/initiate_call_response_calls_inner_spec.rb +36 -0
  235. data/spec/models/initiate_call_response_response_spec.rb +36 -0
  236. data/spec/models/initiate_call_response_spec.rb +60 -0
  237. data/spec/models/list_blocked_users200_response_spec.rb +2 -2
  238. data/spec/models/list_flows200_response_spec.rb +2 -2
  239. data/spec/models/list_messages200_response_spec.rb +2 -2
  240. data/spec/models/list_settings200_response_spec.rb +142 -0
  241. data/spec/models/list_settings200_response_webhook_url_spec.rb +32 -0
  242. data/spec/models/list_templates200_response_spec.rb +2 -2
  243. data/spec/models/message_sent_response_spec.rb +2 -2
  244. data/spec/models/patch_flows_flow_id_assets200_response_spec.rb +2 -2
  245. data/spec/models/patch_flows_flow_id_assets_request_spec.rb +36 -0
  246. data/spec/models/patch_flows_flow_id_metadata_request_spec.rb +52 -0
  247. data/spec/models/profile_info_spec.rb +2 -2
  248. data/spec/models/remove_template_request_spec.rb +36 -0
  249. data/spec/models/retrieve_media200_response_spec.rb +2 -2
  250. data/spec/models/send_address_message_request_spec.rb +2 -2
  251. data/spec/models/send_button_request_sections_inner_reply_spec.rb +2 -2
  252. data/spec/models/send_button_request_sections_inner_spec.rb +2 -2
  253. data/spec/models/send_button_request_spec.rb +26 -2
  254. data/spec/models/send_carousel_request1_spec.rb +8 -2
  255. data/spec/models/send_contact_info_request_spec.rb +60 -0
  256. data/spec/models/send_contact_request_contact_name_spec.rb +32 -0
  257. data/spec/models/send_contact_request_contact_spec.rb +60 -0
  258. data/spec/models/send_contact_request_contacts_inner_name_spec.rb +2 -2
  259. data/spec/models/send_contact_request_contacts_inner_org_spec.rb +2 -2
  260. data/spec/models/send_contact_request_contacts_inner_phones_inner_spec.rb +2 -2
  261. data/spec/models/send_contact_request_contacts_inner_spec.rb +2 -2
  262. data/spec/models/send_contact_request_spec.rb +20 -2
  263. data/spec/models/send_cta_url_request_spec.rb +2 -2
  264. data/spec/models/send_file_request_spec.rb +2 -2
  265. data/spec/models/send_flow_request1_header_spec.rb +2 -2
  266. data/spec/models/send_flow_request1_spec.rb +2 -2
  267. data/spec/models/send_flow_request_header_spec.rb +2 -2
  268. data/spec/models/send_list_request_sections_inner_rows_inner_spec.rb +2 -2
  269. data/spec/models/send_list_request_sections_inner_spec.rb +2 -2
  270. data/spec/models/send_list_request_spec.rb +14 -2
  271. data/spec/models/send_location_request1_spec.rb +2 -2
  272. data/spec/models/send_location_request_request_spec.rb +14 -2
  273. data/spec/models/send_message_request_direct_send_spec.rb +42 -0
  274. data/spec/models/send_message_request_spec.rb +18 -2
  275. data/spec/models/send_order_details_request_language_spec.rb +2 -2
  276. data/spec/models/send_order_details_request_order_items_inner_amount_spec.rb +2 -2
  277. data/spec/models/send_order_details_request_order_items_inner_spec.rb +2 -2
  278. data/spec/models/send_order_details_request_order_spec.rb +2 -2
  279. data/spec/models/send_order_details_request_spec.rb +2 -2
  280. data/spec/models/send_payment_request_request_spec.rb +2 -2
  281. data/spec/models/send_product_request_spec.rb +72 -0
  282. data/spec/models/send_reaction_request_spec.rb +8 -2
  283. data/spec/models/send_sticker_request_spec.rb +2 -2
  284. data/spec/models/send_template_request_language_spec.rb +2 -2
  285. data/spec/models/send_template_request_spec.rb +14 -2
  286. data/spec/models/set_webhook200_response_spec.rb +42 -0
  287. data/spec/models/set_webhook200_response_webhook_url_spec.rb +32 -0
  288. data/spec/models/set_webhook_request_spec.rb +36 -0
  289. data/spec/models/set_webhook_request_webhook_url_spec.rb +32 -0
  290. data/spec/models/set_whatsapp_business_encryption_request_spec.rb +2 -2
  291. data/spec/models/success_response_spec.rb +2 -2
  292. data/spec/models/update_calling_settings200_response_response_spec.rb +36 -0
  293. data/spec/models/update_calling_settings200_response_spec.rb +48 -0
  294. data/spec/models/update_me200_response_spec.rb +36 -0
  295. data/spec/models/update_me_request_spec.rb +2 -2
  296. data/spec/models/webhook_url_status_spec.rb +88 -0
  297. data/spec/spec_helper.rb +2 -2
  298. metadata +319 -89
data/README.md CHANGED
@@ -1,36 +1,39 @@
1
- # 1msg Ruby SDK
1
+ # 1MSG Ruby SDK
2
2
 
3
- Official Ruby SDK for the **1msg WhatsApp Business API**.
3
+ Official Ruby SDK for the **1MSG WhatsApp Business API**.
4
4
 
5
5
  This document is generated from the public OpenAPI contract. It covers install,
6
6
  auth, quick start, and every public operation available in the client.
7
7
 
8
- | | |
9
- |---|---|
10
- | **RubyGems** | [`one_msg_sdk`](https://rubygems.org/gems/one_msg_sdk) |
11
- | **Source** | [github.com/1msg/1msg-sdk/ruby](https://github.com/1msg/1msg-sdk/tree/main/ruby) |
12
- | **API docs** | [docs.1msg.io](https://docs.1msg.io/) |
13
- | **Platform** | [platform.1msg.io](https://platform.1msg.io/) |
14
- | **Support** | support@1msg.io |
15
- | **OpenAPI version** | 1.0.0 |
16
- | **Operations** | 60 |
17
- | **AI agent guide** | [AGENTS.md](./AGENTS.md) |
8
+ | | |
9
+ | ------------------------- | ------------------------------------------------------------------------------------------------------- |
10
+ | **RubyGems** | [`one_msg_sdk`](https://rubygems.org/gems/one_msg_sdk) |
11
+ | **Source** | [github.com/1msg/1msg-sdk/ruby](https://github.com/1msg/1msg-sdk/tree/main/ruby) |
12
+ | **API docs** | [docs.1msg.io](https://docs.1msg.io/) |
13
+ | **Platform API** | [Inbox](https://1msg.io/docs/reference/inbox) and [Campaigns](https://1msg.io/docs/reference/campaigns) |
14
+ | **Platform** | [platform.1msg.io](https://platform.1msg.io/) |
15
+ | **Support** | support@1msg.io |
16
+ | **OpenAPI version** | 2.0.0 |
17
+ | **Operations** | 63 |
18
+ | **AI agent guide** | [AGENTS.md](./AGENTS.md) |
19
+
20
+ Inbox and Campaigns ship in this package as `PlatformClient` (Bearer API key, not the channel token). Reference: [Inbox](https://1msg.io/docs/reference/inbox) and [Campaigns](https://1msg.io/docs/reference/campaigns). CLI: `1msg inbox` and `1msg campaigns`.
18
21
 
19
22
  ---
20
23
 
21
24
  ## Install
22
25
 
23
26
  ```bash
24
- gem install one_msg_sdk -v 2.0.1
27
+ gem install one_msg_sdk -v 2.0.3
25
28
  ```
26
29
 
27
30
  ## Requirements
28
31
 
29
- | Variable | Where to get it | Example |
30
- |----------|-----------------|---------|
31
- | `baseUrl` | Platform → channel → API host | `https://api.1msg.io` |
32
- | `instanceId` | Platform → channel id | `ODI371267300` |
33
- | `token` | Platform → channel → API token | JWT or API key |
32
+ | Variable | Where to get it | Example |
33
+ | ------------ | ------------------------------ | --------------------- |
34
+ | `baseUrl` | Platform → channel → API host | `https://api.1msg.io` |
35
+ | `instanceId` | Platform → channel id | `ODI371267300` |
36
+ | `token` | Platform → channel → API token | JWT or API key |
34
37
 
35
38
  Use environment variables (`MSG_API_TOKEN`, `MSG_INSTANCE_ID`). Never commit tokens.
36
39
 
@@ -100,7 +103,7 @@ API groups: calling, catalog, channel, flows, groups, messaging, profile, templa
100
103
 
101
104
  Get calling settings
102
105
 
103
- WhatsApp Calling API settings (beta). Requires Meta Calling enablement on the WABA. Not production-complete — paths and webhook field names may change. Trial/subscription-limited channels are blocked.
106
+ Return WhatsApp Calling API settings for this channel (beta). Proxies upstream `GET /calling/settings`. **Prerequisites** - Number must be eligible for Meta Calling (Cloud API; not COEX) - Trial / `subscriptionBlocked` channels receive **403** plain text - You need your own WebRTC or SIP stack; 1msg is a **signaling proxy** only and does **not** store call history or recordings See the **Calling** tag overview for inbound/outbound flows and webhooks.
104
107
 
105
108
  ```yaml
106
109
  http: GET /callingSettings
@@ -111,9 +114,9 @@ responses: 200, 401, 500
111
114
 
112
115
  #### `initiateCall`
113
116
 
114
- Initiate WhatsApp call
117
+ Call action (connect / pre_accept / accept / reject / terminate)
115
118
 
116
- Outbound Calling API (beta). Requires Meta Calling enablement and product consent. Not production-complete — verify on stage before relying on this in production. Trial/subscription-limited channels are blocked.
119
+ Perform a WhatsApp Calling action (beta). Proxies upstream `POST /calling/calls`. Despite the historical path name `/initiateCall`, this endpoint handles **all** call actions: | action | Use | Required | |--------|-----|----------| | `connect` | Outbound business → user | `to` + `session` (`sdp_type: offer`) | | `pre_accept` | Inbound (optional, reduces audio clipping) | `call_id` + `session` (`sdp_type: answer`) | | `accept` | Inbound answer | `call_id` + `session` (`sdp_type: answer`) | | `reject` | Decline inbound | `call_id` | | `terminate` | Hang up | `call_id` | **SDP / media (critical)** - `accept` / `pre_accept` require a **WebRTC-generated SDP answer**. - Do **not** send Meta's offer SDP back as the answer. - Postman (or curl) alone **cannot** establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling. Answer within ~**30–60 seconds** of an inbound `connect` webhook or Meta terminates as unanswered. Common Meta errors include Calling not enabled (`138000`), no permission (`138006`), SDP validation failures. **Outbound** requires a prior Call Permission Request (CPR) acceptance. See the **Calling** tag overview for the full outbound flow and CPR limits. Trial / `subscriptionBlocked` → **403** plain text. Upstream failures often return HTTP 200 with `{ "response": { "error": "<upstream message>" } }`. `Invalid API KEY` is used only when Meta/360 body actually indicates an invalid API key or token. Other upstream 401s (notably call permission `138006`) pass through `error.message` / `error_user_msg`.
117
120
 
118
121
  ```yaml
119
122
  http: POST /initiateCall
@@ -126,7 +129,7 @@ responses: 200, 401, 500
126
129
 
127
130
  Update calling settings
128
131
 
129
- Update WhatsApp Calling API settings (beta). Requires Meta Calling enablement. Trial/subscription-limited channels are blocked.
132
+ Enable, disable, or update WhatsApp Calling settings (beta). Proxies upstream `POST /calling/settings`. Body is forwarded as-is (1msg does not validate fields). **Common fields under `calling`** - `status` (`ENABLED` | `DISABLED`) — required to turn calling on/off - `call_icon_visibility` (`DEFAULT` | `DISABLE_ALL`) — optional - `callback_permission_status` (`ENABLED` | `DISABLED`) — optional; when enabled, inbound user calls grant callback permission - `call_hours` — optional hours / timezone object - `sip` — optional SIP trunk; when SIP is ENABLED, Graph call actions and calling webhooks are not used - `srtp_key_exchange_protocol` (`DTLS` | `SDES`) — SDES only with SIP - `video.status` — optional Meta may accept only one feature group per request — prefer focused updates (e.g. enable status first, then SIP). Trial / `subscriptionBlocked` → **403** plain text.
130
133
 
131
134
  ```yaml
132
135
  http: POST /callingSettings
@@ -154,7 +157,7 @@ responses: 200, 401, 500
154
157
 
155
158
  Get Commerce Settings
156
159
 
157
- Returns catalog/cart commerce settings for the channel. - `is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `is_cart_enabled` — enable cart (`true`) or disable it (`false`).
160
+ Returns catalog/cart commerce settings for the channel. Fails with a provider error when the WABA has no catalog linked — that is an API/account limitation, not an MCP schema bug. - `is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `is_cart_enabled` — enable cart (`true`) or disable it (`false`).
158
161
 
159
162
  ```yaml
160
163
  http: GET /commerce
@@ -165,6 +168,19 @@ responses: 200, 401, 500
165
168
 
166
169
  ### channel
167
170
 
171
+ #### `createSettings`
172
+
173
+ Update channel settings
174
+
175
+ Update channel settings. Only send fields you want to change. `webhookUrl` **replaces** the stored list (one URL string, or up to 5 URLs as an array). Passing an empty value clears webhooks. Repeating the same URL(s) also clears a sticky auto-disable. With several URLs, send the complete array to re-enable one of them — omitting a URL removes it from the channel.
176
+
177
+ ```yaml
178
+ http: POST /settings
179
+ operationId: createSettings
180
+ clientGroup: channel
181
+ responses: 200, 401, 500
182
+ ```
183
+
168
184
  #### `getConversationalAutomation`
169
185
 
170
186
  Get conversational automation settings
@@ -182,7 +198,7 @@ responses: 200, 401, 500
182
198
 
183
199
  Get channel status
184
200
 
185
- Returns WhatsApp Business API client connection status.
201
+ Return WhatsApp Cloud API connection status for this channel (`connected` when the number can send). May include `accountStatus`, messaging limit, and MM Lite availability. Optional `health_status_warning` appears only when Meta Graph health could not be loaded and a soft `connected` response is returned. Omitted on the normal path and when health details are not applicable for the channel — never an internal provider/transport name.
186
202
 
187
203
  ```yaml
188
204
  http: GET /status
@@ -191,6 +207,19 @@ clientGroup: channel
191
207
  responses: 200, 401, 500
192
208
  ```
193
209
 
210
+ #### `listSettings`
211
+
212
+ Get channel settings
213
+
214
+ Return channel settings: webhook URL(s), delivery flags, and analytics toggles. Auto-disable / circuit state matches `GET /webhook`. **Prefer `webhookStatuses`** (one row per configured URL). The breaker is per URL, not per channel. Channel-level `haveDisabledWebhooks` is `true` when **at least one** URL in `webhookUrl` is sticky auto-disabled — not "the channel is dead". Live URLs still receive events. Top-level `circuitState` / `reason` / `fails` / `trips` are a compatibility summary of one URL (first sticky-disabled, else first configured). This is the same `GET /settings` endpoint as the REST API (previously missing from MCP).
215
+
216
+ ```yaml
217
+ http: GET /settings
218
+ operationId: listSettings
219
+ clientGroup: channel
220
+ responses: 200, 401, 500
221
+ ```
222
+
194
223
  #### `setConversationalAutomation`
195
224
 
196
225
  Set conversational automation settings
@@ -210,11 +239,13 @@ responses: 200, 401, 500
210
239
 
211
240
  Create Flow
212
241
 
242
+ Create a WhatsApp Flow (`name` + `categories` required). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
243
+
213
244
  ```yaml
214
245
  http: POST /flows
215
246
  operationId: createFlows
216
247
  clientGroup: flows
217
- responses: 200
248
+ responses: 200, 501
218
249
  ```
219
250
 
220
251
  #### `createFlowsFlowIdDeprecate`
@@ -289,33 +320,39 @@ responses: 200, 401, 500
289
320
 
290
321
  List Flows
291
322
 
323
+ List WhatsApp Flows for the WABA. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
324
+
292
325
  ```yaml
293
326
  http: GET /flows
294
327
  operationId: listFlows
295
328
  clientGroup: flows
296
- responses: 200
329
+ responses: 200, 501
297
330
  ```
298
331
 
299
332
  #### `patchFlowsFlowIdAssets`
300
333
 
301
334
  Update Flow Structure
302
335
 
336
+ Replace the Flow JSON document (`flowJson`). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
337
+
303
338
  ```yaml
304
339
  http: PATCH /flows/{flowId}/assets
305
340
  operationId: patchFlowsFlowIdAssets
306
341
  clientGroup: flows
307
- responses: 200
342
+ responses: 200, 501
308
343
  ```
309
344
 
310
345
  #### `patchFlowsFlowIdMetadata`
311
346
 
312
347
  Update Flow Metadata
313
348
 
349
+ Update Flow `name`, `categories`, and/or `endpointUri`. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
350
+
314
351
  ```yaml
315
352
  http: PATCH /flows/{flowId}/metadata
316
353
  operationId: patchFlowsFlowIdMetadata
317
354
  clientGroup: flows
318
- responses: 200
355
+ responses: 200, 501
319
356
  ```
320
357
 
321
358
  #### `setWhatsappBusinessEncryption`
@@ -348,6 +385,8 @@ responses: 200
348
385
 
349
386
  Update Group Info
350
387
 
388
+ Update group subject, description, and/or profile picture. Path `groupId` is the WABA group id (without `@g.us`).
389
+
351
390
  ```yaml
352
391
  http: POST /groups/{groupId}
353
392
  operationId: createGroupsGroupId
@@ -403,6 +442,8 @@ responses: 200
403
442
 
404
443
  Get Groups List
405
444
 
445
+ List WhatsApp groups for this channel. Paginate with `limit`, `before`, and `after`.
446
+
406
447
  ```yaml
407
448
  http: GET /groups
408
449
  operationId: listGroups
@@ -427,6 +468,8 @@ responses: 200, 401
427
468
 
428
469
  Upload media
429
470
 
471
+ Upload a file to WhatsApp media storage and get a numeric `mediaId` for later use with `send_file` / `send_sticker` (`mediaId` field, not `body`). Pass the file as `body` **or** `url` — an HTTP(S) URL or a base64 data URI. The `mediaId` in the response is a numeric string (keep it as a string).
472
+
430
473
  ```yaml
431
474
  http: POST /uploadMedia
432
475
  operationId: createUploadMedia
@@ -475,6 +518,8 @@ responses: 200, 401, 500
475
518
 
476
519
  Get messages list
477
520
 
521
+ List stored chat history for this channel (requires history storage). Filter with `chatId`, `limit`, `last`, message numbers, or time bounds.
522
+
478
523
  ```yaml
479
524
  http: GET /messages
480
525
  operationId: listMessages
@@ -523,7 +568,7 @@ responses: 200, 400, 401, 429, 500
523
568
 
524
569
  Send Carousel
525
570
 
526
- You can send product cards via Carousel in two ways: Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate. Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel. The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template. In /sendCarousel, for sending a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons.
571
+ You can send product cards via Carousel in two ways: Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate. Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel. The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template. In /sendCarousel, for a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons. Prefer the simple `cards` array (2–10 cards). Each card needs a header media/product plus a CTA URL or quick-reply buttons. Example: ```json { "phone": "79001234567", "body": "Pick a product", "cards": [ { "header": { "type": "image", "image": { "link": "https://example.com/1.jpg" } }, "body": { "text": "Card one" }, "type": "cta_url", "action": { "name": "cta_url", "parameters": { "url": "https://example.com/p1", "display_text": "Open" } } }, { "header": { "type": "image", "image": { "link": "https://example.com/2.jpg" } }, "body": { "text": "Card two" }, "type": "cta_url", "action": { "name": "cta_url", "parameters": { "url": "https://example.com/p2", "display_text": "Open" } } } ] } ``` `params` with a `CAROUSEL` component is the template-like alternative.
527
572
 
528
573
  ```yaml
529
574
  http: POST /sendCarousel
@@ -536,6 +581,8 @@ responses: 200, 400, 401, 429, 500
536
581
 
537
582
  Send a Contact
538
583
 
584
+ Send a WhatsApp contact card. Preferred simple body (legacy-compatible): ```json { "phone": "79001234567", "contact": { "name": "Lida", "phone": "+79181976551" } } ``` Cloud API shape also works: `contacts` is an array of objects with `name.formatted_name` and `phones[].phone` (E.164 string, **not** a timestamp).
585
+
539
586
  ```yaml
540
587
  http: POST /sendContact
541
588
  operationId: sendContact
@@ -543,6 +590,19 @@ clientGroup: messaging
543
590
  responses: 200, 400, 401, 429, 500
544
591
  ```
545
592
 
593
+ #### `sendContactInfo`
594
+
595
+ Request the user's phone number
596
+
597
+ Send a service-window interactive message that asks the WhatsApp user to share their phone number (`request_contact_info`). Use this when you only know the user by BSUID (WhatsApp username) and the 24-hour customer service window is open. Outside that window, create a UTILITY or MARKETING template with a `REQUEST_CONTACT_INFO` button (`POST /addTemplate`) and send it with `POST /sendTemplate`. `body` is the text shown above the button (1–1024 characters). WhatsApp chooses the button label. This method has no button-text field — do not send one. ```json { "bsuid": "US.13491208655302741918", "body": "Please share your phone number so we can reach you." } ``` `phone`, `chatId` (`…@c.us`, `…@lid`, `…@username`), or `bsuid` identifies the recipient. One of them is enough. After Meta accepts the send, the outgoing webhook and stored history message use this same text as `messages[].body` (`type: interactive`). When the user taps the button, Meta sends an inbound `contacts` message. The sender stays the BSUID. The shared number is on the card with `origin: contact_request`. We write that phone onto the existing BSUID contact automatically — there is no separate “link phone” call. ```json { "contacts": [ { "profile": { "name": "Ada", "username": "ada" }, "user_id": "US.13491208655302741918" } ], "messages": [ { "from_user_id": "US.13491208655302741918", "type": "contacts", "contacts": [ { "origin": "contact_request", "phones": [{ "phone": "+1 202-555-0123", "wa_id": "12025550123" }] } ] } ] } ``` The stored inbound message body is the digits (`12025550123`). If Meta later includes a phone on an ordinary message or status for that same BSUID (`wa_id`, `from`, or `recipient_id`, together with `user_id` / `recipient_user_id`), that phone is merged onto the same contact. A contact card the user forwards (`origin` other than `contact_request`) is someone else's number and is not stored as this sender's phone.
598
+
599
+ ```yaml
600
+ http: POST /sendContactInfo
601
+ operationId: sendContactInfo
602
+ clientGroup: messaging
603
+ responses: 200, 400, 401, 429, 500
604
+ ```
605
+
546
606
  #### `sendCtaUrl`
547
607
 
548
608
  Send CTA URL interactive message
@@ -621,7 +681,7 @@ responses: 200, 400, 401, 429, 500
621
681
 
622
682
  Send a Message
623
683
 
624
- Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone.
684
+ Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone. Direct Send is in beta. Meta has not enabled it on every business portfolio, so `category` and `directSend` are a beta option: watch delivery errors before relying on them. Set `category` to `utility` or `authentication` to send outside the 24-hour window as a Meta Direct Send template instead of the 1MSG marketing auto-template. `authentication` is part of that beta and is not recommended. `directSend.serviceFirst: true` tries a free service message first and uses Direct Send only when Meta rejects it because the window is closed (131047). `directSend.templateName` is only valid with `utility` (`^[a-z0-9_]+$`, max 512). Direct Send text is limited to 1024 characters. Without `templateName`, the first unseen phrase may be delivered as Meta's onboarding template. A named template does not guarantee delivery — wait for webhook errors 131000 or 132021. An open 24-hour window is still billed as utility when `category` is set and `serviceFirst` is not true.
625
685
 
626
686
  ```yaml
627
687
  http: POST /sendMessage
@@ -660,6 +720,8 @@ responses: 200, 400, 401, 500
660
720
 
661
721
  Send a Product
662
722
 
723
+ Send a single catalog product or a product list. Destination is `chatId` or `phone`. `action` is required: - single product: `{ "catalog_id": "...", "product_retailer_id": "..." }` - product list: `{ "catalog_id": "...", "sections": [{ "title": "...", "product_items": [{ "product_retailer_id": "..." }] }] }`
724
+
663
725
  ```yaml
664
726
  http: POST /sendProduct
665
727
  operationId: sendProduct
@@ -697,7 +759,7 @@ responses: 200, 400, 401, 429, 500
697
759
 
698
760
  Get Profile Info
699
761
 
700
- Get WhatsApp Business Account profile information
762
+ Return the WhatsApp Business profile for this channel: About, address, description, email, phone, websites, industry (`vertical`), and profile photo URL.
701
763
 
702
764
  ```yaml
703
765
  http: GET /me
@@ -725,6 +787,8 @@ responses: 200, 401, 422, 500
725
787
 
726
788
  Create message template
727
789
 
790
+ Create a WABA message template (`name`, `category`, `language`, `components`). After create, Meta reviews the template; list it with `GET /templates`. Authentication OTP templates (`category: AUTHENTICATION`, copy-code / OTP button) can later be sent only to a phone number. Meta does not accept a BSUID recipient for them (error 131062). If the recipient is known only by BSUID — for example they use a username and their phone number is not in your Business Portfolio — that template cannot be sent. To ask a BSUID user for their phone number, add a `REQUEST_CONTACT_INFO` button on a `UTILITY` or `MARKETING` template. Do not send `text` on that button — WhatsApp sets the label (and rejects a custom one). The button also has no send-time parameters: `POST /sendTemplate` does not take a button component for it. Inside an open 24-hour window, call `POST /sendContactInfo` instead of a template. When the user shares the number, the inbound webhook is a `contacts` message with `origin: contact_request`. The phone is stored on that BSUID automatically. See `POST /sendContactInfo`. ```json { "name": "request_phone", "category": "UTILITY", "language": "en_US", "components": [ { "type": "BODY", "text": "Please share your phone number so we can continue." }, { "type": "BUTTONS", "buttons": [{ "type": "REQUEST_CONTACT_INFO" }] } ] } ```
791
+
728
792
  ```yaml
729
793
  http: POST /addTemplate
730
794
  operationId: addTemplate
@@ -736,6 +800,8 @@ responses: 200, 401, 500
736
800
 
737
801
  Get templates list
738
802
 
803
+ List message templates. Paginate with `limit` / `offset`; sort by `id`, `name`, or `status`.
804
+
739
805
  ```yaml
740
806
  http: GET /templates
741
807
  operationId: listTemplates
@@ -747,6 +813,8 @@ responses: 200
747
813
 
748
814
  Remove message template
749
815
 
816
+ Delete a message template by `name` (all language versions of that name).
817
+
750
818
  ```yaml
751
819
  http: POST /removeTemplate
752
820
  operationId: removeTemplate
@@ -758,7 +826,7 @@ responses: 200, 401, 500
758
826
 
759
827
  Send Template Message
760
828
 
761
- Send a WhatsApp template message (works outside the 24-hour session window). Supported `params` button `sub_type` values include: `url`, `quick_reply`, `copy_code` / `coupon_code`, `catalog`, `flow`, `limited_time_offer`, and **`order_details`** (WhatsApp Payments **India only** — requires an approved Utility template with an ORDER_DETAILS button). For India order/invoice payments outside 24h, include a button component: ```json { "type": "button", "sub_type": "order_details", "index": 0, "parameters": [{ "type": "action", "action": { "order_details": { "reference_id": "...", "currency": "INR", "order": {} } } }] } ``` Convenience wrapper with structured fields: `POST /sendOrderDetails`.
829
+ Send a WhatsApp **template** message (works outside the 24-hour session window). Use this tool — not `send_message` — when the 24h session is closed. `params` MUST be Cloud API **component objects**, never a flat list of strings and never the old On-Prem `hsm` / `localizable_params` format. Example body variable `{{1}}`: ```json { "type": "body", "parameters": [{ "type": "text", "text": "Ivan" }] } ``` Do not send `"type": "hsm"` and do not send `params: ["Ivan", "123"]`. Supported `params` button `sub_type` values include: `url`, `quick_reply`, `copy_code` / `coupon_code`, `catalog`, `flow`, `limited_time_offer`, and **`order_details`** (WhatsApp Payments **India only** — requires an approved Utility template with an ORDER_DETAILS button). Convenience wrapper with structured fields: `POST /sendOrderDetails`. Authentication OTP templates (category `AUTHENTICATION`, or a template with an OTP / copy-code button) can only be sent to a phone number (`phone` or a phone `chatId`). Meta rejects a BSUID `recipient` for these templates with error 131062. If the recipient is known only by BSUID — for example they use a username and their phone number is not in your Business Portfolio — the template cannot be sent. A `REQUEST_CONTACT_INFO` button (UTILITY or MARKETING only) has no send-time parameters. Do not add a button component for it in `params`, and do not send button text — WhatsApp sets that label on the template. Create the button with `POST /addTemplate` as `{ "type": "REQUEST_CONTACT_INFO" }` with no `text`. Inside an open 24-hour window, `POST /sendContactInfo` asks for the number without a template.
762
830
 
763
831
  ```yaml
764
832
  http: POST /sendTemplate
@@ -810,7 +878,7 @@ responses: 200, 400, 401, 500
810
878
 
811
879
  Get webhook URL
812
880
 
813
- Returns the configured client webhook URL for this channel.
881
+ Return the webhook URL(s) currently configured for this channel, plus delivery status for each URL. `webhookUrl` is a string when a single URL is set, an array of strings when multiple URLs are configured, or `null` if none is set. **Prefer `webhookStatuses`.** The circuit breaker is per URL, not per channel. If 1 of 4 URLs is sticky-disabled, that URL is skipped; the other three still receive events. Send/receive are not affected. Channel-level `haveDisabledWebhooks`, `circuitState`, `reason`, `fails`, `trips`, and timestamps are a compatibility summary of **one** URL (the first sticky-disabled URL, else the first configured URL). They are not "the channel is dead". - `haveDisabledWebhooks` — `true` when **at least one** URL in `webhookUrl` is sticky auto-disabled. Live URLs still get events. - `circuitState` — compressed scalar for that same primary URL: `ok` | `degraded` | `open` | `half_open` | `disabled`. - `disabledWebhooks` — currently configured URLs that are sticky-disabled (subset of `webhookUrl`). - `webhookStatuses` — one row per currently configured URL. Use this array to see which endpoints are live vs skipped. - `fails` / `trips` / `firstFailAt` — **diagnostics for support**, not product UI. `fails` = failures in a rolling ~10 minute window (not lifetime). `trips` = failed recovery probes on the 15 min → 1 h → 6 h schedule (sticky disable after 3). Clients can ignore these and use `webhookStatuses` + `disabledWebhooks` only. Sticky disable skips delivery; it does not unconfigure the URL (it stays in `webhookUrl`). Re-enable with `POST /webhook` or `POST /settings`. Those endpoints **replace** the whole list — with multiple URLs, send the full array.
814
882
 
815
883
  ```yaml
816
884
  http: GET /webhook
@@ -823,7 +891,7 @@ responses: 200, 401, 500
823
891
 
824
892
  Set webhook URL
825
893
 
826
- Configure the client webhook URL for inbound events.
894
+ Set the client webhook URL that receives inbound events for this channel. **Replaces** the stored webhook list (it does not append). To deliver the same events to several endpoints, pass an array in `webhookUrl` (max 5) or use `POST /settings`. With several URLs already configured, posting only the disabled URL **drops the others** — send the complete array to re-enable one of many. Incoming payloads include messages, delivery ACKs, group updates, coexistence echoes, and calling events. WhatsApp Calling payloads (`type: "calls"`) are documented under the **Calling** tag. Call permission replies arrive on the normal messages path (`call_permission_reply`). Repeating `POST /webhook` with the same URL(s) clears an auto-disable (self-serve re-enable). Send/receive are not affected by webhook auto-disable.
827
895
 
828
896
  ```yaml
829
897
  http: POST /webhook
@@ -0,0 +1,18 @@
1
+ # OneMsgSdk::AddTemplate200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **response** | **Hash&lt;String, Object&gt;** | Upstream create-template payload | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'one_msg_sdk'
13
+
14
+ instance = OneMsgSdk::AddTemplate200Response.new(
15
+ response: null
16
+ )
17
+ ```
18
+
@@ -4,10 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **name** | **String** | | [optional] |
8
- | **category** | **String** | | [optional] |
9
- | **language** | **String** | | [optional] |
10
- | **components** | **Array&lt;Hash&lt;String, Object&gt;&gt;** | | [optional] |
7
+ | **name** | **String** | Template name | [optional] |
8
+ | **category** | **String** | MARKETING, UTILITY, or AUTHENTICATION | [optional] |
9
+ | **language** | **String** | Template language code (e.g. en_US) | [optional] |
10
+ | **components** | **Array&lt;Hash&lt;String, Object&gt;&gt;** | Template components (HEADER, BODY, FOOTER, BUTTONS, CAROUSEL) | [optional] |
11
11
 
12
12
  ## Example
13
13
 
@@ -15,9 +15,9 @@
15
15
  require 'one_msg_sdk'
16
16
 
17
17
  instance = OneMsgSdk::AddTemplateRequest.new(
18
- name: null,
19
- category: null,
20
- language: null,
18
+ name: hello_world,
19
+ category: UTILITY,
20
+ language: en_US,
21
21
  components: null
22
22
  )
23
23
  ```
data/docs/CallingApi.md CHANGED
@@ -5,17 +5,17 @@ All URIs are relative to *https://api.1msg.io*
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**get_calling_settings**](CallingApi.md#get_calling_settings) | **GET** /callingSettings | Get calling settings |
8
- | [**initiate_call**](CallingApi.md#initiate_call) | **POST** /initiateCall | Initiate WhatsApp call |
8
+ | [**initiate_call**](CallingApi.md#initiate_call) | **POST** /initiateCall | Call action (connect / pre_accept / accept / reject / terminate) |
9
9
  | [**update_calling_settings**](CallingApi.md#update_calling_settings) | **POST** /callingSettings | Update calling settings |
10
10
 
11
11
 
12
12
  ## get_calling_settings
13
13
 
14
- > Hash&lt;String, Object&gt; get_calling_settings(token)
14
+ > <CallingSettings> get_calling_settings(token)
15
15
 
16
16
  Get calling settings
17
17
 
18
- WhatsApp Calling API settings (beta). Requires Meta Calling enablement on the WABA. Not production-complete — paths and webhook field names may change. Trial/subscription-limited channels are blocked.
18
+ Return WhatsApp Calling API settings for this channel (beta). Proxies upstream `GET /calling/settings`. **Prerequisites** - Number must be eligible for Meta Calling (Cloud API; not COEX) - Trial / `subscriptionBlocked` channels receive **403** plain text - You need your own WebRTC or SIP stack; 1msg is a **signaling proxy** only and does **not** store call history or recordings See the **Calling** tag overview for inbound/outbound flows and webhooks.
19
19
 
20
20
  ### Examples
21
21
 
@@ -46,7 +46,7 @@ end
46
46
 
47
47
  This returns an Array which contains the response data, status code and headers.
48
48
 
49
- > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> get_calling_settings_with_http_info(token)
49
+ > <Array(<CallingSettings>, Integer, Hash)> get_calling_settings_with_http_info(token)
50
50
 
51
51
  ```ruby
52
52
  begin
@@ -54,7 +54,7 @@ begin
54
54
  data, status_code, headers = api_instance.get_calling_settings_with_http_info(token)
55
55
  p status_code # => 2xx
56
56
  p headers # => { ... }
57
- p data # => Hash&lt;String, Object&gt;
57
+ p data # => <CallingSettings>
58
58
  rescue OneMsgSdk::ApiError => e
59
59
  puts "Error when calling CallingApi->get_calling_settings_with_http_info: #{e}"
60
60
  end
@@ -68,7 +68,7 @@ end
68
68
 
69
69
  ### Return type
70
70
 
71
- **Hash&lt;String, Object&gt;**
71
+ [**CallingSettings**](CallingSettings.md)
72
72
 
73
73
  ### Authorization
74
74
 
@@ -82,11 +82,11 @@ end
82
82
 
83
83
  ## initiate_call
84
84
 
85
- > Hash&lt;String, Object&gt; initiate_call(token, opts)
85
+ > <InitiateCallResponse> initiate_call(token, initiate_call_request)
86
86
 
87
- Initiate WhatsApp call
87
+ Call action (connect / pre_accept / accept / reject / terminate)
88
88
 
89
- Outbound Calling API (beta). Requires Meta Calling enablement and product consent. Not production-complete — verify on stage before relying on this in production. Trial/subscription-limited channels are blocked.
89
+ Perform a WhatsApp Calling action (beta). Proxies upstream `POST /calling/calls`. Despite the historical path name `/initiateCall`, this endpoint handles **all** call actions: | action | Use | Required | |--------|-----|----------| | `connect` | Outbound business → user | `to` + `session` (`sdp_type: offer`) | | `pre_accept` | Inbound (optional, reduces audio clipping) | `call_id` + `session` (`sdp_type: answer`) | | `accept` | Inbound answer | `call_id` + `session` (`sdp_type: answer`) | | `reject` | Decline inbound | `call_id` | | `terminate` | Hang up | `call_id` | **SDP / media (critical)** - `accept` / `pre_accept` require a **WebRTC-generated SDP answer**. - Do **not** send Meta's offer SDP back as the answer. - Postman (or curl) alone **cannot** establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling. Answer within ~**30–60 seconds** of an inbound `connect` webhook or Meta terminates as unanswered. Common Meta errors include Calling not enabled (`138000`), no permission (`138006`), SDP validation failures. **Outbound** requires a prior Call Permission Request (CPR) acceptance. See the **Calling** tag overview for the full outbound flow and CPR limits. Trial / `subscriptionBlocked` → **403** plain text. Upstream failures often return HTTP 200 with `{ \"response\": { \"error\": \"<upstream message>\" } }`. `Invalid API KEY` is used only when Meta/360 body actually indicates an invalid API key or token. Other upstream 401s (notably call permission `138006`) pass through `error.message` / `error_user_msg`.
90
90
 
91
91
  ### Examples
92
92
 
@@ -103,13 +103,11 @@ end
103
103
 
104
104
  api_instance = OneMsgSdk::CallingApi.new
105
105
  token = 'token_example' # String | JWT token or API key for authorization
106
- opts = {
107
- request_body: { key: 3.56} # Hash<String, Object> |
108
- }
106
+ initiate_call_request = OneMsgSdk::InitiateCallRequest.new({messaging_product: 'whatsapp', action: 'connect'}) # InitiateCallRequest |
109
107
 
110
108
  begin
111
- # Initiate WhatsApp call
112
- result = api_instance.initiate_call(token, opts)
109
+ # Call action (connect / pre_accept / accept / reject / terminate)
110
+ result = api_instance.initiate_call(token, initiate_call_request)
113
111
  p result
114
112
  rescue OneMsgSdk::ApiError => e
115
113
  puts "Error when calling CallingApi->initiate_call: #{e}"
@@ -120,15 +118,15 @@ end
120
118
 
121
119
  This returns an Array which contains the response data, status code and headers.
122
120
 
123
- > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> initiate_call_with_http_info(token, opts)
121
+ > <Array(<InitiateCallResponse>, Integer, Hash)> initiate_call_with_http_info(token, initiate_call_request)
124
122
 
125
123
  ```ruby
126
124
  begin
127
- # Initiate WhatsApp call
128
- data, status_code, headers = api_instance.initiate_call_with_http_info(token, opts)
125
+ # Call action (connect / pre_accept / accept / reject / terminate)
126
+ data, status_code, headers = api_instance.initiate_call_with_http_info(token, initiate_call_request)
129
127
  p status_code # => 2xx
130
128
  p headers # => { ... }
131
- p data # => Hash&lt;String, Object&gt;
129
+ p data # => <InitiateCallResponse>
132
130
  rescue OneMsgSdk::ApiError => e
133
131
  puts "Error when calling CallingApi->initiate_call_with_http_info: #{e}"
134
132
  end
@@ -139,11 +137,11 @@ end
139
137
  | Name | Type | Description | Notes |
140
138
  | ---- | ---- | ----------- | ----- |
141
139
  | **token** | **String** | JWT token or API key for authorization | |
142
- | **request_body** | [**Hash&lt;String, Object&gt;**](Object.md) | | [optional] |
140
+ | **initiate_call_request** | [**InitiateCallRequest**](InitiateCallRequest.md) | | |
143
141
 
144
142
  ### Return type
145
143
 
146
- **Hash&lt;String, Object&gt;**
144
+ [**InitiateCallResponse**](InitiateCallResponse.md)
147
145
 
148
146
  ### Authorization
149
147
 
@@ -157,11 +155,11 @@ end
157
155
 
158
156
  ## update_calling_settings
159
157
 
160
- > Hash&lt;String, Object&gt; update_calling_settings(token, opts)
158
+ > <UpdateCallingSettings200Response> update_calling_settings(token, calling_settings)
161
159
 
162
160
  Update calling settings
163
161
 
164
- Update WhatsApp Calling API settings (beta). Requires Meta Calling enablement. Trial/subscription-limited channels are blocked.
162
+ Enable, disable, or update WhatsApp Calling settings (beta). Proxies upstream `POST /calling/settings`. Body is forwarded as-is (1msg does not validate fields). **Common fields under `calling`** - `status` (`ENABLED` | `DISABLED`) — required to turn calling on/off - `call_icon_visibility` (`DEFAULT` | `DISABLE_ALL`) — optional - `callback_permission_status` (`ENABLED` | `DISABLED`) — optional; when enabled, inbound user calls grant callback permission - `call_hours` — optional hours / timezone object - `sip` — optional SIP trunk; when SIP is ENABLED, Graph call actions and calling webhooks are not used - `srtp_key_exchange_protocol` (`DTLS` | `SDES`) — SDES only with SIP - `video.status` — optional Meta may accept only one feature group per request — prefer focused updates (e.g. enable status first, then SIP). Trial / `subscriptionBlocked` → **403** plain text.
165
163
 
166
164
  ### Examples
167
165
 
@@ -178,13 +176,11 @@ end
178
176
 
179
177
  api_instance = OneMsgSdk::CallingApi.new
180
178
  token = 'token_example' # String | JWT token or API key for authorization
181
- opts = {
182
- request_body: { key: 3.56} # Hash<String, Object> |
183
- }
179
+ calling_settings = OneMsgSdk::CallingSettings.new # CallingSettings |
184
180
 
185
181
  begin
186
182
  # Update calling settings
187
- result = api_instance.update_calling_settings(token, opts)
183
+ result = api_instance.update_calling_settings(token, calling_settings)
188
184
  p result
189
185
  rescue OneMsgSdk::ApiError => e
190
186
  puts "Error when calling CallingApi->update_calling_settings: #{e}"
@@ -195,15 +191,15 @@ end
195
191
 
196
192
  This returns an Array which contains the response data, status code and headers.
197
193
 
198
- > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> update_calling_settings_with_http_info(token, opts)
194
+ > <Array(<UpdateCallingSettings200Response>, Integer, Hash)> update_calling_settings_with_http_info(token, calling_settings)
199
195
 
200
196
  ```ruby
201
197
  begin
202
198
  # Update calling settings
203
- data, status_code, headers = api_instance.update_calling_settings_with_http_info(token, opts)
199
+ data, status_code, headers = api_instance.update_calling_settings_with_http_info(token, calling_settings)
204
200
  p status_code # => 2xx
205
201
  p headers # => { ... }
206
- p data # => Hash&lt;String, Object&gt;
202
+ p data # => <UpdateCallingSettings200Response>
207
203
  rescue OneMsgSdk::ApiError => e
208
204
  puts "Error when calling CallingApi->update_calling_settings_with_http_info: #{e}"
209
205
  end
@@ -214,11 +210,11 @@ end
214
210
  | Name | Type | Description | Notes |
215
211
  | ---- | ---- | ----------- | ----- |
216
212
  | **token** | **String** | JWT token or API key for authorization | |
217
- | **request_body** | [**Hash&lt;String, Object&gt;**](Object.md) | | [optional] |
213
+ | **calling_settings** | [**CallingSettings**](CallingSettings.md) | | |
218
214
 
219
215
  ### Return type
220
216
 
221
- **Hash&lt;String, Object&gt;**
217
+ [**UpdateCallingSettings200Response**](UpdateCallingSettings200Response.md)
222
218
 
223
219
  ### Authorization
224
220
 
@@ -0,0 +1,18 @@
1
+ # OneMsgSdk::CallingSettings
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **calling** | [**CallingSettingsCalling**](CallingSettingsCalling.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'one_msg_sdk'
13
+
14
+ instance = OneMsgSdk::CallingSettings.new(
15
+ calling: null
16
+ )
17
+ ```
18
+