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.
Files changed (843) hide show
  1. brevo/__init__.py +2253 -0
  2. brevo/account/__init__.py +79 -0
  3. brevo/account/client.py +317 -0
  4. brevo/account/raw_client.py +341 -0
  5. brevo/account/types/__init__.py +77 -0
  6. brevo/account/types/get_account_activity_response.py +24 -0
  7. brevo/account/types/get_account_activity_response_logs_item.py +45 -0
  8. brevo/account/types/get_account_response.py +85 -0
  9. brevo/account/types/get_account_response_address.py +43 -0
  10. brevo/account/types/get_account_response_date_time_preferences.py +38 -0
  11. brevo/account/types/get_account_response_marketing_automation.py +29 -0
  12. brevo/account/types/get_account_response_plan_item.py +53 -0
  13. brevo/account/types/get_account_response_plan_item_type.py +5 -0
  14. brevo/account/types/get_account_response_plan_verticals_item.py +63 -0
  15. brevo/account/types/get_account_response_plan_verticals_item_plan_category.py +5 -0
  16. brevo/account/types/get_account_response_plan_verticals_item_status.py +5 -0
  17. brevo/account/types/get_account_response_plan_verticals_item_users.py +35 -0
  18. brevo/account/types/get_account_response_relay.py +34 -0
  19. brevo/account/types/get_account_response_relay_data.py +40 -0
  20. brevo/balance/__init__.py +139 -0
  21. brevo/balance/client.py +2589 -0
  22. brevo/balance/raw_client.py +4538 -0
  23. brevo/balance/types/__init__.py +169 -0
  24. brevo/balance/types/create_balance_limit_request_constraint_type.py +5 -0
  25. brevo/balance/types/create_balance_limit_request_duration_unit.py +5 -0
  26. brevo/balance/types/create_balance_limit_request_transaction_type.py +5 -0
  27. brevo/balance/types/create_balance_order_response.py +96 -0
  28. brevo/balance/types/get_balance_definition_list_request_sort.py +5 -0
  29. brevo/balance/types/get_balance_definition_list_request_sort_field.py +5 -0
  30. brevo/balance/types/get_balance_definition_list_request_version.py +5 -0
  31. brevo/balance/types/get_balance_definition_list_response.py +24 -0
  32. brevo/balance/types/get_balance_definition_request_version.py +5 -0
  33. brevo/balance/types/get_balance_limit_request_version.py +5 -0
  34. brevo/balance/types/get_contact_balances_response.py +30 -0
  35. brevo/balance/types/get_contact_balances_response_balances_item.py +33 -0
  36. brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_request_sort.py +5 -0
  37. brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_request_sort_field.py +7 -0
  38. brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response.py +57 -0
  39. brevo/balance/types/get_loyalty_balance_programs_pid_transaction_history_response_transaction_history_item.py +77 -0
  40. brevo/balance/types/get_subscription_balances_response.py +21 -0
  41. brevo/balance/types/get_subscription_balances_response_balance_item.py +30 -0
  42. brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_availability_duration_modifier.py +7 -0
  43. brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_availability_duration_unit.py +7 -0
  44. brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_option_amount_overtaking_strategy.py +7 -0
  45. brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_option_credit_rounding.py +7 -0
  46. brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_balance_option_debit_rounding.py +7 -0
  47. brevo/balance/types/post_loyalty_balance_programs_pid_balance_definitions_request_unit.py +26 -0
  48. brevo/balance/types/post_loyalty_balance_programs_pid_subscriptions_cid_balances_response.py +66 -0
  49. brevo/balance/types/update_balance_definition_request_balance_availability_duration_modifier.py +7 -0
  50. brevo/balance/types/update_balance_definition_request_balance_availability_duration_unit.py +7 -0
  51. brevo/balance/types/update_balance_definition_request_balance_option_amount_overtaking_strategy.py +7 -0
  52. brevo/balance/types/update_balance_definition_request_balance_option_credit_rounding.py +7 -0
  53. brevo/balance/types/update_balance_definition_request_balance_option_debit_rounding.py +7 -0
  54. brevo/balance/types/update_balance_definition_request_unit.py +26 -0
  55. brevo/balance/types/update_balance_limit_request_constraint_type.py +5 -0
  56. brevo/balance/types/update_balance_limit_request_duration_unit.py +5 -0
  57. brevo/balance/types/update_balance_limit_request_transaction_type.py +5 -0
  58. brevo/client.py +773 -0
  59. brevo/companies/__init__.py +61 -0
  60. brevo/companies/client.py +994 -0
  61. brevo/companies/raw_client.py +1285 -0
  62. brevo/companies/types/__init__.py +59 -0
  63. brevo/companies/types/get_companies_request_sort.py +5 -0
  64. brevo/companies/types/get_companies_response.py +28 -0
  65. brevo/companies/types/get_crm_attributes_companies_response_item.py +40 -0
  66. brevo/companies/types/post_companies_import_response.py +26 -0
  67. brevo/companies/types/post_companies_response.py +27 -0
  68. brevo/companies/types/post_crm_attributes_request_attribute_type.py +7 -0
  69. brevo/companies/types/post_crm_attributes_request_object_type.py +5 -0
  70. brevo/companies/types/post_crm_attributes_response.py +23 -0
  71. brevo/contacts/__init__.py +289 -0
  72. brevo/contacts/client.py +3298 -0
  73. brevo/contacts/raw_client.py +4614 -0
  74. brevo/contacts/types/__init__.py +309 -0
  75. brevo/contacts/types/add_contact_to_list_request_body.py +11 -0
  76. brevo/contacts/types/add_contact_to_list_request_body_emails.py +23 -0
  77. brevo/contacts/types/add_contact_to_list_request_body_ext_ids.py +29 -0
  78. brevo/contacts/types/add_contact_to_list_request_body_ids.py +23 -0
  79. brevo/contacts/types/create_attribute_request_attribute_category.py +7 -0
  80. brevo/contacts/types/create_attribute_request_enumeration_item.py +28 -0
  81. brevo/contacts/types/create_attribute_request_type.py +7 -0
  82. brevo/contacts/types/create_contact_request_attributes_value.py +5 -0
  83. brevo/contacts/types/create_contact_response.py +23 -0
  84. brevo/contacts/types/create_doi_contact_request_attributes_value.py +5 -0
  85. brevo/contacts/types/create_folder_response.py +23 -0
  86. brevo/contacts/types/create_list_response.py +23 -0
  87. brevo/contacts/types/delete_attribute_request_attribute_category.py +7 -0
  88. brevo/contacts/types/delete_contact_request_identifier.py +5 -0
  89. brevo/contacts/types/delete_contact_request_identifier_type.py +7 -0
  90. brevo/contacts/types/get_attributes_response.py +24 -0
  91. brevo/contacts/types/get_attributes_response_attributes_item.py +57 -0
  92. brevo/contacts/types/get_attributes_response_attributes_item_category.py +7 -0
  93. brevo/contacts/types/get_attributes_response_attributes_item_enumeration_item.py +28 -0
  94. brevo/contacts/types/get_attributes_response_attributes_item_type.py +7 -0
  95. brevo/contacts/types/get_contact_info_request_identifier.py +5 -0
  96. brevo/contacts/types/get_contact_info_request_identifier_type.py +7 -0
  97. brevo/contacts/types/get_contact_info_response.py +80 -0
  98. brevo/contacts/types/get_contact_info_response_attributes.py +22 -0
  99. brevo/contacts/types/get_contact_info_response_statistics.py +86 -0
  100. brevo/contacts/types/get_contact_info_response_statistics_clicked_item.py +33 -0
  101. brevo/contacts/types/get_contact_info_response_statistics_clicked_item_links_item.py +40 -0
  102. brevo/contacts/types/get_contact_info_response_statistics_complaints_item.py +31 -0
  103. brevo/contacts/types/get_contact_info_response_statistics_delivered_item.py +31 -0
  104. brevo/contacts/types/get_contact_info_response_statistics_hard_bounces_item.py +31 -0
  105. brevo/contacts/types/get_contact_info_response_statistics_messages_sent_item.py +31 -0
  106. brevo/contacts/types/get_contact_info_response_statistics_opened_item.py +40 -0
  107. brevo/contacts/types/get_contact_info_response_statistics_soft_bounces_item.py +31 -0
  108. brevo/contacts/types/get_contact_info_response_statistics_transac_attributes_item.py +18 -0
  109. brevo/contacts/types/get_contact_info_response_statistics_unsubscriptions.py +43 -0
  110. brevo/contacts/types/get_contact_info_response_statistics_unsubscriptions_admin_unsubscription_item.py +30 -0
  111. brevo/contacts/types/get_contact_info_response_statistics_unsubscriptions_user_unsubscription_item.py +35 -0
  112. brevo/contacts/types/get_contact_stats_request_identifier.py +5 -0
  113. brevo/contacts/types/get_contact_stats_response.py +59 -0
  114. brevo/contacts/types/get_contact_stats_response_clicked_item.py +28 -0
  115. brevo/contacts/types/get_contact_stats_response_clicked_item_links_item.py +40 -0
  116. brevo/contacts/types/get_contact_stats_response_complaints_item.py +31 -0
  117. brevo/contacts/types/get_contact_stats_response_delivered_item.py +31 -0
  118. brevo/contacts/types/get_contact_stats_response_hard_bounces_item.py +31 -0
  119. brevo/contacts/types/get_contact_stats_response_messages_sent_item.py +31 -0
  120. brevo/contacts/types/get_contact_stats_response_opened_item.py +40 -0
  121. brevo/contacts/types/get_contact_stats_response_soft_bounces_item.py +31 -0
  122. brevo/contacts/types/get_contact_stats_response_transac_attributes_item.py +31 -0
  123. brevo/contacts/types/get_contact_stats_response_unsubscriptions.py +39 -0
  124. brevo/contacts/types/get_contact_stats_response_unsubscriptions_admin_unsubscription_item.py +30 -0
  125. brevo/contacts/types/get_contact_stats_response_unsubscriptions_user_unsubscription_item.py +35 -0
  126. brevo/contacts/types/get_contacts_from_list_request_sort.py +5 -0
  127. brevo/contacts/types/get_contacts_request_sort.py +5 -0
  128. brevo/contacts/types/get_folder_lists_request_sort.py +5 -0
  129. brevo/contacts/types/get_folder_lists_response.py +26 -0
  130. brevo/contacts/types/get_folders_request_sort.py +5 -0
  131. brevo/contacts/types/get_folders_response.py +26 -0
  132. brevo/contacts/types/get_list_response.py +68 -0
  133. brevo/contacts/types/get_list_response_campaign_stats_item.py +26 -0
  134. brevo/contacts/types/get_lists_request_sort.py +5 -0
  135. brevo/contacts/types/get_lists_response.py +29 -0
  136. brevo/contacts/types/get_lists_response_lists_item.py +49 -0
  137. brevo/contacts/types/get_segments_request_sort.py +5 -0
  138. brevo/contacts/types/get_segments_response.py +29 -0
  139. brevo/contacts/types/get_segments_response_segments_item.py +41 -0
  140. brevo/contacts/types/import_contacts_request_json_body_item.py +25 -0
  141. brevo/contacts/types/import_contacts_request_new_list.py +41 -0
  142. brevo/contacts/types/import_contacts_response.py +26 -0
  143. brevo/contacts/types/remove_contact_from_list_request_body.py +15 -0
  144. brevo/contacts/types/remove_contact_from_list_request_body_all.py +29 -0
  145. brevo/contacts/types/remove_contact_from_list_request_body_emails.py +23 -0
  146. brevo/contacts/types/remove_contact_from_list_request_body_ext_ids.py +29 -0
  147. brevo/contacts/types/remove_contact_from_list_request_body_ids.py +23 -0
  148. brevo/contacts/types/request_contact_export_request_custom_contact_filter.py +90 -0
  149. brevo/contacts/types/request_contact_export_request_custom_contact_filter_action_for_contacts.py +7 -0
  150. brevo/contacts/types/request_contact_export_request_custom_contact_filter_action_for_email_campaigns.py +8 -0
  151. brevo/contacts/types/request_contact_export_request_custom_contact_filter_action_for_sms_campaigns.py +7 -0
  152. brevo/contacts/types/request_contact_export_response.py +26 -0
  153. brevo/contacts/types/update_attribute_request_attribute_category.py +7 -0
  154. brevo/contacts/types/update_attribute_request_enumeration_item.py +28 -0
  155. brevo/contacts/types/update_batch_contacts_request_contacts_item.py +80 -0
  156. brevo/contacts/types/update_contact_request_attributes_value.py +5 -0
  157. brevo/contacts/types/update_contact_request_identifier.py +5 -0
  158. brevo/contacts/types/update_contact_request_identifier_type.py +7 -0
  159. brevo/conversations/__init__.py +34 -0
  160. brevo/conversations/client.py +912 -0
  161. brevo/conversations/raw_client.py +1328 -0
  162. brevo/conversations/types/__init__.py +36 -0
  163. brevo/conversations/types/put_conversations_visitor_group_response.py +31 -0
  164. brevo/core/__init__.py +125 -0
  165. brevo/core/api_error.py +23 -0
  166. brevo/core/client_wrapper.py +100 -0
  167. brevo/core/datetime_utils.py +28 -0
  168. brevo/core/file.py +67 -0
  169. brevo/core/force_multipart.py +18 -0
  170. brevo/core/http_client.py +776 -0
  171. brevo/core/http_response.py +59 -0
  172. brevo/core/http_sse/__init__.py +42 -0
  173. brevo/core/http_sse/_api.py +112 -0
  174. brevo/core/http_sse/_decoders.py +61 -0
  175. brevo/core/http_sse/_exceptions.py +7 -0
  176. brevo/core/http_sse/_models.py +17 -0
  177. brevo/core/jsonable_encoder.py +108 -0
  178. brevo/core/logging.py +107 -0
  179. brevo/core/pydantic_utilities.py +577 -0
  180. brevo/core/query_encoder.py +58 -0
  181. brevo/core/remove_none_from_dict.py +11 -0
  182. brevo/core/request_options.py +35 -0
  183. brevo/core/serialization.py +276 -0
  184. brevo/core/unchecked_base_model.py +376 -0
  185. brevo/coupons/__init__.py +49 -0
  186. brevo/coupons/client.py +550 -0
  187. brevo/coupons/raw_client.py +839 -0
  188. brevo/coupons/types/__init__.py +47 -0
  189. brevo/coupons/types/create_coupon_collection_response.py +23 -0
  190. brevo/coupons/types/get_coupon_collections_request_sort.py +5 -0
  191. brevo/coupons/types/get_coupon_collections_request_sort_by.py +7 -0
  192. brevo/coupons/types/update_coupon_collection_response.py +35 -0
  193. brevo/custom_objects/__init__.py +139 -0
  194. brevo/custom_objects/client.py +437 -0
  195. brevo/custom_objects/raw_client.py +711 -0
  196. brevo/custom_objects/types/__init__.py +177 -0
  197. brevo/custom_objects/types/batch_delete_object_records_request_identifiers.py +10 -0
  198. brevo/custom_objects/types/batch_delete_object_records_request_identifiers_ext_ids.py +23 -0
  199. brevo/custom_objects/types/batch_delete_object_records_request_identifiers_ids.py +23 -0
  200. brevo/custom_objects/types/batch_delete_object_records_response.py +27 -0
  201. brevo/custom_objects/types/getrecords_request_association.py +5 -0
  202. brevo/custom_objects/types/getrecords_request_sort.py +5 -0
  203. brevo/custom_objects/types/getrecords_response.py +26 -0
  204. brevo/custom_objects/types/getrecords_response_records_item.py +51 -0
  205. brevo/custom_objects/types/getrecords_response_records_item_associations_item.py +10 -0
  206. brevo/custom_objects/types/getrecords_response_records_item_associations_item_one.py +28 -0
  207. brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item.py +15 -0
  208. brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item_one.py +28 -0
  209. brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item_one_identifiers.py +27 -0
  210. brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item_zero.py +28 -0
  211. brevo/custom_objects/types/getrecords_response_records_item_associations_item_one_records_item_zero_identifiers.py +27 -0
  212. brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero.py +28 -0
  213. brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item.py +15 -0
  214. brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item_one.py +28 -0
  215. brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item_one_identifiers.py +27 -0
  216. brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item_zero.py +28 -0
  217. brevo/custom_objects/types/getrecords_response_records_item_associations_item_zero_records_item_zero_identifiers.py +27 -0
  218. brevo/custom_objects/types/getrecords_response_records_item_identifiers.py +32 -0
  219. brevo/custom_objects/types/upsertrecords_request_records_item.py +31 -0
  220. brevo/custom_objects/types/upsertrecords_request_records_item_associations_item.py +12 -0
  221. brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one.py +28 -0
  222. brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item.py +15 -0
  223. brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_one.py +20 -0
  224. brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero.py +28 -0
  225. brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_one_records_item_zero_identifiers.py +32 -0
  226. brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero.py +28 -0
  227. brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero_records_item.py +23 -0
  228. brevo/custom_objects/types/upsertrecords_request_records_item_associations_item_zero_records_item_identifiers.py +28 -0
  229. brevo/custom_objects/types/upsertrecords_request_records_item_identifiers.py +32 -0
  230. brevo/custom_objects/types/upsertrecords_response.py +29 -0
  231. brevo/deals/__init__.py +52 -0
  232. brevo/deals/client.py +1013 -0
  233. brevo/deals/raw_client.py +1326 -0
  234. brevo/deals/types/__init__.py +50 -0
  235. brevo/deals/types/get_crm_attributes_deals_response_item.py +40 -0
  236. brevo/deals/types/get_crm_deals_request_sort.py +5 -0
  237. brevo/deals/types/get_crm_deals_response.py +28 -0
  238. brevo/deals/types/post_crm_deals_import_response.py +26 -0
  239. brevo/deals/types/post_crm_deals_response.py +27 -0
  240. brevo/domains/__init__.py +79 -0
  241. brevo/domains/client.py +506 -0
  242. brevo/domains/raw_client.py +698 -0
  243. brevo/domains/types/__init__.py +83 -0
  244. brevo/domains/types/authenticate_domain_response.py +28 -0
  245. brevo/domains/types/create_domain_response.py +44 -0
  246. brevo/domains/types/create_domain_response_dns_records.py +40 -0
  247. brevo/domains/types/create_domain_response_dns_records_brevo_code.py +42 -0
  248. brevo/domains/types/create_domain_response_dns_records_dkim_record.py +42 -0
  249. brevo/domains/types/create_domain_response_dns_records_dmarc_record.py +42 -0
  250. brevo/domains/types/get_domain_configuration_response.py +41 -0
  251. brevo/domains/types/get_domain_configuration_response_dns_records.py +44 -0
  252. brevo/domains/types/get_domain_configuration_response_dns_records_brevo_code.py +42 -0
  253. brevo/domains/types/get_domain_configuration_response_dns_records_dkim_record.py +42 -0
  254. brevo/domains/types/get_domain_configuration_response_dns_records_dmarc_record.py +42 -0
  255. brevo/domains/types/get_domains_response.py +39 -0
  256. brevo/domains/types/get_domains_response_domains_item.py +56 -0
  257. brevo/domains/types/get_domains_response_domains_item_creator.py +41 -0
  258. brevo/ecommerce/__init__.py +112 -0
  259. brevo/ecommerce/client.py +2176 -0
  260. brevo/ecommerce/raw_client.py +2895 -0
  261. brevo/ecommerce/types/__init__.py +124 -0
  262. brevo/ecommerce/types/create_batch_order_response.py +28 -0
  263. brevo/ecommerce/types/create_product_alert_request_contact_identifiers.py +33 -0
  264. brevo/ecommerce/types/create_update_batch_category_request_categories_item.py +48 -0
  265. brevo/ecommerce/types/create_update_batch_category_response.py +31 -0
  266. brevo/ecommerce/types/create_update_batch_products_request_products_item.py +89 -0
  267. brevo/ecommerce/types/create_update_batch_products_request_products_item_meta_info_value.py +5 -0
  268. brevo/ecommerce/types/create_update_batch_products_response.py +31 -0
  269. brevo/ecommerce/types/create_update_category_response.py +23 -0
  270. brevo/ecommerce/types/create_update_product_request_meta_info_value.py +5 -0
  271. brevo/ecommerce/types/create_update_product_response.py +23 -0
  272. brevo/ecommerce/types/get_categories_request_sort.py +5 -0
  273. brevo/ecommerce/types/get_categories_response.py +25 -0
  274. brevo/ecommerce/types/get_ecommerce_attribution_metrics_conversion_source_conversion_source_id_request_conversion_source.py +7 -0
  275. brevo/ecommerce/types/get_ecommerce_attribution_metrics_conversion_source_conversion_source_id_response.py +40 -0
  276. brevo/ecommerce/types/get_ecommerce_attribution_metrics_conversion_source_conversion_source_id_response_conversion_source.py +7 -0
  277. brevo/ecommerce/types/get_ecommerce_attribution_metrics_response.py +30 -0
  278. brevo/ecommerce/types/get_ecommerce_attribution_metrics_response_totals.py +32 -0
  279. brevo/ecommerce/types/get_ecommerce_attribution_products_conversion_source_conversion_source_id_request_conversion_source.py +7 -0
  280. brevo/ecommerce/types/get_ecommerce_attribution_products_conversion_source_conversion_source_id_response.py +28 -0
  281. brevo/ecommerce/types/get_ecommerce_attribution_products_conversion_source_conversion_source_id_response_products_item.py +33 -0
  282. brevo/ecommerce/types/get_ecommerce_config_display_currency_response.py +23 -0
  283. brevo/ecommerce/types/get_orders_request_sort.py +5 -0
  284. brevo/ecommerce/types/get_products_request_sort.py +5 -0
  285. brevo/ecommerce/types/get_products_response.py +26 -0
  286. brevo/ecommerce/types/set_config_display_currency_response.py +23 -0
  287. brevo/email_campaigns/__init__.py +139 -0
  288. brevo/email_campaigns/client.py +1864 -0
  289. brevo/email_campaigns/raw_client.py +2472 -0
  290. brevo/email_campaigns/types/__init__.py +141 -0
  291. brevo/email_campaigns/types/create_email_campaign_request_email_expiration_date.py +33 -0
  292. brevo/email_campaigns/types/create_email_campaign_request_email_expiration_date_unit.py +5 -0
  293. brevo/email_campaigns/types/create_email_campaign_request_recipients.py +52 -0
  294. brevo/email_campaigns/types/create_email_campaign_request_sender.py +37 -0
  295. brevo/email_campaigns/types/create_email_campaign_request_winner_criteria.py +5 -0
  296. brevo/email_campaigns/types/create_email_campaign_response.py +23 -0
  297. brevo/email_campaigns/types/email_export_recipients_request_recipients_type.py +10 -0
  298. brevo/email_campaigns/types/email_export_recipients_response.py +26 -0
  299. brevo/email_campaigns/types/get_ab_test_campaign_result_response.py +64 -0
  300. brevo/email_campaigns/types/get_ab_test_campaign_result_response_clicked_links.py +28 -0
  301. brevo/email_campaigns/types/get_ab_test_campaign_result_response_statistics.py +32 -0
  302. brevo/email_campaigns/types/get_ab_test_campaign_result_response_winning_criteria.py +5 -0
  303. brevo/email_campaigns/types/get_ab_test_campaign_result_response_winning_version.py +7 -0
  304. brevo/email_campaigns/types/get_email_campaign_request_statistics.py +7 -0
  305. brevo/email_campaigns/types/get_email_campaign_response.py +234 -0
  306. brevo/email_campaigns/types/get_email_campaign_response_sender.py +33 -0
  307. brevo/email_campaigns/types/get_email_campaign_response_status.py +7 -0
  308. brevo/email_campaigns/types/get_email_campaign_response_type.py +5 -0
  309. brevo/email_campaigns/types/get_email_campaigns_request_sort.py +5 -0
  310. brevo/email_campaigns/types/get_email_campaigns_request_statistics.py +7 -0
  311. brevo/email_campaigns/types/get_email_campaigns_request_status.py +7 -0
  312. brevo/email_campaigns/types/get_email_campaigns_request_type.py +5 -0
  313. brevo/email_campaigns/types/get_email_campaigns_response.py +25 -0
  314. brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item.py +234 -0
  315. brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_sender.py +33 -0
  316. brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_status.py +7 -0
  317. brevo/email_campaigns/types/get_email_campaigns_response_campaigns_item_type.py +5 -0
  318. brevo/email_campaigns/types/get_shared_template_url_response.py +29 -0
  319. brevo/email_campaigns/types/update_email_campaign_request_email_expiration_date.py +33 -0
  320. brevo/email_campaigns/types/update_email_campaign_request_email_expiration_date_unit.py +5 -0
  321. brevo/email_campaigns/types/update_email_campaign_request_recipients.py +53 -0
  322. brevo/email_campaigns/types/update_email_campaign_request_sender.py +37 -0
  323. brevo/email_campaigns/types/update_email_campaign_request_winner_criteria.py +5 -0
  324. brevo/email_campaigns/types/upload_image_to_gallery_response.py +23 -0
  325. brevo/environment.py +7 -0
  326. brevo/errors/__init__.py +80 -0
  327. brevo/errors/bad_request_error.py +10 -0
  328. brevo/errors/conflict_error.py +11 -0
  329. brevo/errors/expectation_failed_error.py +11 -0
  330. brevo/errors/failed_dependency_error.py +10 -0
  331. brevo/errors/forbidden_error.py +10 -0
  332. brevo/errors/internal_server_error.py +10 -0
  333. brevo/errors/method_not_allowed_error.py +11 -0
  334. brevo/errors/not_found_error.py +10 -0
  335. brevo/errors/payment_required_error.py +11 -0
  336. brevo/errors/precondition_failed_error.py +11 -0
  337. brevo/errors/too_early_error.py +11 -0
  338. brevo/errors/too_many_requests_error.py +11 -0
  339. brevo/errors/unauthorized_error.py +10 -0
  340. brevo/errors/unprocessable_entity_error.py +11 -0
  341. brevo/errors/unsupported_media_type_error.py +11 -0
  342. brevo/event/__init__.py +52 -0
  343. brevo/event/client.py +184 -0
  344. brevo/event/raw_client.py +230 -0
  345. brevo/event/types/__init__.py +50 -0
  346. brevo/event/types/create_event_request_contact_properties_value.py +5 -0
  347. brevo/event/types/create_event_request_event_properties_value.py +5 -0
  348. brevo/event/types/create_event_request_identifiers.py +52 -0
  349. brevo/event/types/create_event_request_object.py +33 -0
  350. brevo/event/types/create_event_request_object_identifiers.py +32 -0
  351. brevo/external_feeds/__init__.py +79 -0
  352. brevo/external_feeds/client.py +915 -0
  353. brevo/external_feeds/raw_client.py +1087 -0
  354. brevo/external_feeds/types/__init__.py +77 -0
  355. brevo/external_feeds/types/create_external_feed_request_auth_type.py +5 -0
  356. brevo/external_feeds/types/create_external_feed_request_headers_item.py +28 -0
  357. brevo/external_feeds/types/create_external_feed_response.py +23 -0
  358. brevo/external_feeds/types/get_all_external_feeds_request_auth_type.py +5 -0
  359. brevo/external_feeds/types/get_all_external_feeds_request_sort.py +5 -0
  360. brevo/external_feeds/types/get_all_external_feeds_response.py +29 -0
  361. brevo/external_feeds/types/get_all_external_feeds_response_feeds_item.py +96 -0
  362. brevo/external_feeds/types/get_all_external_feeds_response_feeds_item_auth_type.py +5 -0
  363. brevo/external_feeds/types/get_all_external_feeds_response_feeds_item_headers_item.py +28 -0
  364. brevo/external_feeds/types/get_external_feed_by_uuid_response.py +105 -0
  365. brevo/external_feeds/types/get_external_feed_by_uuid_response_auth_type.py +5 -0
  366. brevo/external_feeds/types/get_external_feed_by_uuid_response_headers_item.py +28 -0
  367. brevo/external_feeds/types/update_external_feed_request_auth_type.py +5 -0
  368. brevo/external_feeds/types/update_external_feed_request_headers_item.py +28 -0
  369. brevo/files/__init__.py +38 -0
  370. brevo/files/client.py +479 -0
  371. brevo/files/raw_client.py +675 -0
  372. brevo/files/types/__init__.py +40 -0
  373. brevo/files/types/get_crm_files_id_response.py +30 -0
  374. brevo/files/types/get_crm_files_request_entity.py +5 -0
  375. brevo/files/types/get_crm_files_request_sort.py +5 -0
  376. brevo/inbound_parsing/__init__.py +58 -0
  377. brevo/inbound_parsing/client.py +323 -0
  378. brevo/inbound_parsing/raw_client.py +420 -0
  379. brevo/inbound_parsing/types/__init__.py +60 -0
  380. brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response.py +72 -0
  381. brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response_attachments_item.py +40 -0
  382. brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response_logs_item.py +30 -0
  383. brevo/inbound_parsing/types/get_inbound_email_events_by_uuid_response_logs_item_type.py +7 -0
  384. brevo/inbound_parsing/types/get_inbound_email_events_request_sort.py +5 -0
  385. brevo/inbound_parsing/types/get_inbound_email_events_response.py +21 -0
  386. brevo/inbound_parsing/types/get_inbound_email_events_response_events_item.py +42 -0
  387. brevo/master_account/__init__.py +202 -0
  388. brevo/master_account/client.py +2757 -0
  389. brevo/master_account/raw_client.py +3351 -0
  390. brevo/master_account/types/__init__.py +244 -0
  391. brevo/master_account/types/get_corporate_group_id_response.py +31 -0
  392. brevo/master_account/types/get_corporate_group_id_response_group.py +35 -0
  393. brevo/master_account/types/get_corporate_group_id_response_sub_accounts_item.py +35 -0
  394. brevo/master_account/types/get_corporate_group_id_response_users_item.py +36 -0
  395. brevo/master_account/types/get_corporate_invited_users_list_response.py +24 -0
  396. brevo/master_account/types/get_corporate_invited_users_list_response_users_item.py +50 -0
  397. brevo/master_account/types/get_corporate_invited_users_list_response_users_item_feature_access.py +69 -0
  398. brevo/master_account/types/get_corporate_invited_users_list_response_users_item_groups.py +32 -0
  399. brevo/master_account/types/get_corporate_ip_response_item.py +22 -0
  400. brevo/master_account/types/get_corporate_master_account_response.py +57 -0
  401. brevo/master_account/types/get_corporate_master_account_response_billing_info.py +48 -0
  402. brevo/master_account/types/get_corporate_master_account_response_billing_info_address.py +50 -0
  403. brevo/master_account/types/get_corporate_master_account_response_billing_info_name.py +35 -0
  404. brevo/master_account/types/get_corporate_master_account_response_plan_info.py +63 -0
  405. brevo/master_account/types/get_corporate_master_account_response_plan_info_features_item.py +62 -0
  406. brevo/master_account/types/get_corporate_master_account_response_plan_info_plan_period.py +5 -0
  407. brevo/master_account/types/get_corporate_sub_account_id_response.py +48 -0
  408. brevo/master_account/types/get_corporate_sub_account_id_response_groups_item.py +28 -0
  409. brevo/master_account/types/get_corporate_sub_account_id_response_plan_info.py +42 -0
  410. brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits.py +65 -0
  411. brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_emails.py +32 -0
  412. brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_external_feeds.py +33 -0
  413. brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_sms.py +32 -0
  414. brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_whatsapp.py +32 -0
  415. brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_credits_wp_subscribers.py +32 -0
  416. brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features.py +58 -0
  417. brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features_inbox.py +32 -0
  418. brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features_landing_page.py +32 -0
  419. brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features_sales_users.py +33 -0
  420. brevo/master_account/types/get_corporate_sub_account_id_response_plan_info_features_users.py +32 -0
  421. brevo/master_account/types/get_corporate_sub_account_response.py +32 -0
  422. brevo/master_account/types/get_corporate_sub_account_response_sub_accounts_item.py +48 -0
  423. brevo/master_account/types/get_corporate_sub_account_response_sub_accounts_item_groups_item.py +28 -0
  424. brevo/master_account/types/get_corporate_user_permission_response.py +40 -0
  425. brevo/master_account/types/get_corporate_user_permission_response_feature_access.py +62 -0
  426. brevo/master_account/types/get_corporate_user_permission_response_groups_item.py +32 -0
  427. brevo/master_account/types/get_sub_account_groups_response_item.py +30 -0
  428. brevo/master_account/types/invite_admin_user_request_privileges_item.py +38 -0
  429. brevo/master_account/types/invite_admin_user_request_privileges_item_feature.py +18 -0
  430. brevo/master_account/types/invite_admin_user_request_privileges_item_permissions_item.py +7 -0
  431. brevo/master_account/types/invite_admin_user_response.py +20 -0
  432. brevo/master_account/types/post_corporate_group_response.py +20 -0
  433. brevo/master_account/types/post_corporate_sub_account_key_response.py +28 -0
  434. brevo/master_account/types/post_corporate_sub_account_request_language.py +5 -0
  435. brevo/master_account/types/post_corporate_sub_account_response.py +23 -0
  436. brevo/master_account/types/post_corporate_sub_account_sso_token_request_target.py +17 -0
  437. brevo/master_account/types/put_corporate_sub_account_id_plan_request_credits.py +59 -0
  438. brevo/master_account/types/put_corporate_sub_account_id_plan_request_features.py +44 -0
  439. brevo/master_account/types/put_corporate_sub_accounts_plan_request_credits.py +59 -0
  440. brevo/master_account/types/put_corporate_sub_accounts_plan_request_features.py +39 -0
  441. brevo/master_account/types/put_corporate_user_email_permissions_request_privileges_item.py +42 -0
  442. brevo/master_account/types/put_corporate_user_email_permissions_request_privileges_item_feature.py +18 -0
  443. brevo/master_account/types/put_corporate_user_email_permissions_request_privileges_item_permissions_item.py +10 -0
  444. brevo/master_account/types/put_corporate_user_invitation_action_email_request_action.py +5 -0
  445. brevo/master_account/types/put_corporate_user_invitation_action_email_response.py +23 -0
  446. brevo/notes/__init__.py +38 -0
  447. brevo/notes/client.py +548 -0
  448. brevo/notes/raw_client.py +766 -0
  449. brevo/notes/types/__init__.py +40 -0
  450. brevo/notes/types/get_crm_notes_request_entity.py +5 -0
  451. brevo/notes/types/get_crm_notes_request_sort.py +5 -0
  452. brevo/notes/types/post_crm_notes_response.py +27 -0
  453. brevo/payments/__init__.py +38 -0
  454. brevo/payments/client.py +315 -0
  455. brevo/payments/raw_client.py +532 -0
  456. brevo/payments/types/__init__.py +40 -0
  457. brevo/payments/types/create_payment_request_response.py +28 -0
  458. brevo/payments/types/get_payment_request_response.py +47 -0
  459. brevo/payments/types/get_payment_request_response_status.py +5 -0
  460. brevo/process/__init__.py +79 -0
  461. brevo/process/client.py +304 -0
  462. brevo/process/raw_client.py +372 -0
  463. brevo/process/types/__init__.py +77 -0
  464. brevo/process/types/get_process_response.py +62 -0
  465. brevo/process/types/get_process_response_info.py +36 -0
  466. brevo/process/types/get_process_response_info_export.py +32 -0
  467. brevo/process/types/get_process_response_info_import.py +57 -0
  468. brevo/process/types/get_process_response_name.py +16 -0
  469. brevo/process/types/get_process_response_status.py +7 -0
  470. brevo/process/types/get_processes_request_sort.py +5 -0
  471. brevo/process/types/get_processes_response.py +29 -0
  472. brevo/process/types/get_processes_response_processes_item.py +62 -0
  473. brevo/process/types/get_processes_response_processes_item_info.py +36 -0
  474. brevo/process/types/get_processes_response_processes_item_info_export.py +32 -0
  475. brevo/process/types/get_processes_response_processes_item_info_import.py +57 -0
  476. brevo/process/types/get_processes_response_processes_item_name.py +16 -0
  477. brevo/process/types/get_processes_response_processes_item_status.py +7 -0
  478. brevo/program/__init__.py +67 -0
  479. brevo/program/client.py +1128 -0
  480. brevo/program/raw_client.py +2526 -0
  481. brevo/program/types/__init__.py +67 -0
  482. brevo/program/types/get_lp_list_request_sort_field.py +5 -0
  483. brevo/program/types/get_lp_list_response.py +24 -0
  484. brevo/program/types/get_parameter_subscription_info_response.py +44 -0
  485. brevo/program/types/get_parameter_subscription_info_response_balance.py +41 -0
  486. brevo/program/types/get_parameter_subscription_info_response_balance_balances_item.py +30 -0
  487. brevo/program/types/get_parameter_subscription_info_response_members_item.py +36 -0
  488. brevo/program/types/get_parameter_subscription_info_response_reward_item.py +66 -0
  489. brevo/program/types/get_parameter_subscription_info_response_tier_item.py +56 -0
  490. brevo/program/types/subscribe_member_to_a_subscription_response.py +46 -0
  491. brevo/program/types/subscribe_to_loyalty_program_response.py +56 -0
  492. brevo/py.typed +0 -0
  493. brevo/reward/__init__.py +115 -0
  494. brevo/reward/client.py +1285 -0
  495. brevo/reward/raw_client.py +2564 -0
  496. brevo/reward/types/__init__.py +139 -0
  497. brevo/reward/types/create_reward_response.py +64 -0
  498. brevo/reward/types/create_voucher_response.py +76 -0
  499. brevo/reward/types/get_code_count_response.py +23 -0
  500. brevo/reward/types/get_loyalty_offer_programs_pid_offers_request_version.py +5 -0
  501. brevo/reward/types/get_loyalty_offer_programs_pid_offers_response.py +34 -0
  502. brevo/reward/types/get_loyalty_offer_programs_pid_offers_response_items_item.py +67 -0
  503. brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_request_version.py +5 -0
  504. brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response.py +269 -0
  505. brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_expiration_modifier.py +7 -0
  506. brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_generator.py +52 -0
  507. brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_limits_item.py +68 -0
  508. brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_products_item.py +40 -0
  509. brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_reward_configs.py +33 -0
  510. brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_rule.py +101 -0
  511. brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_rule_event.py +28 -0
  512. brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_rule_results_item.py +43 -0
  513. brevo/reward/types/get_loyalty_offer_programs_pid_rewards_rid_response_rule_results_item_parameters_item.py +37 -0
  514. brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_request_sort.py +5 -0
  515. brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_request_sort_field.py +5 -0
  516. brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_response.py +49 -0
  517. brevo/reward/types/get_loyalty_offer_programs_pid_vouchers_response_contact_rewards_item.py +70 -0
  518. brevo/reward/types/redeem_voucher_request_order.py +85 -0
  519. brevo/reward/types/redeem_voucher_request_order_billing.py +55 -0
  520. brevo/reward/types/redeem_voucher_request_order_identifiers.py +28 -0
  521. brevo/reward/types/redeem_voucher_request_order_products_item.py +46 -0
  522. brevo/reward/types/validate_reward_response.py +23 -0
  523. brevo/senders/__init__.py +67 -0
  524. brevo/senders/client.py +808 -0
  525. brevo/senders/raw_client.py +1089 -0
  526. brevo/senders/types/__init__.py +65 -0
  527. brevo/senders/types/create_sender_request_ips_item.py +36 -0
  528. brevo/senders/types/create_sender_response.py +42 -0
  529. brevo/senders/types/get_ips_from_sender_response.py +25 -0
  530. brevo/senders/types/get_ips_from_sender_response_ips_item.py +38 -0
  531. brevo/senders/types/get_ips_response.py +25 -0
  532. brevo/senders/types/get_ips_response_ips_item.py +38 -0
  533. brevo/senders/types/get_senders_response.py +24 -0
  534. brevo/senders/types/get_senders_response_senders_item.py +46 -0
  535. brevo/senders/types/get_senders_response_senders_item_ips_item.py +33 -0
  536. brevo/senders/types/update_sender_request_ips_item.py +36 -0
  537. brevo/sms_campaigns/__init__.py +73 -0
  538. brevo/sms_campaigns/client.py +1078 -0
  539. brevo/sms_campaigns/raw_client.py +1501 -0
  540. brevo/sms_campaigns/types/__init__.py +71 -0
  541. brevo/sms_campaigns/types/create_sms_campaign_request_recipients.py +33 -0
  542. brevo/sms_campaigns/types/create_sms_campaign_response.py +23 -0
  543. brevo/sms_campaigns/types/get_sms_campaign_response.py +74 -0
  544. brevo/sms_campaigns/types/get_sms_campaign_response_status.py +7 -0
  545. brevo/sms_campaigns/types/get_sms_campaigns_request_sort.py +5 -0
  546. brevo/sms_campaigns/types/get_sms_campaigns_request_status.py +7 -0
  547. brevo/sms_campaigns/types/get_sms_campaigns_response.py +25 -0
  548. brevo/sms_campaigns/types/get_sms_campaigns_response_campaigns_item.py +74 -0
  549. brevo/sms_campaigns/types/get_sms_campaigns_response_campaigns_item_status.py +7 -0
  550. brevo/sms_campaigns/types/request_sms_recipient_export_request_recipients_type.py +7 -0
  551. brevo/sms_campaigns/types/request_sms_recipient_export_response.py +26 -0
  552. brevo/sms_campaigns/types/update_sms_campaign_request_recipients.py +33 -0
  553. brevo/sms_templates/__init__.py +49 -0
  554. brevo/sms_templates/client.py +133 -0
  555. brevo/sms_templates/raw_client.py +151 -0
  556. brevo/sms_templates/types/__init__.py +47 -0
  557. brevo/sms_templates/types/get_sms_templates_request_sort.py +5 -0
  558. brevo/sms_templates/types/get_sms_templates_response.py +26 -0
  559. brevo/sms_templates/types/get_sms_templates_response_templates_item.py +86 -0
  560. brevo/sms_templates/types/get_sms_templates_response_templates_item_compliance.py +37 -0
  561. brevo/tasks/__init__.py +55 -0
  562. brevo/tasks/client.py +814 -0
  563. brevo/tasks/raw_client.py +992 -0
  564. brevo/tasks/types/__init__.py +53 -0
  565. brevo/tasks/types/get_crm_tasks_request_filter_date.py +5 -0
  566. brevo/tasks/types/get_crm_tasks_request_filter_status.py +5 -0
  567. brevo/tasks/types/get_crm_tasks_request_sort.py +5 -0
  568. brevo/tasks/types/get_crm_tasks_response.py +28 -0
  569. brevo/tasks/types/get_crm_tasktypes_response.py +32 -0
  570. brevo/tasks/types/post_crm_tasks_response.py +27 -0
  571. brevo/tier/__init__.py +79 -0
  572. brevo/tier/client.py +1144 -0
  573. brevo/tier/raw_client.py +2360 -0
  574. brevo/tier/types/__init__.py +79 -0
  575. brevo/tier/types/add_subscription_to_tier_response.py +53 -0
  576. brevo/tier/types/create_tier_for_tier_group_request_access_conditions_item.py +31 -0
  577. brevo/tier/types/create_tier_for_tier_group_request_tier_rewards_item.py +26 -0
  578. brevo/tier/types/create_tier_group_request_downgrade_strategy.py +7 -0
  579. brevo/tier/types/create_tier_group_request_upgrade_strategy.py +7 -0
  580. brevo/tier/types/get_list_of_tier_groups_request_version.py +5 -0
  581. brevo/tier/types/get_list_of_tier_groups_response.py +21 -0
  582. brevo/tier/types/get_loyalty_program_tier_request_version.py +5 -0
  583. brevo/tier/types/get_loyalty_program_tier_response.py +21 -0
  584. brevo/tier/types/get_tier_group_request_version.py +5 -0
  585. brevo/tier/types/update_tier_group_request_downgrade_strategy.py +7 -0
  586. brevo/tier/types/update_tier_group_request_upgrade_strategy.py +7 -0
  587. brevo/tier/types/update_tier_request_access_conditions_item.py +31 -0
  588. brevo/tier/types/update_tier_request_tier_rewards_item.py +26 -0
  589. brevo/transactional_emails/__init__.py +175 -0
  590. brevo/transactional_emails/client.py +2544 -0
  591. brevo/transactional_emails/raw_client.py +3240 -0
  592. brevo/transactional_emails/types/__init__.py +189 -0
  593. brevo/transactional_emails/types/create_smtp_template_request_sender.py +37 -0
  594. brevo/transactional_emails/types/create_smtp_template_response.py +23 -0
  595. brevo/transactional_emails/types/get_aggregated_smtp_report_response.py +85 -0
  596. brevo/transactional_emails/types/get_blocked_domains_response.py +23 -0
  597. brevo/transactional_emails/types/get_email_event_report_request_event.py +23 -0
  598. brevo/transactional_emails/types/get_email_event_report_request_sort.py +5 -0
  599. brevo/transactional_emails/types/get_email_event_report_response.py +21 -0
  600. brevo/transactional_emails/types/get_email_event_report_response_events_item.py +79 -0
  601. brevo/transactional_emails/types/get_email_event_report_response_events_item_event.py +23 -0
  602. brevo/transactional_emails/types/get_scheduled_email_by_id_request_sort.py +5 -0
  603. brevo/transactional_emails/types/get_scheduled_email_by_id_request_status.py +5 -0
  604. brevo/transactional_emails/types/get_scheduled_email_by_id_response.py +10 -0
  605. brevo/transactional_emails/types/get_scheduled_email_by_id_response_batches.py +25 -0
  606. brevo/transactional_emails/types/get_scheduled_email_by_id_response_batches_batches_item.py +39 -0
  607. brevo/transactional_emails/types/get_scheduled_email_by_id_response_batches_batches_item_status.py +7 -0
  608. brevo/transactional_emails/types/get_scheduled_email_by_id_response_created_at.py +37 -0
  609. brevo/transactional_emails/types/get_scheduled_email_by_id_response_created_at_status.py +7 -0
  610. brevo/transactional_emails/types/get_smtp_report_request_sort.py +5 -0
  611. brevo/transactional_emails/types/get_smtp_report_response.py +21 -0
  612. brevo/transactional_emails/types/get_smtp_report_response_reports_item.py +86 -0
  613. brevo/transactional_emails/types/get_smtp_templates_request_sort.py +5 -0
  614. brevo/transactional_emails/types/get_smtp_templates_response.py +26 -0
  615. brevo/transactional_emails/types/get_transac_blocked_contacts_request_sort.py +5 -0
  616. brevo/transactional_emails/types/get_transac_blocked_contacts_response.py +25 -0
  617. brevo/transactional_emails/types/get_transac_blocked_contacts_response_contacts_item.py +44 -0
  618. brevo/transactional_emails/types/get_transac_blocked_contacts_response_contacts_item_reason.py +35 -0
  619. brevo/transactional_emails/types/get_transac_blocked_contacts_response_contacts_item_reason_code.py +15 -0
  620. brevo/transactional_emails/types/get_transac_email_content_response.py +57 -0
  621. brevo/transactional_emails/types/get_transac_email_content_response_events_item.py +28 -0
  622. brevo/transactional_emails/types/get_transac_emails_list_request_sort.py +5 -0
  623. brevo/transactional_emails/types/get_transac_emails_list_response.py +34 -0
  624. brevo/transactional_emails/types/get_transac_emails_list_response_transactional_emails_item.py +61 -0
  625. brevo/transactional_emails/types/post_preview_smtp_email_templates_response.py +49 -0
  626. brevo/transactional_emails/types/send_transac_email_request_attachment_item.py +33 -0
  627. brevo/transactional_emails/types/send_transac_email_request_bcc_item.py +28 -0
  628. brevo/transactional_emails/types/send_transac_email_request_cc_item.py +28 -0
  629. brevo/transactional_emails/types/send_transac_email_request_message_versions_item.py +73 -0
  630. brevo/transactional_emails/types/send_transac_email_request_message_versions_item_bcc_item.py +28 -0
  631. brevo/transactional_emails/types/send_transac_email_request_message_versions_item_cc_item.py +28 -0
  632. brevo/transactional_emails/types/send_transac_email_request_message_versions_item_reply_to.py +32 -0
  633. brevo/transactional_emails/types/send_transac_email_request_message_versions_item_to_item.py +28 -0
  634. brevo/transactional_emails/types/send_transac_email_request_reply_to.py +32 -0
  635. brevo/transactional_emails/types/send_transac_email_request_sender.py +37 -0
  636. brevo/transactional_emails/types/send_transac_email_request_to_item.py +28 -0
  637. brevo/transactional_emails/types/send_transac_email_response.py +29 -0
  638. brevo/transactional_emails/types/update_smtp_template_request_sender.py +37 -0
  639. brevo/transactional_sms/__init__.py +70 -0
  640. brevo/transactional_sms/client.py +726 -0
  641. brevo/transactional_sms/raw_client.py +913 -0
  642. brevo/transactional_sms/types/__init__.py +68 -0
  643. brevo/transactional_sms/types/get_sms_events_request_event.py +20 -0
  644. brevo/transactional_sms/types/get_sms_events_request_sort.py +5 -0
  645. brevo/transactional_sms/types/get_sms_events_response.py +21 -0
  646. brevo/transactional_sms/types/get_sms_events_response_events_item.py +52 -0
  647. brevo/transactional_sms/types/get_sms_events_response_events_item_event.py +20 -0
  648. brevo/transactional_sms/types/get_transac_aggregated_sms_report_response.py +75 -0
  649. brevo/transactional_sms/types/get_transac_sms_report_request_sort.py +5 -0
  650. brevo/transactional_sms/types/get_transac_sms_report_response.py +21 -0
  651. brevo/transactional_sms/types/get_transac_sms_report_response_reports_item.py +76 -0
  652. brevo/transactional_sms/types/send_async_transactional_sms_response.py +22 -0
  653. brevo/transactional_sms/types/send_transac_sms_response.py +38 -0
  654. brevo/transactional_whats_app/__init__.py +64 -0
  655. brevo/transactional_whats_app/client.py +283 -0
  656. brevo/transactional_whats_app/raw_client.py +326 -0
  657. brevo/transactional_whats_app/types/__init__.py +62 -0
  658. brevo/transactional_whats_app/types/get_whatsapp_event_report_request_event.py +7 -0
  659. brevo/transactional_whats_app/types/get_whatsapp_event_report_request_sort.py +5 -0
  660. brevo/transactional_whats_app/types/get_whatsapp_event_report_response.py +21 -0
  661. brevo/transactional_whats_app/types/get_whatsapp_event_report_response_events_item.py +65 -0
  662. brevo/transactional_whats_app/types/get_whatsapp_event_report_response_events_item_event.py +7 -0
  663. brevo/transactional_whats_app/types/send_whatsapp_message_request.py +8 -0
  664. brevo/transactional_whats_app/types/send_whatsapp_message_request_params.py +41 -0
  665. brevo/transactional_whats_app/types/send_whatsapp_message_request_text.py +35 -0
  666. brevo/transactional_whats_app/types/send_whatsapp_message_response.py +26 -0
  667. brevo/types/__init__.py +373 -0
  668. brevo/types/ab_test_version_clicks.py +7 -0
  669. brevo/types/ab_test_version_clicks_item.py +35 -0
  670. brevo/types/ab_test_version_stats.py +35 -0
  671. brevo/types/bad_request_error_body.py +29 -0
  672. brevo/types/bad_request_error_body_code.py +45 -0
  673. brevo/types/balance_definition.py +139 -0
  674. brevo/types/balance_definition_balance_availability_duration_modifier.py +7 -0
  675. brevo/types/balance_limit.py +78 -0
  676. brevo/types/cart.py +38 -0
  677. brevo/types/company.py +45 -0
  678. brevo/types/configuration.py +30 -0
  679. brevo/types/contact_error_model.py +34 -0
  680. brevo/types/contact_error_model_code.py +16 -0
  681. brevo/types/conversations_message.py +187 -0
  682. brevo/types/conversations_message_attachments_item.py +50 -0
  683. brevo/types/conversations_message_bcc_item.py +21 -0
  684. brevo/types/conversations_message_cc_item.py +21 -0
  685. brevo/types/conversations_message_file.py +46 -0
  686. brevo/types/conversations_message_file_image_info.py +39 -0
  687. brevo/types/conversations_message_forwarded_to_source_status.py +29 -0
  688. brevo/types/conversations_message_from.py +25 -0
  689. brevo/types/conversations_message_reply_to.py +25 -0
  690. brevo/types/conversations_message_to_item.py +21 -0
  691. brevo/types/conversations_message_type.py +5 -0
  692. brevo/types/conversion_source_metrics.py +35 -0
  693. brevo/types/conversion_source_metrics_conversion_source.py +7 -0
  694. brevo/types/create_update_folder.py +23 -0
  695. brevo/types/deal.py +45 -0
  696. brevo/types/error_model.py +28 -0
  697. brevo/types/file_data.py +60 -0
  698. brevo/types/forbidden_error_body.py +29 -0
  699. brevo/types/forbidden_error_body_code.py +45 -0
  700. brevo/types/get_campaign_recipients.py +25 -0
  701. brevo/types/get_campaign_stats.py +130 -0
  702. brevo/types/get_category_details.py +54 -0
  703. brevo/types/get_contact_details.py +75 -0
  704. brevo/types/get_contact_details_attributes.py +22 -0
  705. brevo/types/get_contacts.py +25 -0
  706. brevo/types/get_coupon_collection.py +75 -0
  707. brevo/types/get_device_browser_stats.py +44 -0
  708. brevo/types/get_extended_campaign_overview.py +230 -0
  709. brevo/types/get_extended_campaign_overview_sender.py +33 -0
  710. brevo/types/get_extended_campaign_overview_status.py +7 -0
  711. brevo/types/get_extended_campaign_overview_type.py +5 -0
  712. brevo/types/get_extended_campaign_stats.py +63 -0
  713. brevo/types/get_extended_campaign_stats_links_stats.py +22 -0
  714. brevo/types/get_extended_campaign_stats_stats_by_device.py +39 -0
  715. brevo/types/get_folder.py +46 -0
  716. brevo/types/get_list.py +46 -0
  717. brevo/types/get_product_details.py +115 -0
  718. brevo/types/get_sms_campaign_overview.py +69 -0
  719. brevo/types/get_sms_campaign_overview_status.py +7 -0
  720. brevo/types/get_sms_campaign_stats.py +55 -0
  721. brevo/types/get_smtp_template_overview.py +93 -0
  722. brevo/types/get_smtp_template_overview_sender.py +33 -0
  723. brevo/types/get_sso_token.py +23 -0
  724. brevo/types/get_webhook.py +74 -0
  725. brevo/types/get_webhook_channel.py +5 -0
  726. brevo/types/get_webhook_type.py +5 -0
  727. brevo/types/inviteuser.py +31 -0
  728. brevo/types/inviteuser_privileges_item.py +34 -0
  729. brevo/types/inviteuser_privileges_item_feature.py +24 -0
  730. brevo/types/inviteuser_privileges_item_permissions_item.py +39 -0
  731. brevo/types/loyalty_program.py +82 -0
  732. brevo/types/loyalty_program_state.py +5 -0
  733. brevo/types/node_response.py +63 -0
  734. brevo/types/not_found_error_body.py +29 -0
  735. brevo/types/not_found_error_body_code.py +45 -0
  736. brevo/types/note.py +61 -0
  737. brevo/types/note_data.py +44 -0
  738. brevo/types/notification.py +32 -0
  739. brevo/types/order.py +85 -0
  740. brevo/types/order_billing.py +66 -0
  741. brevo/types/order_identifiers.py +42 -0
  742. brevo/types/order_meta_info_value.py +5 -0
  743. brevo/types/order_products_item.py +43 -0
  744. brevo/types/pipeline.py +38 -0
  745. brevo/types/pipeline_stages_item.py +32 -0
  746. brevo/types/pipelines.py +7 -0
  747. brevo/types/post_contact_info.py +21 -0
  748. brevo/types/post_contact_info_contacts.py +37 -0
  749. brevo/types/post_contact_info_contacts_failure.py +5 -0
  750. brevo/types/post_contact_info_contacts_success.py +5 -0
  751. brevo/types/post_send_failed.py +46 -0
  752. brevo/types/redeem.py +92 -0
  753. brevo/types/rule_condition_response.py +52 -0
  754. brevo/types/send_report.py +30 -0
  755. brevo/types/send_report_email.py +32 -0
  756. brevo/types/send_report_language.py +5 -0
  757. brevo/types/send_test_email.py +29 -0
  758. brevo/types/send_transac_sms.py +66 -0
  759. brevo/types/send_transac_sms_tag.py +28 -0
  760. brevo/types/send_transac_sms_tag_field.py +5 -0
  761. brevo/types/send_transac_sms_type.py +5 -0
  762. brevo/types/task.py +55 -0
  763. brevo/types/task_reminder.py +39 -0
  764. brevo/types/task_reminder_types_item.py +5 -0
  765. brevo/types/task_reminder_unit.py +5 -0
  766. brevo/types/tier.py +63 -0
  767. brevo/types/tier_access_conditions_item.py +38 -0
  768. brevo/types/tier_group.py +70 -0
  769. brevo/types/tier_group_downgrade_strategy.py +7 -0
  770. brevo/types/tier_group_upgrade_strategy.py +7 -0
  771. brevo/types/tier_tier_rewards_item.py +33 -0
  772. brevo/types/transaction.py +110 -0
  773. brevo/types/unauthorized_error_body.py +29 -0
  774. brevo/types/unauthorized_error_body_code.py +45 -0
  775. brevo/types/update_campaign_status.py +28 -0
  776. brevo/types/update_campaign_status_status.py +8 -0
  777. brevo/types/value_response.py +67 -0
  778. brevo/types/variables_items.py +22 -0
  779. brevo/types/whatsapp_camp_stats.py +26 -0
  780. brevo/user/__init__.py +67 -0
  781. brevo/user/client.py +806 -0
  782. brevo/user/raw_client.py +977 -0
  783. brevo/user/types/__init__.py +67 -0
  784. brevo/user/types/edit_user_permission_response.py +33 -0
  785. brevo/user/types/get_invited_users_list_response.py +24 -0
  786. brevo/user/types/get_invited_users_list_response_users_item.py +39 -0
  787. brevo/user/types/get_invited_users_list_response_users_item_feature_access.py +37 -0
  788. brevo/user/types/get_user_permission_response.py +38 -0
  789. brevo/user/types/get_user_permission_response_privileges_item.py +21 -0
  790. brevo/user/types/inviteuser_response.py +28 -0
  791. brevo/user/types/put_revoke_user_permission_response.py +28 -0
  792. brevo/user/types/putresendcancelinvitation_request_action.py +5 -0
  793. brevo/user/types/putresendcancelinvitation_response.py +28 -0
  794. brevo/version.py +3 -0
  795. brevo/webhooks/__init__.py +82 -0
  796. brevo/webhooks/client.py +982 -0
  797. brevo/webhooks/raw_client.py +1211 -0
  798. brevo/webhooks/types/__init__.py +80 -0
  799. brevo/webhooks/types/create_webhook_request_auth.py +32 -0
  800. brevo/webhooks/types/create_webhook_request_channel.py +5 -0
  801. brevo/webhooks/types/create_webhook_request_events_item.py +26 -0
  802. brevo/webhooks/types/create_webhook_request_headers_item.py +28 -0
  803. brevo/webhooks/types/create_webhook_request_type.py +5 -0
  804. brevo/webhooks/types/create_webhook_response.py +23 -0
  805. brevo/webhooks/types/export_webhooks_history_request_event.py +26 -0
  806. brevo/webhooks/types/export_webhooks_history_request_type.py +5 -0
  807. brevo/webhooks/types/export_webhooks_history_response.py +26 -0
  808. brevo/webhooks/types/get_webhooks_request_sort.py +5 -0
  809. brevo/webhooks/types/get_webhooks_request_type.py +5 -0
  810. brevo/webhooks/types/get_webhooks_response.py +21 -0
  811. brevo/webhooks/types/update_webhook_request_auth.py +32 -0
  812. brevo/webhooks/types/update_webhook_request_events_item.py +26 -0
  813. brevo/webhooks/types/update_webhook_request_headers_item.py +28 -0
  814. brevo/whats_app_campaigns/__init__.py +106 -0
  815. brevo/whats_app_campaigns/client.py +1064 -0
  816. brevo/whats_app_campaigns/raw_client.py +1311 -0
  817. brevo/whats_app_campaigns/types/__init__.py +110 -0
  818. brevo/whats_app_campaigns/types/create_whats_app_campaign_request_recipients.py +41 -0
  819. brevo/whats_app_campaigns/types/create_whats_app_campaign_response.py +23 -0
  820. brevo/whats_app_campaigns/types/create_whats_app_template_request_category.py +5 -0
  821. brevo/whats_app_campaigns/types/create_whats_app_template_request_source.py +5 -0
  822. brevo/whats_app_campaigns/types/create_whats_app_template_response.py +23 -0
  823. brevo/whats_app_campaigns/types/get_whats_app_campaign_response.py +69 -0
  824. brevo/whats_app_campaigns/types/get_whats_app_campaign_response_campaign_status.py +7 -0
  825. brevo/whats_app_campaigns/types/get_whats_app_campaign_response_template.py +61 -0
  826. brevo/whats_app_campaigns/types/get_whats_app_campaign_response_template_components_item.py +21 -0
  827. brevo/whats_app_campaigns/types/get_whats_app_campaigns_request_sort.py +5 -0
  828. brevo/whats_app_campaigns/types/get_whats_app_campaigns_response.py +25 -0
  829. brevo/whats_app_campaigns/types/get_whats_app_campaigns_response_campaigns_item.py +84 -0
  830. brevo/whats_app_campaigns/types/get_whats_app_campaigns_response_campaigns_item_campaign_status.py +7 -0
  831. brevo/whats_app_campaigns/types/get_whats_app_config_response.py +63 -0
  832. brevo/whats_app_campaigns/types/get_whats_app_config_response_phone_number_name_status.py +7 -0
  833. brevo/whats_app_campaigns/types/get_whats_app_config_response_phone_number_quality.py +5 -0
  834. brevo/whats_app_campaigns/types/get_whats_app_config_response_whatsapp_business_account_status.py +7 -0
  835. brevo/whats_app_campaigns/types/get_whats_app_templates_request_sort.py +5 -0
  836. brevo/whats_app_campaigns/types/get_whats_app_templates_request_source.py +5 -0
  837. brevo/whats_app_campaigns/types/get_whats_app_templates_response.py +26 -0
  838. brevo/whats_app_campaigns/types/get_whats_app_templates_response_templates_item.py +65 -0
  839. brevo/whats_app_campaigns/types/update_whats_app_campaign_request_campaign_status.py +5 -0
  840. brevo/whats_app_campaigns/types/update_whats_app_campaign_request_recipients.py +41 -0
  841. brevo_python-4.0.1.dist-info/METADATA +1072 -0
  842. brevo_python-4.0.1.dist-info/RECORD +843 -0
  843. brevo_python-4.0.1.dist-info/WHEEL +4 -0
