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,1864 @@
|
|
|
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 ..types.send_report_email import SendReportEmail
|
|
8
|
+
from ..types.send_report_language import SendReportLanguage
|
|
9
|
+
from ..types.update_campaign_status_status import UpdateCampaignStatusStatus
|
|
10
|
+
from .raw_client import AsyncRawEmailCampaignsClient, RawEmailCampaignsClient
|
|
11
|
+
from .types.create_email_campaign_request_email_expiration_date import CreateEmailCampaignRequestEmailExpirationDate
|
|
12
|
+
from .types.create_email_campaign_request_recipients import CreateEmailCampaignRequestRecipients
|
|
13
|
+
from .types.create_email_campaign_request_sender import CreateEmailCampaignRequestSender
|
|
14
|
+
from .types.create_email_campaign_request_winner_criteria import CreateEmailCampaignRequestWinnerCriteria
|
|
15
|
+
from .types.create_email_campaign_response import CreateEmailCampaignResponse
|
|
16
|
+
from .types.email_export_recipients_request_recipients_type import EmailExportRecipientsRequestRecipientsType
|
|
17
|
+
from .types.email_export_recipients_response import EmailExportRecipientsResponse
|
|
18
|
+
from .types.get_ab_test_campaign_result_response import GetAbTestCampaignResultResponse
|
|
19
|
+
from .types.get_email_campaign_request_statistics import GetEmailCampaignRequestStatistics
|
|
20
|
+
from .types.get_email_campaign_response import GetEmailCampaignResponse
|
|
21
|
+
from .types.get_email_campaigns_request_sort import GetEmailCampaignsRequestSort
|
|
22
|
+
from .types.get_email_campaigns_request_statistics import GetEmailCampaignsRequestStatistics
|
|
23
|
+
from .types.get_email_campaigns_request_status import GetEmailCampaignsRequestStatus
|
|
24
|
+
from .types.get_email_campaigns_request_type import GetEmailCampaignsRequestType
|
|
25
|
+
from .types.get_email_campaigns_response import GetEmailCampaignsResponse
|
|
26
|
+
from .types.get_shared_template_url_response import GetSharedTemplateUrlResponse
|
|
27
|
+
from .types.update_email_campaign_request_email_expiration_date import UpdateEmailCampaignRequestEmailExpirationDate
|
|
28
|
+
from .types.update_email_campaign_request_recipients import UpdateEmailCampaignRequestRecipients
|
|
29
|
+
from .types.update_email_campaign_request_sender import UpdateEmailCampaignRequestSender
|
|
30
|
+
from .types.update_email_campaign_request_winner_criteria import UpdateEmailCampaignRequestWinnerCriteria
|
|
31
|
+
from .types.upload_image_to_gallery_response import UploadImageToGalleryResponse
|
|
32
|
+
|
|
33
|
+
# this is used as the default value for optional parameters
|
|
34
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class EmailCampaignsClient:
|
|
38
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
39
|
+
self._raw_client = RawEmailCampaignsClient(client_wrapper=client_wrapper)
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def with_raw_response(self) -> RawEmailCampaignsClient:
|
|
43
|
+
"""
|
|
44
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
45
|
+
|
|
46
|
+
Returns
|
|
47
|
+
-------
|
|
48
|
+
RawEmailCampaignsClient
|
|
49
|
+
"""
|
|
50
|
+
return self._raw_client
|
|
51
|
+
|
|
52
|
+
def get_email_campaigns(
|
|
53
|
+
self,
|
|
54
|
+
*,
|
|
55
|
+
type: typing.Optional[GetEmailCampaignsRequestType] = None,
|
|
56
|
+
status: typing.Optional[GetEmailCampaignsRequestStatus] = None,
|
|
57
|
+
statistics: typing.Optional[GetEmailCampaignsRequestStatistics] = None,
|
|
58
|
+
start_date: typing.Optional[str] = None,
|
|
59
|
+
end_date: typing.Optional[str] = None,
|
|
60
|
+
limit: typing.Optional[int] = None,
|
|
61
|
+
offset: typing.Optional[int] = None,
|
|
62
|
+
sort: typing.Optional[GetEmailCampaignsRequestSort] = None,
|
|
63
|
+
exclude_html_content: typing.Optional[bool] = None,
|
|
64
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
65
|
+
) -> GetEmailCampaignsResponse:
|
|
66
|
+
"""
|
|
67
|
+
<Note>
|
|
68
|
+
The response payload for this endpoint has changed
|
|
69
|
+
|
|
70
|
+
You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/get-all-marketing-campaigns).
|
|
71
|
+
</Note>
|
|
72
|
+
|
|
73
|
+
Parameters
|
|
74
|
+
----------
|
|
75
|
+
type : typing.Optional[GetEmailCampaignsRequestType]
|
|
76
|
+
Filter on the type of the campaigns
|
|
77
|
+
|
|
78
|
+
status : typing.Optional[GetEmailCampaignsRequestStatus]
|
|
79
|
+
Filter on the status of the campaign
|
|
80
|
+
|
|
81
|
+
statistics : typing.Optional[GetEmailCampaignsRequestStatistics]
|
|
82
|
+
Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint.
|
|
83
|
+
|
|
84
|
+
start_date : typing.Optional[str]
|
|
85
|
+
**Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' )
|
|
86
|
+
|
|
87
|
+
end_date : typing.Optional[str]
|
|
88
|
+
**Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' )
|
|
89
|
+
|
|
90
|
+
limit : typing.Optional[int]
|
|
91
|
+
Number of documents per page
|
|
92
|
+
|
|
93
|
+
offset : typing.Optional[int]
|
|
94
|
+
Index of the first document in the page
|
|
95
|
+
|
|
96
|
+
sort : typing.Optional[GetEmailCampaignsRequestSort]
|
|
97
|
+
Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
|
|
98
|
+
|
|
99
|
+
exclude_html_content : typing.Optional[bool]
|
|
100
|
+
Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body
|
|
101
|
+
|
|
102
|
+
request_options : typing.Optional[RequestOptions]
|
|
103
|
+
Request-specific configuration.
|
|
104
|
+
|
|
105
|
+
Returns
|
|
106
|
+
-------
|
|
107
|
+
GetEmailCampaignsResponse
|
|
108
|
+
Email campaigns informations
|
|
109
|
+
|
|
110
|
+
Examples
|
|
111
|
+
--------
|
|
112
|
+
from brevo import Brevo
|
|
113
|
+
|
|
114
|
+
client = Brevo(
|
|
115
|
+
api_key="YOUR_API_KEY",
|
|
116
|
+
)
|
|
117
|
+
client.email_campaigns.get_email_campaigns()
|
|
118
|
+
"""
|
|
119
|
+
_response = self._raw_client.get_email_campaigns(
|
|
120
|
+
type=type,
|
|
121
|
+
status=status,
|
|
122
|
+
statistics=statistics,
|
|
123
|
+
start_date=start_date,
|
|
124
|
+
end_date=end_date,
|
|
125
|
+
limit=limit,
|
|
126
|
+
offset=offset,
|
|
127
|
+
sort=sort,
|
|
128
|
+
exclude_html_content=exclude_html_content,
|
|
129
|
+
request_options=request_options,
|
|
130
|
+
)
|
|
131
|
+
return _response.data
|
|
132
|
+
|
|
133
|
+
def create_email_campaign(
|
|
134
|
+
self,
|
|
135
|
+
*,
|
|
136
|
+
name: str,
|
|
137
|
+
sender: CreateEmailCampaignRequestSender,
|
|
138
|
+
ab_testing: typing.Optional[bool] = OMIT,
|
|
139
|
+
attachment_url: typing.Optional[str] = OMIT,
|
|
140
|
+
email_expiration_date: typing.Optional[CreateEmailCampaignRequestEmailExpirationDate] = OMIT,
|
|
141
|
+
footer: typing.Optional[str] = OMIT,
|
|
142
|
+
header: typing.Optional[str] = OMIT,
|
|
143
|
+
html_content: typing.Optional[str] = OMIT,
|
|
144
|
+
html_url: typing.Optional[str] = OMIT,
|
|
145
|
+
increase_rate: typing.Optional[int] = OMIT,
|
|
146
|
+
initial_quota: typing.Optional[int] = OMIT,
|
|
147
|
+
inline_image_activation: typing.Optional[bool] = OMIT,
|
|
148
|
+
ip_warmup_enable: typing.Optional[bool] = OMIT,
|
|
149
|
+
mirror_active: typing.Optional[bool] = OMIT,
|
|
150
|
+
params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
151
|
+
preview_text: typing.Optional[str] = OMIT,
|
|
152
|
+
recipients: typing.Optional[CreateEmailCampaignRequestRecipients] = OMIT,
|
|
153
|
+
reply_to: typing.Optional[str] = OMIT,
|
|
154
|
+
scheduled_at: typing.Optional[str] = OMIT,
|
|
155
|
+
send_at_best_time: typing.Optional[bool] = OMIT,
|
|
156
|
+
split_rule: typing.Optional[int] = OMIT,
|
|
157
|
+
subject: typing.Optional[str] = OMIT,
|
|
158
|
+
subject_a: typing.Optional[str] = OMIT,
|
|
159
|
+
subject_b: typing.Optional[str] = OMIT,
|
|
160
|
+
tag: typing.Optional[str] = OMIT,
|
|
161
|
+
template_id: typing.Optional[int] = OMIT,
|
|
162
|
+
to_field: typing.Optional[str] = OMIT,
|
|
163
|
+
unsubscription_page_id: typing.Optional[str] = OMIT,
|
|
164
|
+
update_form_id: typing.Optional[str] = OMIT,
|
|
165
|
+
utm_campaign: typing.Optional[str] = OMIT,
|
|
166
|
+
winner_criteria: typing.Optional[CreateEmailCampaignRequestWinnerCriteria] = OMIT,
|
|
167
|
+
winner_delay: typing.Optional[int] = OMIT,
|
|
168
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
169
|
+
) -> CreateEmailCampaignResponse:
|
|
170
|
+
"""
|
|
171
|
+
Parameters
|
|
172
|
+
----------
|
|
173
|
+
name : str
|
|
174
|
+
Name of the campaign
|
|
175
|
+
|
|
176
|
+
sender : CreateEmailCampaignRequestSender
|
|
177
|
+
Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{"name":"xyz", "email":"example@abc.com"}** **{"name":"xyz", "id":123}**
|
|
178
|
+
|
|
179
|
+
ab_testing : typing.Optional[bool]
|
|
180
|
+
Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true. subjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B
|
|
181
|
+
|
|
182
|
+
attachment_url : typing.Optional[str]
|
|
183
|
+
Absolute url of the attachment (no local file). Extension allowed: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps
|
|
184
|
+
|
|
185
|
+
email_expiration_date : typing.Optional[CreateEmailCampaignRequestEmailExpirationDate]
|
|
186
|
+
To reduce your carbon footprint, set an expiration date for your email. If supported, it will be automatically deleted from the recipient’s inbox, saving storage space and energy. Learn more about setting an email expiration date. For reference , ``https://help.brevo.com/hc/en-us/articles/4413566705298-Create-an-email-campaign``
|
|
187
|
+
|
|
188
|
+
footer : typing.Optional[str]
|
|
189
|
+
Footer of the email campaign
|
|
190
|
+
|
|
191
|
+
header : typing.Optional[str]
|
|
192
|
+
Header of the email campaign
|
|
193
|
+
|
|
194
|
+
html_content : typing.Optional[str]
|
|
195
|
+
Mandatory if htmlUrl and templateId are empty. Body of the message (HTML).
|
|
196
|
+
|
|
197
|
+
html_url : typing.Optional[str]
|
|
198
|
+
**Mandatory if htmlContent and templateId are empty**. Url to the message (HTML). For example: **https://html.domain.com**
|
|
199
|
+
|
|
200
|
+
increase_rate : typing.Optional[int]
|
|
201
|
+
**Mandatory if ipWarmupEnable is set to true**. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%.
|
|
202
|
+
|
|
203
|
+
initial_quota : typing.Optional[int]
|
|
204
|
+
**Mandatory if ipWarmupEnable is set to true**. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000.
|
|
205
|
+
|
|
206
|
+
inline_image_activation : typing.Optional[bool]
|
|
207
|
+
Use true to embedded the images in your email. Final size of the email should be less than **4MB**. Campaigns with embedded images can _not be sent to more than 5000 contacts_
|
|
208
|
+
|
|
209
|
+
ip_warmup_enable : typing.Optional[bool]
|
|
210
|
+
**Available for dedicated ip clients**. Set this to true if you wish to warm up your ip.
|
|
211
|
+
|
|
212
|
+
mirror_active : typing.Optional[bool]
|
|
213
|
+
Use true to enable the mirror link
|
|
214
|
+
|
|
215
|
+
params : typing.Optional[typing.Dict[str, typing.Any]]
|
|
216
|
+
Pass the set of attributes to customize the type classic campaign. For example: **{"FNAME":"Joe", "LNAME":"Doe"}**. Only available if **type** is **classic**. It's considered only if campaign is in _New Template Language format_. The New Template Language is dependent on the values of **subject, htmlContent/htmlUrl, sender.name & toField**
|
|
217
|
+
|
|
218
|
+
preview_text : typing.Optional[str]
|
|
219
|
+
Preview text or preheader of the email campaign
|
|
220
|
+
|
|
221
|
+
recipients : typing.Optional[CreateEmailCampaignRequestRecipients]
|
|
222
|
+
Segment ids and List ids to include/exclude from campaign
|
|
223
|
+
|
|
224
|
+
reply_to : typing.Optional[str]
|
|
225
|
+
Email on which the campaign recipients will be able to reply to
|
|
226
|
+
|
|
227
|
+
scheduled_at : typing.Optional[str]
|
|
228
|
+
Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result**. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). For example: **2017-06-01T12:30:00+02:00**
|
|
229
|
+
|
|
230
|
+
send_at_best_time : typing.Optional[bool]
|
|
231
|
+
Set this to true if you want to send your campaign at best time.
|
|
232
|
+
|
|
233
|
+
split_rule : typing.Optional[int]
|
|
234
|
+
Add the size of your test groups. **Mandatory if abTesting = true & 'recipients' is passed**. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else
|
|
235
|
+
|
|
236
|
+
subject : typing.Optional[str]
|
|
237
|
+
Subject of the campaign. **Mandatory if abTesting is false**. Ignored if abTesting is true.
|
|
238
|
+
|
|
239
|
+
subject_a : typing.Optional[str]
|
|
240
|
+
Subject A of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value
|
|
241
|
+
|
|
242
|
+
subject_b : typing.Optional[str]
|
|
243
|
+
Subject B of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value
|
|
244
|
+
|
|
245
|
+
tag : typing.Optional[str]
|
|
246
|
+
Tag of the campaign
|
|
247
|
+
|
|
248
|
+
template_id : typing.Optional[int]
|
|
249
|
+
**Mandatory if htmlContent and htmlUrl are empty**. Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature.
|
|
250
|
+
|
|
251
|
+
to_field : typing.Optional[str]
|
|
252
|
+
To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization
|
|
253
|
+
|
|
254
|
+
unsubscription_page_id : typing.Optional[str]
|
|
255
|
+
Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. If not entered, then the default unsubscription page will be used.
|
|
256
|
+
|
|
257
|
+
update_form_id : typing.Optional[str]
|
|
258
|
+
**Mandatory if templateId is used containing the {{ update_profile }} tag**. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. If not entered, then the default update profile form will be used.
|
|
259
|
+
|
|
260
|
+
utm_campaign : typing.Optional[str]
|
|
261
|
+
Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed
|
|
262
|
+
|
|
263
|
+
winner_criteria : typing.Optional[CreateEmailCampaignRequestWinnerCriteria]
|
|
264
|
+
Choose the metrics that will determinate the winning version. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerCriteria` is ignored if passed
|
|
265
|
+
|
|
266
|
+
winner_delay : typing.Optional[int]
|
|
267
|
+
Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerDelay` is ignored if passed
|
|
268
|
+
|
|
269
|
+
request_options : typing.Optional[RequestOptions]
|
|
270
|
+
Request-specific configuration.
|
|
271
|
+
|
|
272
|
+
Returns
|
|
273
|
+
-------
|
|
274
|
+
CreateEmailCampaignResponse
|
|
275
|
+
successfully created
|
|
276
|
+
|
|
277
|
+
Examples
|
|
278
|
+
--------
|
|
279
|
+
from brevo import Brevo
|
|
280
|
+
from brevo.email_campaigns import CreateEmailCampaignRequestSender
|
|
281
|
+
|
|
282
|
+
client = Brevo(
|
|
283
|
+
api_key="YOUR_API_KEY",
|
|
284
|
+
)
|
|
285
|
+
client.email_campaigns.create_email_campaign(
|
|
286
|
+
name="Newsletter - May 2017",
|
|
287
|
+
sender=CreateEmailCampaignRequestSender(),
|
|
288
|
+
)
|
|
289
|
+
"""
|
|
290
|
+
_response = self._raw_client.create_email_campaign(
|
|
291
|
+
name=name,
|
|
292
|
+
sender=sender,
|
|
293
|
+
ab_testing=ab_testing,
|
|
294
|
+
attachment_url=attachment_url,
|
|
295
|
+
email_expiration_date=email_expiration_date,
|
|
296
|
+
footer=footer,
|
|
297
|
+
header=header,
|
|
298
|
+
html_content=html_content,
|
|
299
|
+
html_url=html_url,
|
|
300
|
+
increase_rate=increase_rate,
|
|
301
|
+
initial_quota=initial_quota,
|
|
302
|
+
inline_image_activation=inline_image_activation,
|
|
303
|
+
ip_warmup_enable=ip_warmup_enable,
|
|
304
|
+
mirror_active=mirror_active,
|
|
305
|
+
params=params,
|
|
306
|
+
preview_text=preview_text,
|
|
307
|
+
recipients=recipients,
|
|
308
|
+
reply_to=reply_to,
|
|
309
|
+
scheduled_at=scheduled_at,
|
|
310
|
+
send_at_best_time=send_at_best_time,
|
|
311
|
+
split_rule=split_rule,
|
|
312
|
+
subject=subject,
|
|
313
|
+
subject_a=subject_a,
|
|
314
|
+
subject_b=subject_b,
|
|
315
|
+
tag=tag,
|
|
316
|
+
template_id=template_id,
|
|
317
|
+
to_field=to_field,
|
|
318
|
+
unsubscription_page_id=unsubscription_page_id,
|
|
319
|
+
update_form_id=update_form_id,
|
|
320
|
+
utm_campaign=utm_campaign,
|
|
321
|
+
winner_criteria=winner_criteria,
|
|
322
|
+
winner_delay=winner_delay,
|
|
323
|
+
request_options=request_options,
|
|
324
|
+
)
|
|
325
|
+
return _response.data
|
|
326
|
+
|
|
327
|
+
def upload_image_to_gallery(
|
|
328
|
+
self,
|
|
329
|
+
*,
|
|
330
|
+
image_url: str,
|
|
331
|
+
name: typing.Optional[str] = OMIT,
|
|
332
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
333
|
+
) -> UploadImageToGalleryResponse:
|
|
334
|
+
"""
|
|
335
|
+
Parameters
|
|
336
|
+
----------
|
|
337
|
+
image_url : str
|
|
338
|
+
The absolute url of the image (**no local file**). Maximum allowed size for image is **2MB**. Allowed extensions for images are: #### jpeg, jpg, png, bmp, gif.
|
|
339
|
+
|
|
340
|
+
name : typing.Optional[str]
|
|
341
|
+
Name of the image.
|
|
342
|
+
|
|
343
|
+
request_options : typing.Optional[RequestOptions]
|
|
344
|
+
Request-specific configuration.
|
|
345
|
+
|
|
346
|
+
Returns
|
|
347
|
+
-------
|
|
348
|
+
UploadImageToGalleryResponse
|
|
349
|
+
Image has been successfully uploaded
|
|
350
|
+
|
|
351
|
+
Examples
|
|
352
|
+
--------
|
|
353
|
+
from brevo import Brevo
|
|
354
|
+
|
|
355
|
+
client = Brevo(
|
|
356
|
+
api_key="YOUR_API_KEY",
|
|
357
|
+
)
|
|
358
|
+
client.email_campaigns.upload_image_to_gallery(
|
|
359
|
+
image_url="https://somedomain.com/image1.jpg",
|
|
360
|
+
)
|
|
361
|
+
"""
|
|
362
|
+
_response = self._raw_client.upload_image_to_gallery(
|
|
363
|
+
image_url=image_url, name=name, request_options=request_options
|
|
364
|
+
)
|
|
365
|
+
return _response.data
|
|
366
|
+
|
|
367
|
+
def get_email_campaign(
|
|
368
|
+
self,
|
|
369
|
+
campaign_id: int,
|
|
370
|
+
*,
|
|
371
|
+
statistics: typing.Optional[GetEmailCampaignRequestStatistics] = None,
|
|
372
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
373
|
+
) -> GetEmailCampaignResponse:
|
|
374
|
+
"""
|
|
375
|
+
Parameters
|
|
376
|
+
----------
|
|
377
|
+
campaign_id : int
|
|
378
|
+
Id of the campaign
|
|
379
|
+
|
|
380
|
+
statistics : typing.Optional[GetEmailCampaignRequestStatistics]
|
|
381
|
+
Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.
|
|
382
|
+
|
|
383
|
+
request_options : typing.Optional[RequestOptions]
|
|
384
|
+
Request-specific configuration.
|
|
385
|
+
|
|
386
|
+
Returns
|
|
387
|
+
-------
|
|
388
|
+
GetEmailCampaignResponse
|
|
389
|
+
Email campaign informations
|
|
390
|
+
|
|
391
|
+
Examples
|
|
392
|
+
--------
|
|
393
|
+
from brevo import Brevo
|
|
394
|
+
|
|
395
|
+
client = Brevo(
|
|
396
|
+
api_key="YOUR_API_KEY",
|
|
397
|
+
)
|
|
398
|
+
client.email_campaigns.get_email_campaign(
|
|
399
|
+
campaign_id=1000000,
|
|
400
|
+
)
|
|
401
|
+
"""
|
|
402
|
+
_response = self._raw_client.get_email_campaign(
|
|
403
|
+
campaign_id, statistics=statistics, request_options=request_options
|
|
404
|
+
)
|
|
405
|
+
return _response.data
|
|
406
|
+
|
|
407
|
+
def update_email_campaign(
|
|
408
|
+
self,
|
|
409
|
+
campaign_id: int,
|
|
410
|
+
*,
|
|
411
|
+
ab_testing: typing.Optional[bool] = OMIT,
|
|
412
|
+
attachment_url: typing.Optional[str] = OMIT,
|
|
413
|
+
email_expiration_date: typing.Optional[UpdateEmailCampaignRequestEmailExpirationDate] = OMIT,
|
|
414
|
+
footer: typing.Optional[str] = OMIT,
|
|
415
|
+
header: typing.Optional[str] = OMIT,
|
|
416
|
+
html_content: typing.Optional[str] = OMIT,
|
|
417
|
+
html_url: typing.Optional[str] = OMIT,
|
|
418
|
+
increase_rate: typing.Optional[int] = OMIT,
|
|
419
|
+
initial_quota: typing.Optional[int] = OMIT,
|
|
420
|
+
inline_image_activation: typing.Optional[bool] = OMIT,
|
|
421
|
+
ip_warmup_enable: typing.Optional[bool] = OMIT,
|
|
422
|
+
mirror_active: typing.Optional[bool] = OMIT,
|
|
423
|
+
name: typing.Optional[str] = OMIT,
|
|
424
|
+
params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
425
|
+
preview_text: typing.Optional[str] = OMIT,
|
|
426
|
+
recipients: typing.Optional[UpdateEmailCampaignRequestRecipients] = OMIT,
|
|
427
|
+
recurring: typing.Optional[bool] = OMIT,
|
|
428
|
+
reply_to: typing.Optional[str] = OMIT,
|
|
429
|
+
scheduled_at: typing.Optional[str] = OMIT,
|
|
430
|
+
send_at_best_time: typing.Optional[bool] = OMIT,
|
|
431
|
+
sender: typing.Optional[UpdateEmailCampaignRequestSender] = OMIT,
|
|
432
|
+
split_rule: typing.Optional[int] = OMIT,
|
|
433
|
+
subject: typing.Optional[str] = OMIT,
|
|
434
|
+
subject_a: typing.Optional[str] = OMIT,
|
|
435
|
+
subject_b: typing.Optional[str] = OMIT,
|
|
436
|
+
tag: typing.Optional[str] = OMIT,
|
|
437
|
+
to_field: typing.Optional[str] = OMIT,
|
|
438
|
+
unsubscription_page_id: typing.Optional[str] = OMIT,
|
|
439
|
+
update_form_id: typing.Optional[str] = OMIT,
|
|
440
|
+
utm_campaign: typing.Optional[str] = OMIT,
|
|
441
|
+
winner_criteria: typing.Optional[UpdateEmailCampaignRequestWinnerCriteria] = OMIT,
|
|
442
|
+
winner_delay: typing.Optional[int] = OMIT,
|
|
443
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
444
|
+
) -> None:
|
|
445
|
+
"""
|
|
446
|
+
Parameters
|
|
447
|
+
----------
|
|
448
|
+
campaign_id : int
|
|
449
|
+
Id of the campaign
|
|
450
|
+
|
|
451
|
+
ab_testing : typing.Optional[bool]
|
|
452
|
+
Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true. subjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B
|
|
453
|
+
|
|
454
|
+
attachment_url : typing.Optional[str]
|
|
455
|
+
Absolute url of the attachment (no local file). Extension allowed: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps'
|
|
456
|
+
|
|
457
|
+
email_expiration_date : typing.Optional[UpdateEmailCampaignRequestEmailExpirationDate]
|
|
458
|
+
To reduce your carbon footprint, set an expiration date for your email. If supported, it will be automatically deleted from the recipient’s inbox, saving storage space and energy.
|
|
459
|
+
|
|
460
|
+
footer : typing.Optional[str]
|
|
461
|
+
Footer of the email campaign
|
|
462
|
+
|
|
463
|
+
header : typing.Optional[str]
|
|
464
|
+
Header of the email campaign
|
|
465
|
+
|
|
466
|
+
html_content : typing.Optional[str]
|
|
467
|
+
Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. **REQUIRED if htmlUrl is empty**
|
|
468
|
+
|
|
469
|
+
html_url : typing.Optional[str]
|
|
470
|
+
Url which contents the body of the email message. **REQUIRED if htmlContent is empty**
|
|
471
|
+
|
|
472
|
+
increase_rate : typing.Optional[int]
|
|
473
|
+
Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%.
|
|
474
|
+
|
|
475
|
+
initial_quota : typing.Optional[int]
|
|
476
|
+
Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000.
|
|
477
|
+
|
|
478
|
+
inline_image_activation : typing.Optional[bool]
|
|
479
|
+
Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than **4MB** with images embedded in the email. Campaigns with the images embedded in the email _must be sent to less than 5000 contacts_.
|
|
480
|
+
|
|
481
|
+
ip_warmup_enable : typing.Optional[bool]
|
|
482
|
+
**Available for dedicated ip clients**. Set this to true if you wish to warm up your ip.
|
|
483
|
+
|
|
484
|
+
mirror_active : typing.Optional[bool]
|
|
485
|
+
Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign
|
|
486
|
+
|
|
487
|
+
name : typing.Optional[str]
|
|
488
|
+
Name of the campaign
|
|
489
|
+
|
|
490
|
+
params : typing.Optional[typing.Dict[str, typing.Any]]
|
|
491
|
+
Pass the set of attributes to customize the type classic campaign. For example: **{"FNAME":"Joe", "LNAME":"Doe"}**. Only available if **type** is **classic**. It's considered only if campaign is in _New Template Language format_. The New Template Language is dependent on the values of **subject, htmlContent/htmlUrl, sender.name & toField**
|
|
492
|
+
|
|
493
|
+
preview_text : typing.Optional[str]
|
|
494
|
+
Preview text or preheader of the email campaign
|
|
495
|
+
|
|
496
|
+
recipients : typing.Optional[UpdateEmailCampaignRequestRecipients]
|
|
497
|
+
Segment ids and List ids to include/exclude from campaign
|
|
498
|
+
|
|
499
|
+
recurring : typing.Optional[bool]
|
|
500
|
+
**FOR TRIGGER ONLY !** Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times
|
|
501
|
+
|
|
502
|
+
reply_to : typing.Optional[str]
|
|
503
|
+
Email on which campaign recipients will be able to reply to
|
|
504
|
+
|
|
505
|
+
scheduled_at : typing.Optional[str]
|
|
506
|
+
UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part).
|
|
507
|
+
|
|
508
|
+
send_at_best_time : typing.Optional[bool]
|
|
509
|
+
Set this to true if you want to send your campaign at best time. Note:- **if true, warmup ip will be disabled.**
|
|
510
|
+
|
|
511
|
+
sender : typing.Optional[UpdateEmailCampaignRequestSender]
|
|
512
|
+
Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{"name":"xyz", "email":"example@abc.com"}** **{"name":"xyz", "id":123}**
|
|
513
|
+
|
|
514
|
+
split_rule : typing.Optional[int]
|
|
515
|
+
Add the size of your test groups. **Mandatory if abTesting = true & 'recipients' is passed**. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else
|
|
516
|
+
|
|
517
|
+
subject : typing.Optional[str]
|
|
518
|
+
Subject of the campaign
|
|
519
|
+
|
|
520
|
+
subject_a : typing.Optional[str]
|
|
521
|
+
Subject A of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value
|
|
522
|
+
|
|
523
|
+
subject_b : typing.Optional[str]
|
|
524
|
+
Subject B of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value
|
|
525
|
+
|
|
526
|
+
tag : typing.Optional[str]
|
|
527
|
+
Tag of the campaign
|
|
528
|
+
|
|
529
|
+
to_field : typing.Optional[str]
|
|
530
|
+
To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization
|
|
531
|
+
|
|
532
|
+
unsubscription_page_id : typing.Optional[str]
|
|
533
|
+
Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page.
|
|
534
|
+
|
|
535
|
+
update_form_id : typing.Optional[str]
|
|
536
|
+
**Mandatory if templateId is used containing the {{ update_profile }} tag**. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form.
|
|
537
|
+
|
|
538
|
+
utm_campaign : typing.Optional[str]
|
|
539
|
+
Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed
|
|
540
|
+
|
|
541
|
+
winner_criteria : typing.Optional[UpdateEmailCampaignRequestWinnerCriteria]
|
|
542
|
+
Choose the metrics that will determinate the winning version. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerCriteria` is ignored if passed
|
|
543
|
+
|
|
544
|
+
winner_delay : typing.Optional[int]
|
|
545
|
+
Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerDelay` is ignored if passed
|
|
546
|
+
|
|
547
|
+
request_options : typing.Optional[RequestOptions]
|
|
548
|
+
Request-specific configuration.
|
|
549
|
+
|
|
550
|
+
Returns
|
|
551
|
+
-------
|
|
552
|
+
None
|
|
553
|
+
|
|
554
|
+
Examples
|
|
555
|
+
--------
|
|
556
|
+
from brevo import Brevo
|
|
557
|
+
|
|
558
|
+
client = Brevo(
|
|
559
|
+
api_key="YOUR_API_KEY",
|
|
560
|
+
)
|
|
561
|
+
client.email_campaigns.update_email_campaign(
|
|
562
|
+
campaign_id=1000000,
|
|
563
|
+
)
|
|
564
|
+
"""
|
|
565
|
+
_response = self._raw_client.update_email_campaign(
|
|
566
|
+
campaign_id,
|
|
567
|
+
ab_testing=ab_testing,
|
|
568
|
+
attachment_url=attachment_url,
|
|
569
|
+
email_expiration_date=email_expiration_date,
|
|
570
|
+
footer=footer,
|
|
571
|
+
header=header,
|
|
572
|
+
html_content=html_content,
|
|
573
|
+
html_url=html_url,
|
|
574
|
+
increase_rate=increase_rate,
|
|
575
|
+
initial_quota=initial_quota,
|
|
576
|
+
inline_image_activation=inline_image_activation,
|
|
577
|
+
ip_warmup_enable=ip_warmup_enable,
|
|
578
|
+
mirror_active=mirror_active,
|
|
579
|
+
name=name,
|
|
580
|
+
params=params,
|
|
581
|
+
preview_text=preview_text,
|
|
582
|
+
recipients=recipients,
|
|
583
|
+
recurring=recurring,
|
|
584
|
+
reply_to=reply_to,
|
|
585
|
+
scheduled_at=scheduled_at,
|
|
586
|
+
send_at_best_time=send_at_best_time,
|
|
587
|
+
sender=sender,
|
|
588
|
+
split_rule=split_rule,
|
|
589
|
+
subject=subject,
|
|
590
|
+
subject_a=subject_a,
|
|
591
|
+
subject_b=subject_b,
|
|
592
|
+
tag=tag,
|
|
593
|
+
to_field=to_field,
|
|
594
|
+
unsubscription_page_id=unsubscription_page_id,
|
|
595
|
+
update_form_id=update_form_id,
|
|
596
|
+
utm_campaign=utm_campaign,
|
|
597
|
+
winner_criteria=winner_criteria,
|
|
598
|
+
winner_delay=winner_delay,
|
|
599
|
+
request_options=request_options,
|
|
600
|
+
)
|
|
601
|
+
return _response.data
|
|
602
|
+
|
|
603
|
+
def delete_email_campaign(
|
|
604
|
+
self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
605
|
+
) -> None:
|
|
606
|
+
"""
|
|
607
|
+
Parameters
|
|
608
|
+
----------
|
|
609
|
+
campaign_id : int
|
|
610
|
+
id of the campaign
|
|
611
|
+
|
|
612
|
+
request_options : typing.Optional[RequestOptions]
|
|
613
|
+
Request-specific configuration.
|
|
614
|
+
|
|
615
|
+
Returns
|
|
616
|
+
-------
|
|
617
|
+
None
|
|
618
|
+
|
|
619
|
+
Examples
|
|
620
|
+
--------
|
|
621
|
+
from brevo import Brevo
|
|
622
|
+
|
|
623
|
+
client = Brevo(
|
|
624
|
+
api_key="YOUR_API_KEY",
|
|
625
|
+
)
|
|
626
|
+
client.email_campaigns.delete_email_campaign(
|
|
627
|
+
campaign_id=1000000,
|
|
628
|
+
)
|
|
629
|
+
"""
|
|
630
|
+
_response = self._raw_client.delete_email_campaign(campaign_id, request_options=request_options)
|
|
631
|
+
return _response.data
|
|
632
|
+
|
|
633
|
+
def get_ab_test_campaign_result(
|
|
634
|
+
self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
635
|
+
) -> GetAbTestCampaignResultResponse:
|
|
636
|
+
"""
|
|
637
|
+
Obtain winning version of an A/B test email campaign
|
|
638
|
+
|
|
639
|
+
Parameters
|
|
640
|
+
----------
|
|
641
|
+
campaign_id : int
|
|
642
|
+
Id of the A/B test campaign
|
|
643
|
+
|
|
644
|
+
request_options : typing.Optional[RequestOptions]
|
|
645
|
+
Request-specific configuration.
|
|
646
|
+
|
|
647
|
+
Returns
|
|
648
|
+
-------
|
|
649
|
+
GetAbTestCampaignResultResponse
|
|
650
|
+
A/B test email campaign Result
|
|
651
|
+
|
|
652
|
+
Examples
|
|
653
|
+
--------
|
|
654
|
+
from brevo import Brevo
|
|
655
|
+
|
|
656
|
+
client = Brevo(
|
|
657
|
+
api_key="YOUR_API_KEY",
|
|
658
|
+
)
|
|
659
|
+
client.email_campaigns.get_ab_test_campaign_result(
|
|
660
|
+
campaign_id=1000000,
|
|
661
|
+
)
|
|
662
|
+
"""
|
|
663
|
+
_response = self._raw_client.get_ab_test_campaign_result(campaign_id, request_options=request_options)
|
|
664
|
+
return _response.data
|
|
665
|
+
|
|
666
|
+
def email_export_recipients(
|
|
667
|
+
self,
|
|
668
|
+
campaign_id: int,
|
|
669
|
+
*,
|
|
670
|
+
recipients_type: EmailExportRecipientsRequestRecipientsType,
|
|
671
|
+
notify_url: typing.Optional[str] = OMIT,
|
|
672
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
673
|
+
) -> EmailExportRecipientsResponse:
|
|
674
|
+
"""
|
|
675
|
+
Parameters
|
|
676
|
+
----------
|
|
677
|
+
campaign_id : int
|
|
678
|
+
Id of the campaign
|
|
679
|
+
|
|
680
|
+
recipients_type : EmailExportRecipientsRequestRecipientsType
|
|
681
|
+
Type of recipients to export for a campaign
|
|
682
|
+
|
|
683
|
+
notify_url : typing.Optional[str]
|
|
684
|
+
Webhook called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
|
|
685
|
+
|
|
686
|
+
request_options : typing.Optional[RequestOptions]
|
|
687
|
+
Request-specific configuration.
|
|
688
|
+
|
|
689
|
+
Returns
|
|
690
|
+
-------
|
|
691
|
+
EmailExportRecipientsResponse
|
|
692
|
+
process id created
|
|
693
|
+
|
|
694
|
+
Examples
|
|
695
|
+
--------
|
|
696
|
+
from brevo import Brevo
|
|
697
|
+
|
|
698
|
+
client = Brevo(
|
|
699
|
+
api_key="YOUR_API_KEY",
|
|
700
|
+
)
|
|
701
|
+
client.email_campaigns.email_export_recipients(
|
|
702
|
+
campaign_id=1000000,
|
|
703
|
+
recipients_type="all",
|
|
704
|
+
)
|
|
705
|
+
"""
|
|
706
|
+
_response = self._raw_client.email_export_recipients(
|
|
707
|
+
campaign_id, recipients_type=recipients_type, notify_url=notify_url, request_options=request_options
|
|
708
|
+
)
|
|
709
|
+
return _response.data
|
|
710
|
+
|
|
711
|
+
def send_email_campaign_now(
|
|
712
|
+
self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
713
|
+
) -> None:
|
|
714
|
+
"""
|
|
715
|
+
Parameters
|
|
716
|
+
----------
|
|
717
|
+
campaign_id : int
|
|
718
|
+
Id of the campaign
|
|
719
|
+
|
|
720
|
+
request_options : typing.Optional[RequestOptions]
|
|
721
|
+
Request-specific configuration.
|
|
722
|
+
|
|
723
|
+
Returns
|
|
724
|
+
-------
|
|
725
|
+
None
|
|
726
|
+
|
|
727
|
+
Examples
|
|
728
|
+
--------
|
|
729
|
+
from brevo import Brevo
|
|
730
|
+
|
|
731
|
+
client = Brevo(
|
|
732
|
+
api_key="YOUR_API_KEY",
|
|
733
|
+
)
|
|
734
|
+
client.email_campaigns.send_email_campaign_now(
|
|
735
|
+
campaign_id=1000000,
|
|
736
|
+
)
|
|
737
|
+
"""
|
|
738
|
+
_response = self._raw_client.send_email_campaign_now(campaign_id, request_options=request_options)
|
|
739
|
+
return _response.data
|
|
740
|
+
|
|
741
|
+
def send_report(
|
|
742
|
+
self,
|
|
743
|
+
campaign_id: int,
|
|
744
|
+
*,
|
|
745
|
+
email: SendReportEmail,
|
|
746
|
+
language: typing.Optional[SendReportLanguage] = OMIT,
|
|
747
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
748
|
+
) -> None:
|
|
749
|
+
"""
|
|
750
|
+
A PDF will be sent to the specified email addresses
|
|
751
|
+
|
|
752
|
+
Parameters
|
|
753
|
+
----------
|
|
754
|
+
campaign_id : int
|
|
755
|
+
Id of the campaign
|
|
756
|
+
|
|
757
|
+
email : SendReportEmail
|
|
758
|
+
Custom attributes for the report email.
|
|
759
|
+
|
|
760
|
+
language : typing.Optional[SendReportLanguage]
|
|
761
|
+
Language of email content for campaign report sending.
|
|
762
|
+
|
|
763
|
+
request_options : typing.Optional[RequestOptions]
|
|
764
|
+
Request-specific configuration.
|
|
765
|
+
|
|
766
|
+
Returns
|
|
767
|
+
-------
|
|
768
|
+
None
|
|
769
|
+
|
|
770
|
+
Examples
|
|
771
|
+
--------
|
|
772
|
+
from brevo import Brevo, SendReportEmail
|
|
773
|
+
|
|
774
|
+
client = Brevo(
|
|
775
|
+
api_key="YOUR_API_KEY",
|
|
776
|
+
)
|
|
777
|
+
client.email_campaigns.send_report(
|
|
778
|
+
campaign_id=1000000,
|
|
779
|
+
email=SendReportEmail(
|
|
780
|
+
body="Please find attached the report of our last email campaign.",
|
|
781
|
+
to=["jim.suehan@example.com"],
|
|
782
|
+
),
|
|
783
|
+
)
|
|
784
|
+
"""
|
|
785
|
+
_response = self._raw_client.send_report(
|
|
786
|
+
campaign_id, email=email, language=language, request_options=request_options
|
|
787
|
+
)
|
|
788
|
+
return _response.data
|
|
789
|
+
|
|
790
|
+
def send_test_email(
|
|
791
|
+
self,
|
|
792
|
+
campaign_id: int,
|
|
793
|
+
*,
|
|
794
|
+
email_to: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
795
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
796
|
+
) -> None:
|
|
797
|
+
"""
|
|
798
|
+
Parameters
|
|
799
|
+
----------
|
|
800
|
+
campaign_id : int
|
|
801
|
+
Id of the campaign
|
|
802
|
+
|
|
803
|
+
email_to : typing.Optional[typing.Sequence[str]]
|
|
804
|
+
List of the email addresses of the recipients whom you wish to send the test mail. _If left empty, the test mail will be sent to your entire test list. You can not send more than 50 test emails per day_.
|
|
805
|
+
|
|
806
|
+
request_options : typing.Optional[RequestOptions]
|
|
807
|
+
Request-specific configuration.
|
|
808
|
+
|
|
809
|
+
Returns
|
|
810
|
+
-------
|
|
811
|
+
None
|
|
812
|
+
|
|
813
|
+
Examples
|
|
814
|
+
--------
|
|
815
|
+
from brevo import Brevo
|
|
816
|
+
|
|
817
|
+
client = Brevo(
|
|
818
|
+
api_key="YOUR_API_KEY",
|
|
819
|
+
)
|
|
820
|
+
client.email_campaigns.send_test_email(
|
|
821
|
+
campaign_id=1000000,
|
|
822
|
+
)
|
|
823
|
+
"""
|
|
824
|
+
_response = self._raw_client.send_test_email(campaign_id, email_to=email_to, request_options=request_options)
|
|
825
|
+
return _response.data
|
|
826
|
+
|
|
827
|
+
def get_shared_template_url(
|
|
828
|
+
self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
829
|
+
) -> GetSharedTemplateUrlResponse:
|
|
830
|
+
"""
|
|
831
|
+
Get a unique URL to share & import an email template from one Brevo account to another.
|
|
832
|
+
|
|
833
|
+
Parameters
|
|
834
|
+
----------
|
|
835
|
+
campaign_id : int
|
|
836
|
+
Id of the campaign or template
|
|
837
|
+
|
|
838
|
+
request_options : typing.Optional[RequestOptions]
|
|
839
|
+
Request-specific configuration.
|
|
840
|
+
|
|
841
|
+
Returns
|
|
842
|
+
-------
|
|
843
|
+
GetSharedTemplateUrlResponse
|
|
844
|
+
Shared template URL information
|
|
845
|
+
|
|
846
|
+
Examples
|
|
847
|
+
--------
|
|
848
|
+
from brevo import Brevo
|
|
849
|
+
|
|
850
|
+
client = Brevo(
|
|
851
|
+
api_key="YOUR_API_KEY",
|
|
852
|
+
)
|
|
853
|
+
client.email_campaigns.get_shared_template_url(
|
|
854
|
+
campaign_id=1000000,
|
|
855
|
+
)
|
|
856
|
+
"""
|
|
857
|
+
_response = self._raw_client.get_shared_template_url(campaign_id, request_options=request_options)
|
|
858
|
+
return _response.data
|
|
859
|
+
|
|
860
|
+
def update_campaign_status(
|
|
861
|
+
self,
|
|
862
|
+
campaign_id: int,
|
|
863
|
+
*,
|
|
864
|
+
status: typing.Optional[UpdateCampaignStatusStatus] = OMIT,
|
|
865
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
866
|
+
) -> None:
|
|
867
|
+
"""
|
|
868
|
+
Parameters
|
|
869
|
+
----------
|
|
870
|
+
campaign_id : int
|
|
871
|
+
Id of the campaign
|
|
872
|
+
|
|
873
|
+
status : typing.Optional[UpdateCampaignStatusStatus]
|
|
874
|
+
Note:- **replicateTemplate** status will be available **only for template type campaigns.**
|
|
875
|
+
|
|
876
|
+
request_options : typing.Optional[RequestOptions]
|
|
877
|
+
Request-specific configuration.
|
|
878
|
+
|
|
879
|
+
Returns
|
|
880
|
+
-------
|
|
881
|
+
None
|
|
882
|
+
|
|
883
|
+
Examples
|
|
884
|
+
--------
|
|
885
|
+
from brevo import Brevo
|
|
886
|
+
|
|
887
|
+
client = Brevo(
|
|
888
|
+
api_key="YOUR_API_KEY",
|
|
889
|
+
)
|
|
890
|
+
client.email_campaigns.update_campaign_status(
|
|
891
|
+
campaign_id=1000000,
|
|
892
|
+
)
|
|
893
|
+
"""
|
|
894
|
+
_response = self._raw_client.update_campaign_status(campaign_id, status=status, request_options=request_options)
|
|
895
|
+
return _response.data
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
class AsyncEmailCampaignsClient:
|
|
899
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
900
|
+
self._raw_client = AsyncRawEmailCampaignsClient(client_wrapper=client_wrapper)
|
|
901
|
+
|
|
902
|
+
@property
|
|
903
|
+
def with_raw_response(self) -> AsyncRawEmailCampaignsClient:
|
|
904
|
+
"""
|
|
905
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
906
|
+
|
|
907
|
+
Returns
|
|
908
|
+
-------
|
|
909
|
+
AsyncRawEmailCampaignsClient
|
|
910
|
+
"""
|
|
911
|
+
return self._raw_client
|
|
912
|
+
|
|
913
|
+
async def get_email_campaigns(
|
|
914
|
+
self,
|
|
915
|
+
*,
|
|
916
|
+
type: typing.Optional[GetEmailCampaignsRequestType] = None,
|
|
917
|
+
status: typing.Optional[GetEmailCampaignsRequestStatus] = None,
|
|
918
|
+
statistics: typing.Optional[GetEmailCampaignsRequestStatistics] = None,
|
|
919
|
+
start_date: typing.Optional[str] = None,
|
|
920
|
+
end_date: typing.Optional[str] = None,
|
|
921
|
+
limit: typing.Optional[int] = None,
|
|
922
|
+
offset: typing.Optional[int] = None,
|
|
923
|
+
sort: typing.Optional[GetEmailCampaignsRequestSort] = None,
|
|
924
|
+
exclude_html_content: typing.Optional[bool] = None,
|
|
925
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
926
|
+
) -> GetEmailCampaignsResponse:
|
|
927
|
+
"""
|
|
928
|
+
<Note>
|
|
929
|
+
The response payload for this endpoint has changed
|
|
930
|
+
|
|
931
|
+
You now need to specify which type of statistics you would like to retrieve. For more information visit [this page](https://developers.brevo.com/changelog/get-all-marketing-campaigns).
|
|
932
|
+
</Note>
|
|
933
|
+
|
|
934
|
+
Parameters
|
|
935
|
+
----------
|
|
936
|
+
type : typing.Optional[GetEmailCampaignsRequestType]
|
|
937
|
+
Filter on the type of the campaigns
|
|
938
|
+
|
|
939
|
+
status : typing.Optional[GetEmailCampaignsRequestStatus]
|
|
940
|
+
Filter on the status of the campaign
|
|
941
|
+
|
|
942
|
+
statistics : typing.Optional[GetEmailCampaignsRequestStatistics]
|
|
943
|
+
Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint.
|
|
944
|
+
|
|
945
|
+
start_date : typing.Optional[str]
|
|
946
|
+
**Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' )
|
|
947
|
+
|
|
948
|
+
end_date : typing.Optional[str]
|
|
949
|
+
**Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' )
|
|
950
|
+
|
|
951
|
+
limit : typing.Optional[int]
|
|
952
|
+
Number of documents per page
|
|
953
|
+
|
|
954
|
+
offset : typing.Optional[int]
|
|
955
|
+
Index of the first document in the page
|
|
956
|
+
|
|
957
|
+
sort : typing.Optional[GetEmailCampaignsRequestSort]
|
|
958
|
+
Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
|
|
959
|
+
|
|
960
|
+
exclude_html_content : typing.Optional[bool]
|
|
961
|
+
Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body
|
|
962
|
+
|
|
963
|
+
request_options : typing.Optional[RequestOptions]
|
|
964
|
+
Request-specific configuration.
|
|
965
|
+
|
|
966
|
+
Returns
|
|
967
|
+
-------
|
|
968
|
+
GetEmailCampaignsResponse
|
|
969
|
+
Email campaigns informations
|
|
970
|
+
|
|
971
|
+
Examples
|
|
972
|
+
--------
|
|
973
|
+
import asyncio
|
|
974
|
+
|
|
975
|
+
from brevo import AsyncBrevo
|
|
976
|
+
|
|
977
|
+
client = AsyncBrevo(
|
|
978
|
+
api_key="YOUR_API_KEY",
|
|
979
|
+
)
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
async def main() -> None:
|
|
983
|
+
await client.email_campaigns.get_email_campaigns()
|
|
984
|
+
|
|
985
|
+
|
|
986
|
+
asyncio.run(main())
|
|
987
|
+
"""
|
|
988
|
+
_response = await self._raw_client.get_email_campaigns(
|
|
989
|
+
type=type,
|
|
990
|
+
status=status,
|
|
991
|
+
statistics=statistics,
|
|
992
|
+
start_date=start_date,
|
|
993
|
+
end_date=end_date,
|
|
994
|
+
limit=limit,
|
|
995
|
+
offset=offset,
|
|
996
|
+
sort=sort,
|
|
997
|
+
exclude_html_content=exclude_html_content,
|
|
998
|
+
request_options=request_options,
|
|
999
|
+
)
|
|
1000
|
+
return _response.data
|
|
1001
|
+
|
|
1002
|
+
async def create_email_campaign(
|
|
1003
|
+
self,
|
|
1004
|
+
*,
|
|
1005
|
+
name: str,
|
|
1006
|
+
sender: CreateEmailCampaignRequestSender,
|
|
1007
|
+
ab_testing: typing.Optional[bool] = OMIT,
|
|
1008
|
+
attachment_url: typing.Optional[str] = OMIT,
|
|
1009
|
+
email_expiration_date: typing.Optional[CreateEmailCampaignRequestEmailExpirationDate] = OMIT,
|
|
1010
|
+
footer: typing.Optional[str] = OMIT,
|
|
1011
|
+
header: typing.Optional[str] = OMIT,
|
|
1012
|
+
html_content: typing.Optional[str] = OMIT,
|
|
1013
|
+
html_url: typing.Optional[str] = OMIT,
|
|
1014
|
+
increase_rate: typing.Optional[int] = OMIT,
|
|
1015
|
+
initial_quota: typing.Optional[int] = OMIT,
|
|
1016
|
+
inline_image_activation: typing.Optional[bool] = OMIT,
|
|
1017
|
+
ip_warmup_enable: typing.Optional[bool] = OMIT,
|
|
1018
|
+
mirror_active: typing.Optional[bool] = OMIT,
|
|
1019
|
+
params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
1020
|
+
preview_text: typing.Optional[str] = OMIT,
|
|
1021
|
+
recipients: typing.Optional[CreateEmailCampaignRequestRecipients] = OMIT,
|
|
1022
|
+
reply_to: typing.Optional[str] = OMIT,
|
|
1023
|
+
scheduled_at: typing.Optional[str] = OMIT,
|
|
1024
|
+
send_at_best_time: typing.Optional[bool] = OMIT,
|
|
1025
|
+
split_rule: typing.Optional[int] = OMIT,
|
|
1026
|
+
subject: typing.Optional[str] = OMIT,
|
|
1027
|
+
subject_a: typing.Optional[str] = OMIT,
|
|
1028
|
+
subject_b: typing.Optional[str] = OMIT,
|
|
1029
|
+
tag: typing.Optional[str] = OMIT,
|
|
1030
|
+
template_id: typing.Optional[int] = OMIT,
|
|
1031
|
+
to_field: typing.Optional[str] = OMIT,
|
|
1032
|
+
unsubscription_page_id: typing.Optional[str] = OMIT,
|
|
1033
|
+
update_form_id: typing.Optional[str] = OMIT,
|
|
1034
|
+
utm_campaign: typing.Optional[str] = OMIT,
|
|
1035
|
+
winner_criteria: typing.Optional[CreateEmailCampaignRequestWinnerCriteria] = OMIT,
|
|
1036
|
+
winner_delay: typing.Optional[int] = OMIT,
|
|
1037
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1038
|
+
) -> CreateEmailCampaignResponse:
|
|
1039
|
+
"""
|
|
1040
|
+
Parameters
|
|
1041
|
+
----------
|
|
1042
|
+
name : str
|
|
1043
|
+
Name of the campaign
|
|
1044
|
+
|
|
1045
|
+
sender : CreateEmailCampaignRequestSender
|
|
1046
|
+
Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{"name":"xyz", "email":"example@abc.com"}** **{"name":"xyz", "id":123}**
|
|
1047
|
+
|
|
1048
|
+
ab_testing : typing.Optional[bool]
|
|
1049
|
+
Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true. subjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B
|
|
1050
|
+
|
|
1051
|
+
attachment_url : typing.Optional[str]
|
|
1052
|
+
Absolute url of the attachment (no local file). Extension allowed: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps
|
|
1053
|
+
|
|
1054
|
+
email_expiration_date : typing.Optional[CreateEmailCampaignRequestEmailExpirationDate]
|
|
1055
|
+
To reduce your carbon footprint, set an expiration date for your email. If supported, it will be automatically deleted from the recipient’s inbox, saving storage space and energy. Learn more about setting an email expiration date. For reference , ``https://help.brevo.com/hc/en-us/articles/4413566705298-Create-an-email-campaign``
|
|
1056
|
+
|
|
1057
|
+
footer : typing.Optional[str]
|
|
1058
|
+
Footer of the email campaign
|
|
1059
|
+
|
|
1060
|
+
header : typing.Optional[str]
|
|
1061
|
+
Header of the email campaign
|
|
1062
|
+
|
|
1063
|
+
html_content : typing.Optional[str]
|
|
1064
|
+
Mandatory if htmlUrl and templateId are empty. Body of the message (HTML).
|
|
1065
|
+
|
|
1066
|
+
html_url : typing.Optional[str]
|
|
1067
|
+
**Mandatory if htmlContent and templateId are empty**. Url to the message (HTML). For example: **https://html.domain.com**
|
|
1068
|
+
|
|
1069
|
+
increase_rate : typing.Optional[int]
|
|
1070
|
+
**Mandatory if ipWarmupEnable is set to true**. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%.
|
|
1071
|
+
|
|
1072
|
+
initial_quota : typing.Optional[int]
|
|
1073
|
+
**Mandatory if ipWarmupEnable is set to true**. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000.
|
|
1074
|
+
|
|
1075
|
+
inline_image_activation : typing.Optional[bool]
|
|
1076
|
+
Use true to embedded the images in your email. Final size of the email should be less than **4MB**. Campaigns with embedded images can _not be sent to more than 5000 contacts_
|
|
1077
|
+
|
|
1078
|
+
ip_warmup_enable : typing.Optional[bool]
|
|
1079
|
+
**Available for dedicated ip clients**. Set this to true if you wish to warm up your ip.
|
|
1080
|
+
|
|
1081
|
+
mirror_active : typing.Optional[bool]
|
|
1082
|
+
Use true to enable the mirror link
|
|
1083
|
+
|
|
1084
|
+
params : typing.Optional[typing.Dict[str, typing.Any]]
|
|
1085
|
+
Pass the set of attributes to customize the type classic campaign. For example: **{"FNAME":"Joe", "LNAME":"Doe"}**. Only available if **type** is **classic**. It's considered only if campaign is in _New Template Language format_. The New Template Language is dependent on the values of **subject, htmlContent/htmlUrl, sender.name & toField**
|
|
1086
|
+
|
|
1087
|
+
preview_text : typing.Optional[str]
|
|
1088
|
+
Preview text or preheader of the email campaign
|
|
1089
|
+
|
|
1090
|
+
recipients : typing.Optional[CreateEmailCampaignRequestRecipients]
|
|
1091
|
+
Segment ids and List ids to include/exclude from campaign
|
|
1092
|
+
|
|
1093
|
+
reply_to : typing.Optional[str]
|
|
1094
|
+
Email on which the campaign recipients will be able to reply to
|
|
1095
|
+
|
|
1096
|
+
scheduled_at : typing.Optional[str]
|
|
1097
|
+
Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result**. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). For example: **2017-06-01T12:30:00+02:00**
|
|
1098
|
+
|
|
1099
|
+
send_at_best_time : typing.Optional[bool]
|
|
1100
|
+
Set this to true if you want to send your campaign at best time.
|
|
1101
|
+
|
|
1102
|
+
split_rule : typing.Optional[int]
|
|
1103
|
+
Add the size of your test groups. **Mandatory if abTesting = true & 'recipients' is passed**. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else
|
|
1104
|
+
|
|
1105
|
+
subject : typing.Optional[str]
|
|
1106
|
+
Subject of the campaign. **Mandatory if abTesting is false**. Ignored if abTesting is true.
|
|
1107
|
+
|
|
1108
|
+
subject_a : typing.Optional[str]
|
|
1109
|
+
Subject A of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value
|
|
1110
|
+
|
|
1111
|
+
subject_b : typing.Optional[str]
|
|
1112
|
+
Subject B of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value
|
|
1113
|
+
|
|
1114
|
+
tag : typing.Optional[str]
|
|
1115
|
+
Tag of the campaign
|
|
1116
|
+
|
|
1117
|
+
template_id : typing.Optional[int]
|
|
1118
|
+
**Mandatory if htmlContent and htmlUrl are empty**. Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature.
|
|
1119
|
+
|
|
1120
|
+
to_field : typing.Optional[str]
|
|
1121
|
+
To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization
|
|
1122
|
+
|
|
1123
|
+
unsubscription_page_id : typing.Optional[str]
|
|
1124
|
+
Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. If not entered, then the default unsubscription page will be used.
|
|
1125
|
+
|
|
1126
|
+
update_form_id : typing.Optional[str]
|
|
1127
|
+
**Mandatory if templateId is used containing the {{ update_profile }} tag**. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. If not entered, then the default update profile form will be used.
|
|
1128
|
+
|
|
1129
|
+
utm_campaign : typing.Optional[str]
|
|
1130
|
+
Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed
|
|
1131
|
+
|
|
1132
|
+
winner_criteria : typing.Optional[CreateEmailCampaignRequestWinnerCriteria]
|
|
1133
|
+
Choose the metrics that will determinate the winning version. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerCriteria` is ignored if passed
|
|
1134
|
+
|
|
1135
|
+
winner_delay : typing.Optional[int]
|
|
1136
|
+
Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerDelay` is ignored if passed
|
|
1137
|
+
|
|
1138
|
+
request_options : typing.Optional[RequestOptions]
|
|
1139
|
+
Request-specific configuration.
|
|
1140
|
+
|
|
1141
|
+
Returns
|
|
1142
|
+
-------
|
|
1143
|
+
CreateEmailCampaignResponse
|
|
1144
|
+
successfully created
|
|
1145
|
+
|
|
1146
|
+
Examples
|
|
1147
|
+
--------
|
|
1148
|
+
import asyncio
|
|
1149
|
+
|
|
1150
|
+
from brevo import AsyncBrevo
|
|
1151
|
+
from brevo.email_campaigns import CreateEmailCampaignRequestSender
|
|
1152
|
+
|
|
1153
|
+
client = AsyncBrevo(
|
|
1154
|
+
api_key="YOUR_API_KEY",
|
|
1155
|
+
)
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
async def main() -> None:
|
|
1159
|
+
await client.email_campaigns.create_email_campaign(
|
|
1160
|
+
name="Newsletter - May 2017",
|
|
1161
|
+
sender=CreateEmailCampaignRequestSender(),
|
|
1162
|
+
)
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
asyncio.run(main())
|
|
1166
|
+
"""
|
|
1167
|
+
_response = await self._raw_client.create_email_campaign(
|
|
1168
|
+
name=name,
|
|
1169
|
+
sender=sender,
|
|
1170
|
+
ab_testing=ab_testing,
|
|
1171
|
+
attachment_url=attachment_url,
|
|
1172
|
+
email_expiration_date=email_expiration_date,
|
|
1173
|
+
footer=footer,
|
|
1174
|
+
header=header,
|
|
1175
|
+
html_content=html_content,
|
|
1176
|
+
html_url=html_url,
|
|
1177
|
+
increase_rate=increase_rate,
|
|
1178
|
+
initial_quota=initial_quota,
|
|
1179
|
+
inline_image_activation=inline_image_activation,
|
|
1180
|
+
ip_warmup_enable=ip_warmup_enable,
|
|
1181
|
+
mirror_active=mirror_active,
|
|
1182
|
+
params=params,
|
|
1183
|
+
preview_text=preview_text,
|
|
1184
|
+
recipients=recipients,
|
|
1185
|
+
reply_to=reply_to,
|
|
1186
|
+
scheduled_at=scheduled_at,
|
|
1187
|
+
send_at_best_time=send_at_best_time,
|
|
1188
|
+
split_rule=split_rule,
|
|
1189
|
+
subject=subject,
|
|
1190
|
+
subject_a=subject_a,
|
|
1191
|
+
subject_b=subject_b,
|
|
1192
|
+
tag=tag,
|
|
1193
|
+
template_id=template_id,
|
|
1194
|
+
to_field=to_field,
|
|
1195
|
+
unsubscription_page_id=unsubscription_page_id,
|
|
1196
|
+
update_form_id=update_form_id,
|
|
1197
|
+
utm_campaign=utm_campaign,
|
|
1198
|
+
winner_criteria=winner_criteria,
|
|
1199
|
+
winner_delay=winner_delay,
|
|
1200
|
+
request_options=request_options,
|
|
1201
|
+
)
|
|
1202
|
+
return _response.data
|
|
1203
|
+
|
|
1204
|
+
async def upload_image_to_gallery(
|
|
1205
|
+
self,
|
|
1206
|
+
*,
|
|
1207
|
+
image_url: str,
|
|
1208
|
+
name: typing.Optional[str] = OMIT,
|
|
1209
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1210
|
+
) -> UploadImageToGalleryResponse:
|
|
1211
|
+
"""
|
|
1212
|
+
Parameters
|
|
1213
|
+
----------
|
|
1214
|
+
image_url : str
|
|
1215
|
+
The absolute url of the image (**no local file**). Maximum allowed size for image is **2MB**. Allowed extensions for images are: #### jpeg, jpg, png, bmp, gif.
|
|
1216
|
+
|
|
1217
|
+
name : typing.Optional[str]
|
|
1218
|
+
Name of the image.
|
|
1219
|
+
|
|
1220
|
+
request_options : typing.Optional[RequestOptions]
|
|
1221
|
+
Request-specific configuration.
|
|
1222
|
+
|
|
1223
|
+
Returns
|
|
1224
|
+
-------
|
|
1225
|
+
UploadImageToGalleryResponse
|
|
1226
|
+
Image has been successfully uploaded
|
|
1227
|
+
|
|
1228
|
+
Examples
|
|
1229
|
+
--------
|
|
1230
|
+
import asyncio
|
|
1231
|
+
|
|
1232
|
+
from brevo import AsyncBrevo
|
|
1233
|
+
|
|
1234
|
+
client = AsyncBrevo(
|
|
1235
|
+
api_key="YOUR_API_KEY",
|
|
1236
|
+
)
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
async def main() -> None:
|
|
1240
|
+
await client.email_campaigns.upload_image_to_gallery(
|
|
1241
|
+
image_url="https://somedomain.com/image1.jpg",
|
|
1242
|
+
)
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
asyncio.run(main())
|
|
1246
|
+
"""
|
|
1247
|
+
_response = await self._raw_client.upload_image_to_gallery(
|
|
1248
|
+
image_url=image_url, name=name, request_options=request_options
|
|
1249
|
+
)
|
|
1250
|
+
return _response.data
|
|
1251
|
+
|
|
1252
|
+
async def get_email_campaign(
|
|
1253
|
+
self,
|
|
1254
|
+
campaign_id: int,
|
|
1255
|
+
*,
|
|
1256
|
+
statistics: typing.Optional[GetEmailCampaignRequestStatistics] = None,
|
|
1257
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1258
|
+
) -> GetEmailCampaignResponse:
|
|
1259
|
+
"""
|
|
1260
|
+
Parameters
|
|
1261
|
+
----------
|
|
1262
|
+
campaign_id : int
|
|
1263
|
+
Id of the campaign
|
|
1264
|
+
|
|
1265
|
+
statistics : typing.Optional[GetEmailCampaignRequestStatistics]
|
|
1266
|
+
Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.
|
|
1267
|
+
|
|
1268
|
+
request_options : typing.Optional[RequestOptions]
|
|
1269
|
+
Request-specific configuration.
|
|
1270
|
+
|
|
1271
|
+
Returns
|
|
1272
|
+
-------
|
|
1273
|
+
GetEmailCampaignResponse
|
|
1274
|
+
Email campaign informations
|
|
1275
|
+
|
|
1276
|
+
Examples
|
|
1277
|
+
--------
|
|
1278
|
+
import asyncio
|
|
1279
|
+
|
|
1280
|
+
from brevo import AsyncBrevo
|
|
1281
|
+
|
|
1282
|
+
client = AsyncBrevo(
|
|
1283
|
+
api_key="YOUR_API_KEY",
|
|
1284
|
+
)
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
async def main() -> None:
|
|
1288
|
+
await client.email_campaigns.get_email_campaign(
|
|
1289
|
+
campaign_id=1000000,
|
|
1290
|
+
)
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
asyncio.run(main())
|
|
1294
|
+
"""
|
|
1295
|
+
_response = await self._raw_client.get_email_campaign(
|
|
1296
|
+
campaign_id, statistics=statistics, request_options=request_options
|
|
1297
|
+
)
|
|
1298
|
+
return _response.data
|
|
1299
|
+
|
|
1300
|
+
async def update_email_campaign(
|
|
1301
|
+
self,
|
|
1302
|
+
campaign_id: int,
|
|
1303
|
+
*,
|
|
1304
|
+
ab_testing: typing.Optional[bool] = OMIT,
|
|
1305
|
+
attachment_url: typing.Optional[str] = OMIT,
|
|
1306
|
+
email_expiration_date: typing.Optional[UpdateEmailCampaignRequestEmailExpirationDate] = OMIT,
|
|
1307
|
+
footer: typing.Optional[str] = OMIT,
|
|
1308
|
+
header: typing.Optional[str] = OMIT,
|
|
1309
|
+
html_content: typing.Optional[str] = OMIT,
|
|
1310
|
+
html_url: typing.Optional[str] = OMIT,
|
|
1311
|
+
increase_rate: typing.Optional[int] = OMIT,
|
|
1312
|
+
initial_quota: typing.Optional[int] = OMIT,
|
|
1313
|
+
inline_image_activation: typing.Optional[bool] = OMIT,
|
|
1314
|
+
ip_warmup_enable: typing.Optional[bool] = OMIT,
|
|
1315
|
+
mirror_active: typing.Optional[bool] = OMIT,
|
|
1316
|
+
name: typing.Optional[str] = OMIT,
|
|
1317
|
+
params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
1318
|
+
preview_text: typing.Optional[str] = OMIT,
|
|
1319
|
+
recipients: typing.Optional[UpdateEmailCampaignRequestRecipients] = OMIT,
|
|
1320
|
+
recurring: typing.Optional[bool] = OMIT,
|
|
1321
|
+
reply_to: typing.Optional[str] = OMIT,
|
|
1322
|
+
scheduled_at: typing.Optional[str] = OMIT,
|
|
1323
|
+
send_at_best_time: typing.Optional[bool] = OMIT,
|
|
1324
|
+
sender: typing.Optional[UpdateEmailCampaignRequestSender] = OMIT,
|
|
1325
|
+
split_rule: typing.Optional[int] = OMIT,
|
|
1326
|
+
subject: typing.Optional[str] = OMIT,
|
|
1327
|
+
subject_a: typing.Optional[str] = OMIT,
|
|
1328
|
+
subject_b: typing.Optional[str] = OMIT,
|
|
1329
|
+
tag: typing.Optional[str] = OMIT,
|
|
1330
|
+
to_field: typing.Optional[str] = OMIT,
|
|
1331
|
+
unsubscription_page_id: typing.Optional[str] = OMIT,
|
|
1332
|
+
update_form_id: typing.Optional[str] = OMIT,
|
|
1333
|
+
utm_campaign: typing.Optional[str] = OMIT,
|
|
1334
|
+
winner_criteria: typing.Optional[UpdateEmailCampaignRequestWinnerCriteria] = OMIT,
|
|
1335
|
+
winner_delay: typing.Optional[int] = OMIT,
|
|
1336
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1337
|
+
) -> None:
|
|
1338
|
+
"""
|
|
1339
|
+
Parameters
|
|
1340
|
+
----------
|
|
1341
|
+
campaign_id : int
|
|
1342
|
+
Id of the campaign
|
|
1343
|
+
|
|
1344
|
+
ab_testing : typing.Optional[bool]
|
|
1345
|
+
Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true. subjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B
|
|
1346
|
+
|
|
1347
|
+
attachment_url : typing.Optional[str]
|
|
1348
|
+
Absolute url of the attachment (no local file). Extension allowed: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps'
|
|
1349
|
+
|
|
1350
|
+
email_expiration_date : typing.Optional[UpdateEmailCampaignRequestEmailExpirationDate]
|
|
1351
|
+
To reduce your carbon footprint, set an expiration date for your email. If supported, it will be automatically deleted from the recipient’s inbox, saving storage space and energy.
|
|
1352
|
+
|
|
1353
|
+
footer : typing.Optional[str]
|
|
1354
|
+
Footer of the email campaign
|
|
1355
|
+
|
|
1356
|
+
header : typing.Optional[str]
|
|
1357
|
+
Header of the email campaign
|
|
1358
|
+
|
|
1359
|
+
html_content : typing.Optional[str]
|
|
1360
|
+
Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. **REQUIRED if htmlUrl is empty**
|
|
1361
|
+
|
|
1362
|
+
html_url : typing.Optional[str]
|
|
1363
|
+
Url which contents the body of the email message. **REQUIRED if htmlContent is empty**
|
|
1364
|
+
|
|
1365
|
+
increase_rate : typing.Optional[int]
|
|
1366
|
+
Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%.
|
|
1367
|
+
|
|
1368
|
+
initial_quota : typing.Optional[int]
|
|
1369
|
+
Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000.
|
|
1370
|
+
|
|
1371
|
+
inline_image_activation : typing.Optional[bool]
|
|
1372
|
+
Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than **4MB** with images embedded in the email. Campaigns with the images embedded in the email _must be sent to less than 5000 contacts_.
|
|
1373
|
+
|
|
1374
|
+
ip_warmup_enable : typing.Optional[bool]
|
|
1375
|
+
**Available for dedicated ip clients**. Set this to true if you wish to warm up your ip.
|
|
1376
|
+
|
|
1377
|
+
mirror_active : typing.Optional[bool]
|
|
1378
|
+
Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign
|
|
1379
|
+
|
|
1380
|
+
name : typing.Optional[str]
|
|
1381
|
+
Name of the campaign
|
|
1382
|
+
|
|
1383
|
+
params : typing.Optional[typing.Dict[str, typing.Any]]
|
|
1384
|
+
Pass the set of attributes to customize the type classic campaign. For example: **{"FNAME":"Joe", "LNAME":"Doe"}**. Only available if **type** is **classic**. It's considered only if campaign is in _New Template Language format_. The New Template Language is dependent on the values of **subject, htmlContent/htmlUrl, sender.name & toField**
|
|
1385
|
+
|
|
1386
|
+
preview_text : typing.Optional[str]
|
|
1387
|
+
Preview text or preheader of the email campaign
|
|
1388
|
+
|
|
1389
|
+
recipients : typing.Optional[UpdateEmailCampaignRequestRecipients]
|
|
1390
|
+
Segment ids and List ids to include/exclude from campaign
|
|
1391
|
+
|
|
1392
|
+
recurring : typing.Optional[bool]
|
|
1393
|
+
**FOR TRIGGER ONLY !** Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times
|
|
1394
|
+
|
|
1395
|
+
reply_to : typing.Optional[str]
|
|
1396
|
+
Email on which campaign recipients will be able to reply to
|
|
1397
|
+
|
|
1398
|
+
scheduled_at : typing.Optional[str]
|
|
1399
|
+
UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part).
|
|
1400
|
+
|
|
1401
|
+
send_at_best_time : typing.Optional[bool]
|
|
1402
|
+
Set this to true if you want to send your campaign at best time. Note:- **if true, warmup ip will be disabled.**
|
|
1403
|
+
|
|
1404
|
+
sender : typing.Optional[UpdateEmailCampaignRequestSender]
|
|
1405
|
+
Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{"name":"xyz", "email":"example@abc.com"}** **{"name":"xyz", "id":123}**
|
|
1406
|
+
|
|
1407
|
+
split_rule : typing.Optional[int]
|
|
1408
|
+
Add the size of your test groups. **Mandatory if abTesting = true & 'recipients' is passed**. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else
|
|
1409
|
+
|
|
1410
|
+
subject : typing.Optional[str]
|
|
1411
|
+
Subject of the campaign
|
|
1412
|
+
|
|
1413
|
+
subject_a : typing.Optional[str]
|
|
1414
|
+
Subject A of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value
|
|
1415
|
+
|
|
1416
|
+
subject_b : typing.Optional[str]
|
|
1417
|
+
Subject B of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value
|
|
1418
|
+
|
|
1419
|
+
tag : typing.Optional[str]
|
|
1420
|
+
Tag of the campaign
|
|
1421
|
+
|
|
1422
|
+
to_field : typing.Optional[str]
|
|
1423
|
+
To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization
|
|
1424
|
+
|
|
1425
|
+
unsubscription_page_id : typing.Optional[str]
|
|
1426
|
+
Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page.
|
|
1427
|
+
|
|
1428
|
+
update_form_id : typing.Optional[str]
|
|
1429
|
+
**Mandatory if templateId is used containing the {{ update_profile }} tag**. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form.
|
|
1430
|
+
|
|
1431
|
+
utm_campaign : typing.Optional[str]
|
|
1432
|
+
Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed
|
|
1433
|
+
|
|
1434
|
+
winner_criteria : typing.Optional[UpdateEmailCampaignRequestWinnerCriteria]
|
|
1435
|
+
Choose the metrics that will determinate the winning version. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerCriteria` is ignored if passed
|
|
1436
|
+
|
|
1437
|
+
winner_delay : typing.Optional[int]
|
|
1438
|
+
Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerDelay` is ignored if passed
|
|
1439
|
+
|
|
1440
|
+
request_options : typing.Optional[RequestOptions]
|
|
1441
|
+
Request-specific configuration.
|
|
1442
|
+
|
|
1443
|
+
Returns
|
|
1444
|
+
-------
|
|
1445
|
+
None
|
|
1446
|
+
|
|
1447
|
+
Examples
|
|
1448
|
+
--------
|
|
1449
|
+
import asyncio
|
|
1450
|
+
|
|
1451
|
+
from brevo import AsyncBrevo
|
|
1452
|
+
|
|
1453
|
+
client = AsyncBrevo(
|
|
1454
|
+
api_key="YOUR_API_KEY",
|
|
1455
|
+
)
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
async def main() -> None:
|
|
1459
|
+
await client.email_campaigns.update_email_campaign(
|
|
1460
|
+
campaign_id=1000000,
|
|
1461
|
+
)
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
asyncio.run(main())
|
|
1465
|
+
"""
|
|
1466
|
+
_response = await self._raw_client.update_email_campaign(
|
|
1467
|
+
campaign_id,
|
|
1468
|
+
ab_testing=ab_testing,
|
|
1469
|
+
attachment_url=attachment_url,
|
|
1470
|
+
email_expiration_date=email_expiration_date,
|
|
1471
|
+
footer=footer,
|
|
1472
|
+
header=header,
|
|
1473
|
+
html_content=html_content,
|
|
1474
|
+
html_url=html_url,
|
|
1475
|
+
increase_rate=increase_rate,
|
|
1476
|
+
initial_quota=initial_quota,
|
|
1477
|
+
inline_image_activation=inline_image_activation,
|
|
1478
|
+
ip_warmup_enable=ip_warmup_enable,
|
|
1479
|
+
mirror_active=mirror_active,
|
|
1480
|
+
name=name,
|
|
1481
|
+
params=params,
|
|
1482
|
+
preview_text=preview_text,
|
|
1483
|
+
recipients=recipients,
|
|
1484
|
+
recurring=recurring,
|
|
1485
|
+
reply_to=reply_to,
|
|
1486
|
+
scheduled_at=scheduled_at,
|
|
1487
|
+
send_at_best_time=send_at_best_time,
|
|
1488
|
+
sender=sender,
|
|
1489
|
+
split_rule=split_rule,
|
|
1490
|
+
subject=subject,
|
|
1491
|
+
subject_a=subject_a,
|
|
1492
|
+
subject_b=subject_b,
|
|
1493
|
+
tag=tag,
|
|
1494
|
+
to_field=to_field,
|
|
1495
|
+
unsubscription_page_id=unsubscription_page_id,
|
|
1496
|
+
update_form_id=update_form_id,
|
|
1497
|
+
utm_campaign=utm_campaign,
|
|
1498
|
+
winner_criteria=winner_criteria,
|
|
1499
|
+
winner_delay=winner_delay,
|
|
1500
|
+
request_options=request_options,
|
|
1501
|
+
)
|
|
1502
|
+
return _response.data
|
|
1503
|
+
|
|
1504
|
+
async def delete_email_campaign(
|
|
1505
|
+
self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
1506
|
+
) -> None:
|
|
1507
|
+
"""
|
|
1508
|
+
Parameters
|
|
1509
|
+
----------
|
|
1510
|
+
campaign_id : int
|
|
1511
|
+
id of the campaign
|
|
1512
|
+
|
|
1513
|
+
request_options : typing.Optional[RequestOptions]
|
|
1514
|
+
Request-specific configuration.
|
|
1515
|
+
|
|
1516
|
+
Returns
|
|
1517
|
+
-------
|
|
1518
|
+
None
|
|
1519
|
+
|
|
1520
|
+
Examples
|
|
1521
|
+
--------
|
|
1522
|
+
import asyncio
|
|
1523
|
+
|
|
1524
|
+
from brevo import AsyncBrevo
|
|
1525
|
+
|
|
1526
|
+
client = AsyncBrevo(
|
|
1527
|
+
api_key="YOUR_API_KEY",
|
|
1528
|
+
)
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
async def main() -> None:
|
|
1532
|
+
await client.email_campaigns.delete_email_campaign(
|
|
1533
|
+
campaign_id=1000000,
|
|
1534
|
+
)
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
asyncio.run(main())
|
|
1538
|
+
"""
|
|
1539
|
+
_response = await self._raw_client.delete_email_campaign(campaign_id, request_options=request_options)
|
|
1540
|
+
return _response.data
|
|
1541
|
+
|
|
1542
|
+
async def get_ab_test_campaign_result(
|
|
1543
|
+
self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
1544
|
+
) -> GetAbTestCampaignResultResponse:
|
|
1545
|
+
"""
|
|
1546
|
+
Obtain winning version of an A/B test email campaign
|
|
1547
|
+
|
|
1548
|
+
Parameters
|
|
1549
|
+
----------
|
|
1550
|
+
campaign_id : int
|
|
1551
|
+
Id of the A/B test campaign
|
|
1552
|
+
|
|
1553
|
+
request_options : typing.Optional[RequestOptions]
|
|
1554
|
+
Request-specific configuration.
|
|
1555
|
+
|
|
1556
|
+
Returns
|
|
1557
|
+
-------
|
|
1558
|
+
GetAbTestCampaignResultResponse
|
|
1559
|
+
A/B test email campaign Result
|
|
1560
|
+
|
|
1561
|
+
Examples
|
|
1562
|
+
--------
|
|
1563
|
+
import asyncio
|
|
1564
|
+
|
|
1565
|
+
from brevo import AsyncBrevo
|
|
1566
|
+
|
|
1567
|
+
client = AsyncBrevo(
|
|
1568
|
+
api_key="YOUR_API_KEY",
|
|
1569
|
+
)
|
|
1570
|
+
|
|
1571
|
+
|
|
1572
|
+
async def main() -> None:
|
|
1573
|
+
await client.email_campaigns.get_ab_test_campaign_result(
|
|
1574
|
+
campaign_id=1000000,
|
|
1575
|
+
)
|
|
1576
|
+
|
|
1577
|
+
|
|
1578
|
+
asyncio.run(main())
|
|
1579
|
+
"""
|
|
1580
|
+
_response = await self._raw_client.get_ab_test_campaign_result(campaign_id, request_options=request_options)
|
|
1581
|
+
return _response.data
|
|
1582
|
+
|
|
1583
|
+
async def email_export_recipients(
|
|
1584
|
+
self,
|
|
1585
|
+
campaign_id: int,
|
|
1586
|
+
*,
|
|
1587
|
+
recipients_type: EmailExportRecipientsRequestRecipientsType,
|
|
1588
|
+
notify_url: typing.Optional[str] = OMIT,
|
|
1589
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1590
|
+
) -> EmailExportRecipientsResponse:
|
|
1591
|
+
"""
|
|
1592
|
+
Parameters
|
|
1593
|
+
----------
|
|
1594
|
+
campaign_id : int
|
|
1595
|
+
Id of the campaign
|
|
1596
|
+
|
|
1597
|
+
recipients_type : EmailExportRecipientsRequestRecipientsType
|
|
1598
|
+
Type of recipients to export for a campaign
|
|
1599
|
+
|
|
1600
|
+
notify_url : typing.Optional[str]
|
|
1601
|
+
Webhook called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
|
|
1602
|
+
|
|
1603
|
+
request_options : typing.Optional[RequestOptions]
|
|
1604
|
+
Request-specific configuration.
|
|
1605
|
+
|
|
1606
|
+
Returns
|
|
1607
|
+
-------
|
|
1608
|
+
EmailExportRecipientsResponse
|
|
1609
|
+
process id created
|
|
1610
|
+
|
|
1611
|
+
Examples
|
|
1612
|
+
--------
|
|
1613
|
+
import asyncio
|
|
1614
|
+
|
|
1615
|
+
from brevo import AsyncBrevo
|
|
1616
|
+
|
|
1617
|
+
client = AsyncBrevo(
|
|
1618
|
+
api_key="YOUR_API_KEY",
|
|
1619
|
+
)
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
async def main() -> None:
|
|
1623
|
+
await client.email_campaigns.email_export_recipients(
|
|
1624
|
+
campaign_id=1000000,
|
|
1625
|
+
recipients_type="all",
|
|
1626
|
+
)
|
|
1627
|
+
|
|
1628
|
+
|
|
1629
|
+
asyncio.run(main())
|
|
1630
|
+
"""
|
|
1631
|
+
_response = await self._raw_client.email_export_recipients(
|
|
1632
|
+
campaign_id, recipients_type=recipients_type, notify_url=notify_url, request_options=request_options
|
|
1633
|
+
)
|
|
1634
|
+
return _response.data
|
|
1635
|
+
|
|
1636
|
+
async def send_email_campaign_now(
|
|
1637
|
+
self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
1638
|
+
) -> None:
|
|
1639
|
+
"""
|
|
1640
|
+
Parameters
|
|
1641
|
+
----------
|
|
1642
|
+
campaign_id : int
|
|
1643
|
+
Id of the campaign
|
|
1644
|
+
|
|
1645
|
+
request_options : typing.Optional[RequestOptions]
|
|
1646
|
+
Request-specific configuration.
|
|
1647
|
+
|
|
1648
|
+
Returns
|
|
1649
|
+
-------
|
|
1650
|
+
None
|
|
1651
|
+
|
|
1652
|
+
Examples
|
|
1653
|
+
--------
|
|
1654
|
+
import asyncio
|
|
1655
|
+
|
|
1656
|
+
from brevo import AsyncBrevo
|
|
1657
|
+
|
|
1658
|
+
client = AsyncBrevo(
|
|
1659
|
+
api_key="YOUR_API_KEY",
|
|
1660
|
+
)
|
|
1661
|
+
|
|
1662
|
+
|
|
1663
|
+
async def main() -> None:
|
|
1664
|
+
await client.email_campaigns.send_email_campaign_now(
|
|
1665
|
+
campaign_id=1000000,
|
|
1666
|
+
)
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
asyncio.run(main())
|
|
1670
|
+
"""
|
|
1671
|
+
_response = await self._raw_client.send_email_campaign_now(campaign_id, request_options=request_options)
|
|
1672
|
+
return _response.data
|
|
1673
|
+
|
|
1674
|
+
async def send_report(
|
|
1675
|
+
self,
|
|
1676
|
+
campaign_id: int,
|
|
1677
|
+
*,
|
|
1678
|
+
email: SendReportEmail,
|
|
1679
|
+
language: typing.Optional[SendReportLanguage] = OMIT,
|
|
1680
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1681
|
+
) -> None:
|
|
1682
|
+
"""
|
|
1683
|
+
A PDF will be sent to the specified email addresses
|
|
1684
|
+
|
|
1685
|
+
Parameters
|
|
1686
|
+
----------
|
|
1687
|
+
campaign_id : int
|
|
1688
|
+
Id of the campaign
|
|
1689
|
+
|
|
1690
|
+
email : SendReportEmail
|
|
1691
|
+
Custom attributes for the report email.
|
|
1692
|
+
|
|
1693
|
+
language : typing.Optional[SendReportLanguage]
|
|
1694
|
+
Language of email content for campaign report sending.
|
|
1695
|
+
|
|
1696
|
+
request_options : typing.Optional[RequestOptions]
|
|
1697
|
+
Request-specific configuration.
|
|
1698
|
+
|
|
1699
|
+
Returns
|
|
1700
|
+
-------
|
|
1701
|
+
None
|
|
1702
|
+
|
|
1703
|
+
Examples
|
|
1704
|
+
--------
|
|
1705
|
+
import asyncio
|
|
1706
|
+
|
|
1707
|
+
from brevo import AsyncBrevo, SendReportEmail
|
|
1708
|
+
|
|
1709
|
+
client = AsyncBrevo(
|
|
1710
|
+
api_key="YOUR_API_KEY",
|
|
1711
|
+
)
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
async def main() -> None:
|
|
1715
|
+
await client.email_campaigns.send_report(
|
|
1716
|
+
campaign_id=1000000,
|
|
1717
|
+
email=SendReportEmail(
|
|
1718
|
+
body="Please find attached the report of our last email campaign.",
|
|
1719
|
+
to=["jim.suehan@example.com"],
|
|
1720
|
+
),
|
|
1721
|
+
)
|
|
1722
|
+
|
|
1723
|
+
|
|
1724
|
+
asyncio.run(main())
|
|
1725
|
+
"""
|
|
1726
|
+
_response = await self._raw_client.send_report(
|
|
1727
|
+
campaign_id, email=email, language=language, request_options=request_options
|
|
1728
|
+
)
|
|
1729
|
+
return _response.data
|
|
1730
|
+
|
|
1731
|
+
async def send_test_email(
|
|
1732
|
+
self,
|
|
1733
|
+
campaign_id: int,
|
|
1734
|
+
*,
|
|
1735
|
+
email_to: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
1736
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1737
|
+
) -> None:
|
|
1738
|
+
"""
|
|
1739
|
+
Parameters
|
|
1740
|
+
----------
|
|
1741
|
+
campaign_id : int
|
|
1742
|
+
Id of the campaign
|
|
1743
|
+
|
|
1744
|
+
email_to : typing.Optional[typing.Sequence[str]]
|
|
1745
|
+
List of the email addresses of the recipients whom you wish to send the test mail. _If left empty, the test mail will be sent to your entire test list. You can not send more than 50 test emails per day_.
|
|
1746
|
+
|
|
1747
|
+
request_options : typing.Optional[RequestOptions]
|
|
1748
|
+
Request-specific configuration.
|
|
1749
|
+
|
|
1750
|
+
Returns
|
|
1751
|
+
-------
|
|
1752
|
+
None
|
|
1753
|
+
|
|
1754
|
+
Examples
|
|
1755
|
+
--------
|
|
1756
|
+
import asyncio
|
|
1757
|
+
|
|
1758
|
+
from brevo import AsyncBrevo
|
|
1759
|
+
|
|
1760
|
+
client = AsyncBrevo(
|
|
1761
|
+
api_key="YOUR_API_KEY",
|
|
1762
|
+
)
|
|
1763
|
+
|
|
1764
|
+
|
|
1765
|
+
async def main() -> None:
|
|
1766
|
+
await client.email_campaigns.send_test_email(
|
|
1767
|
+
campaign_id=1000000,
|
|
1768
|
+
)
|
|
1769
|
+
|
|
1770
|
+
|
|
1771
|
+
asyncio.run(main())
|
|
1772
|
+
"""
|
|
1773
|
+
_response = await self._raw_client.send_test_email(
|
|
1774
|
+
campaign_id, email_to=email_to, request_options=request_options
|
|
1775
|
+
)
|
|
1776
|
+
return _response.data
|
|
1777
|
+
|
|
1778
|
+
async def get_shared_template_url(
|
|
1779
|
+
self, campaign_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
1780
|
+
) -> GetSharedTemplateUrlResponse:
|
|
1781
|
+
"""
|
|
1782
|
+
Get a unique URL to share & import an email template from one Brevo account to another.
|
|
1783
|
+
|
|
1784
|
+
Parameters
|
|
1785
|
+
----------
|
|
1786
|
+
campaign_id : int
|
|
1787
|
+
Id of the campaign or template
|
|
1788
|
+
|
|
1789
|
+
request_options : typing.Optional[RequestOptions]
|
|
1790
|
+
Request-specific configuration.
|
|
1791
|
+
|
|
1792
|
+
Returns
|
|
1793
|
+
-------
|
|
1794
|
+
GetSharedTemplateUrlResponse
|
|
1795
|
+
Shared template URL information
|
|
1796
|
+
|
|
1797
|
+
Examples
|
|
1798
|
+
--------
|
|
1799
|
+
import asyncio
|
|
1800
|
+
|
|
1801
|
+
from brevo import AsyncBrevo
|
|
1802
|
+
|
|
1803
|
+
client = AsyncBrevo(
|
|
1804
|
+
api_key="YOUR_API_KEY",
|
|
1805
|
+
)
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
async def main() -> None:
|
|
1809
|
+
await client.email_campaigns.get_shared_template_url(
|
|
1810
|
+
campaign_id=1000000,
|
|
1811
|
+
)
|
|
1812
|
+
|
|
1813
|
+
|
|
1814
|
+
asyncio.run(main())
|
|
1815
|
+
"""
|
|
1816
|
+
_response = await self._raw_client.get_shared_template_url(campaign_id, request_options=request_options)
|
|
1817
|
+
return _response.data
|
|
1818
|
+
|
|
1819
|
+
async def update_campaign_status(
|
|
1820
|
+
self,
|
|
1821
|
+
campaign_id: int,
|
|
1822
|
+
*,
|
|
1823
|
+
status: typing.Optional[UpdateCampaignStatusStatus] = OMIT,
|
|
1824
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1825
|
+
) -> None:
|
|
1826
|
+
"""
|
|
1827
|
+
Parameters
|
|
1828
|
+
----------
|
|
1829
|
+
campaign_id : int
|
|
1830
|
+
Id of the campaign
|
|
1831
|
+
|
|
1832
|
+
status : typing.Optional[UpdateCampaignStatusStatus]
|
|
1833
|
+
Note:- **replicateTemplate** status will be available **only for template type campaigns.**
|
|
1834
|
+
|
|
1835
|
+
request_options : typing.Optional[RequestOptions]
|
|
1836
|
+
Request-specific configuration.
|
|
1837
|
+
|
|
1838
|
+
Returns
|
|
1839
|
+
-------
|
|
1840
|
+
None
|
|
1841
|
+
|
|
1842
|
+
Examples
|
|
1843
|
+
--------
|
|
1844
|
+
import asyncio
|
|
1845
|
+
|
|
1846
|
+
from brevo import AsyncBrevo
|
|
1847
|
+
|
|
1848
|
+
client = AsyncBrevo(
|
|
1849
|
+
api_key="YOUR_API_KEY",
|
|
1850
|
+
)
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
async def main() -> None:
|
|
1854
|
+
await client.email_campaigns.update_campaign_status(
|
|
1855
|
+
campaign_id=1000000,
|
|
1856
|
+
)
|
|
1857
|
+
|
|
1858
|
+
|
|
1859
|
+
asyncio.run(main())
|
|
1860
|
+
"""
|
|
1861
|
+
_response = await self._raw_client.update_campaign_status(
|
|
1862
|
+
campaign_id, status=status, request_options=request_options
|
|
1863
|
+
)
|
|
1864
|
+
return _response.data
|