brevo-python 4.0.1__py3-none-any.whl
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.
- brevo/__init__.py +2253 -0
- brevo/account/__init__.py +79 -0
- brevo/account/client.py +317 -0
- brevo/account/raw_client.py +341 -0
- brevo/account/types/__init__.py +77 -0
- brevo/account/types/get_account_activity_response.py +24 -0
- brevo/account/types/get_account_activity_response_logs_item.py +45 -0
- brevo/account/types/get_account_response.py +85 -0
- brevo/account/types/get_account_response_address.py +43 -0
- brevo/account/types/get_account_response_date_time_preferences.py +38 -0
- brevo/account/types/get_account_response_marketing_automation.py +29 -0
- brevo/account/types/get_account_response_plan_item.py +53 -0
- brevo/account/types/get_account_response_plan_item_type.py +5 -0
- brevo/account/types/get_account_response_plan_verticals_item.py +63 -0
- brevo/account/types/get_account_response_plan_verticals_item_plan_category.py +5 -0
- brevo/account/types/get_account_response_plan_verticals_item_status.py +5 -0
- brevo/account/types/get_account_response_plan_verticals_item_users.py +35 -0
- brevo/account/types/get_account_response_relay.py +34 -0
- brevo/account/types/get_account_response_relay_data.py +40 -0
- brevo/balance/__init__.py +139 -0
- brevo/balance/client.py +2589 -0
- brevo/balance/raw_client.py +4538 -0
- brevo/balance/types/__init__.py +169 -0
- brevo/balance/types/create_balance_limit_request_constraint_type.py +5 -0
- brevo/balance/types/create_balance_limit_request_duration_unit.py +5 -0
- brevo/balance/types/create_balance_limit_request_transaction_type.py +5 -0
- brevo/balance/types/create_balance_order_response.py +96 -0
- brevo/balance/types/get_balance_definition_list_request_sort.py +5 -0
- brevo/balance/types/get_balance_definition_list_request_sort_field.py +5 -0
- brevo/balance/types/get_balance_definition_list_request_version.py +5 -0
- brevo/balance/types/get_balance_definition_list_response.py +24 -0
- brevo/balance/types/get_balance_definition_request_version.py +5 -0
- brevo/balance/types/get_balance_limit_request_version.py +5 -0
- brevo/balance/types/get_contact_balances_response.py +30 -0
- brevo/balance/types/get_contact_balances_response_balances_item.py +33 -0
- brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_request_sort.py +5 -0
- brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_request_sort_field.py +7 -0
- brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response.py +57 -0
- brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item.py +77 -0
- brevo/balance/types/get_subscription_balances_response.py +21 -0
- brevo/balance/types/get_subscription_balances_response_balance_item.py +30 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_availability_duration_modifier.py +7 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_availability_duration_unit.py +7 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_option_amount_overtaking_strategy.py +7 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_option_credit_rounding.py +7 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_option_debit_rounding.py +7 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_unit.py +26 -0
- brevo/balance/types/post_loyalty_balance_programs_pid_subscriptions_cid_balances_response.py +66 -0
- brevo/balance/types/update_balance_definition_request_balance_availability_duration_modifier.py +7 -0
- brevo/balance/types/update_balance_definition_request_balance_availability_duration_unit.py +7 -0
- brevo/balance/types/update_balance_definition_request_balance_option_amount_overtaking_strategy.py +7 -0
- brevo/balance/types/update_balance_definition_request_balance_option_credit_rounding.py +7 -0
- brevo/balance/types/update_balance_definition_request_balance_option_debit_rounding.py +7 -0
- brevo/balance/types/update_balance_definition_request_unit.py +26 -0
- brevo/balance/types/update_balance_limit_request_constraint_type.py +5 -0
- brevo/balance/types/update_balance_limit_request_duration_unit.py +5 -0
- brevo/balance/types/update_balance_limit_request_transaction_type.py +5 -0
- brevo/client.py +773 -0
- brevo/companies/__init__.py +61 -0
- brevo/companies/client.py +994 -0
- brevo/companies/raw_client.py +1285 -0
- brevo/companies/types/__init__.py +59 -0
- brevo/companies/types/get_companies_request_sort.py +5 -0
- brevo/companies/types/get_companies_response.py +28 -0
- brevo/companies/types/get_crm_attributes_companies_response_item.py +40 -0
- brevo/companies/types/post_companies_import_response.py +26 -0
- brevo/companies/types/post_companies_response.py +27 -0
- brevo/companies/types/post_crm_attributes_request_attribute_type.py +7 -0
- brevo/companies/types/post_crm_attributes_request_object_type.py +5 -0
- brevo/companies/types/post_crm_attributes_response.py +23 -0
- brevo/contacts/__init__.py +289 -0
- brevo/contacts/client.py +3298 -0
- brevo/contacts/raw_client.py +4614 -0
- brevo/contacts/types/__init__.py +309 -0
- brevo/contacts/types/add_contact_to_list_request_body.py +11 -0
- brevo/contacts/types/add_contact_to_list_request_body_emails.py +23 -0
- brevo/contacts/types/add_contact_to_list_request_body_ext_ids.py +29 -0
- brevo/contacts/types/add_contact_to_list_request_body_ids.py +23 -0
- brevo/contacts/types/create_attribute_request_attribute_category.py +7 -0
- brevo/contacts/types/create_attribute_request_enumeration_item.py +28 -0
- brevo/contacts/types/create_attribute_request_type.py +7 -0
- brevo/contacts/types/create_contact_request_attributes_value.py +5 -0
- brevo/contacts/types/create_contact_response.py +23 -0
- brevo/contacts/types/create_doi_contact_request_attributes_value.py +5 -0
- brevo/contacts/types/create_folder_response.py +23 -0
- brevo/contacts/types/create_list_response.py +23 -0
- brevo/contacts/types/delete_attribute_request_attribute_category.py +7 -0
- brevo/contacts/types/delete_contact_request_identifier.py +5 -0
- brevo/contacts/types/delete_contact_request_identifier_type.py +7 -0
- brevo/contacts/types/get_attributes_response.py +24 -0
- brevo/contacts/types/get_attributes_response_attributes_item.py +57 -0
- brevo/contacts/types/get_attributes_response_attributes_item_category.py +7 -0
- brevo/contacts/types/get_attributes_response_attributes_item_enumeration_item.py +28 -0
- brevo/contacts/types/get_attributes_response_attributes_item_type.py +7 -0
- brevo/contacts/types/get_contact_info_request_identifier.py +5 -0
- brevo/contacts/types/get_contact_info_request_identifier_type.py +7 -0
- brevo/contacts/types/get_contact_info_response.py +80 -0
- brevo/contacts/types/get_contact_info_response_attributes.py +22 -0
- brevo/contacts/types/get_contact_info_response_statistics.py +86 -0
- brevo/contacts/types/get_contact_info_response_statistics_clicked_item.py +33 -0
- brevo/contacts/types/get_contact_info_response_statistics_clicked_item_links_item.py +40 -0
- brevo/contacts/types/get_contact_info_response_statistics_complaints_item.py +31 -0
- brevo/contacts/types/get_contact_info_response_statistics_delivered_item.py +31 -0
- brevo/contacts/types/get_contact_info_response_statistics_hard_bounces_item.py +31 -0
- brevo/contacts/types/get_contact_info_response_statistics_messages_sent_item.py +31 -0
- brevo/contacts/types/get_contact_info_response_statistics_opened_item.py +40 -0
- brevo/contacts/types/get_contact_info_response_statistics_soft_bounces_item.py +31 -0
- brevo/contacts/types/get_contact_info_response_statistics_transac_attributes_item.py +18 -0
- brevo/contacts/types/get_contact_info_response_statistics_unsubscriptions.py +43 -0
- brevo/contacts/types/get_contact_info_response_statistics_unsubscriptions_admin_unsubscription_item.py +30 -0
- brevo/contacts/types/get_contact_info_response_statistics_unsubscriptions_user_unsubscription_item.py +35 -0
- brevo/contacts/types/get_contact_stats_request_identifier.py +5 -0
- brevo/contacts/types/get_contact_stats_response.py +59 -0
- brevo/contacts/types/get_contact_stats_response_clicked_item.py +28 -0
- brevo/contacts/types/get_contact_stats_response_clicked_item_links_item.py +40 -0
- brevo/contacts/types/get_contact_stats_response_complaints_item.py +31 -0
- brevo/contacts/types/get_contact_stats_response_delivered_item.py +31 -0
- brevo/contacts/types/get_contact_stats_response_hard_bounces_item.py +31 -0
- brevo/contacts/types/get_contact_stats_response_messages_sent_item.py +31 -0
- brevo/contacts/types/get_contact_stats_response_opened_item.py +40 -0
- brevo/contacts/types/get_contact_stats_response_soft_bounces_item.py +31 -0
- brevo/contacts/types/get_contact_stats_response_transac_attributes_item.py +31 -0
- brevo/contacts/types/get_contact_stats_response_unsubscriptions.py +39 -0
- brevo/contacts/types/get_contact_stats_response_unsubscriptions_admin_unsubscription_item.py +30 -0
- brevo/contacts/types/get_contact_stats_response_unsubscriptions_user_unsubscription_item.py +35 -0
- brevo/contacts/types/get_contacts_from_list_request_sort.py +5 -0
- brevo/contacts/types/get_contacts_request_sort.py +5 -0
- brevo/contacts/types/get_folder_lists_request_sort.py +5 -0
- brevo/contacts/types/get_folder_lists_response.py +26 -0
- brevo/contacts/types/get_folders_request_sort.py +5 -0
- brevo/contacts/types/get_folders_response.py +26 -0
- brevo/contacts/types/get_list_response.py +68 -0
- brevo/contacts/types/get_list_response_campaign_stats_item.py +26 -0
- brevo/contacts/types/get_lists_request_sort.py +5 -0
- brevo/contacts/types/get_lists_response.py +29 -0
- brevo/contacts/types/get_lists_response_lists_item.py +49 -0
- brevo/contacts/types/get_segments_request_sort.py +5 -0
- brevo/contacts/types/get_segments_response.py +29 -0
- brevo/contacts/types/get_segments_response_segments_item.py +41 -0
- brevo/contacts/types/import_contacts_request_json_body_item.py +25 -0
- brevo/contacts/types/import_contacts_request_new_list.py +41 -0
- brevo/contacts/types/import_contacts_response.py +26 -0
- brevo/contacts/types/remove_contact_from_list_request_body.py +15 -0
- brevo/contacts/types/remove_contact_from_list_request_body_all.py +29 -0
- brevo/contacts/types/remove_contact_from_list_request_body_emails.py +23 -0
- brevo/contacts/types/remove_contact_from_list_request_body_ext_ids.py +29 -0
- brevo/contacts/types/remove_contact_from_list_request_body_ids.py +23 -0
- brevo/contacts/types/request_contact_export_request_custom_contact_filter.py +90 -0
- brevo/contacts/types/request_contact_export_request_custom_contact_filter_action_for_contacts.py +7 -0
- brevo/contacts/types/request_contact_export_request_custom_contact_filter_action_for_email_campaigns.py +8 -0
- brevo/contacts/types/request_contact_export_request_custom_contact_filter_action_for_sms_campaigns.py +7 -0
- brevo/contacts/types/request_contact_export_response.py +26 -0
- brevo/contacts/types/update_attribute_request_attribute_category.py +7 -0
- brevo/contacts/types/update_attribute_request_enumeration_item.py +28 -0
- brevo/contacts/types/update_batch_contacts_request_contacts_item.py +80 -0
- brevo/contacts/types/update_contact_request_attributes_value.py +5 -0
- brevo/contacts/types/update_contact_request_identifier.py +5 -0
- brevo/contacts/types/update_contact_request_identifier_type.py +7 -0
- brevo/conversations/__init__.py +34 -0
- brevo/conversations/client.py +912 -0
- brevo/conversations/raw_client.py +1328 -0
- brevo/conversations/types/__init__.py +36 -0
- brevo/conversations/types/put_conversations_visitor_group_response.py +31 -0
- brevo/core/__init__.py +125 -0
- brevo/core/api_error.py +23 -0
- brevo/core/client_wrapper.py +100 -0
- brevo/core/datetime_utils.py +28 -0
- brevo/core/file.py +67 -0
- brevo/core/force_multipart.py +18 -0
- brevo/core/http_client.py +776 -0
- brevo/core/http_response.py +59 -0
- brevo/core/http_sse/__init__.py +42 -0
- brevo/core/http_sse/_api.py +112 -0
- brevo/core/http_sse/_decoders.py +61 -0
- brevo/core/http_sse/_exceptions.py +7 -0
- brevo/core/http_sse/_models.py +17 -0
- brevo/core/jsonable_encoder.py +108 -0
- brevo/core/logging.py +107 -0
- brevo/core/pydantic_utilities.py +577 -0
- brevo/core/query_encoder.py +58 -0
- brevo/core/remove_none_from_dict.py +11 -0
- brevo/core/request_options.py +35 -0
- brevo/core/serialization.py +276 -0
- brevo/core/unchecked_base_model.py +376 -0
- brevo/coupons/__init__.py +49 -0
- brevo/coupons/client.py +550 -0
- brevo/coupons/raw_client.py +839 -0
- brevo/coupons/types/__init__.py +47 -0
- brevo/coupons/types/create_coupon_collection_response.py +23 -0
- brevo/coupons/types/get_coupon_collections_request_sort.py +5 -0
- brevo/coupons/types/get_coupon_collections_request_sort_by.py +7 -0
- brevo/coupons/types/update_coupon_collection_response.py +35 -0
- brevo/custom_objects/__init__.py +139 -0
- brevo/custom_objects/client.py +437 -0
- brevo/custom_objects/raw_client.py +711 -0
- brevo/custom_objects/types/__init__.py +177 -0
- brevo/custom_objects/types/batch_delete_object_records_request_identifiers.py +10 -0
- brevo/custom_objects/types/batch_delete_object_records_request_identifiers_ext_ids.py +23 -0
- brevo/custom_objects/types/batch_delete_object_records_request_identifiers_ids.py +23 -0
- brevo/custom_objects/types/batch_delete_object_records_response.py +27 -0
- brevo/custom_objects/types/getrecords_request_association.py +5 -0
- brevo/custom_objects/types/getrecords_request_sort.py +5 -0
- brevo/custom_objects/types/getrecords_response.py +26 -0
- brevo/custom_objects/types/getrecords_response_records_item.py +51 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item.py +10 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_one.py +28 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item.py +15 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item_one.py +28 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item_one_identifiers.py +27 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item_zero.py +28 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item_zero_identifiers.py +27 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero.py +28 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item.py +15 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item_one.py +28 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item_one_identifiers.py +27 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item_zero.py +28 -0
- brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item_zero_identifiers.py +27 -0
- brevo/custom_objects/types/getrecords_response_records_item_identifiers.py +32 -0
- brevo/custom_objects/types/upsertrecords_request_records_item.py +31 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item.py +12 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one.py +28 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item.py +15 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_one.py +20 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero.py +28 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero_identifiers.py +32 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero.py +28 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero_records_item.py +23 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero_records_item_identifiers.py +28 -0
- brevo/custom_objects/types/upsertrecords_request_records_item_identifiers.py +32 -0
- brevo/custom_objects/types/upsertrecords_response.py +29 -0
- brevo/deals/__init__.py +52 -0
- brevo/deals/client.py +1013 -0
- brevo/deals/raw_client.py +1326 -0
- brevo/deals/types/__init__.py +50 -0
- brevo/deals/types/get_crm_attributes_deals_response_item.py +40 -0
- brevo/deals/types/get_crm_deals_request_sort.py +5 -0
- brevo/deals/types/get_crm_deals_response.py +28 -0
- brevo/deals/types/post_crm_deals_import_response.py +26 -0
- brevo/deals/types/post_crm_deals_response.py +27 -0
- brevo/domains/__init__.py +79 -0
- brevo/domains/client.py +506 -0
- brevo/domains/raw_client.py +698 -0
- brevo/domains/types/__init__.py +83 -0
- brevo/domains/types/authenticate_domain_response.py +28 -0
- brevo/domains/types/create_domain_response.py +44 -0
- brevo/domains/types/create_domain_response_dns_records.py +40 -0
- brevo/domains/types/create_domain_response_dns_records_brevo_code.py +42 -0
- brevo/domains/types/create_domain_response_dns_records_dkim_record.py +42 -0
- brevo/domains/types/create_domain_response_dns_records_dmarc_record.py +42 -0
- brevo/domains/types/get_domain_configuration_response.py +41 -0
- brevo/domains/types/get_domain_configuration_response_dns_records.py +44 -0
- brevo/domains/types/get_domain_configuration_response_dns_records_brevo_code.py +42 -0
- brevo/domains/types/get_domain_configuration_response_dns_records_dkim_record.py +42 -0
- brevo/domains/types/get_domain_configuration_response_dns_records_dmarc_record.py +42 -0
- brevo/domains/types/get_domains_response.py +39 -0
- brevo/domains/types/get_domains_response_domains_item.py +56 -0
- brevo/domains/types/get_domains_response_domains_item_creator.py +41 -0
- brevo/ecommerce/__init__.py +112 -0
- brevo/ecommerce/client.py +2176 -0
- brevo/ecommerce/raw_client.py +2895 -0
- brevo/ecommerce/types/__init__.py +124 -0
- brevo/ecommerce/types/create_batch_order_response.py +28 -0
- brevo/ecommerce/types/create_product_alert_request_contact_identifiers.py +33 -0
- brevo/ecommerce/types/create_update_batch_category_request_categories_item.py +48 -0
- brevo/ecommerce/types/create_update_batch_category_response.py +31 -0
- brevo/ecommerce/types/create_update_batch_products_request_products_item.py +89 -0
- brevo/ecommerce/types/create_update_batch_products_request_products_item_meta_info_value.py +5 -0
- brevo/ecommerce/types/create_update_batch_products_response.py +31 -0
- brevo/ecommerce/types/create_update_category_response.py +23 -0
- brevo/ecommerce/types/create_update_product_request_meta_info_value.py +5 -0
- brevo/ecommerce/types/create_update_product_response.py +23 -0
- brevo/ecommerce/types/get_categories_request_sort.py +5 -0
- brevo/ecommerce/types/get_categories_response.py +25 -0
- brevo/ecommerce/types/get_ecommerce_attribution_metrics_conversion_source_conversion_source_id_request_conversion_source.py +7 -0
- brevo/ecommerce/types/get_ecommerce_attribution_metrics_conversion_source_conversion_source_id_response.py +40 -0
- brevo/ecommerce/types/get_ecommerce_attribution_metrics_conversion_source_conversion_source_id_response_conversion_source.py +7 -0
- brevo/ecommerce/types/get_ecommerce_attribution_metrics_response.py +30 -0
- brevo/ecommerce/types/get_ecommerce_attribution_metrics_response_totals.py +32 -0
- brevo/ecommerce/types/get_ecommerce_attribution_products_conversion_source_conversion_source_id_request_conversion_source.py +7 -0
- brevo/ecommerce/types/get_ecommerce_attribution_products_conversion_source_conversion_source_id_response.py +28 -0
- brevo/ecommerce/types/get_ecommerce_attribution_products_conversion_source_conversion_source_id_response_products_item.py +33 -0
- brevo/ecommerce/types/get_ecommerce_config_display_currency_response.py +23 -0
- brevo/ecommerce/types/get_orders_request_sort.py +5 -0
- brevo/ecommerce/types/get_products_request_sort.py +5 -0
- brevo/ecommerce/types/get_products_response.py +26 -0
- brevo/ecommerce/types/set_config_display_currency_response.py +23 -0
- brevo/email_campaigns/__init__.py +139 -0
- brevo/email_campaigns/client.py +1864 -0
- brevo/email_campaigns/raw_client.py +2472 -0
- brevo/email_campaigns/types/__init__.py +141 -0
- brevo/email_campaigns/types/create_email_campaign_request_email_expiration_date.py +33 -0
- brevo/email_campaigns/types/create_email_campaign_request_email_expiration_date_unit.py +5 -0
- brevo/email_campaigns/types/create_email_campaign_request_recipients.py +52 -0
- brevo/email_campaigns/types/create_email_campaign_request_sender.py +37 -0
- brevo/email_campaigns/types/create_email_campaign_request_winner_criteria.py +5 -0
- brevo/email_campaigns/types/create_email_campaign_response.py +23 -0
- brevo/email_campaigns/types/email_export_recipients_request_recipients_type.py +10 -0
- brevo/email_campaigns/types/email_export_recipients_response.py +26 -0
- brevo/email_campaigns/types/get_ab_test_campaign_result_response.py +64 -0
- brevo/email_campaigns/types/get_ab_test_campaign_result_response_clicked_links.py +28 -0
- brevo/email_campaigns/types/get_ab_test_campaign_result_response_statistics.py +32 -0
- brevo/email_campaigns/types/get_ab_test_campaign_result_response_winning_criteria.py +5 -0
- brevo/email_campaigns/types/get_ab_test_campaign_result_response_winning_version.py +7 -0
- brevo/email_campaigns/types/get_email_campaign_request_statistics.py +7 -0
- brevo/email_campaigns/types/get_email_campaign_response.py +234 -0
- brevo/email_campaigns/types/get_email_campaign_response_sender.py +33 -0
- brevo/email_campaigns/types/get_email_campaign_response_status.py +7 -0
- brevo/email_campaigns/types/get_email_campaign_response_type.py +5 -0
- brevo/email_campaigns/types/get_email_campaigns_request_sort.py +5 -0
- brevo/email_campaigns/types/get_email_campaigns_request_statistics.py +7 -0
- brevo/email_campaigns/types/get_email_campaigns_request_status.py +7 -0
- brevo/email_campaigns/types/get_email_campaigns_request_type.py +5 -0
- brevo/email_campaigns/types/get_email_campaigns_response.py +25 -0
- brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item.py +234 -0
- brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_sender.py +33 -0
- brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_status.py +7 -0
- brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_type.py +5 -0
- brevo/email_campaigns/types/get_shared_template_url_response.py +29 -0
- brevo/email_campaigns/types/update_email_campaign_request_email_expiration_date.py +33 -0
- brevo/email_campaigns/types/update_email_campaign_request_email_expiration_date_unit.py +5 -0
- brevo/email_campaigns/types/update_email_campaign_request_recipients.py +53 -0
- brevo/email_campaigns/types/update_email_campaign_request_sender.py +37 -0
- brevo/email_campaigns/types/update_email_campaign_request_winner_criteria.py +5 -0
- brevo/email_campaigns/types/upload_image_to_gallery_response.py +23 -0
- brevo/environment.py +7 -0
- brevo/errors/__init__.py +80 -0
- brevo/errors/bad_request_error.py +10 -0
- brevo/errors/conflict_error.py +11 -0
- brevo/errors/expectation_failed_error.py +11 -0
- brevo/errors/failed_dependency_error.py +10 -0
- brevo/errors/forbidden_error.py +10 -0
- brevo/errors/internal_server_error.py +10 -0
- brevo/errors/method_not_allowed_error.py +11 -0
- brevo/errors/not_found_error.py +10 -0
- brevo/errors/payment_required_error.py +11 -0
- brevo/errors/precondition_failed_error.py +11 -0
- brevo/errors/too_early_error.py +11 -0
- brevo/errors/too_many_requests_error.py +11 -0
- brevo/errors/unauthorized_error.py +10 -0
- brevo/errors/unprocessable_entity_error.py +11 -0
- brevo/errors/unsupported_media_type_error.py +11 -0
- brevo/event/__init__.py +52 -0
- brevo/event/client.py +184 -0
- brevo/event/raw_client.py +230 -0
- brevo/event/types/__init__.py +50 -0
- brevo/event/types/create_event_request_contact_properties_value.py +5 -0
- brevo/event/types/create_event_request_event_properties_value.py +5 -0
- brevo/event/types/create_event_request_identifiers.py +52 -0
- brevo/event/types/create_event_request_object.py +33 -0
- brevo/event/types/create_event_request_object_identifiers.py +32 -0
- brevo/external_feeds/__init__.py +79 -0
- brevo/external_feeds/client.py +915 -0
- brevo/external_feeds/raw_client.py +1087 -0
- brevo/external_feeds/types/__init__.py +77 -0
- brevo/external_feeds/types/create_external_feed_request_auth_type.py +5 -0
- brevo/external_feeds/types/create_external_feed_request_headers_item.py +28 -0
- brevo/external_feeds/types/create_external_feed_response.py +23 -0
- brevo/external_feeds/types/get_all_external_feeds_request_auth_type.py +5 -0
- brevo/external_feeds/types/get_all_external_feeds_request_sort.py +5 -0
- brevo/external_feeds/types/get_all_external_feeds_response.py +29 -0
- brevo/external_feeds/types/get_all_external_feeds_response_feeds_item.py +96 -0
- brevo/external_feeds/types/get_all_external_feeds_response_feeds_item_auth_type.py +5 -0
- brevo/external_feeds/types/get_all_external_feeds_response_feeds_item_headers_item.py +28 -0
- brevo/external_feeds/types/get_external_feed_by_uuid_response.py +105 -0
- brevo/external_feeds/types/get_external_feed_by_uuid_response_auth_type.py +5 -0
- brevo/external_feeds/types/get_external_feed_by_uuid_response_headers_item.py +28 -0
- brevo/external_feeds/types/update_external_feed_request_auth_type.py +5 -0
- brevo/external_feeds/types/update_external_feed_request_headers_item.py +28 -0
- brevo/files/__init__.py +38 -0
- brevo/files/client.py +479 -0
- brevo/files/raw_client.py +675 -0
- brevo/files/types/__init__.py +40 -0
- brevo/files/types/get_crm_files_id_response.py +30 -0
- brevo/files/types/get_crm_files_request_entity.py +5 -0
- brevo/files/types/get_crm_files_request_sort.py +5 -0
- brevo/inbound_parsing/__init__.py +58 -0
- brevo/inbound_parsing/client.py +323 -0
- brevo/inbound_parsing/raw_client.py +420 -0
- brevo/inbound_parsing/types/__init__.py +60 -0
- brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response.py +72 -0
- brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response_attachments_item.py +40 -0
- brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response_logs_item.py +30 -0
- brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response_logs_item_type.py +7 -0
- brevo/inbound_parsing/types/get_inbound_email_events_request_sort.py +5 -0
- brevo/inbound_parsing/types/get_inbound_email_events_response.py +21 -0
- brevo/inbound_parsing/types/get_inbound_email_events_response_events_item.py +42 -0
- brevo/master_account/__init__.py +202 -0
- brevo/master_account/client.py +2757 -0
- brevo/master_account/raw_client.py +3351 -0
- brevo/master_account/types/__init__.py +244 -0
- brevo/master_account/types/get_corporate_group_id_response.py +31 -0
- brevo/master_account/types/get_corporate_group_id_response_group.py +35 -0
- brevo/master_account/types/get_corporate_group_id_response_sub_accounts_item.py +35 -0
- brevo/master_account/types/get_corporate_group_id_response_users_item.py +36 -0
- brevo/master_account/types/get_corporate_invited_users_list_response.py +24 -0
- brevo/master_account/types/get_corporate_invited_users_list_response_users_item.py +50 -0
- brevo/master_account/types/get_corporate_invited_users_list_response_users_item_feature_access.py +69 -0
- brevo/master_account/types/get_corporate_invited_users_list_response_users_item_groups.py +32 -0
- brevo/master_account/types/get_corporate_ip_response_item.py +22 -0
- brevo/master_account/types/get_corporate_master_account_response.py +57 -0
- brevo/master_account/types/get_corporate_master_account_response_billing_info.py +48 -0
- brevo/master_account/types/get_corporate_master_account_response_billing_info_address.py +50 -0
- brevo/master_account/types/get_corporate_master_account_response_billing_info_name.py +35 -0
- brevo/master_account/types/get_corporate_master_account_response_plan_info.py +63 -0
- brevo/master_account/types/get_corporate_master_account_response_plan_info_features_item.py +62 -0
- brevo/master_account/types/get_corporate_master_account_response_plan_info_plan_period.py +5 -0
- brevo/master_account/types/get_corporate_sub_account_id_response.py +48 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_groups_item.py +28 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info.py +42 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits.py +65 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_emails.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_external_feeds.py +33 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_sms.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_whatsapp.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_wp_subscribers.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features.py +58 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features_inbox.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features_landing_page.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features_sales_users.py +33 -0
- brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features_users.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_response.py +32 -0
- brevo/master_account/types/get_corporate_sub_account_response_sub_accounts_item.py +48 -0
- brevo/master_account/types/get_corporate_sub_account_response_sub_accounts_item_groups_item.py +28 -0
- brevo/master_account/types/get_corporate_user_permission_response.py +40 -0
- brevo/master_account/types/get_corporate_user_permission_response_feature_access.py +62 -0
- brevo/master_account/types/get_corporate_user_permission_response_groups_item.py +32 -0
- brevo/master_account/types/get_sub_account_groups_response_item.py +30 -0
- brevo/master_account/types/invite_admin_user_request_privileges_item.py +38 -0
- brevo/master_account/types/invite_admin_user_request_privileges_item_feature.py +18 -0
- brevo/master_account/types/invite_admin_user_request_privileges_item_permissions_item.py +7 -0
- brevo/master_account/types/invite_admin_user_response.py +20 -0
- brevo/master_account/types/post_corporate_group_response.py +20 -0
- brevo/master_account/types/post_corporate_sub_account_key_response.py +28 -0
- brevo/master_account/types/post_corporate_sub_account_request_language.py +5 -0
- brevo/master_account/types/post_corporate_sub_account_response.py +23 -0
- brevo/master_account/types/post_corporate_sub_account_sso_token_request_target.py +17 -0
- brevo/master_account/types/put_corporate_sub_account_id_plan_request_credits.py +59 -0
- brevo/master_account/types/put_corporate_sub_account_id_plan_request_features.py +44 -0
- brevo/master_account/types/put_corporate_sub_accounts_plan_request_credits.py +59 -0
- brevo/master_account/types/put_corporate_sub_accounts_plan_request_features.py +39 -0
- brevo/master_account/types/put_corporate_user_email_permissions_request_privileges_item.py +42 -0
- brevo/master_account/types/put_corporate_user_email_permissions_request_privileges_item_feature.py +18 -0
- brevo/master_account/types/put_corporate_user_email_permissions_request_privileges_item_permissions_item.py +10 -0
- brevo/master_account/types/put_corporate_user_invitation_action_email_request_action.py +5 -0
- brevo/master_account/types/put_corporate_user_invitation_action_email_response.py +23 -0
- brevo/notes/__init__.py +38 -0
- brevo/notes/client.py +548 -0
- brevo/notes/raw_client.py +766 -0
- brevo/notes/types/__init__.py +40 -0
- brevo/notes/types/get_crm_notes_request_entity.py +5 -0
- brevo/notes/types/get_crm_notes_request_sort.py +5 -0
- brevo/notes/types/post_crm_notes_response.py +27 -0
- brevo/payments/__init__.py +38 -0
- brevo/payments/client.py +315 -0
- brevo/payments/raw_client.py +532 -0
- brevo/payments/types/__init__.py +40 -0
- brevo/payments/types/create_payment_request_response.py +28 -0
- brevo/payments/types/get_payment_request_response.py +47 -0
- brevo/payments/types/get_payment_request_response_status.py +5 -0
- brevo/process/__init__.py +79 -0
- brevo/process/client.py +304 -0
- brevo/process/raw_client.py +372 -0
- brevo/process/types/__init__.py +77 -0
- brevo/process/types/get_process_response.py +62 -0
- brevo/process/types/get_process_response_info.py +36 -0
- brevo/process/types/get_process_response_info_export.py +32 -0
- brevo/process/types/get_process_response_info_import.py +57 -0
- brevo/process/types/get_process_response_name.py +16 -0
- brevo/process/types/get_process_response_status.py +7 -0
- brevo/process/types/get_processes_request_sort.py +5 -0
- brevo/process/types/get_processes_response.py +29 -0
- brevo/process/types/get_processes_response_processes_item.py +62 -0
- brevo/process/types/get_processes_response_processes_item_info.py +36 -0
- brevo/process/types/get_processes_response_processes_item_info_export.py +32 -0
- brevo/process/types/get_processes_response_processes_item_info_import.py +57 -0
- brevo/process/types/get_processes_response_processes_item_name.py +16 -0
- brevo/process/types/get_processes_response_processes_item_status.py +7 -0
- brevo/program/__init__.py +67 -0
- brevo/program/client.py +1128 -0
- brevo/program/raw_client.py +2526 -0
- brevo/program/types/__init__.py +67 -0
- brevo/program/types/get_lp_list_request_sort_field.py +5 -0
- brevo/program/types/get_lp_list_response.py +24 -0
- brevo/program/types/get_parameter_subscription_info_response.py +44 -0
- brevo/program/types/get_parameter_subscription_info_response_balance.py +41 -0
- brevo/program/types/get_parameter_subscription_info_response_balance_balances_item.py +30 -0
- brevo/program/types/get_parameter_subscription_info_response_members_item.py +36 -0
- brevo/program/types/get_parameter_subscription_info_response_reward_item.py +66 -0
- brevo/program/types/get_parameter_subscription_info_response_tier_item.py +56 -0
- brevo/program/types/subscribe_member_to_a_subscription_response.py +46 -0
- brevo/program/types/subscribe_to_loyalty_program_response.py +56 -0
- brevo/py.typed +0 -0
- brevo/reward/__init__.py +115 -0
- brevo/reward/client.py +1285 -0
- brevo/reward/raw_client.py +2564 -0
- brevo/reward/types/__init__.py +139 -0
- brevo/reward/types/create_reward_response.py +64 -0
- brevo/reward/types/create_voucher_response.py +76 -0
- brevo/reward/types/get_code_count_response.py +23 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_offers_request_version.py +5 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_offers_response.py +34 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_offers_response_items_item.py +67 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_request_version.py +5 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response.py +269 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_expiration_modifier.py +7 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_generator.py +52 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_limits_item.py +68 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_products_item.py +40 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_reward_configs.py +33 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_rule.py +101 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_rule_event.py +28 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_rule_results_item.py +43 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_rule_results_item_parameters_item.py +37 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_request_sort.py +5 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_request_sort_field.py +5 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_response.py +49 -0
- brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_response_contact_rewards_item.py +70 -0
- brevo/reward/types/redeem_voucher_request_order.py +85 -0
- brevo/reward/types/redeem_voucher_request_order_billing.py +55 -0
- brevo/reward/types/redeem_voucher_request_order_identifiers.py +28 -0
- brevo/reward/types/redeem_voucher_request_order_products_item.py +46 -0
- brevo/reward/types/validate_reward_response.py +23 -0
- brevo/senders/__init__.py +67 -0
- brevo/senders/client.py +808 -0
- brevo/senders/raw_client.py +1089 -0
- brevo/senders/types/__init__.py +65 -0
- brevo/senders/types/create_sender_request_ips_item.py +36 -0
- brevo/senders/types/create_sender_response.py +42 -0
- brevo/senders/types/get_ips_from_sender_response.py +25 -0
- brevo/senders/types/get_ips_from_sender_response_ips_item.py +38 -0
- brevo/senders/types/get_ips_response.py +25 -0
- brevo/senders/types/get_ips_response_ips_item.py +38 -0
- brevo/senders/types/get_senders_response.py +24 -0
- brevo/senders/types/get_senders_response_senders_item.py +46 -0
- brevo/senders/types/get_senders_response_senders_item_ips_item.py +33 -0
- brevo/senders/types/update_sender_request_ips_item.py +36 -0
- brevo/sms_campaigns/__init__.py +73 -0
- brevo/sms_campaigns/client.py +1078 -0
- brevo/sms_campaigns/raw_client.py +1501 -0
- brevo/sms_campaigns/types/__init__.py +71 -0
- brevo/sms_campaigns/types/create_sms_campaign_request_recipients.py +33 -0
- brevo/sms_campaigns/types/create_sms_campaign_response.py +23 -0
- brevo/sms_campaigns/types/get_sms_campaign_response.py +74 -0
- brevo/sms_campaigns/types/get_sms_campaign_response_status.py +7 -0
- brevo/sms_campaigns/types/get_sms_campaigns_request_sort.py +5 -0
- brevo/sms_campaigns/types/get_sms_campaigns_request_status.py +7 -0
- brevo/sms_campaigns/types/get_sms_campaigns_response.py +25 -0
- brevo/sms_campaigns/types/get_sms_campaigns_response_campaigns_item.py +74 -0
- brevo/sms_campaigns/types/get_sms_campaigns_response_campaigns_item_status.py +7 -0
- brevo/sms_campaigns/types/request_sms_recipient_export_request_recipients_type.py +7 -0
- brevo/sms_campaigns/types/request_sms_recipient_export_response.py +26 -0
- brevo/sms_campaigns/types/update_sms_campaign_request_recipients.py +33 -0
- brevo/sms_templates/__init__.py +49 -0
- brevo/sms_templates/client.py +133 -0
- brevo/sms_templates/raw_client.py +151 -0
- brevo/sms_templates/types/__init__.py +47 -0
- brevo/sms_templates/types/get_sms_templates_request_sort.py +5 -0
- brevo/sms_templates/types/get_sms_templates_response.py +26 -0
- brevo/sms_templates/types/get_sms_templates_response_templates_item.py +86 -0
- brevo/sms_templates/types/get_sms_templates_response_templates_item_compliance.py +37 -0
- brevo/tasks/__init__.py +55 -0
- brevo/tasks/client.py +814 -0
- brevo/tasks/raw_client.py +992 -0
- brevo/tasks/types/__init__.py +53 -0
- brevo/tasks/types/get_crm_tasks_request_filter_date.py +5 -0
- brevo/tasks/types/get_crm_tasks_request_filter_status.py +5 -0
- brevo/tasks/types/get_crm_tasks_request_sort.py +5 -0
- brevo/tasks/types/get_crm_tasks_response.py +28 -0
- brevo/tasks/types/get_crm_tasktypes_response.py +32 -0
- brevo/tasks/types/post_crm_tasks_response.py +27 -0
- brevo/tier/__init__.py +79 -0
- brevo/tier/client.py +1144 -0
- brevo/tier/raw_client.py +2360 -0
- brevo/tier/types/__init__.py +79 -0
- brevo/tier/types/add_subscription_to_tier_response.py +53 -0
- brevo/tier/types/create_tier_for_tier_group_request_access_conditions_item.py +31 -0
- brevo/tier/types/create_tier_for_tier_group_request_tier_rewards_item.py +26 -0
- brevo/tier/types/create_tier_group_request_downgrade_strategy.py +7 -0
- brevo/tier/types/create_tier_group_request_upgrade_strategy.py +7 -0
- brevo/tier/types/get_list_of_tier_groups_request_version.py +5 -0
- brevo/tier/types/get_list_of_tier_groups_response.py +21 -0
- brevo/tier/types/get_loyalty_program_tier_request_version.py +5 -0
- brevo/tier/types/get_loyalty_program_tier_response.py +21 -0
- brevo/tier/types/get_tier_group_request_version.py +5 -0
- brevo/tier/types/update_tier_group_request_downgrade_strategy.py +7 -0
- brevo/tier/types/update_tier_group_request_upgrade_strategy.py +7 -0
- brevo/tier/types/update_tier_request_access_conditions_item.py +31 -0
- brevo/tier/types/update_tier_request_tier_rewards_item.py +26 -0
- brevo/transactional_emails/__init__.py +175 -0
- brevo/transactional_emails/client.py +2544 -0
- brevo/transactional_emails/raw_client.py +3240 -0
- brevo/transactional_emails/types/__init__.py +189 -0
- brevo/transactional_emails/types/create_smtp_template_request_sender.py +37 -0
- brevo/transactional_emails/types/create_smtp_template_response.py +23 -0
- brevo/transactional_emails/types/get_aggregated_smtp_report_response.py +85 -0
- brevo/transactional_emails/types/get_blocked_domains_response.py +23 -0
- brevo/transactional_emails/types/get_email_event_report_request_event.py +23 -0
- brevo/transactional_emails/types/get_email_event_report_request_sort.py +5 -0
- brevo/transactional_emails/types/get_email_event_report_response.py +21 -0
- brevo/transactional_emails/types/get_email_event_report_response_events_item.py +79 -0
- brevo/transactional_emails/types/get_email_event_report_response_events_item_event.py +23 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_request_sort.py +5 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_request_status.py +5 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_response.py +10 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_response_batches.py +25 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_response_batches_batches_item.py +39 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_response_batches_batches_item_status.py +7 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_response_created_at.py +37 -0
- brevo/transactional_emails/types/get_scheduled_email_by_id_response_created_at_status.py +7 -0
- brevo/transactional_emails/types/get_smtp_report_request_sort.py +5 -0
- brevo/transactional_emails/types/get_smtp_report_response.py +21 -0
- brevo/transactional_emails/types/get_smtp_report_response_reports_item.py +86 -0
- brevo/transactional_emails/types/get_smtp_templates_request_sort.py +5 -0
- brevo/transactional_emails/types/get_smtp_templates_response.py +26 -0
- brevo/transactional_emails/types/get_transac_blocked_contacts_request_sort.py +5 -0
- brevo/transactional_emails/types/get_transac_blocked_contacts_response.py +25 -0
- brevo/transactional_emails/types/get_transac_blocked_contacts_response_contacts_item.py +44 -0
- brevo/transactional_emails/types/get_transac_blocked_contacts_response_contacts_item_reason.py +35 -0
- brevo/transactional_emails/types/get_transac_blocked_contacts_response_contacts_item_reason_code.py +15 -0
- brevo/transactional_emails/types/get_transac_email_content_response.py +57 -0
- brevo/transactional_emails/types/get_transac_email_content_response_events_item.py +28 -0
- brevo/transactional_emails/types/get_transac_emails_list_request_sort.py +5 -0
- brevo/transactional_emails/types/get_transac_emails_list_response.py +34 -0
- brevo/transactional_emails/types/get_transac_emails_list_response_transactional_emails_item.py +61 -0
- brevo/transactional_emails/types/post_preview_smtp_email_templates_response.py +49 -0
- brevo/transactional_emails/types/send_transac_email_request_attachment_item.py +33 -0
- brevo/transactional_emails/types/send_transac_email_request_bcc_item.py +28 -0
- brevo/transactional_emails/types/send_transac_email_request_cc_item.py +28 -0
- brevo/transactional_emails/types/send_transac_email_request_message_versions_item.py +73 -0
- brevo/transactional_emails/types/send_transac_email_request_message_versions_item_bcc_item.py +28 -0
- brevo/transactional_emails/types/send_transac_email_request_message_versions_item_cc_item.py +28 -0
- brevo/transactional_emails/types/send_transac_email_request_message_versions_item_reply_to.py +32 -0
- brevo/transactional_emails/types/send_transac_email_request_message_versions_item_to_item.py +28 -0
- brevo/transactional_emails/types/send_transac_email_request_reply_to.py +32 -0
- brevo/transactional_emails/types/send_transac_email_request_sender.py +37 -0
- brevo/transactional_emails/types/send_transac_email_request_to_item.py +28 -0
- brevo/transactional_emails/types/send_transac_email_response.py +29 -0
- brevo/transactional_emails/types/update_smtp_template_request_sender.py +37 -0
- brevo/transactional_sms/__init__.py +70 -0
- brevo/transactional_sms/client.py +726 -0
- brevo/transactional_sms/raw_client.py +913 -0
- brevo/transactional_sms/types/__init__.py +68 -0
- brevo/transactional_sms/types/get_sms_events_request_event.py +20 -0
- brevo/transactional_sms/types/get_sms_events_request_sort.py +5 -0
- brevo/transactional_sms/types/get_sms_events_response.py +21 -0
- brevo/transactional_sms/types/get_sms_events_response_events_item.py +52 -0
- brevo/transactional_sms/types/get_sms_events_response_events_item_event.py +20 -0
- brevo/transactional_sms/types/get_transac_aggregated_sms_report_response.py +75 -0
- brevo/transactional_sms/types/get_transac_sms_report_request_sort.py +5 -0
- brevo/transactional_sms/types/get_transac_sms_report_response.py +21 -0
- brevo/transactional_sms/types/get_transac_sms_report_response_reports_item.py +76 -0
- brevo/transactional_sms/types/send_async_transactional_sms_response.py +22 -0
- brevo/transactional_sms/types/send_transac_sms_response.py +38 -0
- brevo/transactional_whats_app/__init__.py +64 -0
- brevo/transactional_whats_app/client.py +283 -0
- brevo/transactional_whats_app/raw_client.py +326 -0
- brevo/transactional_whats_app/types/__init__.py +62 -0
- brevo/transactional_whats_app/types/get_whatsapp_event_report_request_event.py +7 -0
- brevo/transactional_whats_app/types/get_whatsapp_event_report_request_sort.py +5 -0
- brevo/transactional_whats_app/types/get_whatsapp_event_report_response.py +21 -0
- brevo/transactional_whats_app/types/get_whatsapp_event_report_response_events_item.py +65 -0
- brevo/transactional_whats_app/types/get_whatsapp_event_report_response_events_item_event.py +7 -0
- brevo/transactional_whats_app/types/send_whatsapp_message_request.py +8 -0
- brevo/transactional_whats_app/types/send_whatsapp_message_request_params.py +41 -0
- brevo/transactional_whats_app/types/send_whatsapp_message_request_text.py +35 -0
- brevo/transactional_whats_app/types/send_whatsapp_message_response.py +26 -0
- brevo/types/__init__.py +373 -0
- brevo/types/ab_test_version_clicks.py +7 -0
- brevo/types/ab_test_version_clicks_item.py +35 -0
- brevo/types/ab_test_version_stats.py +35 -0
- brevo/types/bad_request_error_body.py +29 -0
- brevo/types/bad_request_error_body_code.py +45 -0
- brevo/types/balance_definition.py +139 -0
- brevo/types/balance_definition_balance_availability_duration_modifier.py +7 -0
- brevo/types/balance_limit.py +78 -0
- brevo/types/cart.py +38 -0
- brevo/types/company.py +45 -0
- brevo/types/configuration.py +30 -0
- brevo/types/contact_error_model.py +34 -0
- brevo/types/contact_error_model_code.py +16 -0
- brevo/types/conversations_message.py +187 -0
- brevo/types/conversations_message_attachments_item.py +50 -0
- brevo/types/conversations_message_bcc_item.py +21 -0
- brevo/types/conversations_message_cc_item.py +21 -0
- brevo/types/conversations_message_file.py +46 -0
- brevo/types/conversations_message_file_image_info.py +39 -0
- brevo/types/conversations_message_forwarded_to_source_status.py +29 -0
- brevo/types/conversations_message_from.py +25 -0
- brevo/types/conversations_message_reply_to.py +25 -0
- brevo/types/conversations_message_to_item.py +21 -0
- brevo/types/conversations_message_type.py +5 -0
- brevo/types/conversion_source_metrics.py +35 -0
- brevo/types/conversion_source_metrics_conversion_source.py +7 -0
- brevo/types/create_update_folder.py +23 -0
- brevo/types/deal.py +45 -0
- brevo/types/error_model.py +28 -0
- brevo/types/file_data.py +60 -0
- brevo/types/forbidden_error_body.py +29 -0
- brevo/types/forbidden_error_body_code.py +45 -0
- brevo/types/get_campaign_recipients.py +25 -0
- brevo/types/get_campaign_stats.py +130 -0
- brevo/types/get_category_details.py +54 -0
- brevo/types/get_contact_details.py +75 -0
- brevo/types/get_contact_details_attributes.py +22 -0
- brevo/types/get_contacts.py +25 -0
- brevo/types/get_coupon_collection.py +75 -0
- brevo/types/get_device_browser_stats.py +44 -0
- brevo/types/get_extended_campaign_overview.py +230 -0
- brevo/types/get_extended_campaign_overview_sender.py +33 -0
- brevo/types/get_extended_campaign_overview_status.py +7 -0
- brevo/types/get_extended_campaign_overview_type.py +5 -0
- brevo/types/get_extended_campaign_stats.py +63 -0
- brevo/types/get_extended_campaign_stats_links_stats.py +22 -0
- brevo/types/get_extended_campaign_stats_stats_by_device.py +39 -0
- brevo/types/get_folder.py +46 -0
- brevo/types/get_list.py +46 -0
- brevo/types/get_product_details.py +115 -0
- brevo/types/get_sms_campaign_overview.py +69 -0
- brevo/types/get_sms_campaign_overview_status.py +7 -0
- brevo/types/get_sms_campaign_stats.py +55 -0
- brevo/types/get_smtp_template_overview.py +93 -0
- brevo/types/get_smtp_template_overview_sender.py +33 -0
- brevo/types/get_sso_token.py +23 -0
- brevo/types/get_webhook.py +74 -0
- brevo/types/get_webhook_channel.py +5 -0
- brevo/types/get_webhook_type.py +5 -0
- brevo/types/inviteuser.py +31 -0
- brevo/types/inviteuser_privileges_item.py +34 -0
- brevo/types/inviteuser_privileges_item_feature.py +24 -0
- brevo/types/inviteuser_privileges_item_permissions_item.py +39 -0
- brevo/types/loyalty_program.py +82 -0
- brevo/types/loyalty_program_state.py +5 -0
- brevo/types/node_response.py +63 -0
- brevo/types/not_found_error_body.py +29 -0
- brevo/types/not_found_error_body_code.py +45 -0
- brevo/types/note.py +61 -0
- brevo/types/note_data.py +44 -0
- brevo/types/notification.py +32 -0
- brevo/types/order.py +85 -0
- brevo/types/order_billing.py +66 -0
- brevo/types/order_identifiers.py +42 -0
- brevo/types/order_meta_info_value.py +5 -0
- brevo/types/order_products_item.py +43 -0
- brevo/types/pipeline.py +38 -0
- brevo/types/pipeline_stages_item.py +32 -0
- brevo/types/pipelines.py +7 -0
- brevo/types/post_contact_info.py +21 -0
- brevo/types/post_contact_info_contacts.py +37 -0
- brevo/types/post_contact_info_contacts_failure.py +5 -0
- brevo/types/post_contact_info_contacts_success.py +5 -0
- brevo/types/post_send_failed.py +46 -0
- brevo/types/redeem.py +92 -0
- brevo/types/rule_condition_response.py +52 -0
- brevo/types/send_report.py +30 -0
- brevo/types/send_report_email.py +32 -0
- brevo/types/send_report_language.py +5 -0
- brevo/types/send_test_email.py +29 -0
- brevo/types/send_transac_sms.py +66 -0
- brevo/types/send_transac_sms_tag.py +28 -0
- brevo/types/send_transac_sms_tag_field.py +5 -0
- brevo/types/send_transac_sms_type.py +5 -0
- brevo/types/task.py +55 -0
- brevo/types/task_reminder.py +39 -0
- brevo/types/task_reminder_types_item.py +5 -0
- brevo/types/task_reminder_unit.py +5 -0
- brevo/types/tier.py +63 -0
- brevo/types/tier_access_conditions_item.py +38 -0
- brevo/types/tier_group.py +70 -0
- brevo/types/tier_group_downgrade_strategy.py +7 -0
- brevo/types/tier_group_upgrade_strategy.py +7 -0
- brevo/types/tier_tier_rewards_item.py +33 -0
- brevo/types/transaction.py +110 -0
- brevo/types/unauthorized_error_body.py +29 -0
- brevo/types/unauthorized_error_body_code.py +45 -0
- brevo/types/update_campaign_status.py +28 -0
- brevo/types/update_campaign_status_status.py +8 -0
- brevo/types/value_response.py +67 -0
- brevo/types/variables_items.py +22 -0
- brevo/types/whatsapp_camp_stats.py +26 -0
- brevo/user/__init__.py +67 -0
- brevo/user/client.py +806 -0
- brevo/user/raw_client.py +977 -0
- brevo/user/types/__init__.py +67 -0
- brevo/user/types/edit_user_permission_response.py +33 -0
- brevo/user/types/get_invited_users_list_response.py +24 -0
- brevo/user/types/get_invited_users_list_response_users_item.py +39 -0
- brevo/user/types/get_invited_users_list_response_users_item_feature_access.py +37 -0
- brevo/user/types/get_user_permission_response.py +38 -0
- brevo/user/types/get_user_permission_response_privileges_item.py +21 -0
- brevo/user/types/inviteuser_response.py +28 -0
- brevo/user/types/put_revoke_user_permission_response.py +28 -0
- brevo/user/types/putresendcancelinvitation_request_action.py +5 -0
- brevo/user/types/putresendcancelinvitation_response.py +28 -0
- brevo/version.py +3 -0
- brevo/webhooks/__init__.py +82 -0
- brevo/webhooks/client.py +982 -0
- brevo/webhooks/raw_client.py +1211 -0
- brevo/webhooks/types/__init__.py +80 -0
- brevo/webhooks/types/create_webhook_request_auth.py +32 -0
- brevo/webhooks/types/create_webhook_request_channel.py +5 -0
- brevo/webhooks/types/create_webhook_request_events_item.py +26 -0
- brevo/webhooks/types/create_webhook_request_headers_item.py +28 -0
- brevo/webhooks/types/create_webhook_request_type.py +5 -0
- brevo/webhooks/types/create_webhook_response.py +23 -0
- brevo/webhooks/types/export_webhooks_history_request_event.py +26 -0
- brevo/webhooks/types/export_webhooks_history_request_type.py +5 -0
- brevo/webhooks/types/export_webhooks_history_response.py +26 -0
- brevo/webhooks/types/get_webhooks_request_sort.py +5 -0
- brevo/webhooks/types/get_webhooks_request_type.py +5 -0
- brevo/webhooks/types/get_webhooks_response.py +21 -0
- brevo/webhooks/types/update_webhook_request_auth.py +32 -0
- brevo/webhooks/types/update_webhook_request_events_item.py +26 -0
- brevo/webhooks/types/update_webhook_request_headers_item.py +28 -0
- brevo/whats_app_campaigns/__init__.py +106 -0
- brevo/whats_app_campaigns/client.py +1064 -0
- brevo/whats_app_campaigns/raw_client.py +1311 -0
- brevo/whats_app_campaigns/types/__init__.py +110 -0
- brevo/whats_app_campaigns/types/create_whats_app_campaign_request_recipients.py +41 -0
- brevo/whats_app_campaigns/types/create_whats_app_campaign_response.py +23 -0
- brevo/whats_app_campaigns/types/create_whats_app_template_request_category.py +5 -0
- brevo/whats_app_campaigns/types/create_whats_app_template_request_source.py +5 -0
- brevo/whats_app_campaigns/types/create_whats_app_template_response.py +23 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaign_response.py +69 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaign_response_campaign_status.py +7 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaign_response_template.py +61 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaign_response_template_components_item.py +21 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaigns_request_sort.py +5 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaigns_response.py +25 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaigns_response_campaigns_item.py +84 -0
- brevo/whats_app_campaigns/types/get_whats_app_campaigns_response_campaigns_item_campaign_status.py +7 -0
- brevo/whats_app_campaigns/types/get_whats_app_config_response.py +63 -0
- brevo/whats_app_campaigns/types/get_whats_app_config_response_phone_number_name_status.py +7 -0
- brevo/whats_app_campaigns/types/get_whats_app_config_response_phone_number_quality.py +5 -0
- brevo/whats_app_campaigns/types/get_whats_app_config_response_whatsapp_business_account_status.py +7 -0
- brevo/whats_app_campaigns/types/get_whats_app_templates_request_sort.py +5 -0
- brevo/whats_app_campaigns/types/get_whats_app_templates_request_source.py +5 -0
- brevo/whats_app_campaigns/types/get_whats_app_templates_response.py +26 -0
- brevo/whats_app_campaigns/types/get_whats_app_templates_response_templates_item.py +65 -0
- brevo/whats_app_campaigns/types/update_whats_app_campaign_request_campaign_status.py +5 -0
- brevo/whats_app_campaigns/types/update_whats_app_campaign_request_recipients.py +41 -0
- brevo_python-4.0.1.dist-info/METADATA +1072 -0
- brevo_python-4.0.1.dist-info/RECORD +843 -0
- brevo_python-4.0.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,1064 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from .raw_client import AsyncRawWhatsAppCampaignsClient, RawWhatsAppCampaignsClient
|
|
8
|
+
from .types.create_whats_app_campaign_request_recipients import CreateWhatsAppCampaignRequestRecipients
|
|
9
|
+
from .types.create_whats_app_campaign_response import CreateWhatsAppCampaignResponse
|
|
10
|
+
from .types.create_whats_app_template_request_category import CreateWhatsAppTemplateRequestCategory
|
|
11
|
+
from .types.create_whats_app_template_request_source import CreateWhatsAppTemplateRequestSource
|
|
12
|
+
from .types.create_whats_app_template_response import CreateWhatsAppTemplateResponse
|
|
13
|
+
from .types.get_whats_app_campaign_response import GetWhatsAppCampaignResponse
|
|
14
|
+
from .types.get_whats_app_campaigns_request_sort import GetWhatsAppCampaignsRequestSort
|
|
15
|
+
from .types.get_whats_app_campaigns_response import GetWhatsAppCampaignsResponse
|
|
16
|
+
from .types.get_whats_app_config_response import GetWhatsAppConfigResponse
|
|
17
|
+
from .types.get_whats_app_templates_request_sort import GetWhatsAppTemplatesRequestSort
|
|
18
|
+
from .types.get_whats_app_templates_request_source import GetWhatsAppTemplatesRequestSource
|
|
19
|
+
from .types.get_whats_app_templates_response import GetWhatsAppTemplatesResponse
|
|
20
|
+
from .types.update_whats_app_campaign_request_campaign_status import UpdateWhatsAppCampaignRequestCampaignStatus
|
|
21
|
+
from .types.update_whats_app_campaign_request_recipients import UpdateWhatsAppCampaignRequestRecipients
|
|
22
|
+
|
|
23
|
+
# this is used as the default value for optional parameters
|
|
24
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class WhatsAppCampaignsClient:
|
|
28
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
29
|
+
self._raw_client = RawWhatsAppCampaignsClient(client_wrapper=client_wrapper)
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def with_raw_response(self) -> RawWhatsAppCampaignsClient:
|
|
33
|
+
"""
|
|
34
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
35
|
+
|
|
36
|
+
Returns
|
|
37
|
+
-------
|
|
38
|
+
RawWhatsAppCampaignsClient
|
|
39
|
+
"""
|
|
40
|
+
return self._raw_client
|
|
41
|
+
|
|
42
|
+
def get_whats_app_campaigns(
|
|
43
|
+
self,
|
|
44
|
+
*,
|
|
45
|
+
start_date: typing.Optional[str] = None,
|
|
46
|
+
end_date: typing.Optional[str] = None,
|
|
47
|
+
limit: typing.Optional[int] = None,
|
|
48
|
+
offset: typing.Optional[int] = None,
|
|
49
|
+
sort: typing.Optional[GetWhatsAppCampaignsRequestSort] = None,
|
|
50
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
51
|
+
) -> GetWhatsAppCampaignsResponse:
|
|
52
|
+
"""
|
|
53
|
+
Parameters
|
|
54
|
+
----------
|
|
55
|
+
start_date : typing.Optional[str]
|
|
56
|
+
**Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. **Prefer to pass your timezone in date-time format for accurate result**
|
|
57
|
+
|
|
58
|
+
end_date : typing.Optional[str]
|
|
59
|
+
**Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. **Prefer to pass your timezone in date-time format for accurate result**
|
|
60
|
+
|
|
61
|
+
limit : typing.Optional[int]
|
|
62
|
+
Number of documents per page
|
|
63
|
+
|
|
64
|
+
offset : typing.Optional[int]
|
|
65
|
+
Index of the first document in the page
|
|
66
|
+
|
|
67
|
+
sort : typing.Optional[GetWhatsAppCampaignsRequestSort]
|
|
68
|
+
Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed
|
|
69
|
+
|
|
70
|
+
request_options : typing.Optional[RequestOptions]
|
|
71
|
+
Request-specific configuration.
|
|
72
|
+
|
|
73
|
+
Returns
|
|
74
|
+
-------
|
|
75
|
+
GetWhatsAppCampaignsResponse
|
|
76
|
+
WhatsApp campaigns information
|
|
77
|
+
|
|
78
|
+
Examples
|
|
79
|
+
--------
|
|
80
|
+
from brevo import Brevo
|
|
81
|
+
|
|
82
|
+
client = Brevo(
|
|
83
|
+
api_key="YOUR_API_KEY",
|
|
84
|
+
)
|
|
85
|
+
client.whats_app_campaigns.get_whats_app_campaigns()
|
|
86
|
+
"""
|
|
87
|
+
_response = self._raw_client.get_whats_app_campaigns(
|
|
88
|
+
start_date=start_date,
|
|
89
|
+
end_date=end_date,
|
|
90
|
+
limit=limit,
|
|
91
|
+
offset=offset,
|
|
92
|
+
sort=sort,
|
|
93
|
+
request_options=request_options,
|
|
94
|
+
)
|
|
95
|
+
return _response.data
|
|
96
|
+
|
|
97
|
+
def create_whats_app_campaign(
|
|
98
|
+
self,
|
|
99
|
+
*,
|
|
100
|
+
name: str,
|
|
101
|
+
recipients: CreateWhatsAppCampaignRequestRecipients,
|
|
102
|
+
scheduled_at: str,
|
|
103
|
+
template_id: int,
|
|
104
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
105
|
+
) -> CreateWhatsAppCampaignResponse:
|
|
106
|
+
"""
|
|
107
|
+
<Note>
|
|
108
|
+
You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
|
|
109
|
+
|
|
110
|
+
[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
|
|
111
|
+
</Note>
|
|
112
|
+
|
|
113
|
+
<Note>
|
|
114
|
+
This API requires the List and Segment ids as recipients in Body params. You can use the below Contact endpoints to get the required information.
|
|
115
|
+
|
|
116
|
+
[Get all the Lists](https://developers.brevo.com/reference/getlists-1)
|
|
117
|
+
|
|
118
|
+
[Get all the Segments](https://developers.brevo.com/reference/getsegments)
|
|
119
|
+
</Note>
|
|
120
|
+
|
|
121
|
+
Parameters
|
|
122
|
+
----------
|
|
123
|
+
name : str
|
|
124
|
+
Name of the WhatsApp campaign creation
|
|
125
|
+
|
|
126
|
+
recipients : CreateWhatsAppCampaignRequestRecipients
|
|
127
|
+
Segment ids and List ids to include/exclude from campaign
|
|
128
|
+
|
|
129
|
+
scheduled_at : str
|
|
130
|
+
Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00**
|
|
131
|
+
|
|
132
|
+
template_id : int
|
|
133
|
+
Id of the WhatsApp template in **approved** state
|
|
134
|
+
|
|
135
|
+
request_options : typing.Optional[RequestOptions]
|
|
136
|
+
Request-specific configuration.
|
|
137
|
+
|
|
138
|
+
Returns
|
|
139
|
+
-------
|
|
140
|
+
CreateWhatsAppCampaignResponse
|
|
141
|
+
successfully created
|
|
142
|
+
|
|
143
|
+
Examples
|
|
144
|
+
--------
|
|
145
|
+
from brevo import Brevo
|
|
146
|
+
from brevo.whats_app_campaigns import CreateWhatsAppCampaignRequestRecipients
|
|
147
|
+
|
|
148
|
+
client = Brevo(
|
|
149
|
+
api_key="YOUR_API_KEY",
|
|
150
|
+
)
|
|
151
|
+
client.whats_app_campaigns.create_whats_app_campaign(
|
|
152
|
+
name="Test Campaign",
|
|
153
|
+
recipients=CreateWhatsAppCampaignRequestRecipients(),
|
|
154
|
+
scheduled_at="2017-06-01T12:30:00+02:00",
|
|
155
|
+
template_id=19,
|
|
156
|
+
)
|
|
157
|
+
"""
|
|
158
|
+
_response = self._raw_client.create_whats_app_campaign(
|
|
159
|
+
name=name,
|
|
160
|
+
recipients=recipients,
|
|
161
|
+
scheduled_at=scheduled_at,
|
|
162
|
+
template_id=template_id,
|
|
163
|
+
request_options=request_options,
|
|
164
|
+
)
|
|
165
|
+
return _response.data
|
|
166
|
+
|
|
167
|
+
def get_whats_app_config(
|
|
168
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
169
|
+
) -> GetWhatsAppConfigResponse:
|
|
170
|
+
"""
|
|
171
|
+
<Note>
|
|
172
|
+
You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
|
|
173
|
+
|
|
174
|
+
[Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
|
|
175
|
+
</Note>
|
|
176
|
+
|
|
177
|
+
Parameters
|
|
178
|
+
----------
|
|
179
|
+
request_options : typing.Optional[RequestOptions]
|
|
180
|
+
Request-specific configuration.
|
|
181
|
+
|
|
182
|
+
Returns
|
|
183
|
+
-------
|
|
184
|
+
GetWhatsAppConfigResponse
|
|
185
|
+
Get all the information of your WhatsApp API account
|
|
186
|
+
|
|
187
|
+
Examples
|
|
188
|
+
--------
|
|
189
|
+
from brevo import Brevo
|
|
190
|
+
|
|
191
|
+
client = Brevo(
|
|
192
|
+
api_key="YOUR_API_KEY",
|
|
193
|
+
)
|
|
194
|
+
client.whats_app_campaigns.get_whats_app_config()
|
|
195
|
+
"""
|
|
196
|
+
_response = self._raw_client.get_whats_app_config(request_options=request_options)
|
|
197
|
+
return _response.data
|
|
198
|
+
|
|
199
|
+
def create_whats_app_template(
|
|
200
|
+
self,
|
|
201
|
+
*,
|
|
202
|
+
body_text: str,
|
|
203
|
+
category: CreateWhatsAppTemplateRequestCategory,
|
|
204
|
+
language: str,
|
|
205
|
+
name: str,
|
|
206
|
+
header_text: typing.Optional[str] = OMIT,
|
|
207
|
+
media_url: typing.Optional[str] = OMIT,
|
|
208
|
+
source: typing.Optional[CreateWhatsAppTemplateRequestSource] = OMIT,
|
|
209
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
210
|
+
) -> CreateWhatsAppTemplateResponse:
|
|
211
|
+
"""
|
|
212
|
+
<Note>
|
|
213
|
+
You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
|
|
214
|
+
|
|
215
|
+
[Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
|
|
216
|
+
</Note>
|
|
217
|
+
|
|
218
|
+
Parameters
|
|
219
|
+
----------
|
|
220
|
+
body_text : str
|
|
221
|
+
Body of the template. **Maximum allowed characters are 1024**
|
|
222
|
+
|
|
223
|
+
category : CreateWhatsAppTemplateRequestCategory
|
|
224
|
+
Category of the template
|
|
225
|
+
|
|
226
|
+
language : str
|
|
227
|
+
Language of the template. For Example :
|
|
228
|
+
**en** for English
|
|
229
|
+
|
|
230
|
+
name : str
|
|
231
|
+
Name of the template
|
|
232
|
+
|
|
233
|
+
header_text : typing.Optional[str]
|
|
234
|
+
Text content of the header in the template. **Maximum allowed characters are 45** **Use this field to add text content in template header and if mediaUrl is empty**
|
|
235
|
+
|
|
236
|
+
media_url : typing.Optional[str]
|
|
237
|
+
Absolute url of the media file **(no local file)** for the header. **Use this field in you want to add media in Template header and headerText is empty** Allowed extensions for media files are: #### jpeg | png | mp4 | pdf
|
|
238
|
+
|
|
239
|
+
source : typing.Optional[CreateWhatsAppTemplateRequestSource]
|
|
240
|
+
source of the template
|
|
241
|
+
|
|
242
|
+
request_options : typing.Optional[RequestOptions]
|
|
243
|
+
Request-specific configuration.
|
|
244
|
+
|
|
245
|
+
Returns
|
|
246
|
+
-------
|
|
247
|
+
CreateWhatsAppTemplateResponse
|
|
248
|
+
successfully created
|
|
249
|
+
|
|
250
|
+
Examples
|
|
251
|
+
--------
|
|
252
|
+
from brevo import Brevo
|
|
253
|
+
|
|
254
|
+
client = Brevo(
|
|
255
|
+
api_key="YOUR_API_KEY",
|
|
256
|
+
)
|
|
257
|
+
client.whats_app_campaigns.create_whats_app_template(
|
|
258
|
+
body_text="making it look like readable English",
|
|
259
|
+
category="MARKETING",
|
|
260
|
+
language="en",
|
|
261
|
+
name="Test template",
|
|
262
|
+
)
|
|
263
|
+
"""
|
|
264
|
+
_response = self._raw_client.create_whats_app_template(
|
|
265
|
+
body_text=body_text,
|
|
266
|
+
category=category,
|
|
267
|
+
language=language,
|
|
268
|
+
name=name,
|
|
269
|
+
header_text=header_text,
|
|
270
|
+
media_url=media_url,
|
|
271
|
+
source=source,
|
|
272
|
+
request_options=request_options,
|
|
273
|
+
)
|
|
274
|
+
return _response.data
|
|
275
|
+
|
|
276
|
+
def get_whats_app_templates(
|
|
277
|
+
self,
|
|
278
|
+
*,
|
|
279
|
+
start_date: typing.Optional[str] = None,
|
|
280
|
+
end_date: typing.Optional[str] = None,
|
|
281
|
+
limit: typing.Optional[int] = None,
|
|
282
|
+
offset: typing.Optional[int] = None,
|
|
283
|
+
sort: typing.Optional[GetWhatsAppTemplatesRequestSort] = None,
|
|
284
|
+
source: typing.Optional[GetWhatsAppTemplatesRequestSource] = None,
|
|
285
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
286
|
+
) -> GetWhatsAppTemplatesResponse:
|
|
287
|
+
"""
|
|
288
|
+
Parameters
|
|
289
|
+
----------
|
|
290
|
+
start_date : typing.Optional[str]
|
|
291
|
+
**Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result**
|
|
292
|
+
|
|
293
|
+
end_date : typing.Optional[str]
|
|
294
|
+
**Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result**
|
|
295
|
+
|
|
296
|
+
limit : typing.Optional[int]
|
|
297
|
+
Number of documents per page
|
|
298
|
+
|
|
299
|
+
offset : typing.Optional[int]
|
|
300
|
+
Index of the first document in the page
|
|
301
|
+
|
|
302
|
+
sort : typing.Optional[GetWhatsAppTemplatesRequestSort]
|
|
303
|
+
Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed
|
|
304
|
+
|
|
305
|
+
source : typing.Optional[GetWhatsAppTemplatesRequestSource]
|
|
306
|
+
source of the template
|
|
307
|
+
|
|
308
|
+
request_options : typing.Optional[RequestOptions]
|
|
309
|
+
Request-specific configuration.
|
|
310
|
+
|
|
311
|
+
Returns
|
|
312
|
+
-------
|
|
313
|
+
GetWhatsAppTemplatesResponse
|
|
314
|
+
WhatsApp templates informations
|
|
315
|
+
|
|
316
|
+
Examples
|
|
317
|
+
--------
|
|
318
|
+
from brevo import Brevo
|
|
319
|
+
|
|
320
|
+
client = Brevo(
|
|
321
|
+
api_key="YOUR_API_KEY",
|
|
322
|
+
)
|
|
323
|
+
client.whats_app_campaigns.get_whats_app_templates()
|
|
324
|
+
"""
|
|
325
|
+
_response = self._raw_client.get_whats_app_templates(
|
|
326
|
+
start_date=start_date,
|
|
327
|
+
end_date=end_date,
|
|
328
|
+
limit=limit,
|
|
329
|
+
offset=offset,
|
|
330
|
+
sort=sort,
|
|
331
|
+
source=source,
|
|
332
|
+
request_options=request_options,
|
|
333
|
+
)
|
|
334
|
+
return _response.data
|
|
335
|
+
|
|
336
|
+
def send_whats_app_template_approval(
|
|
337
|
+
self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
338
|
+
) -> None:
|
|
339
|
+
"""
|
|
340
|
+
<Note>
|
|
341
|
+
You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
|
|
342
|
+
|
|
343
|
+
[Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
|
|
344
|
+
</Note>
|
|
345
|
+
|
|
346
|
+
Parameters
|
|
347
|
+
----------
|
|
348
|
+
template_id : int
|
|
349
|
+
id of the template
|
|
350
|
+
|
|
351
|
+
request_options : typing.Optional[RequestOptions]
|
|
352
|
+
Request-specific configuration.
|
|
353
|
+
|
|
354
|
+
Returns
|
|
355
|
+
-------
|
|
356
|
+
None
|
|
357
|
+
|
|
358
|
+
Examples
|
|
359
|
+
--------
|
|
360
|
+
from brevo import Brevo
|
|
361
|
+
|
|
362
|
+
client = Brevo(
|
|
363
|
+
api_key="YOUR_API_KEY",
|
|
364
|
+
)
|
|
365
|
+
client.whats_app_campaigns.send_whats_app_template_approval(
|
|
366
|
+
template_id=1000000,
|
|
367
|
+
)
|
|
368
|
+
"""
|
|
369
|
+
_response = self._raw_client.send_whats_app_template_approval(template_id, request_options=request_options)
|
|
370
|
+
return _response.data
|
|
371
|
+
|
|
372
|
+
def get_whats_app_campaign(
|
|
373
|
+
self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
374
|
+
) -> GetWhatsAppCampaignResponse:
|
|
375
|
+
"""
|
|
376
|
+
<Note>
|
|
377
|
+
You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
|
|
378
|
+
|
|
379
|
+
[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
|
|
380
|
+
</Note>
|
|
381
|
+
|
|
382
|
+
Parameters
|
|
383
|
+
----------
|
|
384
|
+
campaign_id : int
|
|
385
|
+
Id of the campaign
|
|
386
|
+
|
|
387
|
+
request_options : typing.Optional[RequestOptions]
|
|
388
|
+
Request-specific configuration.
|
|
389
|
+
|
|
390
|
+
Returns
|
|
391
|
+
-------
|
|
392
|
+
GetWhatsAppCampaignResponse
|
|
393
|
+
Get whatsApp campaign information on the basis of campaignId
|
|
394
|
+
|
|
395
|
+
Examples
|
|
396
|
+
--------
|
|
397
|
+
from brevo import Brevo
|
|
398
|
+
|
|
399
|
+
client = Brevo(
|
|
400
|
+
api_key="YOUR_API_KEY",
|
|
401
|
+
)
|
|
402
|
+
client.whats_app_campaigns.get_whats_app_campaign(
|
|
403
|
+
campaign_id=1000000,
|
|
404
|
+
)
|
|
405
|
+
"""
|
|
406
|
+
_response = self._raw_client.get_whats_app_campaign(campaign_id, request_options=request_options)
|
|
407
|
+
return _response.data
|
|
408
|
+
|
|
409
|
+
def update_whats_app_campaign(
|
|
410
|
+
self,
|
|
411
|
+
campaign_id: int,
|
|
412
|
+
*,
|
|
413
|
+
campaign_name: typing.Optional[str] = OMIT,
|
|
414
|
+
campaign_status: typing.Optional[UpdateWhatsAppCampaignRequestCampaignStatus] = OMIT,
|
|
415
|
+
recipients: typing.Optional[UpdateWhatsAppCampaignRequestRecipients] = OMIT,
|
|
416
|
+
reschedule_for: typing.Optional[str] = OMIT,
|
|
417
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
418
|
+
) -> None:
|
|
419
|
+
"""
|
|
420
|
+
<Note>
|
|
421
|
+
You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
|
|
422
|
+
|
|
423
|
+
[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
|
|
424
|
+
</Note>
|
|
425
|
+
|
|
426
|
+
<Note>
|
|
427
|
+
This API requires the List and Segment ids as recipients in Body params. You can use the below Contact endpoints to get the required information.
|
|
428
|
+
|
|
429
|
+
[Get all the Lists](https://developers.brevo.com/reference/getlists-1)
|
|
430
|
+
|
|
431
|
+
[Get all the Segments](https://developers.brevo.com/reference/getsegments)
|
|
432
|
+
</Note>
|
|
433
|
+
|
|
434
|
+
Parameters
|
|
435
|
+
----------
|
|
436
|
+
campaign_id : int
|
|
437
|
+
id of the campaign
|
|
438
|
+
|
|
439
|
+
campaign_name : typing.Optional[str]
|
|
440
|
+
Name of the campaign
|
|
441
|
+
|
|
442
|
+
campaign_status : typing.Optional[UpdateWhatsAppCampaignRequestCampaignStatus]
|
|
443
|
+
Status of the campaign
|
|
444
|
+
|
|
445
|
+
recipients : typing.Optional[UpdateWhatsAppCampaignRequestRecipients]
|
|
446
|
+
Segment ids and List ids to include/exclude from campaign
|
|
447
|
+
|
|
448
|
+
reschedule_for : typing.Optional[str]
|
|
449
|
+
Reschedule the sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of campaign. **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** Use this field to update the scheduledAt of any existing draft or scheduled WhatsApp campaign.
|
|
450
|
+
|
|
451
|
+
request_options : typing.Optional[RequestOptions]
|
|
452
|
+
Request-specific configuration.
|
|
453
|
+
|
|
454
|
+
Returns
|
|
455
|
+
-------
|
|
456
|
+
None
|
|
457
|
+
|
|
458
|
+
Examples
|
|
459
|
+
--------
|
|
460
|
+
from brevo import Brevo
|
|
461
|
+
|
|
462
|
+
client = Brevo(
|
|
463
|
+
api_key="YOUR_API_KEY",
|
|
464
|
+
)
|
|
465
|
+
client.whats_app_campaigns.update_whats_app_campaign(
|
|
466
|
+
campaign_id=1000000,
|
|
467
|
+
)
|
|
468
|
+
"""
|
|
469
|
+
_response = self._raw_client.update_whats_app_campaign(
|
|
470
|
+
campaign_id,
|
|
471
|
+
campaign_name=campaign_name,
|
|
472
|
+
campaign_status=campaign_status,
|
|
473
|
+
recipients=recipients,
|
|
474
|
+
reschedule_for=reschedule_for,
|
|
475
|
+
request_options=request_options,
|
|
476
|
+
)
|
|
477
|
+
return _response.data
|
|
478
|
+
|
|
479
|
+
def delete_whats_app_campaign(
|
|
480
|
+
self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
481
|
+
) -> None:
|
|
482
|
+
"""
|
|
483
|
+
Parameters
|
|
484
|
+
----------
|
|
485
|
+
campaign_id : int
|
|
486
|
+
id of the campaign
|
|
487
|
+
|
|
488
|
+
request_options : typing.Optional[RequestOptions]
|
|
489
|
+
Request-specific configuration.
|
|
490
|
+
|
|
491
|
+
Returns
|
|
492
|
+
-------
|
|
493
|
+
None
|
|
494
|
+
|
|
495
|
+
Examples
|
|
496
|
+
--------
|
|
497
|
+
from brevo import Brevo
|
|
498
|
+
|
|
499
|
+
client = Brevo(
|
|
500
|
+
api_key="YOUR_API_KEY",
|
|
501
|
+
)
|
|
502
|
+
client.whats_app_campaigns.delete_whats_app_campaign(
|
|
503
|
+
campaign_id=1000000,
|
|
504
|
+
)
|
|
505
|
+
"""
|
|
506
|
+
_response = self._raw_client.delete_whats_app_campaign(campaign_id, request_options=request_options)
|
|
507
|
+
return _response.data
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
class AsyncWhatsAppCampaignsClient:
|
|
511
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
512
|
+
self._raw_client = AsyncRawWhatsAppCampaignsClient(client_wrapper=client_wrapper)
|
|
513
|
+
|
|
514
|
+
@property
|
|
515
|
+
def with_raw_response(self) -> AsyncRawWhatsAppCampaignsClient:
|
|
516
|
+
"""
|
|
517
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
518
|
+
|
|
519
|
+
Returns
|
|
520
|
+
-------
|
|
521
|
+
AsyncRawWhatsAppCampaignsClient
|
|
522
|
+
"""
|
|
523
|
+
return self._raw_client
|
|
524
|
+
|
|
525
|
+
async def get_whats_app_campaigns(
|
|
526
|
+
self,
|
|
527
|
+
*,
|
|
528
|
+
start_date: typing.Optional[str] = None,
|
|
529
|
+
end_date: typing.Optional[str] = None,
|
|
530
|
+
limit: typing.Optional[int] = None,
|
|
531
|
+
offset: typing.Optional[int] = None,
|
|
532
|
+
sort: typing.Optional[GetWhatsAppCampaignsRequestSort] = None,
|
|
533
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
534
|
+
) -> GetWhatsAppCampaignsResponse:
|
|
535
|
+
"""
|
|
536
|
+
Parameters
|
|
537
|
+
----------
|
|
538
|
+
start_date : typing.Optional[str]
|
|
539
|
+
**Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. **Prefer to pass your timezone in date-time format for accurate result**
|
|
540
|
+
|
|
541
|
+
end_date : typing.Optional[str]
|
|
542
|
+
**Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. **Prefer to pass your timezone in date-time format for accurate result**
|
|
543
|
+
|
|
544
|
+
limit : typing.Optional[int]
|
|
545
|
+
Number of documents per page
|
|
546
|
+
|
|
547
|
+
offset : typing.Optional[int]
|
|
548
|
+
Index of the first document in the page
|
|
549
|
+
|
|
550
|
+
sort : typing.Optional[GetWhatsAppCampaignsRequestSort]
|
|
551
|
+
Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed
|
|
552
|
+
|
|
553
|
+
request_options : typing.Optional[RequestOptions]
|
|
554
|
+
Request-specific configuration.
|
|
555
|
+
|
|
556
|
+
Returns
|
|
557
|
+
-------
|
|
558
|
+
GetWhatsAppCampaignsResponse
|
|
559
|
+
WhatsApp campaigns information
|
|
560
|
+
|
|
561
|
+
Examples
|
|
562
|
+
--------
|
|
563
|
+
import asyncio
|
|
564
|
+
|
|
565
|
+
from brevo import AsyncBrevo
|
|
566
|
+
|
|
567
|
+
client = AsyncBrevo(
|
|
568
|
+
api_key="YOUR_API_KEY",
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
async def main() -> None:
|
|
573
|
+
await client.whats_app_campaigns.get_whats_app_campaigns()
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
asyncio.run(main())
|
|
577
|
+
"""
|
|
578
|
+
_response = await self._raw_client.get_whats_app_campaigns(
|
|
579
|
+
start_date=start_date,
|
|
580
|
+
end_date=end_date,
|
|
581
|
+
limit=limit,
|
|
582
|
+
offset=offset,
|
|
583
|
+
sort=sort,
|
|
584
|
+
request_options=request_options,
|
|
585
|
+
)
|
|
586
|
+
return _response.data
|
|
587
|
+
|
|
588
|
+
async def create_whats_app_campaign(
|
|
589
|
+
self,
|
|
590
|
+
*,
|
|
591
|
+
name: str,
|
|
592
|
+
recipients: CreateWhatsAppCampaignRequestRecipients,
|
|
593
|
+
scheduled_at: str,
|
|
594
|
+
template_id: int,
|
|
595
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
596
|
+
) -> CreateWhatsAppCampaignResponse:
|
|
597
|
+
"""
|
|
598
|
+
<Note>
|
|
599
|
+
You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
|
|
600
|
+
|
|
601
|
+
[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
|
|
602
|
+
</Note>
|
|
603
|
+
|
|
604
|
+
<Note>
|
|
605
|
+
This API requires the List and Segment ids as recipients in Body params. You can use the below Contact endpoints to get the required information.
|
|
606
|
+
|
|
607
|
+
[Get all the Lists](https://developers.brevo.com/reference/getlists-1)
|
|
608
|
+
|
|
609
|
+
[Get all the Segments](https://developers.brevo.com/reference/getsegments)
|
|
610
|
+
</Note>
|
|
611
|
+
|
|
612
|
+
Parameters
|
|
613
|
+
----------
|
|
614
|
+
name : str
|
|
615
|
+
Name of the WhatsApp campaign creation
|
|
616
|
+
|
|
617
|
+
recipients : CreateWhatsAppCampaignRequestRecipients
|
|
618
|
+
Segment ids and List ids to include/exclude from campaign
|
|
619
|
+
|
|
620
|
+
scheduled_at : str
|
|
621
|
+
Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00**
|
|
622
|
+
|
|
623
|
+
template_id : int
|
|
624
|
+
Id of the WhatsApp template in **approved** state
|
|
625
|
+
|
|
626
|
+
request_options : typing.Optional[RequestOptions]
|
|
627
|
+
Request-specific configuration.
|
|
628
|
+
|
|
629
|
+
Returns
|
|
630
|
+
-------
|
|
631
|
+
CreateWhatsAppCampaignResponse
|
|
632
|
+
successfully created
|
|
633
|
+
|
|
634
|
+
Examples
|
|
635
|
+
--------
|
|
636
|
+
import asyncio
|
|
637
|
+
|
|
638
|
+
from brevo import AsyncBrevo
|
|
639
|
+
from brevo.whats_app_campaigns import CreateWhatsAppCampaignRequestRecipients
|
|
640
|
+
|
|
641
|
+
client = AsyncBrevo(
|
|
642
|
+
api_key="YOUR_API_KEY",
|
|
643
|
+
)
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
async def main() -> None:
|
|
647
|
+
await client.whats_app_campaigns.create_whats_app_campaign(
|
|
648
|
+
name="Test Campaign",
|
|
649
|
+
recipients=CreateWhatsAppCampaignRequestRecipients(),
|
|
650
|
+
scheduled_at="2017-06-01T12:30:00+02:00",
|
|
651
|
+
template_id=19,
|
|
652
|
+
)
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
asyncio.run(main())
|
|
656
|
+
"""
|
|
657
|
+
_response = await self._raw_client.create_whats_app_campaign(
|
|
658
|
+
name=name,
|
|
659
|
+
recipients=recipients,
|
|
660
|
+
scheduled_at=scheduled_at,
|
|
661
|
+
template_id=template_id,
|
|
662
|
+
request_options=request_options,
|
|
663
|
+
)
|
|
664
|
+
return _response.data
|
|
665
|
+
|
|
666
|
+
async def get_whats_app_config(
|
|
667
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
668
|
+
) -> GetWhatsAppConfigResponse:
|
|
669
|
+
"""
|
|
670
|
+
<Note>
|
|
671
|
+
You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
|
|
672
|
+
|
|
673
|
+
[Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
|
|
674
|
+
</Note>
|
|
675
|
+
|
|
676
|
+
Parameters
|
|
677
|
+
----------
|
|
678
|
+
request_options : typing.Optional[RequestOptions]
|
|
679
|
+
Request-specific configuration.
|
|
680
|
+
|
|
681
|
+
Returns
|
|
682
|
+
-------
|
|
683
|
+
GetWhatsAppConfigResponse
|
|
684
|
+
Get all the information of your WhatsApp API account
|
|
685
|
+
|
|
686
|
+
Examples
|
|
687
|
+
--------
|
|
688
|
+
import asyncio
|
|
689
|
+
|
|
690
|
+
from brevo import AsyncBrevo
|
|
691
|
+
|
|
692
|
+
client = AsyncBrevo(
|
|
693
|
+
api_key="YOUR_API_KEY",
|
|
694
|
+
)
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
async def main() -> None:
|
|
698
|
+
await client.whats_app_campaigns.get_whats_app_config()
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
asyncio.run(main())
|
|
702
|
+
"""
|
|
703
|
+
_response = await self._raw_client.get_whats_app_config(request_options=request_options)
|
|
704
|
+
return _response.data
|
|
705
|
+
|
|
706
|
+
async def create_whats_app_template(
|
|
707
|
+
self,
|
|
708
|
+
*,
|
|
709
|
+
body_text: str,
|
|
710
|
+
category: CreateWhatsAppTemplateRequestCategory,
|
|
711
|
+
language: str,
|
|
712
|
+
name: str,
|
|
713
|
+
header_text: typing.Optional[str] = OMIT,
|
|
714
|
+
media_url: typing.Optional[str] = OMIT,
|
|
715
|
+
source: typing.Optional[CreateWhatsAppTemplateRequestSource] = OMIT,
|
|
716
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
717
|
+
) -> CreateWhatsAppTemplateResponse:
|
|
718
|
+
"""
|
|
719
|
+
<Note>
|
|
720
|
+
You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
|
|
721
|
+
|
|
722
|
+
[Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
|
|
723
|
+
</Note>
|
|
724
|
+
|
|
725
|
+
Parameters
|
|
726
|
+
----------
|
|
727
|
+
body_text : str
|
|
728
|
+
Body of the template. **Maximum allowed characters are 1024**
|
|
729
|
+
|
|
730
|
+
category : CreateWhatsAppTemplateRequestCategory
|
|
731
|
+
Category of the template
|
|
732
|
+
|
|
733
|
+
language : str
|
|
734
|
+
Language of the template. For Example :
|
|
735
|
+
**en** for English
|
|
736
|
+
|
|
737
|
+
name : str
|
|
738
|
+
Name of the template
|
|
739
|
+
|
|
740
|
+
header_text : typing.Optional[str]
|
|
741
|
+
Text content of the header in the template. **Maximum allowed characters are 45** **Use this field to add text content in template header and if mediaUrl is empty**
|
|
742
|
+
|
|
743
|
+
media_url : typing.Optional[str]
|
|
744
|
+
Absolute url of the media file **(no local file)** for the header. **Use this field in you want to add media in Template header and headerText is empty** Allowed extensions for media files are: #### jpeg | png | mp4 | pdf
|
|
745
|
+
|
|
746
|
+
source : typing.Optional[CreateWhatsAppTemplateRequestSource]
|
|
747
|
+
source of the template
|
|
748
|
+
|
|
749
|
+
request_options : typing.Optional[RequestOptions]
|
|
750
|
+
Request-specific configuration.
|
|
751
|
+
|
|
752
|
+
Returns
|
|
753
|
+
-------
|
|
754
|
+
CreateWhatsAppTemplateResponse
|
|
755
|
+
successfully created
|
|
756
|
+
|
|
757
|
+
Examples
|
|
758
|
+
--------
|
|
759
|
+
import asyncio
|
|
760
|
+
|
|
761
|
+
from brevo import AsyncBrevo
|
|
762
|
+
|
|
763
|
+
client = AsyncBrevo(
|
|
764
|
+
api_key="YOUR_API_KEY",
|
|
765
|
+
)
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
async def main() -> None:
|
|
769
|
+
await client.whats_app_campaigns.create_whats_app_template(
|
|
770
|
+
body_text="making it look like readable English",
|
|
771
|
+
category="MARKETING",
|
|
772
|
+
language="en",
|
|
773
|
+
name="Test template",
|
|
774
|
+
)
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
asyncio.run(main())
|
|
778
|
+
"""
|
|
779
|
+
_response = await self._raw_client.create_whats_app_template(
|
|
780
|
+
body_text=body_text,
|
|
781
|
+
category=category,
|
|
782
|
+
language=language,
|
|
783
|
+
name=name,
|
|
784
|
+
header_text=header_text,
|
|
785
|
+
media_url=media_url,
|
|
786
|
+
source=source,
|
|
787
|
+
request_options=request_options,
|
|
788
|
+
)
|
|
789
|
+
return _response.data
|
|
790
|
+
|
|
791
|
+
async def get_whats_app_templates(
|
|
792
|
+
self,
|
|
793
|
+
*,
|
|
794
|
+
start_date: typing.Optional[str] = None,
|
|
795
|
+
end_date: typing.Optional[str] = None,
|
|
796
|
+
limit: typing.Optional[int] = None,
|
|
797
|
+
offset: typing.Optional[int] = None,
|
|
798
|
+
sort: typing.Optional[GetWhatsAppTemplatesRequestSort] = None,
|
|
799
|
+
source: typing.Optional[GetWhatsAppTemplatesRequestSource] = None,
|
|
800
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
801
|
+
) -> GetWhatsAppTemplatesResponse:
|
|
802
|
+
"""
|
|
803
|
+
Parameters
|
|
804
|
+
----------
|
|
805
|
+
start_date : typing.Optional[str]
|
|
806
|
+
**Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result**
|
|
807
|
+
|
|
808
|
+
end_date : typing.Optional[str]
|
|
809
|
+
**Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result**
|
|
810
|
+
|
|
811
|
+
limit : typing.Optional[int]
|
|
812
|
+
Number of documents per page
|
|
813
|
+
|
|
814
|
+
offset : typing.Optional[int]
|
|
815
|
+
Index of the first document in the page
|
|
816
|
+
|
|
817
|
+
sort : typing.Optional[GetWhatsAppTemplatesRequestSort]
|
|
818
|
+
Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed
|
|
819
|
+
|
|
820
|
+
source : typing.Optional[GetWhatsAppTemplatesRequestSource]
|
|
821
|
+
source of the template
|
|
822
|
+
|
|
823
|
+
request_options : typing.Optional[RequestOptions]
|
|
824
|
+
Request-specific configuration.
|
|
825
|
+
|
|
826
|
+
Returns
|
|
827
|
+
-------
|
|
828
|
+
GetWhatsAppTemplatesResponse
|
|
829
|
+
WhatsApp templates informations
|
|
830
|
+
|
|
831
|
+
Examples
|
|
832
|
+
--------
|
|
833
|
+
import asyncio
|
|
834
|
+
|
|
835
|
+
from brevo import AsyncBrevo
|
|
836
|
+
|
|
837
|
+
client = AsyncBrevo(
|
|
838
|
+
api_key="YOUR_API_KEY",
|
|
839
|
+
)
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
async def main() -> None:
|
|
843
|
+
await client.whats_app_campaigns.get_whats_app_templates()
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
asyncio.run(main())
|
|
847
|
+
"""
|
|
848
|
+
_response = await self._raw_client.get_whats_app_templates(
|
|
849
|
+
start_date=start_date,
|
|
850
|
+
end_date=end_date,
|
|
851
|
+
limit=limit,
|
|
852
|
+
offset=offset,
|
|
853
|
+
sort=sort,
|
|
854
|
+
source=source,
|
|
855
|
+
request_options=request_options,
|
|
856
|
+
)
|
|
857
|
+
return _response.data
|
|
858
|
+
|
|
859
|
+
async def send_whats_app_template_approval(
|
|
860
|
+
self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
861
|
+
) -> None:
|
|
862
|
+
"""
|
|
863
|
+
<Note>
|
|
864
|
+
You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
|
|
865
|
+
|
|
866
|
+
[Activating WhatsApp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
|
|
867
|
+
</Note>
|
|
868
|
+
|
|
869
|
+
Parameters
|
|
870
|
+
----------
|
|
871
|
+
template_id : int
|
|
872
|
+
id of the template
|
|
873
|
+
|
|
874
|
+
request_options : typing.Optional[RequestOptions]
|
|
875
|
+
Request-specific configuration.
|
|
876
|
+
|
|
877
|
+
Returns
|
|
878
|
+
-------
|
|
879
|
+
None
|
|
880
|
+
|
|
881
|
+
Examples
|
|
882
|
+
--------
|
|
883
|
+
import asyncio
|
|
884
|
+
|
|
885
|
+
from brevo import AsyncBrevo
|
|
886
|
+
|
|
887
|
+
client = AsyncBrevo(
|
|
888
|
+
api_key="YOUR_API_KEY",
|
|
889
|
+
)
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
async def main() -> None:
|
|
893
|
+
await client.whats_app_campaigns.send_whats_app_template_approval(
|
|
894
|
+
template_id=1000000,
|
|
895
|
+
)
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
asyncio.run(main())
|
|
899
|
+
"""
|
|
900
|
+
_response = await self._raw_client.send_whats_app_template_approval(
|
|
901
|
+
template_id, request_options=request_options
|
|
902
|
+
)
|
|
903
|
+
return _response.data
|
|
904
|
+
|
|
905
|
+
async def get_whats_app_campaign(
|
|
906
|
+
self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
907
|
+
) -> GetWhatsAppCampaignResponse:
|
|
908
|
+
"""
|
|
909
|
+
<Note>
|
|
910
|
+
You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
|
|
911
|
+
|
|
912
|
+
[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
|
|
913
|
+
</Note>
|
|
914
|
+
|
|
915
|
+
Parameters
|
|
916
|
+
----------
|
|
917
|
+
campaign_id : int
|
|
918
|
+
Id of the campaign
|
|
919
|
+
|
|
920
|
+
request_options : typing.Optional[RequestOptions]
|
|
921
|
+
Request-specific configuration.
|
|
922
|
+
|
|
923
|
+
Returns
|
|
924
|
+
-------
|
|
925
|
+
GetWhatsAppCampaignResponse
|
|
926
|
+
Get whatsApp campaign information on the basis of campaignId
|
|
927
|
+
|
|
928
|
+
Examples
|
|
929
|
+
--------
|
|
930
|
+
import asyncio
|
|
931
|
+
|
|
932
|
+
from brevo import AsyncBrevo
|
|
933
|
+
|
|
934
|
+
client = AsyncBrevo(
|
|
935
|
+
api_key="YOUR_API_KEY",
|
|
936
|
+
)
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
async def main() -> None:
|
|
940
|
+
await client.whats_app_campaigns.get_whats_app_campaign(
|
|
941
|
+
campaign_id=1000000,
|
|
942
|
+
)
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
asyncio.run(main())
|
|
946
|
+
"""
|
|
947
|
+
_response = await self._raw_client.get_whats_app_campaign(campaign_id, request_options=request_options)
|
|
948
|
+
return _response.data
|
|
949
|
+
|
|
950
|
+
async def update_whats_app_campaign(
|
|
951
|
+
self,
|
|
952
|
+
campaign_id: int,
|
|
953
|
+
*,
|
|
954
|
+
campaign_name: typing.Optional[str] = OMIT,
|
|
955
|
+
campaign_status: typing.Optional[UpdateWhatsAppCampaignRequestCampaignStatus] = OMIT,
|
|
956
|
+
recipients: typing.Optional[UpdateWhatsAppCampaignRequestRecipients] = OMIT,
|
|
957
|
+
reschedule_for: typing.Optional[str] = OMIT,
|
|
958
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
959
|
+
) -> None:
|
|
960
|
+
"""
|
|
961
|
+
<Note>
|
|
962
|
+
You can use this API for WhatsApp only if you have setup your WhatsApp account on Brevo platform. To setup your WhatsApp account, follow the steps in the guide below.
|
|
963
|
+
|
|
964
|
+
[Activating Whatsapp](https://developers.brevo.com/docs/whatsapp-campaigns-1) in your account
|
|
965
|
+
</Note>
|
|
966
|
+
|
|
967
|
+
<Note>
|
|
968
|
+
This API requires the List and Segment ids as recipients in Body params. You can use the below Contact endpoints to get the required information.
|
|
969
|
+
|
|
970
|
+
[Get all the Lists](https://developers.brevo.com/reference/getlists-1)
|
|
971
|
+
|
|
972
|
+
[Get all the Segments](https://developers.brevo.com/reference/getsegments)
|
|
973
|
+
</Note>
|
|
974
|
+
|
|
975
|
+
Parameters
|
|
976
|
+
----------
|
|
977
|
+
campaign_id : int
|
|
978
|
+
id of the campaign
|
|
979
|
+
|
|
980
|
+
campaign_name : typing.Optional[str]
|
|
981
|
+
Name of the campaign
|
|
982
|
+
|
|
983
|
+
campaign_status : typing.Optional[UpdateWhatsAppCampaignRequestCampaignStatus]
|
|
984
|
+
Status of the campaign
|
|
985
|
+
|
|
986
|
+
recipients : typing.Optional[UpdateWhatsAppCampaignRequestRecipients]
|
|
987
|
+
Segment ids and List ids to include/exclude from campaign
|
|
988
|
+
|
|
989
|
+
reschedule_for : typing.Optional[str]
|
|
990
|
+
Reschedule the sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of campaign. **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** Use this field to update the scheduledAt of any existing draft or scheduled WhatsApp campaign.
|
|
991
|
+
|
|
992
|
+
request_options : typing.Optional[RequestOptions]
|
|
993
|
+
Request-specific configuration.
|
|
994
|
+
|
|
995
|
+
Returns
|
|
996
|
+
-------
|
|
997
|
+
None
|
|
998
|
+
|
|
999
|
+
Examples
|
|
1000
|
+
--------
|
|
1001
|
+
import asyncio
|
|
1002
|
+
|
|
1003
|
+
from brevo import AsyncBrevo
|
|
1004
|
+
|
|
1005
|
+
client = AsyncBrevo(
|
|
1006
|
+
api_key="YOUR_API_KEY",
|
|
1007
|
+
)
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
async def main() -> None:
|
|
1011
|
+
await client.whats_app_campaigns.update_whats_app_campaign(
|
|
1012
|
+
campaign_id=1000000,
|
|
1013
|
+
)
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
asyncio.run(main())
|
|
1017
|
+
"""
|
|
1018
|
+
_response = await self._raw_client.update_whats_app_campaign(
|
|
1019
|
+
campaign_id,
|
|
1020
|
+
campaign_name=campaign_name,
|
|
1021
|
+
campaign_status=campaign_status,
|
|
1022
|
+
recipients=recipients,
|
|
1023
|
+
reschedule_for=reschedule_for,
|
|
1024
|
+
request_options=request_options,
|
|
1025
|
+
)
|
|
1026
|
+
return _response.data
|
|
1027
|
+
|
|
1028
|
+
async def delete_whats_app_campaign(
|
|
1029
|
+
self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
1030
|
+
) -> None:
|
|
1031
|
+
"""
|
|
1032
|
+
Parameters
|
|
1033
|
+
----------
|
|
1034
|
+
campaign_id : int
|
|
1035
|
+
id of the campaign
|
|
1036
|
+
|
|
1037
|
+
request_options : typing.Optional[RequestOptions]
|
|
1038
|
+
Request-specific configuration.
|
|
1039
|
+
|
|
1040
|
+
Returns
|
|
1041
|
+
-------
|
|
1042
|
+
None
|
|
1043
|
+
|
|
1044
|
+
Examples
|
|
1045
|
+
--------
|
|
1046
|
+
import asyncio
|
|
1047
|
+
|
|
1048
|
+
from brevo import AsyncBrevo
|
|
1049
|
+
|
|
1050
|
+
client = AsyncBrevo(
|
|
1051
|
+
api_key="YOUR_API_KEY",
|
|
1052
|
+
)
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
async def main() -> None:
|
|
1056
|
+
await client.whats_app_campaigns.delete_whats_app_campaign(
|
|
1057
|
+
campaign_id=1000000,
|
|
1058
|
+
)
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
asyncio.run(main())
|
|
1062
|
+
"""
|
|
1063
|
+
_response = await self._raw_client.delete_whats_app_campaign(campaign_id, request_options=request_options)
|
|
1064
|
+
return _response.data
|