@@ -0,0 +1,2544 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
7
+ from ..core.request_options import RequestOptions
8
+ from ..types.get_smtp_template_overview import GetSmtpTemplateOverview
9
+ from .raw_client import AsyncRawTransactionalEmailsClient, RawTransactionalEmailsClient
10
+ from .types.create_smtp_template_request_sender import CreateSmtpTemplateRequestSender
11
+ from .types.create_smtp_template_response import CreateSmtpTemplateResponse
12
+ from .types.get_aggregated_smtp_report_response import GetAggregatedSmtpReportResponse
13
+ from .types.get_blocked_domains_response import GetBlockedDomainsResponse
14
+ from .types.get_email_event_report_request_event import GetEmailEventReportRequestEvent
15
+ from .types.get_email_event_report_request_sort import GetEmailEventReportRequestSort
16
+ from .types.get_email_event_report_response import GetEmailEventReportResponse
17
+ from .types.get_scheduled_email_by_id_request_sort import GetScheduledEmailByIdRequestSort
18
+ from .types.get_scheduled_email_by_id_request_status import GetScheduledEmailByIdRequestStatus
19
+ from .types.get_scheduled_email_by_id_response import GetScheduledEmailByIdResponse
20
+ from .types.get_smtp_report_request_sort import GetSmtpReportRequestSort
21
+ from .types.get_smtp_report_response import GetSmtpReportResponse
22
+ from .types.get_smtp_templates_request_sort import GetSmtpTemplatesRequestSort
23
+ from .types.get_smtp_templates_response import GetSmtpTemplatesResponse
24
+ from .types.get_transac_blocked_contacts_request_sort import GetTransacBlockedContactsRequestSort
25
+ from .types.get_transac_blocked_contacts_response import GetTransacBlockedContactsResponse
26
+ from .types.get_transac_email_content_response import GetTransacEmailContentResponse
27
+ from .types.get_transac_emails_list_request_sort import GetTransacEmailsListRequestSort
28
+ from .types.get_transac_emails_list_response import GetTransacEmailsListResponse
29
+ from .types.post_preview_smtp_email_templates_response import PostPreviewSmtpEmailTemplatesResponse
30
+ from .types.send_transac_email_request_attachment_item import SendTransacEmailRequestAttachmentItem
31
+ from .types.send_transac_email_request_bcc_item import SendTransacEmailRequestBccItem
32
+ from .types.send_transac_email_request_cc_item import SendTransacEmailRequestCcItem
33
+ from .types.send_transac_email_request_message_versions_item import SendTransacEmailRequestMessageVersionsItem
34
+ from .types.send_transac_email_request_reply_to import SendTransacEmailRequestReplyTo
35
+ from .types.send_transac_email_request_sender import SendTransacEmailRequestSender
36
+ from .types.send_transac_email_request_to_item import SendTransacEmailRequestToItem
37
+ from .types.send_transac_email_response import SendTransacEmailResponse
38
+ from .types.update_smtp_template_request_sender import UpdateSmtpTemplateRequestSender
39
+
40
+ # this is used as the default value for optional parameters
41
+ OMIT = typing.cast(typing.Any, ...)
42
+
43
+
44
+ class TransactionalEmailsClient:
45
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
46
+ self._raw_client = RawTransactionalEmailsClient(client_wrapper=client_wrapper)
47
+
48
+ @property
49
+ def with_raw_response(self) -> RawTransactionalEmailsClient:
50
+ """
51
+ Retrieves a raw implementation of this client that returns raw responses.
52
+
53
+ Returns
54
+ -------
55
+ RawTransactionalEmailsClient
56
+ """
57
+ return self._raw_client
58
+
59
+ def get_transac_blocked_contacts(
60
+ self,
61
+ *,
62
+ start_date: typing.Optional[str] = None,
63
+ end_date: typing.Optional[str] = None,
64
+ limit: typing.Optional[int] = None,
65
+ offset: typing.Optional[int] = None,
66
+ senders: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
67
+ sort: typing.Optional[GetTransacBlockedContactsRequestSort] = None,
68
+ request_options: typing.Optional[RequestOptions] = None,
69
+ ) -> GetTransacBlockedContactsResponse:
70
+ """
71
+ Parameters
72
+ ----------
73
+ start_date : typing.Optional[str]
74
+ **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts
75
+
76
+ end_date : typing.Optional[str]
77
+ **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts
78
+
79
+ limit : typing.Optional[int]
80
+ Number of documents returned per page
81
+
82
+ offset : typing.Optional[int]
83
+ Index of the first document on the page
84
+
85
+ senders : typing.Optional[typing.Union[str, typing.Sequence[str]]]
86
+ Comma separated list of emails of the senders from which contacts are blocked or unsubscribed
87
+
88
+ sort : typing.Optional[GetTransacBlockedContactsRequestSort]
89
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
90
+
91
+ request_options : typing.Optional[RequestOptions]
92
+ Request-specific configuration.
93
+
94
+ Returns
95
+ -------
96
+ GetTransacBlockedContactsResponse
97
+ List of blocked or unsubscribed transactional contacts
98
+
99
+ Examples
100
+ --------
101
+ from brevo import Brevo
102
+
103
+ client = Brevo(
104
+ api_key="YOUR_API_KEY",
105
+ )
106
+ client.transactional_emails.get_transac_blocked_contacts()
107
+ """
108
+ _response = self._raw_client.get_transac_blocked_contacts(
109
+ start_date=start_date,
110
+ end_date=end_date,
111
+ limit=limit,
112
+ offset=offset,
113
+ senders=senders,
114
+ sort=sort,
115
+ request_options=request_options,
116
+ )
117
+ return _response.data
118
+
119
+ def unblock_or_resubscribe_a_transactional_contact(
120
+ self, email: str, *, request_options: typing.Optional[RequestOptions] = None
121
+ ) -> None:
122
+ """
123
+ Parameters
124
+ ----------
125
+ email : str
126
+ contact email (urlencoded) to unblock.
127
+
128
+ request_options : typing.Optional[RequestOptions]
129
+ Request-specific configuration.
130
+
131
+ Returns
132
+ -------
133
+ None
134
+
135
+ Examples
136
+ --------
137
+ from brevo import Brevo
138
+
139
+ client = Brevo(
140
+ api_key="YOUR_API_KEY",
141
+ )
142
+ client.transactional_emails.unblock_or_resubscribe_a_transactional_contact(
143
+ email="email",
144
+ )
145
+ """
146
+ _response = self._raw_client.unblock_or_resubscribe_a_transactional_contact(
147
+ email, request_options=request_options
148
+ )
149
+ return _response.data
150
+
151
+ def get_blocked_domains(
152
+ self, *, request_options: typing.Optional[RequestOptions] = None
153
+ ) -> GetBlockedDomainsResponse:
154
+ """
155
+ Get the list of blocked domains
156
+
157
+ Parameters
158
+ ----------
159
+ request_options : typing.Optional[RequestOptions]
160
+ Request-specific configuration.
161
+
162
+ Returns
163
+ -------
164
+ GetBlockedDomainsResponse
165
+ List of blocked domains
166
+
167
+ Examples
168
+ --------
169
+ from brevo import Brevo
170
+
171
+ client = Brevo(
172
+ api_key="YOUR_API_KEY",
173
+ )
174
+ client.transactional_emails.get_blocked_domains()
175
+ """
176
+ _response = self._raw_client.get_blocked_domains(request_options=request_options)
177
+ return _response.data
178
+
179
+ def block_new_domain(self, *, domain: str, request_options: typing.Optional[RequestOptions] = None) -> None:
180
+ """
181
+ Blocks a new domain in order to avoid messages being sent to the same
182
+
183
+ Parameters
184
+ ----------
185
+ domain : str
186
+ name of the domain to be blocked
187
+
188
+ request_options : typing.Optional[RequestOptions]
189
+ Request-specific configuration.
190
+
191
+ Returns
192
+ -------
193
+ None
194
+
195
+ Examples
196
+ --------
197
+ from brevo import Brevo
198
+
199
+ client = Brevo(
200
+ api_key="YOUR_API_KEY",
201
+ )
202
+ client.transactional_emails.block_new_domain(
203
+ domain="example.com",
204
+ )
205
+ """
206
+ _response = self._raw_client.block_new_domain(domain=domain, request_options=request_options)
207
+ return _response.data
208
+
209
+ def delete_blocked_domain(self, domain: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
210
+ """
211
+ Unblocks an existing domain from the list of blocked domains
212
+
213
+ Parameters
214
+ ----------
215
+ domain : str
216
+ The name of the domain to be deleted
217
+
218
+ request_options : typing.Optional[RequestOptions]
219
+ Request-specific configuration.
220
+
221
+ Returns
222
+ -------
223
+ None
224
+
225
+ Examples
226
+ --------
227
+ from brevo import Brevo
228
+
229
+ client = Brevo(
230
+ api_key="YOUR_API_KEY",
231
+ )
232
+ client.transactional_emails.delete_blocked_domain(
233
+ domain="domain",
234
+ )
235
+ """
236
+ _response = self._raw_client.delete_blocked_domain(domain, request_options=request_options)
237
+ return _response.data
238
+
239
+ def delete_hardbounces(
240
+ self,
241
+ *,
242
+ contact_email: typing.Optional[str] = OMIT,
243
+ end_date: typing.Optional[str] = OMIT,
244
+ start_date: typing.Optional[str] = OMIT,
245
+ request_options: typing.Optional[RequestOptions] = None,
246
+ ) -> None:
247
+ """
248
+ Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)
249
+
250
+ Parameters
251
+ ----------
252
+ contact_email : typing.Optional[str]
253
+ Target a specific email address
254
+
255
+ end_date : typing.Optional[str]
256
+ Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate
257
+
258
+ start_date : typing.Optional[str]
259
+ Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate
260
+
261
+ request_options : typing.Optional[RequestOptions]
262
+ Request-specific configuration.
263
+
264
+ Returns
265
+ -------
266
+ None
267
+
268
+ Examples
269
+ --------
270
+ from brevo import Brevo
271
+
272
+ client = Brevo(
273
+ api_key="YOUR_API_KEY",
274
+ )
275
+ client.transactional_emails.delete_hardbounces()
276
+ """
277
+ _response = self._raw_client.delete_hardbounces(
278
+ contact_email=contact_email, end_date=end_date, start_date=start_date, request_options=request_options
279
+ )
280
+ return _response.data
281
+
282
+ def send_transac_email(
283
+ self,
284
+ *,
285
+ attachment: typing.Optional[typing.Sequence[SendTransacEmailRequestAttachmentItem]] = OMIT,
286
+ batch_id: typing.Optional[str] = OMIT,
287
+ bcc: typing.Optional[typing.Sequence[SendTransacEmailRequestBccItem]] = OMIT,
288
+ cc: typing.Optional[typing.Sequence[SendTransacEmailRequestCcItem]] = OMIT,
289
+ headers: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
290
+ html_content: typing.Optional[str] = OMIT,
291
+ message_versions: typing.Optional[typing.Sequence[SendTransacEmailRequestMessageVersionsItem]] = OMIT,
292
+ params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
293
+ reply_to: typing.Optional[SendTransacEmailRequestReplyTo] = OMIT,
294
+ scheduled_at: typing.Optional[dt.datetime] = OMIT,
295
+ sender: typing.Optional[SendTransacEmailRequestSender] = OMIT,
296
+ subject: typing.Optional[str] = OMIT,
297
+ tags: typing.Optional[typing.Sequence[str]] = OMIT,
298
+ template_id: typing.Optional[int] = OMIT,
299
+ text_content: typing.Optional[str] = OMIT,
300
+ to: typing.Optional[typing.Sequence[SendTransacEmailRequestToItem]] = OMIT,
301
+ request_options: typing.Optional[RequestOptions] = None,
302
+ ) -> SendTransacEmailResponse:
303
+ """
304
+ Parameters
305
+ ----------
306
+ attachment : typing.Optional[typing.Sequence[SendTransacEmailRequestAttachmentItem]]
307
+ Array of attachment objects. Each attachment must include either an absolute URL (no local file paths) or base64-encoded content, along with the attachment filename. The `name` field is required when `content` is provided. Supported file extensions: 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, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass, xlsm. When `templateId` is specified: if the template uses the New Template Language format, both `url` and `content` attachment types are supported; if the template uses the Old Template Language format, the `attachment` parameter is ignored.
308
+
309
+ batch_id : typing.Optional[str]
310
+ UUIDv4 identifier for the scheduled batch of transactional emails. If omitted, a valid UUIDv4 batch identifier is automatically generated.
311
+
312
+ bcc : typing.Optional[typing.Sequence[SendTransacEmailRequestBccItem]]
313
+ Array of BCC recipient objects. Each object contains an email address and an optional name.
314
+
315
+ cc : typing.Optional[typing.Sequence[SendTransacEmailRequestCcItem]]
316
+ Array of CC recipient objects. Each object contains an email address and an optional name.
317
+
318
+ headers : typing.Optional[typing.Dict[str, typing.Any]]
319
+ Custom email headers (non-standard headers) to include in the email. The `sender.ip` header can be set to specify the IP address used for sending transactional emails (dedicated IP users only). Header names must use Title-Case-Format (words separated by hyphens with the first letter of each word capitalized). Headers not in this format are automatically converted. Standard email headers are not supported. Example: `{"sender.ip":"1.2.3.4", "X-Mailin-custom":"some_custom_value", "Idempotency-Key":"abc-123"}`
320
+
321
+ html_content : typing.Optional[str]
322
+ HTML body content of the email. Required when `templateId` is not provided. Ignored when `templateId` is provided.
323
+
324
+ message_versions : typing.Optional[typing.Sequence[SendTransacEmailRequestMessageVersionsItem]]
325
+ Array of message version objects for sending customized email variants. The `templateId` can be customized per version only if a global `templateId` is provided. The `htmlContent` and `textContent` can be customized per version only if at least one of these is present in the global parameters. Global parameters such as `to` (required), `bcc`, `cc`, `replyTo`, and `subject` can be customized per version. Maximum total recipients per API request is 2000. Maximum recipients per message version is 99. Individual `params` objects must not exceed 100 KB. Cumulative `params` across all versions must not exceed 1000 KB. See https://developers.brevo.com/docs/batch-send-transactional-emails for detailed usage instructions.
326
+
327
+ params : typing.Optional[typing.Dict[str, typing.Any]]
328
+ Key-value pairs for template variable substitution. Only applicable when the template uses the New Template Language format.
329
+
330
+ reply_to : typing.Optional[SendTransacEmailRequestReplyTo]
331
+ Reply-to email address (required) and optional display name. Recipients will use this address when replying to the email.
332
+
333
+ scheduled_at : typing.Optional[dt.datetime]
334
+ UTC date-time when the email should be sent (format: YYYY-MM-DDTHH:mm:ss.SSSZ). Include timezone information in the date-time value. Scheduled emails may be delayed by up to 5 minutes.
335
+
336
+ sender : typing.Optional[SendTransacEmailRequestSender]
337
+ Sender information. Required when `templateId` is not provided. Specify either an email address (with optional name) or a sender ID. The `name` field is ignored when `id` is provided.
338
+
339
+ subject : typing.Optional[str]
340
+ Email subject line. Required when `templateId` is not provided.
341
+
342
+ tags : typing.Optional[typing.Sequence[str]]
343
+ Array of tags for categorizing and filtering emails
344
+
345
+ template_id : typing.Optional[int]
346
+ Template identifier
347
+
348
+ text_content : typing.Optional[str]
349
+ Plain text body content of the email. Ignored when `templateId` is provided.
350
+
351
+ to : typing.Optional[typing.Sequence[SendTransacEmailRequestToItem]]
352
+ Array of recipient objects. Each object contains an email address and an optional display name. Required when `messageVersions` is not provided. Ignored when `messageVersions` is provided. Example: `[{"name":"Jimmy", "email":"jimmy@example.com"}, {"name":"Joe", "email":"joe@example.com"}]`
353
+
354
+ request_options : typing.Optional[RequestOptions]
355
+ Request-specific configuration.
356
+
357
+ Returns
358
+ -------
359
+ SendTransacEmailResponse
360
+ Transactional email sent successfully
361
+
362
+ Examples
363
+ --------
364
+ from brevo import Brevo
365
+ from brevo.transactional_emails import (
366
+ SendTransacEmailRequestSender,
367
+ SendTransacEmailRequestToItem,
368
+ )
369
+
370
+ client = Brevo(
371
+ api_key="YOUR_API_KEY",
372
+ )
373
+ client.transactional_emails.send_transac_email(
374
+ html_content="<html><head></head><body><p>Hello,</p>This is my first transactional email sent from Brevo.</p></body></html>",
375
+ sender=SendTransacEmailRequestSender(
376
+ email="hello@brevo.com",
377
+ name="Alex from Brevo",
378
+ ),
379
+ subject="Hello from Brevo!",
380
+ to=[
381
+ SendTransacEmailRequestToItem(
382
+ email="johndoe@example.com",
383
+ name="John Doe",
384
+ )
385
+ ],
386
+ )
387
+ """
388
+ _response = self._raw_client.send_transac_email(
389
+ attachment=attachment,
390
+ batch_id=batch_id,
391
+ bcc=bcc,
392
+ cc=cc,
393
+ headers=headers,
394
+ html_content=html_content,
395
+ message_versions=message_versions,
396
+ params=params,
397
+ reply_to=reply_to,
398
+ scheduled_at=scheduled_at,
399
+ sender=sender,
400
+ subject=subject,
401
+ tags=tags,
402
+ template_id=template_id,
403
+ text_content=text_content,
404
+ to=to,
405
+ request_options=request_options,
406
+ )
407
+ return _response.data
408
+
409
+ def delete_scheduled_email_by_id(
410
+ self, identifier: str, *, request_options: typing.Optional[RequestOptions] = None
411
+ ) -> None:
412
+ """
413
+ Delete scheduled batch of emails by batchId or single scheduled email by messageId
414
+
415
+ Parameters
416
+ ----------
417
+ identifier : str
418
+ The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.
419
+
420
+ request_options : typing.Optional[RequestOptions]
421
+ Request-specific configuration.
422
+
423
+ Returns
424
+ -------
425
+ None
426
+
427
+ Examples
428
+ --------
429
+ from brevo import Brevo
430
+
431
+ client = Brevo(
432
+ api_key="YOUR_API_KEY",
433
+ )
434
+ client.transactional_emails.delete_scheduled_email_by_id(
435
+ identifier="4320f270-a4e3-4a2e-b591-edfe30a5e627",
436
+ )
437
+ """
438
+ _response = self._raw_client.delete_scheduled_email_by_id(identifier, request_options=request_options)
439
+ return _response.data
440
+
441
+ def get_scheduled_email_by_id(
442
+ self,
443
+ identifier: str,
444
+ *,
445
+ start_date: typing.Optional[dt.date] = None,
446
+ end_date: typing.Optional[dt.date] = None,
447
+ sort: typing.Optional[GetScheduledEmailByIdRequestSort] = None,
448
+ status: typing.Optional[GetScheduledEmailByIdRequestStatus] = None,
449
+ limit: typing.Optional[int] = None,
450
+ offset: typing.Optional[int] = None,
451
+ request_options: typing.Optional[RequestOptions] = None,
452
+ ) -> GetScheduledEmailByIdResponse:
453
+ """
454
+ Fetch scheduled batch of emails by batchId or single scheduled email by messageId (Can retrieve data upto 30 days old)
455
+
456
+ Parameters
457
+ ----------
458
+ identifier : str
459
+ The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.
460
+
461
+ start_date : typing.Optional[dt.date]
462
+ Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date.
463
+
464
+ end_date : typing.Optional[dt.date]
465
+ Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
466
+
467
+ sort : typing.Optional[GetScheduledEmailByIdRequestSort]
468
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. Not valid when identifier is `messageId`.
469
+
470
+ status : typing.Optional[GetScheduledEmailByIdRequestStatus]
471
+ Filter the records by `status` of the scheduled email batch or message. Not valid when identifier is `messageId`.
472
+
473
+ limit : typing.Optional[int]
474
+ Number of documents returned per page. Not valid when identifier is `messageId`.
475
+
476
+ offset : typing.Optional[int]
477
+ Index of the first document on the page. Not valid when identifier is `messageId`.
478
+
479
+ request_options : typing.Optional[RequestOptions]
480
+ Request-specific configuration.
481
+
482
+ Returns
483
+ -------
484
+ GetScheduledEmailByIdResponse
485
+ Scheduled email batches
486
+
487
+ Examples
488
+ --------
489
+ import datetime
490
+
491
+ from brevo import Brevo
492
+
493
+ client = Brevo(
494
+ api_key="YOUR_API_KEY",
495
+ )
496
+ client.transactional_emails.get_scheduled_email_by_id(
497
+ identifier="4320f270-a4e3-4a2e-b591-edfe30a5e627",
498
+ start_date=datetime.date.fromisoformat(
499
+ "2022-02-02",
500
+ ),
501
+ end_date=datetime.date.fromisoformat(
502
+ "2022-03-02",
503
+ ),
504
+ )
505
+ """
506
+ _response = self._raw_client.get_scheduled_email_by_id(
507
+ identifier,
508
+ start_date=start_date,
509
+ end_date=end_date,
510
+ sort=sort,
511
+ status=status,
512
+ limit=limit,
513
+ offset=offset,
514
+ request_options=request_options,
515
+ )
516
+ return _response.data
517
+
518
+ def get_transac_emails_list(
519
+ self,
520
+ *,
521
+ email: typing.Optional[str] = None,
522
+ template_id: typing.Optional[int] = None,
523
+ message_id: typing.Optional[str] = None,
524
+ start_date: typing.Optional[str] = None,
525
+ end_date: typing.Optional[str] = None,
526
+ sort: typing.Optional[GetTransacEmailsListRequestSort] = None,
527
+ limit: typing.Optional[int] = None,
528
+ offset: typing.Optional[int] = None,
529
+ request_options: typing.Optional[RequestOptions] = None,
530
+ ) -> GetTransacEmailsListResponse:
531
+ """
532
+ This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters.
533
+
534
+ Parameters
535
+ ----------
536
+ email : typing.Optional[str]
537
+ **Mandatory if templateId and messageId are not passed in query filters.** Email address to which transactional email has been sent.
538
+
539
+ template_id : typing.Optional[int]
540
+ **Mandatory if email and messageId are not passed in query filters.** Id of the template that was used to compose transactional email.
541
+
542
+ message_id : typing.Optional[str]
543
+ **Mandatory if templateId and email are not passed in query filters.** Message ID of the transactional email sent.
544
+
545
+ start_date : typing.Optional[str]
546
+ **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from which you want to fetch the list. **Maximum time period that can be selected is one month**.
547
+
548
+ end_date : typing.Optional[str]
549
+ **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till which you want to fetch the list. **Maximum time period that can be selected is one month.**
550
+
551
+ sort : typing.Optional[GetTransacEmailsListRequestSort]
552
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
553
+
554
+ limit : typing.Optional[int]
555
+ Number of documents returned per page
556
+
557
+ offset : typing.Optional[int]
558
+ Index of the first document in the page
559
+
560
+ request_options : typing.Optional[RequestOptions]
561
+ Request-specific configuration.
562
+
563
+ Returns
564
+ -------
565
+ GetTransacEmailsListResponse
566
+ List of transactional emails
567
+
568
+ Examples
569
+ --------
570
+ from brevo import Brevo
571
+
572
+ client = Brevo(
573
+ api_key="YOUR_API_KEY",
574
+ )
575
+ client.transactional_emails.get_transac_emails_list()
576
+ """
577
+ _response = self._raw_client.get_transac_emails_list(
578
+ email=email,
579
+ template_id=template_id,
580
+ message_id=message_id,
581
+ start_date=start_date,
582
+ end_date=end_date,
583
+ sort=sort,
584
+ limit=limit,
585
+ offset=offset,
586
+ request_options=request_options,
587
+ )
588
+ return _response.data
589
+
590
+ def get_transac_email_content(
591
+ self, uuid_: str, *, request_options: typing.Optional[RequestOptions] = None
592
+ ) -> GetTransacEmailContentResponse:
593
+ """
594
+ <Note title="How to get uuid?">
595
+ You can get the uuid using either of the following methods:
596
+
597
+ Send a GET request to https://api.brevo.com/v3/smtp/emails and pass the message_id in the url. Use your api-key to authenticate the request and you will get your uuid as a response.
598
+
599
+ The uuid can also be fetched from the transactional logs page in your Brevo account, from the address URL.
600
+ </Note>
601
+
602
+ Parameters
603
+ ----------
604
+ uuid_ : str
605
+ Unique id of the transactional email that has been sent to a particular contact
606
+
607
+ request_options : typing.Optional[RequestOptions]
608
+ Request-specific configuration.
609
+
610
+ Returns
611
+ -------
612
+ GetTransacEmailContentResponse
613
+ Transactional email content
614
+
615
+ Examples
616
+ --------
617
+ from brevo import Brevo
618
+
619
+ client = Brevo(
620
+ api_key="YOUR_API_KEY",
621
+ )
622
+ client.transactional_emails.get_transac_email_content(
623
+ uuid_="uuid",
624
+ )
625
+ """
626
+ _response = self._raw_client.get_transac_email_content(uuid_, request_options=request_options)
627
+ return _response.data
628
+
629
+ def delete_an_smtp_transactional_log(
630
+ self, identifier: str, *, request_options: typing.Optional[RequestOptions] = None
631
+ ) -> None:
632
+ """
633
+ Parameters
634
+ ----------
635
+ identifier : str
636
+ MessageId of the transactional log(s) to delete
637
+
638
+ request_options : typing.Optional[RequestOptions]
639
+ Request-specific configuration.
640
+
641
+ Returns
642
+ -------
643
+ None
644
+
645
+ Examples
646
+ --------
647
+ from brevo import Brevo
648
+
649
+ client = Brevo(
650
+ api_key="YOUR_API_KEY",
651
+ )
652
+ client.transactional_emails.delete_an_smtp_transactional_log(
653
+ identifier="identifier",
654
+ )
655
+ """
656
+ _response = self._raw_client.delete_an_smtp_transactional_log(identifier, request_options=request_options)
657
+ return _response.data
658
+
659
+ def get_aggregated_smtp_report(
660
+ self,
661
+ *,
662
+ start_date: typing.Optional[str] = None,
663
+ end_date: typing.Optional[str] = None,
664
+ days: typing.Optional[int] = None,
665
+ tag: typing.Optional[str] = None,
666
+ request_options: typing.Optional[RequestOptions] = None,
667
+ ) -> GetAggregatedSmtpReportResponse:
668
+ """
669
+ This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
670
+
671
+ Parameters
672
+ ----------
673
+ start_date : typing.Optional[str]
674
+ **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
675
+
676
+ end_date : typing.Optional[str]
677
+ **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
678
+
679
+ days : typing.Optional[int]
680
+ Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_
681
+
682
+ tag : typing.Optional[str]
683
+ Tag of the emails
684
+
685
+ request_options : typing.Optional[RequestOptions]
686
+ Request-specific configuration.
687
+
688
+ Returns
689
+ -------
690
+ GetAggregatedSmtpReportResponse
691
+ Aggregated report informations
692
+
693
+ Examples
694
+ --------
695
+ from brevo import Brevo
696
+
697
+ client = Brevo(
698
+ api_key="YOUR_API_KEY",
699
+ )
700
+ client.transactional_emails.get_aggregated_smtp_report()
701
+ """
702
+ _response = self._raw_client.get_aggregated_smtp_report(
703
+ start_date=start_date, end_date=end_date, days=days, tag=tag, request_options=request_options
704
+ )
705
+ return _response.data
706
+
707
+ def get_email_event_report(
708
+ self,
709
+ *,
710
+ limit: typing.Optional[int] = None,
711
+ offset: typing.Optional[int] = None,
712
+ start_date: typing.Optional[str] = None,
713
+ end_date: typing.Optional[str] = None,
714
+ days: typing.Optional[int] = None,
715
+ email: typing.Optional[str] = None,
716
+ event: typing.Optional[GetEmailEventReportRequestEvent] = None,
717
+ tags: typing.Optional[str] = None,
718
+ message_id: typing.Optional[str] = None,
719
+ template_id: typing.Optional[int] = None,
720
+ sort: typing.Optional[GetEmailEventReportRequestSort] = None,
721
+ request_options: typing.Optional[RequestOptions] = None,
722
+ ) -> GetEmailEventReportResponse:
723
+ """
724
+ This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
725
+
726
+ Parameters
727
+ ----------
728
+ limit : typing.Optional[int]
729
+ Number limitation for the result returned
730
+
731
+ offset : typing.Optional[int]
732
+ Beginning point in the list to retrieve from.
733
+
734
+ start_date : typing.Optional[str]
735
+ **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
736
+
737
+ end_date : typing.Optional[str]
738
+ **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
739
+
740
+ days : typing.Optional[int]
741
+ Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_
742
+
743
+ email : typing.Optional[str]
744
+ Filter the report for a specific email addresses
745
+
746
+ event : typing.Optional[GetEmailEventReportRequestEvent]
747
+ Filter the report for a specific event type
748
+
749
+ tags : typing.Optional[str]
750
+ Filter the report for tags (serialized and urlencoded array)
751
+
752
+ message_id : typing.Optional[str]
753
+ Filter on a specific message id
754
+
755
+ template_id : typing.Optional[int]
756
+ Filter on a specific template id
757
+
758
+ sort : typing.Optional[GetEmailEventReportRequestSort]
759
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
760
+
761
+ request_options : typing.Optional[RequestOptions]
762
+ Request-specific configuration.
763
+
764
+ Returns
765
+ -------
766
+ GetEmailEventReportResponse
767
+ Email events report informations
768
+
769
+ Examples
770
+ --------
771
+ from brevo import Brevo
772
+
773
+ client = Brevo(
774
+ api_key="YOUR_API_KEY",
775
+ )
776
+ client.transactional_emails.get_email_event_report()
777
+ """
778
+ _response = self._raw_client.get_email_event_report(
779
+ limit=limit,
780
+ offset=offset,
781
+ start_date=start_date,
782
+ end_date=end_date,
783
+ days=days,
784
+ email=email,
785
+ event=event,
786
+ tags=tags,
787
+ message_id=message_id,
788
+ template_id=template_id,
789
+ sort=sort,
790
+ request_options=request_options,
791
+ )
792
+ return _response.data
793
+
794
+ def get_smtp_report(
795
+ self,
796
+ *,
797
+ limit: typing.Optional[int] = None,
798
+ offset: typing.Optional[int] = None,
799
+ start_date: typing.Optional[str] = None,
800
+ end_date: typing.Optional[str] = None,
801
+ days: typing.Optional[int] = None,
802
+ tag: typing.Optional[str] = None,
803
+ sort: typing.Optional[GetSmtpReportRequestSort] = None,
804
+ request_options: typing.Optional[RequestOptions] = None,
805
+ ) -> GetSmtpReportResponse:
806
+ """
807
+ Parameters
808
+ ----------
809
+ limit : typing.Optional[int]
810
+ Number of documents returned per page
811
+
812
+ offset : typing.Optional[int]
813
+ Index of the first document on the page
814
+
815
+ start_date : typing.Optional[str]
816
+ **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD)
817
+
818
+ end_date : typing.Optional[str]
819
+ **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD)
820
+
821
+ days : typing.Optional[int]
822
+ Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_
823
+
824
+ tag : typing.Optional[str]
825
+ Tag of the emails
826
+
827
+ sort : typing.Optional[GetSmtpReportRequestSort]
828
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
829
+
830
+ request_options : typing.Optional[RequestOptions]
831
+ Request-specific configuration.
832
+
833
+ Returns
834
+ -------
835
+ GetSmtpReportResponse
836
+ Aggregated report informations
837
+
838
+ Examples
839
+ --------
840
+ from brevo import Brevo
841
+
842
+ client = Brevo(
843
+ api_key="YOUR_API_KEY",
844
+ )
845
+ client.transactional_emails.get_smtp_report()
846
+ """
847
+ _response = self._raw_client.get_smtp_report(
848
+ limit=limit,
849
+ offset=offset,
850
+ start_date=start_date,
851
+ end_date=end_date,
852
+ days=days,
853
+ tag=tag,
854
+ sort=sort,
855
+ request_options=request_options,
856
+ )
857
+ return _response.data
858
+
859
+ def post_preview_smtp_email_templates(
860
+ self, *, request: typing.Any, request_options: typing.Optional[RequestOptions] = None
861
+ ) -> PostPreviewSmtpEmailTemplatesResponse:
862
+ """
863
+ Parameters
864
+ ----------
865
+ request : typing.Any
866
+
867
+ request_options : typing.Optional[RequestOptions]
868
+ Request-specific configuration.
869
+
870
+ Returns
871
+ -------
872
+ PostPreviewSmtpEmailTemplatesResponse
873
+ successfully fetched template's preview fields
874
+
875
+ Examples
876
+ --------
877
+ from brevo import Brevo
878
+
879
+ client = Brevo(
880
+ api_key="YOUR_API_KEY",
881
+ )
882
+ client.transactional_emails.post_preview_smtp_email_templates(
883
+ request={"key": "value"},
884
+ )
885
+ """
886
+ _response = self._raw_client.post_preview_smtp_email_templates(request=request, request_options=request_options)
887
+ return _response.data
888
+
889
+ def get_smtp_templates(
890
+ self,
891
+ *,
892
+ template_status: typing.Optional[bool] = None,
893
+ limit: typing.Optional[int] = None,
894
+ offset: typing.Optional[int] = None,
895
+ sort: typing.Optional[GetSmtpTemplatesRequestSort] = None,
896
+ request_options: typing.Optional[RequestOptions] = None,
897
+ ) -> GetSmtpTemplatesResponse:
898
+ """
899
+ Parameters
900
+ ----------
901
+ template_status : typing.Optional[bool]
902
+ Filter on the status of the template. Active = true, inactive = false
903
+
904
+ limit : typing.Optional[int]
905
+ Number of documents returned per page
906
+
907
+ offset : typing.Optional[int]
908
+ Index of the first document in the page
909
+
910
+ sort : typing.Optional[GetSmtpTemplatesRequestSort]
911
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
912
+
913
+ request_options : typing.Optional[RequestOptions]
914
+ Request-specific configuration.
915
+
916
+ Returns
917
+ -------
918
+ GetSmtpTemplatesResponse
919
+ transactional email templates informations
920
+
921
+ Examples
922
+ --------
923
+ from brevo import Brevo
924
+
925
+ client = Brevo(
926
+ api_key="YOUR_API_KEY",
927
+ )
928
+ client.transactional_emails.get_smtp_templates()
929
+ """
930
+ _response = self._raw_client.get_smtp_templates(
931
+ template_status=template_status, limit=limit, offset=offset, sort=sort, request_options=request_options
932
+ )
933
+ return _response.data
934
+
935
+ def create_smtp_template(
936
+ self,
937
+ *,
938
+ sender: CreateSmtpTemplateRequestSender,
939
+ subject: str,
940
+ template_name: str,
941
+ attachment_url: typing.Optional[str] = OMIT,
942
+ html_content: typing.Optional[str] = OMIT,
943
+ html_url: typing.Optional[str] = OMIT,
944
+ is_active: typing.Optional[bool] = OMIT,
945
+ reply_to: typing.Optional[str] = OMIT,
946
+ tag: typing.Optional[str] = OMIT,
947
+ to_field: typing.Optional[str] = OMIT,
948
+ request_options: typing.Optional[RequestOptions] = None,
949
+ ) -> CreateSmtpTemplateResponse:
950
+ """
951
+ Parameters
952
+ ----------
953
+ sender : CreateSmtpTemplateRequestSender
954
+ 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}**
955
+
956
+ subject : str
957
+ Subject of the template
958
+
959
+ template_name : str
960
+ Name of the template
961
+
962
+ attachment_url : typing.Optional[str]
963
+ 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'
964
+
965
+ html_content : typing.Optional[str]
966
+ Body of the message (HTML version). The field must have more than 10 characters. **REQUIRED if htmlUrl is empty**
967
+
968
+ html_url : typing.Optional[str]
969
+ Url which contents the body of the email message. REQUIRED if htmlContent is empty
970
+
971
+ is_active : typing.Optional[bool]
972
+ Status of template. isActive = true means template is active and isActive = false means template is inactive
973
+
974
+ reply_to : typing.Optional[str]
975
+ Email on which campaign recipients will be able to reply to
976
+
977
+ tag : typing.Optional[str]
978
+ Tag of the template
979
+
980
+ to_field : typing.Optional[str]
981
+ 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
982
+
983
+ request_options : typing.Optional[RequestOptions]
984
+ Request-specific configuration.
985
+
986
+ Returns
987
+ -------
988
+ CreateSmtpTemplateResponse
989
+ successfully created
990
+
991
+ Examples
992
+ --------
993
+ from brevo import Brevo
994
+ from brevo.transactional_emails import CreateSmtpTemplateRequestSender
995
+
996
+ client = Brevo(
997
+ api_key="YOUR_API_KEY",
998
+ )
999
+ client.transactional_emails.create_smtp_template(
1000
+ sender=CreateSmtpTemplateRequestSender(),
1001
+ subject="Thanks for your purchase !",
1002
+ template_name="Order Confirmation - EN",
1003
+ )
1004
+ """
1005
+ _response = self._raw_client.create_smtp_template(
1006
+ sender=sender,
1007
+ subject=subject,
1008
+ template_name=template_name,
1009
+ attachment_url=attachment_url,
1010
+ html_content=html_content,
1011
+ html_url=html_url,
1012
+ is_active=is_active,
1013
+ reply_to=reply_to,
1014
+ tag=tag,
1015
+ to_field=to_field,
1016
+ request_options=request_options,
1017
+ )
1018
+ return _response.data
1019
+
1020
+ def get_smtp_template(
1021
+ self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None
1022
+ ) -> GetSmtpTemplateOverview:
1023
+ """
1024
+ Parameters
1025
+ ----------
1026
+ template_id : int
1027
+ id of the template
1028
+
1029
+ request_options : typing.Optional[RequestOptions]
1030
+ Request-specific configuration.
1031
+
1032
+ Returns
1033
+ -------
1034
+ GetSmtpTemplateOverview
1035
+ Email template informations
1036
+
1037
+ Examples
1038
+ --------
1039
+ from brevo import Brevo
1040
+
1041
+ client = Brevo(
1042
+ api_key="YOUR_API_KEY",
1043
+ )
1044
+ client.transactional_emails.get_smtp_template(
1045
+ template_id=1000000,
1046
+ )
1047
+ """
1048
+ _response = self._raw_client.get_smtp_template(template_id, request_options=request_options)
1049
+ return _response.data
1050
+
1051
+ def update_smtp_template(
1052
+ self,
1053
+ template_id: int,
1054
+ *,
1055
+ attachment_url: typing.Optional[str] = OMIT,
1056
+ html_content: typing.Optional[str] = OMIT,
1057
+ html_url: typing.Optional[str] = OMIT,
1058
+ is_active: typing.Optional[bool] = OMIT,
1059
+ reply_to: typing.Optional[str] = OMIT,
1060
+ sender: typing.Optional[UpdateSmtpTemplateRequestSender] = OMIT,
1061
+ subject: typing.Optional[str] = OMIT,
1062
+ tag: typing.Optional[str] = OMIT,
1063
+ template_name: typing.Optional[str] = OMIT,
1064
+ to_field: typing.Optional[str] = OMIT,
1065
+ request_options: typing.Optional[RequestOptions] = None,
1066
+ ) -> None:
1067
+ """
1068
+ Parameters
1069
+ ----------
1070
+ template_id : int
1071
+ id of the template
1072
+
1073
+ attachment_url : typing.Optional[str]
1074
+ Absolute url of the attachment (**no local file**). Extensions 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
1075
+
1076
+ html_content : typing.Optional[str]
1077
+ **Required if htmlUrl is empty**. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters)
1078
+
1079
+ html_url : typing.Optional[str]
1080
+ **Required if htmlContent is empty**. URL to the body of the email (HTML)
1081
+
1082
+ is_active : typing.Optional[bool]
1083
+ Status of the template. isActive = false means template is inactive, isActive = true means template is active
1084
+
1085
+ reply_to : typing.Optional[str]
1086
+ Email on which campaign recipients will be able to reply to
1087
+
1088
+ sender : typing.Optional[UpdateSmtpTemplateRequestSender]
1089
+ 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}**
1090
+
1091
+ subject : typing.Optional[str]
1092
+ Subject of the email
1093
+
1094
+ tag : typing.Optional[str]
1095
+ Tag of the template
1096
+
1097
+ template_name : typing.Optional[str]
1098
+ Name of the template
1099
+
1100
+ to_field : typing.Optional[str]
1101
+ 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
1102
+
1103
+ request_options : typing.Optional[RequestOptions]
1104
+ Request-specific configuration.
1105
+
1106
+ Returns
1107
+ -------
1108
+ None
1109
+
1110
+ Examples
1111
+ --------
1112
+ from brevo import Brevo
1113
+
1114
+ client = Brevo(
1115
+ api_key="YOUR_API_KEY",
1116
+ )
1117
+ client.transactional_emails.update_smtp_template(
1118
+ template_id=1000000,
1119
+ )
1120
+ """
1121
+ _response = self._raw_client.update_smtp_template(
1122
+ template_id,
1123
+ attachment_url=attachment_url,
1124
+ html_content=html_content,
1125
+ html_url=html_url,
1126
+ is_active=is_active,
1127
+ reply_to=reply_to,
1128
+ sender=sender,
1129
+ subject=subject,
1130
+ tag=tag,
1131
+ template_name=template_name,
1132
+ to_field=to_field,
1133
+ request_options=request_options,
1134
+ )
1135
+ return _response.data
1136
+
1137
+ def delete_smtp_template(
1138
+ self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None
1139
+ ) -> None:
1140
+ """
1141
+ Parameters
1142
+ ----------
1143
+ template_id : int
1144
+ id of the template
1145
+
1146
+ request_options : typing.Optional[RequestOptions]
1147
+ Request-specific configuration.
1148
+
1149
+ Returns
1150
+ -------
1151
+ None
1152
+
1153
+ Examples
1154
+ --------
1155
+ from brevo import Brevo
1156
+
1157
+ client = Brevo(
1158
+ api_key="YOUR_API_KEY",
1159
+ )
1160
+ client.transactional_emails.delete_smtp_template(
1161
+ template_id=1000000,
1162
+ )
1163
+ """
1164
+ _response = self._raw_client.delete_smtp_template(template_id, request_options=request_options)
1165
+ return _response.data
1166
+
1167
+ def send_test_template(
1168
+ self,
1169
+ template_id: int,
1170
+ *,
1171
+ email_to: typing.Optional[typing.Sequence[str]] = OMIT,
1172
+ request_options: typing.Optional[RequestOptions] = None,
1173
+ ) -> None:
1174
+ """
1175
+ Parameters
1176
+ ----------
1177
+ template_id : int
1178
+ Id of the template
1179
+
1180
+ email_to : typing.Optional[typing.Sequence[str]]
1181
+ 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_.
1182
+
1183
+ request_options : typing.Optional[RequestOptions]
1184
+ Request-specific configuration.
1185
+
1186
+ Returns
1187
+ -------
1188
+ None
1189
+
1190
+ Examples
1191
+ --------
1192
+ from brevo import Brevo
1193
+
1194
+ client = Brevo(
1195
+ api_key="YOUR_API_KEY",
1196
+ )
1197
+ client.transactional_emails.send_test_template(
1198
+ template_id=1000000,
1199
+ )
1200
+ """
1201
+ _response = self._raw_client.send_test_template(template_id, email_to=email_to, request_options=request_options)
1202
+ return _response.data
1203
+
1204
+
1205
+ class AsyncTransactionalEmailsClient:
1206
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
1207
+ self._raw_client = AsyncRawTransactionalEmailsClient(client_wrapper=client_wrapper)
1208
+
1209
+ @property
1210
+ def with_raw_response(self) -> AsyncRawTransactionalEmailsClient:
1211
+ """
1212
+ Retrieves a raw implementation of this client that returns raw responses.
1213
+
1214
+ Returns
1215
+ -------
1216
+ AsyncRawTransactionalEmailsClient
1217
+ """
1218
+ return self._raw_client
1219
+
1220
+ async def get_transac_blocked_contacts(
1221
+ self,
1222
+ *,
1223
+ start_date: typing.Optional[str] = None,
1224
+ end_date: typing.Optional[str] = None,
1225
+ limit: typing.Optional[int] = None,
1226
+ offset: typing.Optional[int] = None,
1227
+ senders: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
1228
+ sort: typing.Optional[GetTransacBlockedContactsRequestSort] = None,
1229
+ request_options: typing.Optional[RequestOptions] = None,
1230
+ ) -> GetTransacBlockedContactsResponse:
1231
+ """
1232
+ Parameters
1233
+ ----------
1234
+ start_date : typing.Optional[str]
1235
+ **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts
1236
+
1237
+ end_date : typing.Optional[str]
1238
+ **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts
1239
+
1240
+ limit : typing.Optional[int]
1241
+ Number of documents returned per page
1242
+
1243
+ offset : typing.Optional[int]
1244
+ Index of the first document on the page
1245
+
1246
+ senders : typing.Optional[typing.Union[str, typing.Sequence[str]]]
1247
+ Comma separated list of emails of the senders from which contacts are blocked or unsubscribed
1248
+
1249
+ sort : typing.Optional[GetTransacBlockedContactsRequestSort]
1250
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
1251
+
1252
+ request_options : typing.Optional[RequestOptions]
1253
+ Request-specific configuration.
1254
+
1255
+ Returns
1256
+ -------
1257
+ GetTransacBlockedContactsResponse
1258
+ List of blocked or unsubscribed transactional contacts
1259
+
1260
+ Examples
1261
+ --------
1262
+ import asyncio
1263
+
1264
+ from brevo import AsyncBrevo
1265
+
1266
+ client = AsyncBrevo(
1267
+ api_key="YOUR_API_KEY",
1268
+ )
1269
+
1270
+
1271
+ async def main() -> None:
1272
+ await client.transactional_emails.get_transac_blocked_contacts()
1273
+
1274
+
1275
+ asyncio.run(main())
1276
+ """
1277
+ _response = await self._raw_client.get_transac_blocked_contacts(
1278
+ start_date=start_date,
1279
+ end_date=end_date,
1280
+ limit=limit,
1281
+ offset=offset,
1282
+ senders=senders,
1283
+ sort=sort,
1284
+ request_options=request_options,
1285
+ )
1286
+ return _response.data
1287
+
1288
+ async def unblock_or_resubscribe_a_transactional_contact(
1289
+ self, email: str, *, request_options: typing.Optional[RequestOptions] = None
1290
+ ) -> None:
1291
+ """
1292
+ Parameters
1293
+ ----------
1294
+ email : str
1295
+ contact email (urlencoded) to unblock.
1296
+
1297
+ request_options : typing.Optional[RequestOptions]
1298
+ Request-specific configuration.
1299
+
1300
+ Returns
1301
+ -------
1302
+ None
1303
+
1304
+ Examples
1305
+ --------
1306
+ import asyncio
1307
+
1308
+ from brevo import AsyncBrevo
1309
+
1310
+ client = AsyncBrevo(
1311
+ api_key="YOUR_API_KEY",
1312
+ )
1313
+
1314
+
1315
+ async def main() -> None:
1316
+ await client.transactional_emails.unblock_or_resubscribe_a_transactional_contact(
1317
+ email="email",
1318
+ )
1319
+
1320
+
1321
+ asyncio.run(main())
1322
+ """
1323
+ _response = await self._raw_client.unblock_or_resubscribe_a_transactional_contact(
1324
+ email, request_options=request_options
1325
+ )
1326
+ return _response.data
1327
+
1328
+ async def get_blocked_domains(
1329
+ self, *, request_options: typing.Optional[RequestOptions] = None
1330
+ ) -> GetBlockedDomainsResponse:
1331
+ """
1332
+ Get the list of blocked domains
1333
+
1334
+ Parameters
1335
+ ----------
1336
+ request_options : typing.Optional[RequestOptions]
1337
+ Request-specific configuration.
1338
+
1339
+ Returns
1340
+ -------
1341
+ GetBlockedDomainsResponse
1342
+ List of blocked domains
1343
+
1344
+ Examples
1345
+ --------
1346
+ import asyncio
1347
+
1348
+ from brevo import AsyncBrevo
1349
+
1350
+ client = AsyncBrevo(
1351
+ api_key="YOUR_API_KEY",
1352
+ )
1353
+
1354
+
1355
+ async def main() -> None:
1356
+ await client.transactional_emails.get_blocked_domains()
1357
+
1358
+
1359
+ asyncio.run(main())
1360
+ """
1361
+ _response = await self._raw_client.get_blocked_domains(request_options=request_options)
1362
+ return _response.data
1363
+
1364
+ async def block_new_domain(self, *, domain: str, request_options: typing.Optional[RequestOptions] = None) -> None:
1365
+ """
1366
+ Blocks a new domain in order to avoid messages being sent to the same
1367
+
1368
+ Parameters
1369
+ ----------
1370
+ domain : str
1371
+ name of the domain to be blocked
1372
+
1373
+ request_options : typing.Optional[RequestOptions]
1374
+ Request-specific configuration.
1375
+
1376
+ Returns
1377
+ -------
1378
+ None
1379
+
1380
+ Examples
1381
+ --------
1382
+ import asyncio
1383
+
1384
+ from brevo import AsyncBrevo
1385
+
1386
+ client = AsyncBrevo(
1387
+ api_key="YOUR_API_KEY",
1388
+ )
1389
+
1390
+
1391
+ async def main() -> None:
1392
+ await client.transactional_emails.block_new_domain(
1393
+ domain="example.com",
1394
+ )
1395
+
1396
+
1397
+ asyncio.run(main())
1398
+ """
1399
+ _response = await self._raw_client.block_new_domain(domain=domain, request_options=request_options)
1400
+ return _response.data
1401
+
1402
+ async def delete_blocked_domain(
1403
+ self, domain: str, *, request_options: typing.Optional[RequestOptions] = None
1404
+ ) -> None:
1405
+ """
1406
+ Unblocks an existing domain from the list of blocked domains
1407
+
1408
+ Parameters
1409
+ ----------
1410
+ domain : str
1411
+ The name of the domain to be deleted
1412
+
1413
+ request_options : typing.Optional[RequestOptions]
1414
+ Request-specific configuration.
1415
+
1416
+ Returns
1417
+ -------
1418
+ None
1419
+
1420
+ Examples
1421
+ --------
1422
+ import asyncio
1423
+
1424
+ from brevo import AsyncBrevo
1425
+
1426
+ client = AsyncBrevo(
1427
+ api_key="YOUR_API_KEY",
1428
+ )
1429
+
1430
+
1431
+ async def main() -> None:
1432
+ await client.transactional_emails.delete_blocked_domain(
1433
+ domain="domain",
1434
+ )
1435
+
1436
+
1437
+ asyncio.run(main())
1438
+ """
1439
+ _response = await self._raw_client.delete_blocked_domain(domain, request_options=request_options)
1440
+ return _response.data
1441
+
1442
+ async def delete_hardbounces(
1443
+ self,
1444
+ *,
1445
+ contact_email: typing.Optional[str] = OMIT,
1446
+ end_date: typing.Optional[str] = OMIT,
1447
+ start_date: typing.Optional[str] = OMIT,
1448
+ request_options: typing.Optional[RequestOptions] = None,
1449
+ ) -> None:
1450
+ """
1451
+ Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)
1452
+
1453
+ Parameters
1454
+ ----------
1455
+ contact_email : typing.Optional[str]
1456
+ Target a specific email address
1457
+
1458
+ end_date : typing.Optional[str]
1459
+ Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate
1460
+
1461
+ start_date : typing.Optional[str]
1462
+ Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate
1463
+
1464
+ request_options : typing.Optional[RequestOptions]
1465
+ Request-specific configuration.
1466
+
1467
+ Returns
1468
+ -------
1469
+ None
1470
+
1471
+ Examples
1472
+ --------
1473
+ import asyncio
1474
+
1475
+ from brevo import AsyncBrevo
1476
+
1477
+ client = AsyncBrevo(
1478
+ api_key="YOUR_API_KEY",
1479
+ )
1480
+
1481
+
1482
+ async def main() -> None:
1483
+ await client.transactional_emails.delete_hardbounces()
1484
+
1485
+
1486
+ asyncio.run(main())
1487
+ """
1488
+ _response = await self._raw_client.delete_hardbounces(
1489
+ contact_email=contact_email, end_date=end_date, start_date=start_date, request_options=request_options
1490
+ )
1491
+ return _response.data
1492
+
1493
+ async def send_transac_email(
1494
+ self,
1495
+ *,
1496
+ attachment: typing.Optional[typing.Sequence[SendTransacEmailRequestAttachmentItem]] = OMIT,
1497
+ batch_id: typing.Optional[str] = OMIT,
1498
+ bcc: typing.Optional[typing.Sequence[SendTransacEmailRequestBccItem]] = OMIT,
1499
+ cc: typing.Optional[typing.Sequence[SendTransacEmailRequestCcItem]] = OMIT,
1500
+ headers: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
1501
+ html_content: typing.Optional[str] = OMIT,
1502
+ message_versions: typing.Optional[typing.Sequence[SendTransacEmailRequestMessageVersionsItem]] = OMIT,
1503
+ params: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
1504
+ reply_to: typing.Optional[SendTransacEmailRequestReplyTo] = OMIT,
1505
+ scheduled_at: typing.Optional[dt.datetime] = OMIT,
1506
+ sender: typing.Optional[SendTransacEmailRequestSender] = OMIT,
1507
+ subject: typing.Optional[str] = OMIT,
1508
+ tags: typing.Optional[typing.Sequence[str]] = OMIT,
1509
+ template_id: typing.Optional[int] = OMIT,
1510
+ text_content: typing.Optional[str] = OMIT,
1511
+ to: typing.Optional[typing.Sequence[SendTransacEmailRequestToItem]] = OMIT,
1512
+ request_options: typing.Optional[RequestOptions] = None,
1513
+ ) -> SendTransacEmailResponse:
1514
+ """
1515
+ Parameters
1516
+ ----------
1517
+ attachment : typing.Optional[typing.Sequence[SendTransacEmailRequestAttachmentItem]]
1518
+ Array of attachment objects. Each attachment must include either an absolute URL (no local file paths) or base64-encoded content, along with the attachment filename. The `name` field is required when `content` is provided. Supported file extensions: 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, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass, xlsm. When `templateId` is specified: if the template uses the New Template Language format, both `url` and `content` attachment types are supported; if the template uses the Old Template Language format, the `attachment` parameter is ignored.
1519
+
1520
+ batch_id : typing.Optional[str]
1521
+ UUIDv4 identifier for the scheduled batch of transactional emails. If omitted, a valid UUIDv4 batch identifier is automatically generated.
1522
+
1523
+ bcc : typing.Optional[typing.Sequence[SendTransacEmailRequestBccItem]]
1524
+ Array of BCC recipient objects. Each object contains an email address and an optional name.
1525
+
1526
+ cc : typing.Optional[typing.Sequence[SendTransacEmailRequestCcItem]]
1527
+ Array of CC recipient objects. Each object contains an email address and an optional name.
1528
+
1529
+ headers : typing.Optional[typing.Dict[str, typing.Any]]
1530
+ Custom email headers (non-standard headers) to include in the email. The `sender.ip` header can be set to specify the IP address used for sending transactional emails (dedicated IP users only). Header names must use Title-Case-Format (words separated by hyphens with the first letter of each word capitalized). Headers not in this format are automatically converted. Standard email headers are not supported. Example: `{"sender.ip":"1.2.3.4", "X-Mailin-custom":"some_custom_value", "Idempotency-Key":"abc-123"}`
1531
+
1532
+ html_content : typing.Optional[str]
1533
+ HTML body content of the email. Required when `templateId` is not provided. Ignored when `templateId` is provided.
1534
+
1535
+ message_versions : typing.Optional[typing.Sequence[SendTransacEmailRequestMessageVersionsItem]]
1536
+ Array of message version objects for sending customized email variants. The `templateId` can be customized per version only if a global `templateId` is provided. The `htmlContent` and `textContent` can be customized per version only if at least one of these is present in the global parameters. Global parameters such as `to` (required), `bcc`, `cc`, `replyTo`, and `subject` can be customized per version. Maximum total recipients per API request is 2000. Maximum recipients per message version is 99. Individual `params` objects must not exceed 100 KB. Cumulative `params` across all versions must not exceed 1000 KB. See https://developers.brevo.com/docs/batch-send-transactional-emails for detailed usage instructions.
1537
+
1538
+ params : typing.Optional[typing.Dict[str, typing.Any]]
1539
+ Key-value pairs for template variable substitution. Only applicable when the template uses the New Template Language format.
1540
+
1541
+ reply_to : typing.Optional[SendTransacEmailRequestReplyTo]
1542
+ Reply-to email address (required) and optional display name. Recipients will use this address when replying to the email.
1543
+
1544
+ scheduled_at : typing.Optional[dt.datetime]
1545
+ UTC date-time when the email should be sent (format: YYYY-MM-DDTHH:mm:ss.SSSZ). Include timezone information in the date-time value. Scheduled emails may be delayed by up to 5 minutes.
1546
+
1547
+ sender : typing.Optional[SendTransacEmailRequestSender]
1548
+ Sender information. Required when `templateId` is not provided. Specify either an email address (with optional name) or a sender ID. The `name` field is ignored when `id` is provided.
1549
+
1550
+ subject : typing.Optional[str]
1551
+ Email subject line. Required when `templateId` is not provided.
1552
+
1553
+ tags : typing.Optional[typing.Sequence[str]]
1554
+ Array of tags for categorizing and filtering emails
1555
+
1556
+ template_id : typing.Optional[int]
1557
+ Template identifier
1558
+
1559
+ text_content : typing.Optional[str]
1560
+ Plain text body content of the email. Ignored when `templateId` is provided.
1561
+
1562
+ to : typing.Optional[typing.Sequence[SendTransacEmailRequestToItem]]
1563
+ Array of recipient objects. Each object contains an email address and an optional display name. Required when `messageVersions` is not provided. Ignored when `messageVersions` is provided. Example: `[{"name":"Jimmy", "email":"jimmy@example.com"}, {"name":"Joe", "email":"joe@example.com"}]`
1564
+
1565
+ request_options : typing.Optional[RequestOptions]
1566
+ Request-specific configuration.
1567
+
1568
+ Returns
1569
+ -------
1570
+ SendTransacEmailResponse
1571
+ Transactional email sent successfully
1572
+
1573
+ Examples
1574
+ --------
1575
+ import asyncio
1576
+
1577
+ from brevo import AsyncBrevo
1578
+ from brevo.transactional_emails import (
1579
+ SendTransacEmailRequestSender,
1580
+ SendTransacEmailRequestToItem,
1581
+ )
1582
+
1583
+ client = AsyncBrevo(
1584
+ api_key="YOUR_API_KEY",
1585
+ )
1586
+
1587
+
1588
+ async def main() -> None:
1589
+ await client.transactional_emails.send_transac_email(
1590
+ html_content="<html><head></head><body><p>Hello,</p>This is my first transactional email sent from Brevo.</p></body></html>",
1591
+ sender=SendTransacEmailRequestSender(
1592
+ email="hello@brevo.com",
1593
+ name="Alex from Brevo",
1594
+ ),
1595
+ subject="Hello from Brevo!",
1596
+ to=[
1597
+ SendTransacEmailRequestToItem(
1598
+ email="johndoe@example.com",
1599
+ name="John Doe",
1600
+ )
1601
+ ],
1602
+ )
1603
+
1604
+
1605
+ asyncio.run(main())
1606
+ """
1607
+ _response = await self._raw_client.send_transac_email(
1608
+ attachment=attachment,
1609
+ batch_id=batch_id,
1610
+ bcc=bcc,
1611
+ cc=cc,
1612
+ headers=headers,
1613
+ html_content=html_content,
1614
+ message_versions=message_versions,
1615
+ params=params,
1616
+ reply_to=reply_to,
1617
+ scheduled_at=scheduled_at,
1618
+ sender=sender,
1619
+ subject=subject,
1620
+ tags=tags,
1621
+ template_id=template_id,
1622
+ text_content=text_content,
1623
+ to=to,
1624
+ request_options=request_options,
1625
+ )
1626
+ return _response.data
1627
+
1628
+ async def delete_scheduled_email_by_id(
1629
+ self, identifier: str, *, request_options: typing.Optional[RequestOptions] = None
1630
+ ) -> None:
1631
+ """
1632
+ Delete scheduled batch of emails by batchId or single scheduled email by messageId
1633
+
1634
+ Parameters
1635
+ ----------
1636
+ identifier : str
1637
+ The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.
1638
+
1639
+ request_options : typing.Optional[RequestOptions]
1640
+ Request-specific configuration.
1641
+
1642
+ Returns
1643
+ -------
1644
+ None
1645
+
1646
+ Examples
1647
+ --------
1648
+ import asyncio
1649
+
1650
+ from brevo import AsyncBrevo
1651
+
1652
+ client = AsyncBrevo(
1653
+ api_key="YOUR_API_KEY",
1654
+ )
1655
+
1656
+
1657
+ async def main() -> None:
1658
+ await client.transactional_emails.delete_scheduled_email_by_id(
1659
+ identifier="4320f270-a4e3-4a2e-b591-edfe30a5e627",
1660
+ )
1661
+
1662
+
1663
+ asyncio.run(main())
1664
+ """
1665
+ _response = await self._raw_client.delete_scheduled_email_by_id(identifier, request_options=request_options)
1666
+ return _response.data
1667
+
1668
+ async def get_scheduled_email_by_id(
1669
+ self,
1670
+ identifier: str,
1671
+ *,
1672
+ start_date: typing.Optional[dt.date] = None,
1673
+ end_date: typing.Optional[dt.date] = None,
1674
+ sort: typing.Optional[GetScheduledEmailByIdRequestSort] = None,
1675
+ status: typing.Optional[GetScheduledEmailByIdRequestStatus] = None,
1676
+ limit: typing.Optional[int] = None,
1677
+ offset: typing.Optional[int] = None,
1678
+ request_options: typing.Optional[RequestOptions] = None,
1679
+ ) -> GetScheduledEmailByIdResponse:
1680
+ """
1681
+ Fetch scheduled batch of emails by batchId or single scheduled email by messageId (Can retrieve data upto 30 days old)
1682
+
1683
+ Parameters
1684
+ ----------
1685
+ identifier : str
1686
+ The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.
1687
+
1688
+ start_date : typing.Optional[dt.date]
1689
+ Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date.
1690
+
1691
+ end_date : typing.Optional[dt.date]
1692
+ Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
1693
+
1694
+ sort : typing.Optional[GetScheduledEmailByIdRequestSort]
1695
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. Not valid when identifier is `messageId`.
1696
+
1697
+ status : typing.Optional[GetScheduledEmailByIdRequestStatus]
1698
+ Filter the records by `status` of the scheduled email batch or message. Not valid when identifier is `messageId`.
1699
+
1700
+ limit : typing.Optional[int]
1701
+ Number of documents returned per page. Not valid when identifier is `messageId`.
1702
+
1703
+ offset : typing.Optional[int]
1704
+ Index of the first document on the page. Not valid when identifier is `messageId`.
1705
+
1706
+ request_options : typing.Optional[RequestOptions]
1707
+ Request-specific configuration.
1708
+
1709
+ Returns
1710
+ -------
1711
+ GetScheduledEmailByIdResponse
1712
+ Scheduled email batches
1713
+
1714
+ Examples
1715
+ --------
1716
+ import asyncio
1717
+ import datetime
1718
+
1719
+ from brevo import AsyncBrevo
1720
+
1721
+ client = AsyncBrevo(
1722
+ api_key="YOUR_API_KEY",
1723
+ )
1724
+
1725
+
1726
+ async def main() -> None:
1727
+ await client.transactional_emails.get_scheduled_email_by_id(
1728
+ identifier="4320f270-a4e3-4a2e-b591-edfe30a5e627",
1729
+ start_date=datetime.date.fromisoformat(
1730
+ "2022-02-02",
1731
+ ),
1732
+ end_date=datetime.date.fromisoformat(
1733
+ "2022-03-02",
1734
+ ),
1735
+ )
1736
+
1737
+
1738
+ asyncio.run(main())
1739
+ """
1740
+ _response = await self._raw_client.get_scheduled_email_by_id(
1741
+ identifier,
1742
+ start_date=start_date,
1743
+ end_date=end_date,
1744
+ sort=sort,
1745
+ status=status,
1746
+ limit=limit,
1747
+ offset=offset,
1748
+ request_options=request_options,
1749
+ )
1750
+ return _response.data
1751
+
1752
+ async def get_transac_emails_list(
1753
+ self,
1754
+ *,
1755
+ email: typing.Optional[str] = None,
1756
+ template_id: typing.Optional[int] = None,
1757
+ message_id: typing.Optional[str] = None,
1758
+ start_date: typing.Optional[str] = None,
1759
+ end_date: typing.Optional[str] = None,
1760
+ sort: typing.Optional[GetTransacEmailsListRequestSort] = None,
1761
+ limit: typing.Optional[int] = None,
1762
+ offset: typing.Optional[int] = None,
1763
+ request_options: typing.Optional[RequestOptions] = None,
1764
+ ) -> GetTransacEmailsListResponse:
1765
+ """
1766
+ This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters.
1767
+
1768
+ Parameters
1769
+ ----------
1770
+ email : typing.Optional[str]
1771
+ **Mandatory if templateId and messageId are not passed in query filters.** Email address to which transactional email has been sent.
1772
+
1773
+ template_id : typing.Optional[int]
1774
+ **Mandatory if email and messageId are not passed in query filters.** Id of the template that was used to compose transactional email.
1775
+
1776
+ message_id : typing.Optional[str]
1777
+ **Mandatory if templateId and email are not passed in query filters.** Message ID of the transactional email sent.
1778
+
1779
+ start_date : typing.Optional[str]
1780
+ **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from which you want to fetch the list. **Maximum time period that can be selected is one month**.
1781
+
1782
+ end_date : typing.Optional[str]
1783
+ **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till which you want to fetch the list. **Maximum time period that can be selected is one month.**
1784
+
1785
+ sort : typing.Optional[GetTransacEmailsListRequestSort]
1786
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
1787
+
1788
+ limit : typing.Optional[int]
1789
+ Number of documents returned per page
1790
+
1791
+ offset : typing.Optional[int]
1792
+ Index of the first document in the page
1793
+
1794
+ request_options : typing.Optional[RequestOptions]
1795
+ Request-specific configuration.
1796
+
1797
+ Returns
1798
+ -------
1799
+ GetTransacEmailsListResponse
1800
+ List of transactional emails
1801
+
1802
+ Examples
1803
+ --------
1804
+ import asyncio
1805
+
1806
+ from brevo import AsyncBrevo
1807
+
1808
+ client = AsyncBrevo(
1809
+ api_key="YOUR_API_KEY",
1810
+ )
1811
+
1812
+
1813
+ async def main() -> None:
1814
+ await client.transactional_emails.get_transac_emails_list()
1815
+
1816
+
1817
+ asyncio.run(main())
1818
+ """
1819
+ _response = await self._raw_client.get_transac_emails_list(
1820
+ email=email,
1821
+ template_id=template_id,
1822
+ message_id=message_id,
1823
+ start_date=start_date,
1824
+ end_date=end_date,
1825
+ sort=sort,
1826
+ limit=limit,
1827
+ offset=offset,
1828
+ request_options=request_options,
1829
+ )
1830
+ return _response.data
1831
+
1832
+ async def get_transac_email_content(
1833
+ self, uuid_: str, *, request_options: typing.Optional[RequestOptions] = None
1834
+ ) -> GetTransacEmailContentResponse:
1835
+ """
1836
+ <Note title="How to get uuid?">
1837
+ You can get the uuid using either of the following methods:
1838
+
1839
+ Send a GET request to https://api.brevo.com/v3/smtp/emails and pass the message_id in the url. Use your api-key to authenticate the request and you will get your uuid as a response.
1840
+
1841
+ The uuid can also be fetched from the transactional logs page in your Brevo account, from the address URL.
1842
+ </Note>
1843
+
1844
+ Parameters
1845
+ ----------
1846
+ uuid_ : str
1847
+ Unique id of the transactional email that has been sent to a particular contact
1848
+
1849
+ request_options : typing.Optional[RequestOptions]
1850
+ Request-specific configuration.
1851
+
1852
+ Returns
1853
+ -------
1854
+ GetTransacEmailContentResponse
1855
+ Transactional email content
1856
+
1857
+ Examples
1858
+ --------
1859
+ import asyncio
1860
+
1861
+ from brevo import AsyncBrevo
1862
+
1863
+ client = AsyncBrevo(
1864
+ api_key="YOUR_API_KEY",
1865
+ )
1866
+
1867
+
1868
+ async def main() -> None:
1869
+ await client.transactional_emails.get_transac_email_content(
1870
+ uuid_="uuid",
1871
+ )
1872
+
1873
+
1874
+ asyncio.run(main())
1875
+ """
1876
+ _response = await self._raw_client.get_transac_email_content(uuid_, request_options=request_options)
1877
+ return _response.data
1878
+
1879
+ async def delete_an_smtp_transactional_log(
1880
+ self, identifier: str, *, request_options: typing.Optional[RequestOptions] = None
1881
+ ) -> None:
1882
+ """
1883
+ Parameters
1884
+ ----------
1885
+ identifier : str
1886
+ MessageId of the transactional log(s) to delete
1887
+
1888
+ request_options : typing.Optional[RequestOptions]
1889
+ Request-specific configuration.
1890
+
1891
+ Returns
1892
+ -------
1893
+ None
1894
+
1895
+ Examples
1896
+ --------
1897
+ import asyncio
1898
+
1899
+ from brevo import AsyncBrevo
1900
+
1901
+ client = AsyncBrevo(
1902
+ api_key="YOUR_API_KEY",
1903
+ )
1904
+
1905
+
1906
+ async def main() -> None:
1907
+ await client.transactional_emails.delete_an_smtp_transactional_log(
1908
+ identifier="identifier",
1909
+ )
1910
+
1911
+
1912
+ asyncio.run(main())
1913
+ """
1914
+ _response = await self._raw_client.delete_an_smtp_transactional_log(identifier, request_options=request_options)
1915
+ return _response.data
1916
+
1917
+ async def get_aggregated_smtp_report(
1918
+ self,
1919
+ *,
1920
+ start_date: typing.Optional[str] = None,
1921
+ end_date: typing.Optional[str] = None,
1922
+ days: typing.Optional[int] = None,
1923
+ tag: typing.Optional[str] = None,
1924
+ request_options: typing.Optional[RequestOptions] = None,
1925
+ ) -> GetAggregatedSmtpReportResponse:
1926
+ """
1927
+ This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
1928
+
1929
+ Parameters
1930
+ ----------
1931
+ start_date : typing.Optional[str]
1932
+ **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
1933
+
1934
+ end_date : typing.Optional[str]
1935
+ **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
1936
+
1937
+ days : typing.Optional[int]
1938
+ Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_
1939
+
1940
+ tag : typing.Optional[str]
1941
+ Tag of the emails
1942
+
1943
+ request_options : typing.Optional[RequestOptions]
1944
+ Request-specific configuration.
1945
+
1946
+ Returns
1947
+ -------
1948
+ GetAggregatedSmtpReportResponse
1949
+ Aggregated report informations
1950
+
1951
+ Examples
1952
+ --------
1953
+ import asyncio
1954
+
1955
+ from brevo import AsyncBrevo
1956
+
1957
+ client = AsyncBrevo(
1958
+ api_key="YOUR_API_KEY",
1959
+ )
1960
+
1961
+
1962
+ async def main() -> None:
1963
+ await client.transactional_emails.get_aggregated_smtp_report()
1964
+
1965
+
1966
+ asyncio.run(main())
1967
+ """
1968
+ _response = await self._raw_client.get_aggregated_smtp_report(
1969
+ start_date=start_date, end_date=end_date, days=days, tag=tag, request_options=request_options
1970
+ )
1971
+ return _response.data
1972
+
1973
+ async def get_email_event_report(
1974
+ self,
1975
+ *,
1976
+ limit: typing.Optional[int] = None,
1977
+ offset: typing.Optional[int] = None,
1978
+ start_date: typing.Optional[str] = None,
1979
+ end_date: typing.Optional[str] = None,
1980
+ days: typing.Optional[int] = None,
1981
+ email: typing.Optional[str] = None,
1982
+ event: typing.Optional[GetEmailEventReportRequestEvent] = None,
1983
+ tags: typing.Optional[str] = None,
1984
+ message_id: typing.Optional[str] = None,
1985
+ template_id: typing.Optional[int] = None,
1986
+ sort: typing.Optional[GetEmailEventReportRequestSort] = None,
1987
+ request_options: typing.Optional[RequestOptions] = None,
1988
+ ) -> GetEmailEventReportResponse:
1989
+ """
1990
+ This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
1991
+
1992
+ Parameters
1993
+ ----------
1994
+ limit : typing.Optional[int]
1995
+ Number limitation for the result returned
1996
+
1997
+ offset : typing.Optional[int]
1998
+ Beginning point in the list to retrieve from.
1999
+
2000
+ start_date : typing.Optional[str]
2001
+ **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
2002
+
2003
+ end_date : typing.Optional[str]
2004
+ **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
2005
+
2006
+ days : typing.Optional[int]
2007
+ Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_
2008
+
2009
+ email : typing.Optional[str]
2010
+ Filter the report for a specific email addresses
2011
+
2012
+ event : typing.Optional[GetEmailEventReportRequestEvent]
2013
+ Filter the report for a specific event type
2014
+
2015
+ tags : typing.Optional[str]
2016
+ Filter the report for tags (serialized and urlencoded array)
2017
+
2018
+ message_id : typing.Optional[str]
2019
+ Filter on a specific message id
2020
+
2021
+ template_id : typing.Optional[int]
2022
+ Filter on a specific template id
2023
+
2024
+ sort : typing.Optional[GetEmailEventReportRequestSort]
2025
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
2026
+
2027
+ request_options : typing.Optional[RequestOptions]
2028
+ Request-specific configuration.
2029
+
2030
+ Returns
2031
+ -------
2032
+ GetEmailEventReportResponse
2033
+ Email events report informations
2034
+
2035
+ Examples
2036
+ --------
2037
+ import asyncio
2038
+
2039
+ from brevo import AsyncBrevo
2040
+
2041
+ client = AsyncBrevo(
2042
+ api_key="YOUR_API_KEY",
2043
+ )
2044
+
2045
+
2046
+ async def main() -> None:
2047
+ await client.transactional_emails.get_email_event_report()
2048
+
2049
+
2050
+ asyncio.run(main())
2051
+ """
2052
+ _response = await self._raw_client.get_email_event_report(
2053
+ limit=limit,
2054
+ offset=offset,
2055
+ start_date=start_date,
2056
+ end_date=end_date,
2057
+ days=days,
2058
+ email=email,
2059
+ event=event,
2060
+ tags=tags,
2061
+ message_id=message_id,
2062
+ template_id=template_id,
2063
+ sort=sort,
2064
+ request_options=request_options,
2065
+ )
2066
+ return _response.data
2067
+
2068
+ async def get_smtp_report(
2069
+ self,
2070
+ *,
2071
+ limit: typing.Optional[int] = None,
2072
+ offset: typing.Optional[int] = None,
2073
+ start_date: typing.Optional[str] = None,
2074
+ end_date: typing.Optional[str] = None,
2075
+ days: typing.Optional[int] = None,
2076
+ tag: typing.Optional[str] = None,
2077
+ sort: typing.Optional[GetSmtpReportRequestSort] = None,
2078
+ request_options: typing.Optional[RequestOptions] = None,
2079
+ ) -> GetSmtpReportResponse:
2080
+ """
2081
+ Parameters
2082
+ ----------
2083
+ limit : typing.Optional[int]
2084
+ Number of documents returned per page
2085
+
2086
+ offset : typing.Optional[int]
2087
+ Index of the first document on the page
2088
+
2089
+ start_date : typing.Optional[str]
2090
+ **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD)
2091
+
2092
+ end_date : typing.Optional[str]
2093
+ **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD)
2094
+
2095
+ days : typing.Optional[int]
2096
+ Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_
2097
+
2098
+ tag : typing.Optional[str]
2099
+ Tag of the emails
2100
+
2101
+ sort : typing.Optional[GetSmtpReportRequestSort]
2102
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
2103
+
2104
+ request_options : typing.Optional[RequestOptions]
2105
+ Request-specific configuration.
2106
+
2107
+ Returns
2108
+ -------
2109
+ GetSmtpReportResponse
2110
+ Aggregated report informations
2111
+
2112
+ Examples
2113
+ --------
2114
+ import asyncio
2115
+
2116
+ from brevo import AsyncBrevo
2117
+
2118
+ client = AsyncBrevo(
2119
+ api_key="YOUR_API_KEY",
2120
+ )
2121
+
2122
+
2123
+ async def main() -> None:
2124
+ await client.transactional_emails.get_smtp_report()
2125
+
2126
+
2127
+ asyncio.run(main())
2128
+ """
2129
+ _response = await self._raw_client.get_smtp_report(
2130
+ limit=limit,
2131
+ offset=offset,
2132
+ start_date=start_date,
2133
+ end_date=end_date,
2134
+ days=days,
2135
+ tag=tag,
2136
+ sort=sort,
2137
+ request_options=request_options,
2138
+ )
2139
+ return _response.data
2140
+
2141
+ async def post_preview_smtp_email_templates(
2142
+ self, *, request: typing.Any, request_options: typing.Optional[RequestOptions] = None
2143
+ ) -> PostPreviewSmtpEmailTemplatesResponse:
2144
+ """
2145
+ Parameters
2146
+ ----------
2147
+ request : typing.Any
2148
+
2149
+ request_options : typing.Optional[RequestOptions]
2150
+ Request-specific configuration.
2151
+
2152
+ Returns
2153
+ -------
2154
+ PostPreviewSmtpEmailTemplatesResponse
2155
+ successfully fetched template's preview fields
2156
+
2157
+ Examples
2158
+ --------
2159
+ import asyncio
2160
+
2161
+ from brevo import AsyncBrevo
2162
+
2163
+ client = AsyncBrevo(
2164
+ api_key="YOUR_API_KEY",
2165
+ )
2166
+
2167
+
2168
+ async def main() -> None:
2169
+ await client.transactional_emails.post_preview_smtp_email_templates(
2170
+ request={"key": "value"},
2171
+ )
2172
+
2173
+
2174
+ asyncio.run(main())
2175
+ """
2176
+ _response = await self._raw_client.post_preview_smtp_email_templates(
2177
+ request=request, request_options=request_options
2178
+ )
2179
+ return _response.data
2180
+
2181
+ async def get_smtp_templates(
2182
+ self,
2183
+ *,
2184
+ template_status: typing.Optional[bool] = None,
2185
+ limit: typing.Optional[int] = None,
2186
+ offset: typing.Optional[int] = None,
2187
+ sort: typing.Optional[GetSmtpTemplatesRequestSort] = None,
2188
+ request_options: typing.Optional[RequestOptions] = None,
2189
+ ) -> GetSmtpTemplatesResponse:
2190
+ """
2191
+ Parameters
2192
+ ----------
2193
+ template_status : typing.Optional[bool]
2194
+ Filter on the status of the template. Active = true, inactive = false
2195
+
2196
+ limit : typing.Optional[int]
2197
+ Number of documents returned per page
2198
+
2199
+ offset : typing.Optional[int]
2200
+ Index of the first document in the page
2201
+
2202
+ sort : typing.Optional[GetSmtpTemplatesRequestSort]
2203
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
2204
+
2205
+ request_options : typing.Optional[RequestOptions]
2206
+ Request-specific configuration.
2207
+
2208
+ Returns
2209
+ -------
2210
+ GetSmtpTemplatesResponse
2211
+ transactional email templates informations
2212
+
2213
+ Examples
2214
+ --------
2215
+ import asyncio
2216
+
2217
+ from brevo import AsyncBrevo
2218
+
2219
+ client = AsyncBrevo(
2220
+ api_key="YOUR_API_KEY",
2221
+ )
2222
+
2223
+
2224
+ async def main() -> None:
2225
+ await client.transactional_emails.get_smtp_templates()
2226
+
2227
+
2228
+ asyncio.run(main())
2229
+ """
2230
+ _response = await self._raw_client.get_smtp_templates(
2231
+ template_status=template_status, limit=limit, offset=offset, sort=sort, request_options=request_options
2232
+ )
2233
+ return _response.data
2234
+
2235
+ async def create_smtp_template(
2236
+ self,
2237
+ *,
2238
+ sender: CreateSmtpTemplateRequestSender,
2239
+ subject: str,
2240
+ template_name: str,
2241
+ attachment_url: typing.Optional[str] = OMIT,
2242
+ html_content: typing.Optional[str] = OMIT,
2243
+ html_url: typing.Optional[str] = OMIT,
2244
+ is_active: typing.Optional[bool] = OMIT,
2245
+ reply_to: typing.Optional[str] = OMIT,
2246
+ tag: typing.Optional[str] = OMIT,
2247
+ to_field: typing.Optional[str] = OMIT,
2248
+ request_options: typing.Optional[RequestOptions] = None,
2249
+ ) -> CreateSmtpTemplateResponse:
2250
+ """
2251
+ Parameters
2252
+ ----------
2253
+ sender : CreateSmtpTemplateRequestSender
2254
+ 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}**
2255
+
2256
+ subject : str
2257
+ Subject of the template
2258
+
2259
+ template_name : str
2260
+ Name of the template
2261
+
2262
+ attachment_url : typing.Optional[str]
2263
+ 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'
2264
+
2265
+ html_content : typing.Optional[str]
2266
+ Body of the message (HTML version). The field must have more than 10 characters. **REQUIRED if htmlUrl is empty**
2267
+
2268
+ html_url : typing.Optional[str]
2269
+ Url which contents the body of the email message. REQUIRED if htmlContent is empty
2270
+
2271
+ is_active : typing.Optional[bool]
2272
+ Status of template. isActive = true means template is active and isActive = false means template is inactive
2273
+
2274
+ reply_to : typing.Optional[str]
2275
+ Email on which campaign recipients will be able to reply to
2276
+
2277
+ tag : typing.Optional[str]
2278
+ Tag of the template
2279
+
2280
+ to_field : typing.Optional[str]
2281
+ 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
2282
+
2283
+ request_options : typing.Optional[RequestOptions]
2284
+ Request-specific configuration.
2285
+
2286
+ Returns
2287
+ -------
2288
+ CreateSmtpTemplateResponse
2289
+ successfully created
2290
+
2291
+ Examples
2292
+ --------
2293
+ import asyncio
2294
+
2295
+ from brevo import AsyncBrevo
2296
+ from brevo.transactional_emails import CreateSmtpTemplateRequestSender
2297
+
2298
+ client = AsyncBrevo(
2299
+ api_key="YOUR_API_KEY",
2300
+ )
2301
+
2302
+
2303
+ async def main() -> None:
2304
+ await client.transactional_emails.create_smtp_template(
2305
+ sender=CreateSmtpTemplateRequestSender(),
2306
+ subject="Thanks for your purchase !",
2307
+ template_name="Order Confirmation - EN",
2308
+ )
2309
+
2310
+
2311
+ asyncio.run(main())
2312
+ """
2313
+ _response = await self._raw_client.create_smtp_template(
2314
+ sender=sender,
2315
+ subject=subject,
2316
+ template_name=template_name,
2317
+ attachment_url=attachment_url,
2318
+ html_content=html_content,
2319
+ html_url=html_url,
2320
+ is_active=is_active,
2321
+ reply_to=reply_to,
2322
+ tag=tag,
2323
+ to_field=to_field,
2324
+ request_options=request_options,
2325
+ )
2326
+ return _response.data
2327
+
2328
+ async def get_smtp_template(
2329
+ self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None
2330
+ ) -> GetSmtpTemplateOverview:
2331
+ """
2332
+ Parameters
2333
+ ----------
2334
+ template_id : int
2335
+ id of the template
2336
+
2337
+ request_options : typing.Optional[RequestOptions]
2338
+ Request-specific configuration.
2339
+
2340
+ Returns
2341
+ -------
2342
+ GetSmtpTemplateOverview
2343
+ Email template informations
2344
+
2345
+ Examples
2346
+ --------
2347
+ import asyncio
2348
+
2349
+ from brevo import AsyncBrevo
2350
+
2351
+ client = AsyncBrevo(
2352
+ api_key="YOUR_API_KEY",
2353
+ )
2354
+
2355
+
2356
+ async def main() -> None:
2357
+ await client.transactional_emails.get_smtp_template(
2358
+ template_id=1000000,
2359
+ )
2360
+
2361
+
2362
+ asyncio.run(main())
2363
+ """
2364
+ _response = await self._raw_client.get_smtp_template(template_id, request_options=request_options)
2365
+ return _response.data
2366
+
2367
+ async def update_smtp_template(
2368
+ self,
2369
+ template_id: int,
2370
+ *,
2371
+ attachment_url: typing.Optional[str] = OMIT,
2372
+ html_content: typing.Optional[str] = OMIT,
2373
+ html_url: typing.Optional[str] = OMIT,
2374
+ is_active: typing.Optional[bool] = OMIT,
2375
+ reply_to: typing.Optional[str] = OMIT,
2376
+ sender: typing.Optional[UpdateSmtpTemplateRequestSender] = OMIT,
2377
+ subject: typing.Optional[str] = OMIT,
2378
+ tag: typing.Optional[str] = OMIT,
2379
+ template_name: typing.Optional[str] = OMIT,
2380
+ to_field: typing.Optional[str] = OMIT,
2381
+ request_options: typing.Optional[RequestOptions] = None,
2382
+ ) -> None:
2383
+ """
2384
+ Parameters
2385
+ ----------
2386
+ template_id : int
2387
+ id of the template
2388
+
2389
+ attachment_url : typing.Optional[str]
2390
+ Absolute url of the attachment (**no local file**). Extensions 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
2391
+
2392
+ html_content : typing.Optional[str]
2393
+ **Required if htmlUrl is empty**. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters)
2394
+
2395
+ html_url : typing.Optional[str]
2396
+ **Required if htmlContent is empty**. URL to the body of the email (HTML)
2397
+
2398
+ is_active : typing.Optional[bool]
2399
+ Status of the template. isActive = false means template is inactive, isActive = true means template is active
2400
+
2401
+ reply_to : typing.Optional[str]
2402
+ Email on which campaign recipients will be able to reply to
2403
+
2404
+ sender : typing.Optional[UpdateSmtpTemplateRequestSender]
2405
+ 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}**
2406
+
2407
+ subject : typing.Optional[str]
2408
+ Subject of the email
2409
+
2410
+ tag : typing.Optional[str]
2411
+ Tag of the template
2412
+
2413
+ template_name : typing.Optional[str]
2414
+ Name of the template
2415
+
2416
+ to_field : typing.Optional[str]
2417
+ 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
2418
+
2419
+ request_options : typing.Optional[RequestOptions]
2420
+ Request-specific configuration.
2421
+
2422
+ Returns
2423
+ -------
2424
+ None
2425
+
2426
+ Examples
2427
+ --------
2428
+ import asyncio
2429
+
2430
+ from brevo import AsyncBrevo
2431
+
2432
+ client = AsyncBrevo(
2433
+ api_key="YOUR_API_KEY",
2434
+ )
2435
+
2436
+
2437
+ async def main() -> None:
2438
+ await client.transactional_emails.update_smtp_template(
2439
+ template_id=1000000,
2440
+ )
2441
+
2442
+
2443
+ asyncio.run(main())
2444
+ """
2445
+ _response = await self._raw_client.update_smtp_template(
2446
+ template_id,
2447
+ attachment_url=attachment_url,
2448
+ html_content=html_content,
2449
+ html_url=html_url,
2450
+ is_active=is_active,
2451
+ reply_to=reply_to,
2452
+ sender=sender,
2453
+ subject=subject,
2454
+ tag=tag,
2455
+ template_name=template_name,
2456
+ to_field=to_field,
2457
+ request_options=request_options,
2458
+ )
2459
+ return _response.data
2460
+
2461
+ async def delete_smtp_template(
2462
+ self, template_id: int, *, request_options: typing.Optional[RequestOptions] = None
2463
+ ) -> None:
2464
+ """
2465
+ Parameters
2466
+ ----------
2467
+ template_id : int
2468
+ id of the template
2469
+
2470
+ request_options : typing.Optional[RequestOptions]
2471
+ Request-specific configuration.
2472
+
2473
+ Returns
2474
+ -------
2475
+ None
2476
+
2477
+ Examples
2478
+ --------
2479
+ import asyncio
2480
+
2481
+ from brevo import AsyncBrevo
2482
+
2483
+ client = AsyncBrevo(
2484
+ api_key="YOUR_API_KEY",
2485
+ )
2486
+
2487
+
2488
+ async def main() -> None:
2489
+ await client.transactional_emails.delete_smtp_template(
2490
+ template_id=1000000,
2491
+ )
2492
+
2493
+
2494
+ asyncio.run(main())
2495
+ """
2496
+ _response = await self._raw_client.delete_smtp_template(template_id, request_options=request_options)
2497
+ return _response.data
2498
+
2499
+ async def send_test_template(
2500
+ self,
2501
+ template_id: int,
2502
+ *,
2503
+ email_to: typing.Optional[typing.Sequence[str]] = OMIT,
2504
+ request_options: typing.Optional[RequestOptions] = None,
2505
+ ) -> None:
2506
+ """
2507
+ Parameters
2508
+ ----------
2509
+ template_id : int
2510
+ Id of the template
2511
+
2512
+ email_to : typing.Optional[typing.Sequence[str]]
2513
+ 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_.
2514
+
2515
+ request_options : typing.Optional[RequestOptions]
2516
+ Request-specific configuration.
2517
+
2518
+ Returns
2519
+ -------
2520
+ None
2521
+
2522
+ Examples
2523
+ --------
2524
+ import asyncio
2525
+
2526
+ from brevo import AsyncBrevo
2527
+
2528
+ client = AsyncBrevo(
2529
+ api_key="YOUR_API_KEY",
2530
+ )
2531
+
2532
+
2533
+ async def main() -> None:
2534
+ await client.transactional_emails.send_test_template(
2535
+ template_id=1000000,
2536
+ )
2537
+
2538
+
2539
+ asyncio.run(main())
2540
+ """
2541
+ _response = await self._raw_client.send_test_template(
2542
+ template_id, email_to=email_to, request_options=request_options
2543
+ )
2544
+ return _response.data