one-msg-sdk 1.0.2__tar.gz → 2.0.2__tar.gz
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.
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/PKG-INFO +82 -17
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/README.md +81 -16
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/__init__.py +55 -3
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api/calling_api.py +5 -5
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api/catalog_api.py +5 -5
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api/channel_api.py +579 -10
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api/flows_api.py +130 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api/groups_api.py +136 -4
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api/messaging_api.py +571 -62
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api/profile_api.py +17 -17
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api/templates_api.py +88 -26
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api/users_api.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api/webhooks_api.py +30 -29
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api_client.py +3 -3
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/configuration.py +4 -4
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/exceptions.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/__init__.py +28 -2
- one_msg_sdk-2.0.2/one_msg_sdk/models/add_template200_response.py +102 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/add_template_request.py +7 -7
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/block_user_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/calling_settings.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/calling_settings_calling.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/calling_settings_calling_audio.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/calling_settings_calling_call_hours.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/calling_settings_calling_sip.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/calling_settings_calling_sip_servers_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/calling_settings_calling_video.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/conversational_automation.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/conversational_automation_commands_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/create_commerce200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/create_commerce_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/create_commerce_request_params.py +2 -2
- one_msg_sdk-2.0.2/one_msg_sdk/models/create_flows_request.py +105 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/create_groups200_response.py +2 -2
- one_msg_sdk-2.0.2/one_msg_sdk/models/create_groups_group_id_request.py +93 -0
- one_msg_sdk-2.0.2/one_msg_sdk/models/create_groups_request.py +91 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/create_read_message200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/create_read_message401_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/create_read_message_request.py +2 -2
- one_msg_sdk-2.0.2/one_msg_sdk/models/create_settings_request.py +116 -0
- one_msg_sdk-2.0.2/one_msg_sdk/models/create_settings_request_webhook_url.py +144 -0
- one_msg_sdk-1.0.2/one_msg_sdk/models/get_webhook200_response.py → one_msg_sdk-2.0.2/one_msg_sdk/models/create_upload_media200_response.py +9 -9
- one_msg_sdk-2.0.2/one_msg_sdk/models/create_upload_media_request.py +91 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/delete_flows_flow_id200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/delete_groups_group_id200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/delete_media_legacy_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/error_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/get_commerce200_response_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/get_mm_lite_status200_response.py +2 -2
- one_msg_sdk-2.0.2/one_msg_sdk/models/get_status200_response.py +110 -0
- one_msg_sdk-2.0.2/one_msg_sdk/models/get_webhook200_response.py +151 -0
- one_msg_sdk-2.0.2/one_msg_sdk/models/get_webhook200_response_webhook_url.py +150 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/get_whatsapp_business_encryption200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/initiate_call_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/initiate_call_request_session.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/initiate_call_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/initiate_call_response_calls_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/initiate_call_response_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/list_blocked_users200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/list_flows200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/list_messages200_response.py +2 -2
- one_msg_sdk-2.0.2/one_msg_sdk/models/list_settings200_response.py +158 -0
- one_msg_sdk-2.0.2/one_msg_sdk/models/list_settings200_response_webhook_url.py +144 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/list_templates200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/message_sent_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/patch_flows_flow_id_assets200_response.py +2 -2
- one_msg_sdk-2.0.2/one_msg_sdk/models/patch_flows_flow_id_assets_request.py +89 -0
- one_msg_sdk-2.0.2/one_msg_sdk/models/patch_flows_flow_id_metadata_request.py +104 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/profile_info.py +2 -2
- one_msg_sdk-2.0.2/one_msg_sdk/models/remove_template_request.py +89 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/retrieve_media200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_address_message_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_button_request.py +13 -5
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_button_request_sections_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_button_request_sections_inner_reply.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_carousel_request1.py +8 -5
- one_msg_sdk-2.0.2/one_msg_sdk/models/send_contact_info_request.py +98 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_contact_request.py +15 -5
- one_msg_sdk-2.0.2/one_msg_sdk/models/send_contact_request_contact.py +101 -0
- one_msg_sdk-2.0.2/one_msg_sdk/models/send_contact_request_contact_name.py +144 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_contact_request_contacts_inner.py +5 -5
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_contact_request_contacts_inner_name.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_contact_request_contacts_inner_org.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_contact_request_contacts_inner_phones_inner.py +4 -4
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_cta_url_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_file_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_flow_request1.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_flow_request1_header.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_flow_request_header.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_list_request.py +8 -4
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_list_request_sections_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_list_request_sections_inner_rows_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_location_request1.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_location_request_request.py +9 -5
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_message_request.py +19 -14
- one_msg_sdk-2.0.2/one_msg_sdk/models/send_message_request_direct_send.py +105 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_order_details_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_order_details_request_language.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_order_details_request_order.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_order_details_request_order_items_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_order_details_request_order_items_inner_amount.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_payment_request_request.py +2 -2
- one_msg_sdk-2.0.2/one_msg_sdk/models/send_product_request.py +114 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_reaction_request.py +6 -4
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_sticker_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_template_request.py +12 -8
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/send_template_request_language.py +6 -6
- one_msg_sdk-2.0.2/one_msg_sdk/models/set_webhook200_response.py +108 -0
- one_msg_sdk-2.0.2/one_msg_sdk/models/set_webhook200_response_webhook_url.py +144 -0
- one_msg_sdk-2.0.2/one_msg_sdk/models/set_webhook_request.py +106 -0
- one_msg_sdk-2.0.2/one_msg_sdk/models/set_webhook_request_webhook_url.py +145 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/set_whatsapp_business_encryption_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/success_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/update_calling_settings200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/update_calling_settings200_response_response.py +2 -2
- one_msg_sdk-2.0.2/one_msg_sdk/models/update_me200_response.py +102 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/models/update_me_request.py +6 -6
- one_msg_sdk-2.0.2/one_msg_sdk/models/webhook_url_status.py +125 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/rest.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk.egg-info/PKG-INFO +82 -17
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk.egg-info/SOURCES.txt +52 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/pyproject.toml +1 -1
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/setup.py +3 -3
- one_msg_sdk-2.0.2/test/test_add_template200_response.py +52 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_add_template_request.py +5 -5
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_block_user_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_calling_api.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_calling_settings.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_calling_settings_calling.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_calling_settings_calling_audio.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_calling_settings_calling_call_hours.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_calling_settings_calling_sip.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_calling_settings_calling_sip_servers_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_calling_settings_calling_video.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_catalog_api.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_channel_api.py +16 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_conversational_automation.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_conversational_automation_commands_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_create_commerce200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_create_commerce_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_create_commerce_request_params.py +2 -2
- one_msg_sdk-2.0.2/test/test_create_flows_request.py +62 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_create_groups200_response.py +2 -2
- one_msg_sdk-2.0.2/test/test_create_groups_group_id_request.py +54 -0
- one_msg_sdk-2.0.2/test/test_create_groups_request.py +54 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_create_read_message200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_create_read_message401_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_create_read_message_request.py +2 -2
- one_msg_sdk-2.0.2/test/test_create_settings_request.py +57 -0
- one_msg_sdk-2.0.2/test/test_create_settings_request_webhook_url.py +51 -0
- one_msg_sdk-2.0.2/test/test_create_upload_media200_response.py +52 -0
- one_msg_sdk-2.0.2/test/test_create_upload_media_request.py +53 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_delete_flows_flow_id200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_delete_groups_group_id200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_delete_media_legacy_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_error_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_flows_api.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_get_commerce200_response_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_get_mm_lite_status200_response.py +2 -2
- one_msg_sdk-2.0.2/test/test_get_status200_response.py +56 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_get_webhook200_response.py +18 -3
- one_msg_sdk-2.0.2/test/test_get_webhook200_response_webhook_url.py +51 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_get_whatsapp_business_encryption200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_groups_api.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_initiate_call_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_initiate_call_request_session.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_initiate_call_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_initiate_call_response_calls_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_initiate_call_response_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_list_blocked_users200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_list_flows200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_list_messages200_response.py +2 -2
- one_msg_sdk-2.0.2/test/test_list_settings200_response.py +73 -0
- one_msg_sdk-2.0.2/test/test_list_settings200_response_webhook_url.py +51 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_list_templates200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_message_sent_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_messaging_api.py +9 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_patch_flows_flow_id_assets200_response.py +2 -2
- one_msg_sdk-2.0.2/test/test_patch_flows_flow_id_assets_request.py +53 -0
- one_msg_sdk-2.0.2/test/test_patch_flows_flow_id_metadata_request.py +56 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_profile_api.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_profile_info.py +2 -2
- one_msg_sdk-2.0.2/test/test_remove_template_request.py +53 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_retrieve_media200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_address_message_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_button_request.py +8 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_button_request_sections_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_button_request_sections_inner_reply.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_carousel_request1.py +5 -5
- one_msg_sdk-2.0.2/test/test_send_contact_info_request.py +57 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_contact_request.py +13 -5
- one_msg_sdk-2.0.2/test/test_send_contact_request_contact.py +58 -0
- one_msg_sdk-2.0.2/test/test_send_contact_request_contact_name.py +51 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_contact_request_contacts_inner.py +5 -5
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_contact_request_contacts_inner_name.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_contact_request_contacts_inner_org.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_contact_request_contacts_inner_phones_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_cta_url_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_file_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_flow_request1.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_flow_request1_header.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_flow_request_header.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_list_request.py +4 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_list_request_sections_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_list_request_sections_inner_rows_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_location_request1.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_location_request_request.py +4 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_message_request.py +7 -3
- one_msg_sdk-2.0.2/test/test_send_message_request_direct_send.py +53 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_order_details_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_order_details_request_language.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_order_details_request_order.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_order_details_request_order_items_inner.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_order_details_request_order_items_inner_amount.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_payment_request_request.py +2 -2
- one_msg_sdk-2.0.2/test/test_send_product_request.py +59 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_reaction_request.py +3 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_sticker_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_template_request.py +7 -5
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_send_template_request_language.py +4 -4
- one_msg_sdk-2.0.2/test/test_set_webhook200_response.py +53 -0
- one_msg_sdk-2.0.2/test/test_set_webhook200_response_webhook_url.py +51 -0
- one_msg_sdk-2.0.2/test/test_set_webhook_request.py +53 -0
- one_msg_sdk-2.0.2/test/test_set_webhook_request_webhook_url.py +51 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_set_whatsapp_business_encryption_request.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_success_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_templates_api.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_update_calling_settings200_response.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_update_calling_settings200_response_response.py +2 -2
- one_msg_sdk-2.0.2/test/test_update_me200_response.py +52 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_update_me_request.py +4 -4
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_users_api.py +2 -2
- one_msg_sdk-2.0.2/test/test_webhook_url_status.py +62 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/test/test_webhooks_api.py +2 -2
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/LICENSE +0 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api/__init__.py +0 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/api_response.py +0 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk/py.typed +0 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk.egg-info/dependency_links.txt +0 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk.egg-info/requires.txt +0 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/one_msg_sdk.egg-info/top_level.txt +0 -0
- {one_msg_sdk-1.0.2 → one_msg_sdk-2.0.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: one_msg_sdk
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Official Python SDK for the 1msg WhatsApp Business API
|
|
5
5
|
Home-page: https://github.com/1msg/1msg-sdk
|
|
6
6
|
Author: 1MSG API Support
|
|
@@ -32,8 +32,8 @@ auth, quick start, and every public operation available in the client.
|
|
|
32
32
|
| **API docs** | [docs.1msg.io](https://docs.1msg.io/) |
|
|
33
33
|
| **Platform** | [platform.1msg.io](https://platform.1msg.io/) |
|
|
34
34
|
| **Support** | support@1msg.io |
|
|
35
|
-
| **OpenAPI version** |
|
|
36
|
-
| **Operations** |
|
|
35
|
+
| **OpenAPI version** | 2.0.0 |
|
|
36
|
+
| **Operations** | 63 |
|
|
37
37
|
| **AI agent guide** | [AGENTS.md](./AGENTS.md) |
|
|
38
38
|
|
|
39
39
|
---
|
|
@@ -41,7 +41,7 @@ auth, quick start, and every public operation available in the client.
|
|
|
41
41
|
## Install
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
pip install one-msg-sdk==
|
|
44
|
+
pip install one-msg-sdk==2.0.2
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
## Requirements
|
|
@@ -137,7 +137,7 @@ responses: 200, 401, 500
|
|
|
137
137
|
|
|
138
138
|
Call action (connect / pre_accept / accept / reject / terminate)
|
|
139
139
|
|
|
140
|
-
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": "
|
|
140
|
+
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`.
|
|
141
141
|
|
|
142
142
|
```yaml
|
|
143
143
|
http: POST /initiateCall
|
|
@@ -178,7 +178,7 @@ responses: 200, 401, 500
|
|
|
178
178
|
|
|
179
179
|
Get Commerce Settings
|
|
180
180
|
|
|
181
|
-
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`).
|
|
181
|
+
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`).
|
|
182
182
|
|
|
183
183
|
```yaml
|
|
184
184
|
http: GET /commerce
|
|
@@ -189,6 +189,19 @@ responses: 200, 401, 500
|
|
|
189
189
|
|
|
190
190
|
### channel
|
|
191
191
|
|
|
192
|
+
#### `createSettings`
|
|
193
|
+
|
|
194
|
+
Update channel settings
|
|
195
|
+
|
|
196
|
+
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.
|
|
197
|
+
|
|
198
|
+
```yaml
|
|
199
|
+
http: POST /settings
|
|
200
|
+
operationId: createSettings
|
|
201
|
+
clientGroup: channel
|
|
202
|
+
responses: 200, 401, 500
|
|
203
|
+
```
|
|
204
|
+
|
|
192
205
|
#### `getConversationalAutomation`
|
|
193
206
|
|
|
194
207
|
Get conversational automation settings
|
|
@@ -206,7 +219,7 @@ responses: 200, 401, 500
|
|
|
206
219
|
|
|
207
220
|
Get channel status
|
|
208
221
|
|
|
209
|
-
|
|
222
|
+
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.
|
|
210
223
|
|
|
211
224
|
```yaml
|
|
212
225
|
http: GET /status
|
|
@@ -215,6 +228,19 @@ clientGroup: channel
|
|
|
215
228
|
responses: 200, 401, 500
|
|
216
229
|
```
|
|
217
230
|
|
|
231
|
+
#### `listSettings`
|
|
232
|
+
|
|
233
|
+
Get channel settings
|
|
234
|
+
|
|
235
|
+
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).
|
|
236
|
+
|
|
237
|
+
```yaml
|
|
238
|
+
http: GET /settings
|
|
239
|
+
operationId: listSettings
|
|
240
|
+
clientGroup: channel
|
|
241
|
+
responses: 200, 401, 500
|
|
242
|
+
```
|
|
243
|
+
|
|
218
244
|
#### `setConversationalAutomation`
|
|
219
245
|
|
|
220
246
|
Set conversational automation settings
|
|
@@ -234,11 +260,13 @@ responses: 200, 401, 500
|
|
|
234
260
|
|
|
235
261
|
Create Flow
|
|
236
262
|
|
|
263
|
+
Create a WhatsApp Flow (`name` + `categories` required). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
264
|
+
|
|
237
265
|
```yaml
|
|
238
266
|
http: POST /flows
|
|
239
267
|
operationId: createFlows
|
|
240
268
|
clientGroup: flows
|
|
241
|
-
responses: 200
|
|
269
|
+
responses: 200, 501
|
|
242
270
|
```
|
|
243
271
|
|
|
244
272
|
#### `createFlowsFlowIdDeprecate`
|
|
@@ -313,33 +341,39 @@ responses: 200, 401, 500
|
|
|
313
341
|
|
|
314
342
|
List Flows
|
|
315
343
|
|
|
344
|
+
List WhatsApp Flows for the WABA. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
345
|
+
|
|
316
346
|
```yaml
|
|
317
347
|
http: GET /flows
|
|
318
348
|
operationId: listFlows
|
|
319
349
|
clientGroup: flows
|
|
320
|
-
responses: 200
|
|
350
|
+
responses: 200, 501
|
|
321
351
|
```
|
|
322
352
|
|
|
323
353
|
#### `patchFlowsFlowIdAssets`
|
|
324
354
|
|
|
325
355
|
Update Flow Structure
|
|
326
356
|
|
|
357
|
+
Replace the Flow JSON document (`flowJson`). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
358
|
+
|
|
327
359
|
```yaml
|
|
328
360
|
http: PATCH /flows/{flowId}/assets
|
|
329
361
|
operationId: patchFlowsFlowIdAssets
|
|
330
362
|
clientGroup: flows
|
|
331
|
-
responses: 200
|
|
363
|
+
responses: 200, 501
|
|
332
364
|
```
|
|
333
365
|
|
|
334
366
|
#### `patchFlowsFlowIdMetadata`
|
|
335
367
|
|
|
336
368
|
Update Flow Metadata
|
|
337
369
|
|
|
370
|
+
Update Flow `name`, `categories`, and/or `endpointUri`. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
371
|
+
|
|
338
372
|
```yaml
|
|
339
373
|
http: PATCH /flows/{flowId}/metadata
|
|
340
374
|
operationId: patchFlowsFlowIdMetadata
|
|
341
375
|
clientGroup: flows
|
|
342
|
-
responses: 200
|
|
376
|
+
responses: 200, 501
|
|
343
377
|
```
|
|
344
378
|
|
|
345
379
|
#### `setWhatsappBusinessEncryption`
|
|
@@ -372,6 +406,8 @@ responses: 200
|
|
|
372
406
|
|
|
373
407
|
Update Group Info
|
|
374
408
|
|
|
409
|
+
Update group subject, description, and/or profile picture. Path `groupId` is the WABA group id (without `@g.us`).
|
|
410
|
+
|
|
375
411
|
```yaml
|
|
376
412
|
http: POST /groups/{groupId}
|
|
377
413
|
operationId: createGroupsGroupId
|
|
@@ -427,6 +463,8 @@ responses: 200
|
|
|
427
463
|
|
|
428
464
|
Get Groups List
|
|
429
465
|
|
|
466
|
+
List WhatsApp groups for this channel. Paginate with `limit`, `before`, and `after`.
|
|
467
|
+
|
|
430
468
|
```yaml
|
|
431
469
|
http: GET /groups
|
|
432
470
|
operationId: listGroups
|
|
@@ -451,6 +489,8 @@ responses: 200, 401
|
|
|
451
489
|
|
|
452
490
|
Upload media
|
|
453
491
|
|
|
492
|
+
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).
|
|
493
|
+
|
|
454
494
|
```yaml
|
|
455
495
|
http: POST /uploadMedia
|
|
456
496
|
operationId: createUploadMedia
|
|
@@ -499,6 +539,8 @@ responses: 200, 401, 500
|
|
|
499
539
|
|
|
500
540
|
Get messages list
|
|
501
541
|
|
|
542
|
+
List stored chat history for this channel (requires history storage). Filter with `chatId`, `limit`, `last`, message numbers, or time bounds.
|
|
543
|
+
|
|
502
544
|
```yaml
|
|
503
545
|
http: GET /messages
|
|
504
546
|
operationId: listMessages
|
|
@@ -547,7 +589,7 @@ responses: 200, 400, 401, 429, 500
|
|
|
547
589
|
|
|
548
590
|
Send Carousel
|
|
549
591
|
|
|
550
|
-
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
|
|
592
|
+
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.
|
|
551
593
|
|
|
552
594
|
```yaml
|
|
553
595
|
http: POST /sendCarousel
|
|
@@ -560,6 +602,8 @@ responses: 200, 400, 401, 429, 500
|
|
|
560
602
|
|
|
561
603
|
Send a Contact
|
|
562
604
|
|
|
605
|
+
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).
|
|
606
|
+
|
|
563
607
|
```yaml
|
|
564
608
|
http: POST /sendContact
|
|
565
609
|
operationId: sendContact
|
|
@@ -567,6 +611,19 @@ clientGroup: messaging
|
|
|
567
611
|
responses: 200, 400, 401, 429, 500
|
|
568
612
|
```
|
|
569
613
|
|
|
614
|
+
#### `sendContactInfo`
|
|
615
|
+
|
|
616
|
+
Request the user's phone number
|
|
617
|
+
|
|
618
|
+
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.
|
|
619
|
+
|
|
620
|
+
```yaml
|
|
621
|
+
http: POST /sendContactInfo
|
|
622
|
+
operationId: sendContactInfo
|
|
623
|
+
clientGroup: messaging
|
|
624
|
+
responses: 200, 400, 401, 429, 500
|
|
625
|
+
```
|
|
626
|
+
|
|
570
627
|
#### `sendCtaUrl`
|
|
571
628
|
|
|
572
629
|
Send CTA URL interactive message
|
|
@@ -645,7 +702,7 @@ responses: 200, 400, 401, 429, 500
|
|
|
645
702
|
|
|
646
703
|
Send a Message
|
|
647
704
|
|
|
648
|
-
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.
|
|
705
|
+
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.
|
|
649
706
|
|
|
650
707
|
```yaml
|
|
651
708
|
http: POST /sendMessage
|
|
@@ -684,6 +741,8 @@ responses: 200, 400, 401, 500
|
|
|
684
741
|
|
|
685
742
|
Send a Product
|
|
686
743
|
|
|
744
|
+
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": "..." }] }] }`
|
|
745
|
+
|
|
687
746
|
```yaml
|
|
688
747
|
http: POST /sendProduct
|
|
689
748
|
operationId: sendProduct
|
|
@@ -721,7 +780,7 @@ responses: 200, 400, 401, 429, 500
|
|
|
721
780
|
|
|
722
781
|
Get Profile Info
|
|
723
782
|
|
|
724
|
-
|
|
783
|
+
Return the WhatsApp Business profile for this channel: About, address, description, email, phone, websites, industry (`vertical`), and profile photo URL.
|
|
725
784
|
|
|
726
785
|
```yaml
|
|
727
786
|
http: GET /me
|
|
@@ -749,6 +808,8 @@ responses: 200, 401, 422, 500
|
|
|
749
808
|
|
|
750
809
|
Create message template
|
|
751
810
|
|
|
811
|
+
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" }] } ] } ```
|
|
812
|
+
|
|
752
813
|
```yaml
|
|
753
814
|
http: POST /addTemplate
|
|
754
815
|
operationId: addTemplate
|
|
@@ -760,6 +821,8 @@ responses: 200, 401, 500
|
|
|
760
821
|
|
|
761
822
|
Get templates list
|
|
762
823
|
|
|
824
|
+
List message templates. Paginate with `limit` / `offset`; sort by `id`, `name`, or `status`.
|
|
825
|
+
|
|
763
826
|
```yaml
|
|
764
827
|
http: GET /templates
|
|
765
828
|
operationId: listTemplates
|
|
@@ -771,6 +834,8 @@ responses: 200
|
|
|
771
834
|
|
|
772
835
|
Remove message template
|
|
773
836
|
|
|
837
|
+
Delete a message template by `name` (all language versions of that name).
|
|
838
|
+
|
|
774
839
|
```yaml
|
|
775
840
|
http: POST /removeTemplate
|
|
776
841
|
operationId: removeTemplate
|
|
@@ -782,7 +847,7 @@ responses: 200, 401, 500
|
|
|
782
847
|
|
|
783
848
|
Send Template Message
|
|
784
849
|
|
|
785
|
-
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).
|
|
850
|
+
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.
|
|
786
851
|
|
|
787
852
|
```yaml
|
|
788
853
|
http: POST /sendTemplate
|
|
@@ -834,7 +899,7 @@ responses: 200, 400, 401, 500
|
|
|
834
899
|
|
|
835
900
|
Get webhook URL
|
|
836
901
|
|
|
837
|
-
|
|
902
|
+
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.
|
|
838
903
|
|
|
839
904
|
```yaml
|
|
840
905
|
http: GET /webhook
|
|
@@ -847,7 +912,7 @@ responses: 200, 401, 500
|
|
|
847
912
|
|
|
848
913
|
Set webhook URL
|
|
849
914
|
|
|
850
|
-
|
|
915
|
+
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.
|
|
851
916
|
|
|
852
917
|
```yaml
|
|
853
918
|
http: POST /webhook
|
|
@@ -12,8 +12,8 @@ auth, quick start, and every public operation available in the client.
|
|
|
12
12
|
| **API docs** | [docs.1msg.io](https://docs.1msg.io/) |
|
|
13
13
|
| **Platform** | [platform.1msg.io](https://platform.1msg.io/) |
|
|
14
14
|
| **Support** | support@1msg.io |
|
|
15
|
-
| **OpenAPI version** |
|
|
16
|
-
| **Operations** |
|
|
15
|
+
| **OpenAPI version** | 2.0.0 |
|
|
16
|
+
| **Operations** | 63 |
|
|
17
17
|
| **AI agent guide** | [AGENTS.md](./AGENTS.md) |
|
|
18
18
|
|
|
19
19
|
---
|
|
@@ -21,7 +21,7 @@ auth, quick start, and every public operation available in the client.
|
|
|
21
21
|
## Install
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
pip install one-msg-sdk==
|
|
24
|
+
pip install one-msg-sdk==2.0.2
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Requirements
|
|
@@ -117,7 +117,7 @@ responses: 200, 401, 500
|
|
|
117
117
|
|
|
118
118
|
Call action (connect / pre_accept / accept / reject / terminate)
|
|
119
119
|
|
|
120
|
-
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": "
|
|
120
|
+
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`.
|
|
121
121
|
|
|
122
122
|
```yaml
|
|
123
123
|
http: POST /initiateCall
|
|
@@ -158,7 +158,7 @@ responses: 200, 401, 500
|
|
|
158
158
|
|
|
159
159
|
Get Commerce Settings
|
|
160
160
|
|
|
161
|
-
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`).
|
|
161
|
+
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`).
|
|
162
162
|
|
|
163
163
|
```yaml
|
|
164
164
|
http: GET /commerce
|
|
@@ -169,6 +169,19 @@ responses: 200, 401, 500
|
|
|
169
169
|
|
|
170
170
|
### channel
|
|
171
171
|
|
|
172
|
+
#### `createSettings`
|
|
173
|
+
|
|
174
|
+
Update channel settings
|
|
175
|
+
|
|
176
|
+
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.
|
|
177
|
+
|
|
178
|
+
```yaml
|
|
179
|
+
http: POST /settings
|
|
180
|
+
operationId: createSettings
|
|
181
|
+
clientGroup: channel
|
|
182
|
+
responses: 200, 401, 500
|
|
183
|
+
```
|
|
184
|
+
|
|
172
185
|
#### `getConversationalAutomation`
|
|
173
186
|
|
|
174
187
|
Get conversational automation settings
|
|
@@ -186,7 +199,7 @@ responses: 200, 401, 500
|
|
|
186
199
|
|
|
187
200
|
Get channel status
|
|
188
201
|
|
|
189
|
-
|
|
202
|
+
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.
|
|
190
203
|
|
|
191
204
|
```yaml
|
|
192
205
|
http: GET /status
|
|
@@ -195,6 +208,19 @@ clientGroup: channel
|
|
|
195
208
|
responses: 200, 401, 500
|
|
196
209
|
```
|
|
197
210
|
|
|
211
|
+
#### `listSettings`
|
|
212
|
+
|
|
213
|
+
Get channel settings
|
|
214
|
+
|
|
215
|
+
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).
|
|
216
|
+
|
|
217
|
+
```yaml
|
|
218
|
+
http: GET /settings
|
|
219
|
+
operationId: listSettings
|
|
220
|
+
clientGroup: channel
|
|
221
|
+
responses: 200, 401, 500
|
|
222
|
+
```
|
|
223
|
+
|
|
198
224
|
#### `setConversationalAutomation`
|
|
199
225
|
|
|
200
226
|
Set conversational automation settings
|
|
@@ -214,11 +240,13 @@ responses: 200, 401, 500
|
|
|
214
240
|
|
|
215
241
|
Create Flow
|
|
216
242
|
|
|
243
|
+
Create a WhatsApp Flow (`name` + `categories` required). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
244
|
+
|
|
217
245
|
```yaml
|
|
218
246
|
http: POST /flows
|
|
219
247
|
operationId: createFlows
|
|
220
248
|
clientGroup: flows
|
|
221
|
-
responses: 200
|
|
249
|
+
responses: 200, 501
|
|
222
250
|
```
|
|
223
251
|
|
|
224
252
|
#### `createFlowsFlowIdDeprecate`
|
|
@@ -293,33 +321,39 @@ responses: 200, 401, 500
|
|
|
293
321
|
|
|
294
322
|
List Flows
|
|
295
323
|
|
|
324
|
+
List WhatsApp Flows for the WABA. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
325
|
+
|
|
296
326
|
```yaml
|
|
297
327
|
http: GET /flows
|
|
298
328
|
operationId: listFlows
|
|
299
329
|
clientGroup: flows
|
|
300
|
-
responses: 200
|
|
330
|
+
responses: 200, 501
|
|
301
331
|
```
|
|
302
332
|
|
|
303
333
|
#### `patchFlowsFlowIdAssets`
|
|
304
334
|
|
|
305
335
|
Update Flow Structure
|
|
306
336
|
|
|
337
|
+
Replace the Flow JSON document (`flowJson`). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
338
|
+
|
|
307
339
|
```yaml
|
|
308
340
|
http: PATCH /flows/{flowId}/assets
|
|
309
341
|
operationId: patchFlowsFlowIdAssets
|
|
310
342
|
clientGroup: flows
|
|
311
|
-
responses: 200
|
|
343
|
+
responses: 200, 501
|
|
312
344
|
```
|
|
313
345
|
|
|
314
346
|
#### `patchFlowsFlowIdMetadata`
|
|
315
347
|
|
|
316
348
|
Update Flow Metadata
|
|
317
349
|
|
|
350
|
+
Update Flow `name`, `categories`, and/or `endpointUri`. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
351
|
+
|
|
318
352
|
```yaml
|
|
319
353
|
http: PATCH /flows/{flowId}/metadata
|
|
320
354
|
operationId: patchFlowsFlowIdMetadata
|
|
321
355
|
clientGroup: flows
|
|
322
|
-
responses: 200
|
|
356
|
+
responses: 200, 501
|
|
323
357
|
```
|
|
324
358
|
|
|
325
359
|
#### `setWhatsappBusinessEncryption`
|
|
@@ -352,6 +386,8 @@ responses: 200
|
|
|
352
386
|
|
|
353
387
|
Update Group Info
|
|
354
388
|
|
|
389
|
+
Update group subject, description, and/or profile picture. Path `groupId` is the WABA group id (without `@g.us`).
|
|
390
|
+
|
|
355
391
|
```yaml
|
|
356
392
|
http: POST /groups/{groupId}
|
|
357
393
|
operationId: createGroupsGroupId
|
|
@@ -407,6 +443,8 @@ responses: 200
|
|
|
407
443
|
|
|
408
444
|
Get Groups List
|
|
409
445
|
|
|
446
|
+
List WhatsApp groups for this channel. Paginate with `limit`, `before`, and `after`.
|
|
447
|
+
|
|
410
448
|
```yaml
|
|
411
449
|
http: GET /groups
|
|
412
450
|
operationId: listGroups
|
|
@@ -431,6 +469,8 @@ responses: 200, 401
|
|
|
431
469
|
|
|
432
470
|
Upload media
|
|
433
471
|
|
|
472
|
+
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).
|
|
473
|
+
|
|
434
474
|
```yaml
|
|
435
475
|
http: POST /uploadMedia
|
|
436
476
|
operationId: createUploadMedia
|
|
@@ -479,6 +519,8 @@ responses: 200, 401, 500
|
|
|
479
519
|
|
|
480
520
|
Get messages list
|
|
481
521
|
|
|
522
|
+
List stored chat history for this channel (requires history storage). Filter with `chatId`, `limit`, `last`, message numbers, or time bounds.
|
|
523
|
+
|
|
482
524
|
```yaml
|
|
483
525
|
http: GET /messages
|
|
484
526
|
operationId: listMessages
|
|
@@ -527,7 +569,7 @@ responses: 200, 400, 401, 429, 500
|
|
|
527
569
|
|
|
528
570
|
Send Carousel
|
|
529
571
|
|
|
530
|
-
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
|
|
572
|
+
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.
|
|
531
573
|
|
|
532
574
|
```yaml
|
|
533
575
|
http: POST /sendCarousel
|
|
@@ -540,6 +582,8 @@ responses: 200, 400, 401, 429, 500
|
|
|
540
582
|
|
|
541
583
|
Send a Contact
|
|
542
584
|
|
|
585
|
+
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).
|
|
586
|
+
|
|
543
587
|
```yaml
|
|
544
588
|
http: POST /sendContact
|
|
545
589
|
operationId: sendContact
|
|
@@ -547,6 +591,19 @@ clientGroup: messaging
|
|
|
547
591
|
responses: 200, 400, 401, 429, 500
|
|
548
592
|
```
|
|
549
593
|
|
|
594
|
+
#### `sendContactInfo`
|
|
595
|
+
|
|
596
|
+
Request the user's phone number
|
|
597
|
+
|
|
598
|
+
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.
|
|
599
|
+
|
|
600
|
+
```yaml
|
|
601
|
+
http: POST /sendContactInfo
|
|
602
|
+
operationId: sendContactInfo
|
|
603
|
+
clientGroup: messaging
|
|
604
|
+
responses: 200, 400, 401, 429, 500
|
|
605
|
+
```
|
|
606
|
+
|
|
550
607
|
#### `sendCtaUrl`
|
|
551
608
|
|
|
552
609
|
Send CTA URL interactive message
|
|
@@ -625,7 +682,7 @@ responses: 200, 400, 401, 429, 500
|
|
|
625
682
|
|
|
626
683
|
Send a Message
|
|
627
684
|
|
|
628
|
-
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.
|
|
685
|
+
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.
|
|
629
686
|
|
|
630
687
|
```yaml
|
|
631
688
|
http: POST /sendMessage
|
|
@@ -664,6 +721,8 @@ responses: 200, 400, 401, 500
|
|
|
664
721
|
|
|
665
722
|
Send a Product
|
|
666
723
|
|
|
724
|
+
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": "..." }] }] }`
|
|
725
|
+
|
|
667
726
|
```yaml
|
|
668
727
|
http: POST /sendProduct
|
|
669
728
|
operationId: sendProduct
|
|
@@ -701,7 +760,7 @@ responses: 200, 400, 401, 429, 500
|
|
|
701
760
|
|
|
702
761
|
Get Profile Info
|
|
703
762
|
|
|
704
|
-
|
|
763
|
+
Return the WhatsApp Business profile for this channel: About, address, description, email, phone, websites, industry (`vertical`), and profile photo URL.
|
|
705
764
|
|
|
706
765
|
```yaml
|
|
707
766
|
http: GET /me
|
|
@@ -729,6 +788,8 @@ responses: 200, 401, 422, 500
|
|
|
729
788
|
|
|
730
789
|
Create message template
|
|
731
790
|
|
|
791
|
+
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" }] } ] } ```
|
|
792
|
+
|
|
732
793
|
```yaml
|
|
733
794
|
http: POST /addTemplate
|
|
734
795
|
operationId: addTemplate
|
|
@@ -740,6 +801,8 @@ responses: 200, 401, 500
|
|
|
740
801
|
|
|
741
802
|
Get templates list
|
|
742
803
|
|
|
804
|
+
List message templates. Paginate with `limit` / `offset`; sort by `id`, `name`, or `status`.
|
|
805
|
+
|
|
743
806
|
```yaml
|
|
744
807
|
http: GET /templates
|
|
745
808
|
operationId: listTemplates
|
|
@@ -751,6 +814,8 @@ responses: 200
|
|
|
751
814
|
|
|
752
815
|
Remove message template
|
|
753
816
|
|
|
817
|
+
Delete a message template by `name` (all language versions of that name).
|
|
818
|
+
|
|
754
819
|
```yaml
|
|
755
820
|
http: POST /removeTemplate
|
|
756
821
|
operationId: removeTemplate
|
|
@@ -762,7 +827,7 @@ responses: 200, 401, 500
|
|
|
762
827
|
|
|
763
828
|
Send Template Message
|
|
764
829
|
|
|
765
|
-
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).
|
|
830
|
+
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.
|
|
766
831
|
|
|
767
832
|
```yaml
|
|
768
833
|
http: POST /sendTemplate
|
|
@@ -814,7 +879,7 @@ responses: 200, 400, 401, 500
|
|
|
814
879
|
|
|
815
880
|
Get webhook URL
|
|
816
881
|
|
|
817
|
-
|
|
882
|
+
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.
|
|
818
883
|
|
|
819
884
|
```yaml
|
|
820
885
|
http: GET /webhook
|
|
@@ -827,7 +892,7 @@ responses: 200, 401, 500
|
|
|
827
892
|
|
|
828
893
|
Set webhook URL
|
|
829
894
|
|
|
830
|
-
|
|
895
|
+
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.
|
|
831
896
|
|
|
832
897
|
```yaml
|
|
833
898
|
http: POST /webhook
|