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,3298 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
+ from ..core.request_options import RequestOptions
7
+ from ..types.get_contacts import GetContacts
8
+ from ..types.get_folder import GetFolder
9
+ from ..types.post_contact_info import PostContactInfo
10
+ from .raw_client import AsyncRawContactsClient, RawContactsClient
11
+ from .types.add_contact_to_list_request_body import AddContactToListRequestBody
12
+ from .types.create_attribute_request_attribute_category import CreateAttributeRequestAttributeCategory
13
+ from .types.create_attribute_request_enumeration_item import CreateAttributeRequestEnumerationItem
14
+ from .types.create_attribute_request_type import CreateAttributeRequestType
15
+ from .types.create_contact_request_attributes_value import CreateContactRequestAttributesValue
16
+ from .types.create_contact_response import CreateContactResponse
17
+ from .types.create_doi_contact_request_attributes_value import CreateDoiContactRequestAttributesValue
18
+ from .types.create_folder_response import CreateFolderResponse
19
+ from .types.create_list_response import CreateListResponse
20
+ from .types.delete_attribute_request_attribute_category import DeleteAttributeRequestAttributeCategory
21
+ from .types.delete_contact_request_identifier import DeleteContactRequestIdentifier
22
+ from .types.delete_contact_request_identifier_type import DeleteContactRequestIdentifierType
23
+ from .types.get_attributes_response import GetAttributesResponse
24
+ from .types.get_contact_info_request_identifier import GetContactInfoRequestIdentifier
25
+ from .types.get_contact_info_request_identifier_type import GetContactInfoRequestIdentifierType
26
+ from .types.get_contact_info_response import GetContactInfoResponse
27
+ from .types.get_contact_stats_request_identifier import GetContactStatsRequestIdentifier
28
+ from .types.get_contact_stats_response import GetContactStatsResponse
29
+ from .types.get_contacts_from_list_request_sort import GetContactsFromListRequestSort
30
+ from .types.get_contacts_request_sort import GetContactsRequestSort
31
+ from .types.get_folder_lists_request_sort import GetFolderListsRequestSort
32
+ from .types.get_folder_lists_response import GetFolderListsResponse
33
+ from .types.get_folders_request_sort import GetFoldersRequestSort
34
+ from .types.get_folders_response import GetFoldersResponse
35
+ from .types.get_list_response import GetListResponse
36
+ from .types.get_lists_request_sort import GetListsRequestSort
37
+ from .types.get_lists_response import GetListsResponse
38
+ from .types.get_segments_request_sort import GetSegmentsRequestSort
39
+ from .types.get_segments_response import GetSegmentsResponse
40
+ from .types.import_contacts_request_json_body_item import ImportContactsRequestJsonBodyItem
41
+ from .types.import_contacts_request_new_list import ImportContactsRequestNewList
42
+ from .types.import_contacts_response import ImportContactsResponse
43
+ from .types.remove_contact_from_list_request_body import RemoveContactFromListRequestBody
44
+ from .types.request_contact_export_request_custom_contact_filter import RequestContactExportRequestCustomContactFilter
45
+ from .types.request_contact_export_response import RequestContactExportResponse
46
+ from .types.update_attribute_request_attribute_category import UpdateAttributeRequestAttributeCategory
47
+ from .types.update_attribute_request_enumeration_item import UpdateAttributeRequestEnumerationItem
48
+ from .types.update_batch_contacts_request_contacts_item import UpdateBatchContactsRequestContactsItem
49
+ from .types.update_contact_request_attributes_value import UpdateContactRequestAttributesValue
50
+ from .types.update_contact_request_identifier import UpdateContactRequestIdentifier
51
+ from .types.update_contact_request_identifier_type import UpdateContactRequestIdentifierType
52
+
53
+ # this is used as the default value for optional parameters
54
+ OMIT = typing.cast(typing.Any, ...)
55
+
56
+
57
+ class ContactsClient:
58
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
59
+ self._raw_client = RawContactsClient(client_wrapper=client_wrapper)
60
+
61
+ @property
62
+ def with_raw_response(self) -> RawContactsClient:
63
+ """
64
+ Retrieves a raw implementation of this client that returns raw responses.
65
+
66
+ Returns
67
+ -------
68
+ RawContactsClient
69
+ """
70
+ return self._raw_client
71
+
72
+ def get_contacts(
73
+ self,
74
+ *,
75
+ limit: typing.Optional[int] = None,
76
+ offset: typing.Optional[int] = None,
77
+ modified_since: typing.Optional[str] = None,
78
+ created_since: typing.Optional[str] = None,
79
+ sort: typing.Optional[GetContactsRequestSort] = None,
80
+ segment_id: typing.Optional[int] = None,
81
+ list_ids: typing.Optional[typing.Union[int, typing.Sequence[int]]] = None,
82
+ filter: typing.Optional[str] = None,
83
+ request_options: typing.Optional[RequestOptions] = None,
84
+ ) -> GetContacts:
85
+ """
86
+ <Note title="Follow this format when passing a SMS phone number as an attribute">
87
+ Accepted Number Formats
88
+
89
+ 91xxxxxxxxxx
90
+ +91xxxxxxxxxx
91
+ 0091xxxxxxxxxx
92
+ </Note>
93
+
94
+ Parameters
95
+ ----------
96
+ limit : typing.Optional[int]
97
+ Number of documents per page
98
+
99
+ offset : typing.Optional[int]
100
+ Index of the first document of the page
101
+
102
+ modified_since : typing.Optional[str]
103
+ Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
104
+
105
+ created_since : typing.Optional[str]
106
+ Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
107
+
108
+ sort : typing.Optional[GetContactsRequestSort]
109
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
110
+
111
+ segment_id : typing.Optional[int]
112
+ Id of the segment. **Either listIds or segmentId can be passed.**
113
+
114
+ list_ids : typing.Optional[typing.Union[int, typing.Sequence[int]]]
115
+ Ids of the list. **Either listIds or segmentId can be passed.**
116
+
117
+ filter : typing.Optional[str]
118
+ Filter the contacts on the basis of attributes. **Allowed operator: equals. For multiple-choice options, the filter will apply an AND condition between the options. For category attributes, the filter will work with both id and value. (e.g. filter=equals(FIRSTNAME,"Antoine"), filter=equals(B1, true), filter=equals(DOB, "1989-11-23"), filter=equals(GENDER, "1"), filter=equals(GENDER, "MALE"), filter=equals(COUNTRY,"USA, INDIA")**
119
+
120
+ request_options : typing.Optional[RequestOptions]
121
+ Request-specific configuration.
122
+
123
+ Returns
124
+ -------
125
+ GetContacts
126
+ All contacts listed
127
+
128
+ Examples
129
+ --------
130
+ from brevo import Brevo
131
+
132
+ client = Brevo(
133
+ api_key="YOUR_API_KEY",
134
+ )
135
+ client.contacts.get_contacts()
136
+ """
137
+ _response = self._raw_client.get_contacts(
138
+ limit=limit,
139
+ offset=offset,
140
+ modified_since=modified_since,
141
+ created_since=created_since,
142
+ sort=sort,
143
+ segment_id=segment_id,
144
+ list_ids=list_ids,
145
+ filter=filter,
146
+ request_options=request_options,
147
+ )
148
+ return _response.data
149
+
150
+ def create_contact(
151
+ self,
152
+ *,
153
+ attributes: typing.Optional[typing.Dict[str, CreateContactRequestAttributesValue]] = OMIT,
154
+ email: typing.Optional[str] = OMIT,
155
+ email_blacklisted: typing.Optional[bool] = OMIT,
156
+ ext_id: typing.Optional[str] = OMIT,
157
+ list_ids: typing.Optional[typing.Sequence[int]] = OMIT,
158
+ sms_blacklisted: typing.Optional[bool] = OMIT,
159
+ smtp_blacklist_sender: typing.Optional[typing.Sequence[str]] = OMIT,
160
+ update_enabled: typing.Optional[bool] = OMIT,
161
+ request_options: typing.Optional[RequestOptions] = None,
162
+ ) -> CreateContactResponse:
163
+ """
164
+ Creates new contacts on Brevo. Contacts can be created by passing either - <br><br> 1. email address of the contact (email_id), <br> 2. phone number of the contact (to be passed as "SMS" field in "attributes" along with proper country code), For example- {"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"} <br> 3. ext_id <br>
165
+
166
+ Parameters
167
+ ----------
168
+ attributes : typing.Optional[typing.Dict[str, CreateContactRequestAttributesValue]]
169
+ Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored. **These attributes must be present in your Brevo account**. For eg: **{"FNAME":"Elly", "LNAME":"Roger", "COUNTRIES": ["India","China"]}**
170
+
171
+ email : typing.Optional[str]
172
+ Email address of the user. **Mandatory if "ext_id" & "SMS" field is not passed.**
173
+
174
+ email_blacklisted : typing.Optional[bool]
175
+ Set this field to blacklist the contact for emails (emailBlacklisted = true)
176
+
177
+ ext_id : typing.Optional[str]
178
+ Pass your own Id to create a contact.
179
+
180
+ list_ids : typing.Optional[typing.Sequence[int]]
181
+ Ids of the lists to add the contact to
182
+
183
+ sms_blacklisted : typing.Optional[bool]
184
+ Set this field to blacklist the contact for SMS (smsBlacklisted = true)
185
+
186
+ smtp_blacklist_sender : typing.Optional[typing.Sequence[str]]
187
+ transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true )
188
+
189
+ update_enabled : typing.Optional[bool]
190
+ Facilitate to update the existing contact in the same request (updateEnabled = true)
191
+
192
+ request_options : typing.Optional[RequestOptions]
193
+ Request-specific configuration.
194
+
195
+ Returns
196
+ -------
197
+ CreateContactResponse
198
+ Contact created
199
+
200
+ Examples
201
+ --------
202
+ from brevo import Brevo
203
+
204
+ client = Brevo(
205
+ api_key="YOUR_API_KEY",
206
+ )
207
+ client.contacts.create_contact()
208
+ """
209
+ _response = self._raw_client.create_contact(
210
+ attributes=attributes,
211
+ email=email,
212
+ email_blacklisted=email_blacklisted,
213
+ ext_id=ext_id,
214
+ list_ids=list_ids,
215
+ sms_blacklisted=sms_blacklisted,
216
+ smtp_blacklist_sender=smtp_blacklist_sender,
217
+ update_enabled=update_enabled,
218
+ request_options=request_options,
219
+ )
220
+ return _response.data
221
+
222
+ def get_attributes(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetAttributesResponse:
223
+ """
224
+ Parameters
225
+ ----------
226
+ request_options : typing.Optional[RequestOptions]
227
+ Request-specific configuration.
228
+
229
+ Returns
230
+ -------
231
+ GetAttributesResponse
232
+ Attributes listed
233
+
234
+ Examples
235
+ --------
236
+ from brevo import Brevo
237
+
238
+ client = Brevo(
239
+ api_key="YOUR_API_KEY",
240
+ )
241
+ client.contacts.get_attributes()
242
+ """
243
+ _response = self._raw_client.get_attributes(request_options=request_options)
244
+ return _response.data
245
+
246
+ def create_attribute(
247
+ self,
248
+ attribute_category: CreateAttributeRequestAttributeCategory,
249
+ attribute_name: str,
250
+ *,
251
+ enumeration: typing.Optional[typing.Sequence[CreateAttributeRequestEnumerationItem]] = OMIT,
252
+ is_recurring: typing.Optional[bool] = OMIT,
253
+ multi_category_options: typing.Optional[typing.Sequence[str]] = OMIT,
254
+ type: typing.Optional[CreateAttributeRequestType] = OMIT,
255
+ value: typing.Optional[str] = OMIT,
256
+ request_options: typing.Optional[RequestOptions] = None,
257
+ ) -> None:
258
+ """
259
+ Parameters
260
+ ----------
261
+ attribute_category : CreateAttributeRequestAttributeCategory
262
+ Category of the attribute
263
+
264
+ attribute_name : str
265
+ Name of the attribute
266
+
267
+ enumeration : typing.Optional[typing.Sequence[CreateAttributeRequestEnumerationItem]]
268
+ List of values and labels that the attribute can take. **Use only if the attribute's category is "category"**. None of the category options can exceed max 200 characters. For example: **[{"value":1, "label":"male"}, {"value":2, "label":"female"}]**
269
+
270
+ is_recurring : typing.Optional[bool]
271
+ Type of the attribute. **Use only if the attribute's category is 'calculated' or 'global'**
272
+
273
+ multi_category_options : typing.Optional[typing.Sequence[str]]
274
+ List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is "normal" and attribute's type is "multiple-choice". None of the multicategory options can exceed max 200 characters.** For example: **["USA","INDIA"]**
275
+
276
+ type : typing.Optional[CreateAttributeRequestType]
277
+ Type of the attribute. **Use only if the attribute's category is 'normal', 'category' or 'transactional'** Type **user and multiple-choice** is only available if the category is **normal** attribute Type **id** is only available if the category is **transactional** attribute Type **category** is only available if the category is **category** attribute
278
+
279
+ value : typing.Optional[str]
280
+ Value of the attribute. **Use only if the attribute's category is 'calculated' or 'global'**
281
+
282
+ request_options : typing.Optional[RequestOptions]
283
+ Request-specific configuration.
284
+
285
+ Returns
286
+ -------
287
+ None
288
+
289
+ Examples
290
+ --------
291
+ from brevo import Brevo
292
+
293
+ client = Brevo(
294
+ api_key="YOUR_API_KEY",
295
+ )
296
+ client.contacts.create_attribute(
297
+ attribute_category="normal",
298
+ attribute_name="attributeName",
299
+ )
300
+ """
301
+ _response = self._raw_client.create_attribute(
302
+ attribute_category,
303
+ attribute_name,
304
+ enumeration=enumeration,
305
+ is_recurring=is_recurring,
306
+ multi_category_options=multi_category_options,
307
+ type=type,
308
+ value=value,
309
+ request_options=request_options,
310
+ )
311
+ return _response.data
312
+
313
+ def update_attribute(
314
+ self,
315
+ attribute_category: UpdateAttributeRequestAttributeCategory,
316
+ attribute_name: str,
317
+ *,
318
+ enumeration: typing.Optional[typing.Sequence[UpdateAttributeRequestEnumerationItem]] = OMIT,
319
+ multi_category_options: typing.Optional[typing.Sequence[str]] = OMIT,
320
+ value: typing.Optional[str] = OMIT,
321
+ request_options: typing.Optional[RequestOptions] = None,
322
+ ) -> None:
323
+ """
324
+ Parameters
325
+ ----------
326
+ attribute_category : UpdateAttributeRequestAttributeCategory
327
+ Category of the attribute
328
+
329
+ attribute_name : str
330
+ Name of the existing attribute
331
+
332
+ enumeration : typing.Optional[typing.Sequence[UpdateAttributeRequestEnumerationItem]]
333
+ List of the values and labels that the attribute can take. **Use only if the attribute's category is "category"** None of the category options can exceed max 200 characters. For example, **[{"value":1, "label":"male"}, {"value":2, "label":"female"}]**
334
+
335
+ multi_category_options : typing.Optional[typing.Sequence[str]]
336
+ Use this option to add multiple-choice attributes options only if the attribute's category is "normal". **This option is specifically designed for updating multiple-choice attributes. None of the multicategory options can exceed max 200 characters.**. For example: **["USA","INDIA"]**
337
+
338
+ value : typing.Optional[str]
339
+ Value of the attribute to update. **Use only if the attribute's category is 'calculated' or 'global'**
340
+
341
+ request_options : typing.Optional[RequestOptions]
342
+ Request-specific configuration.
343
+
344
+ Returns
345
+ -------
346
+ None
347
+
348
+ Examples
349
+ --------
350
+ from brevo import Brevo
351
+
352
+ client = Brevo(
353
+ api_key="YOUR_API_KEY",
354
+ )
355
+ client.contacts.update_attribute(
356
+ attribute_category="category",
357
+ attribute_name="attributeName",
358
+ )
359
+ """
360
+ _response = self._raw_client.update_attribute(
361
+ attribute_category,
362
+ attribute_name,
363
+ enumeration=enumeration,
364
+ multi_category_options=multi_category_options,
365
+ value=value,
366
+ request_options=request_options,
367
+ )
368
+ return _response.data
369
+
370
+ def delete_attribute(
371
+ self,
372
+ attribute_category: DeleteAttributeRequestAttributeCategory,
373
+ attribute_name: str,
374
+ *,
375
+ request_options: typing.Optional[RequestOptions] = None,
376
+ ) -> None:
377
+ """
378
+ Parameters
379
+ ----------
380
+ attribute_category : DeleteAttributeRequestAttributeCategory
381
+ Category of the attribute
382
+
383
+ attribute_name : str
384
+ Name of the existing attribute
385
+
386
+ request_options : typing.Optional[RequestOptions]
387
+ Request-specific configuration.
388
+
389
+ Returns
390
+ -------
391
+ None
392
+
393
+ Examples
394
+ --------
395
+ from brevo import Brevo
396
+
397
+ client = Brevo(
398
+ api_key="YOUR_API_KEY",
399
+ )
400
+ client.contacts.delete_attribute(
401
+ attribute_category="normal",
402
+ attribute_name="attributeName",
403
+ )
404
+ """
405
+ _response = self._raw_client.delete_attribute(
406
+ attribute_category, attribute_name, request_options=request_options
407
+ )
408
+ return _response.data
409
+
410
+ def delete_multi_attribute_options(
411
+ self,
412
+ multiple_choice_attribute: str,
413
+ multiple_choice_attribute_option: str,
414
+ *,
415
+ request_options: typing.Optional[RequestOptions] = None,
416
+ ) -> None:
417
+ """
418
+ Parameters
419
+ ----------
420
+ multiple_choice_attribute : str
421
+ Name of the existing multiple-choice attribute
422
+
423
+ multiple_choice_attribute_option : str
424
+ Name of the existing multiple-choice attribute option that you want to delete
425
+
426
+ request_options : typing.Optional[RequestOptions]
427
+ Request-specific configuration.
428
+
429
+ Returns
430
+ -------
431
+ None
432
+
433
+ Examples
434
+ --------
435
+ from brevo import Brevo
436
+
437
+ client = Brevo(
438
+ api_key="YOUR_API_KEY",
439
+ )
440
+ client.contacts.delete_multi_attribute_options(
441
+ multiple_choice_attribute="multipleChoiceAttribute",
442
+ multiple_choice_attribute_option="multipleChoiceAttributeOption",
443
+ )
444
+ """
445
+ _response = self._raw_client.delete_multi_attribute_options(
446
+ multiple_choice_attribute, multiple_choice_attribute_option, request_options=request_options
447
+ )
448
+ return _response.data
449
+
450
+ def update_batch_contacts(
451
+ self,
452
+ *,
453
+ contacts: typing.Optional[typing.Sequence[UpdateBatchContactsRequestContactsItem]] = OMIT,
454
+ request_options: typing.Optional[RequestOptions] = None,
455
+ ) -> None:
456
+ """
457
+ Parameters
458
+ ----------
459
+ contacts : typing.Optional[typing.Sequence[UpdateBatchContactsRequestContactsItem]]
460
+ List of contacts to be updated
461
+
462
+ request_options : typing.Optional[RequestOptions]
463
+ Request-specific configuration.
464
+
465
+ Returns
466
+ -------
467
+ None
468
+
469
+ Examples
470
+ --------
471
+ from brevo import Brevo
472
+
473
+ client = Brevo(
474
+ api_key="YOUR_API_KEY",
475
+ )
476
+ client.contacts.update_batch_contacts()
477
+ """
478
+ _response = self._raw_client.update_batch_contacts(contacts=contacts, request_options=request_options)
479
+ return _response.data
480
+
481
+ def create_doi_contact(
482
+ self,
483
+ *,
484
+ email: str,
485
+ include_list_ids: typing.Sequence[int],
486
+ redirection_url: str,
487
+ template_id: int,
488
+ attributes: typing.Optional[typing.Dict[str, CreateDoiContactRequestAttributesValue]] = OMIT,
489
+ exclude_list_ids: typing.Optional[typing.Sequence[int]] = OMIT,
490
+ request_options: typing.Optional[RequestOptions] = None,
491
+ ) -> None:
492
+ """
493
+ <Note title="How to use attributes param?">
494
+ attributes param in this endpoint is an object containing key-value pairs where values can be either a string, integer, array, or boolean. You can create key-value pairs with these four datatypes. When a value is an array, it should be an array of strings.
495
+ </Note>
496
+
497
+ Parameters
498
+ ----------
499
+ email : str
500
+ Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes.
501
+
502
+ include_list_ids : typing.Sequence[int]
503
+ Lists under user account where contact should be added
504
+
505
+ redirection_url : str
506
+ URL of the web page that user will be redirected to after clicking on the double opt in URL. When editing your DOI template you can reference this URL by using the tag **{{ params.DOIurl }}**.
507
+
508
+ template_id : int
509
+ Id of the Double opt-in (DOI) template
510
+
511
+ attributes : typing.Optional[typing.Dict[str, CreateDoiContactRequestAttributesValue]]
512
+ Pass the set of attributes and their values. **These attributes must be present in your Brevo account**. For eg. **{'FNAME':'Elly', 'LNAME':'Roger', 'COUNTRIES': ['India','China']}**
513
+
514
+ exclude_list_ids : typing.Optional[typing.Sequence[int]]
515
+ Lists under user account where contact should not be added
516
+
517
+ request_options : typing.Optional[RequestOptions]
518
+ Request-specific configuration.
519
+
520
+ Returns
521
+ -------
522
+ None
523
+
524
+ Examples
525
+ --------
526
+ from brevo import Brevo
527
+
528
+ client = Brevo(
529
+ api_key="YOUR_API_KEY",
530
+ )
531
+ client.contacts.create_doi_contact(
532
+ email="elly@example.com",
533
+ include_list_ids=[36],
534
+ redirection_url="http://requestb.in/173lyyx1",
535
+ template_id=2,
536
+ )
537
+ """
538
+ _response = self._raw_client.create_doi_contact(
539
+ email=email,
540
+ include_list_ids=include_list_ids,
541
+ redirection_url=redirection_url,
542
+ template_id=template_id,
543
+ attributes=attributes,
544
+ exclude_list_ids=exclude_list_ids,
545
+ request_options=request_options,
546
+ )
547
+ return _response.data
548
+
549
+ def request_contact_export(
550
+ self,
551
+ *,
552
+ custom_contact_filter: RequestContactExportRequestCustomContactFilter,
553
+ disable_notification: typing.Optional[bool] = OMIT,
554
+ export_attributes: typing.Optional[typing.Sequence[str]] = OMIT,
555
+ export_mandatory_attributes: typing.Optional[bool] = OMIT,
556
+ export_metadata: typing.Optional[typing.Sequence[str]] = OMIT,
557
+ export_date_in_utc: typing.Optional[bool] = OMIT,
558
+ export_subscription_status: typing.Optional[typing.Sequence[str]] = OMIT,
559
+ notify_url: typing.Optional[str] = OMIT,
560
+ request_options: typing.Optional[RequestOptions] = None,
561
+ ) -> RequestContactExportResponse:
562
+ """
563
+ It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.
564
+
565
+ Parameters
566
+ ----------
567
+ custom_contact_filter : RequestContactExportRequestCustomContactFilter
568
+ Set the filter for the contacts to be exported.
569
+
570
+ disable_notification : typing.Optional[bool]
571
+ To avoid generating the email notification upon contact export, pass **true**
572
+
573
+ export_attributes : typing.Optional[typing.Sequence[str]]
574
+ List of all the attributes that you want to export. **These attributes must be present in your contact database. It is required if exportMandatoryAttributes is set false. ** For example: **['fname', 'lname', 'email']**
575
+
576
+ export_mandatory_attributes : typing.Optional[bool]
577
+ To export mandatory attributes like EMAIL, ADDED_TIME, MODIFIED_TIME
578
+
579
+ export_metadata : typing.Optional[typing.Sequence[str]]
580
+ Export metadata of contacts such as _listIds, ADDED_TIME, MODIFIED_TIME.
581
+
582
+ export_date_in_utc : typing.Optional[bool]
583
+ Specifies whether the date fields createdAt, modifiedAt in the exported data should be returned in UTC format.
584
+
585
+ export_subscription_status : typing.Optional[typing.Sequence[str]]
586
+ Export subscription status of contacts for email & sms marketting. Pass email_marketing to obtain the marketing email subscription status & sms_marketing to retrieve the marketing SMS status of the contact.
587
+
588
+ notify_url : typing.Optional[str]
589
+ Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
590
+
591
+ request_options : typing.Optional[RequestOptions]
592
+ Request-specific configuration.
593
+
594
+ Returns
595
+ -------
596
+ RequestContactExportResponse
597
+ process id created
598
+
599
+ Examples
600
+ --------
601
+ from brevo import Brevo
602
+ from brevo.contacts import RequestContactExportRequestCustomContactFilter
603
+
604
+ client = Brevo(
605
+ api_key="YOUR_API_KEY",
606
+ )
607
+ client.contacts.request_contact_export(
608
+ custom_contact_filter=RequestContactExportRequestCustomContactFilter(),
609
+ )
610
+ """
611
+ _response = self._raw_client.request_contact_export(
612
+ custom_contact_filter=custom_contact_filter,
613
+ disable_notification=disable_notification,
614
+ export_attributes=export_attributes,
615
+ export_mandatory_attributes=export_mandatory_attributes,
616
+ export_metadata=export_metadata,
617
+ export_date_in_utc=export_date_in_utc,
618
+ export_subscription_status=export_subscription_status,
619
+ notify_url=notify_url,
620
+ request_options=request_options,
621
+ )
622
+ return _response.data
623
+
624
+ def get_folders(
625
+ self,
626
+ *,
627
+ limit: typing.Optional[int] = None,
628
+ offset: typing.Optional[int] = None,
629
+ sort: typing.Optional[GetFoldersRequestSort] = None,
630
+ request_options: typing.Optional[RequestOptions] = None,
631
+ ) -> GetFoldersResponse:
632
+ """
633
+ <Note>
634
+ Ongoing changes for this endpoint
635
+
636
+ We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
637
+
638
+ These are non breaking changes.
639
+
640
+ The default value for the attributes will be 0.
641
+
642
+ The uniqueSubscribers field is deprecated
643
+ </Note>
644
+
645
+ Parameters
646
+ ----------
647
+ limit : typing.Optional[int]
648
+ Number of documents per page
649
+
650
+ offset : typing.Optional[int]
651
+ Index of the first document of the page
652
+
653
+ sort : typing.Optional[GetFoldersRequestSort]
654
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
655
+
656
+ request_options : typing.Optional[RequestOptions]
657
+ Request-specific configuration.
658
+
659
+ Returns
660
+ -------
661
+ GetFoldersResponse
662
+ Folders informations
663
+
664
+ Examples
665
+ --------
666
+ from brevo import Brevo
667
+
668
+ client = Brevo(
669
+ api_key="YOUR_API_KEY",
670
+ )
671
+ client.contacts.get_folders()
672
+ """
673
+ _response = self._raw_client.get_folders(limit=limit, offset=offset, sort=sort, request_options=request_options)
674
+ return _response.data
675
+
676
+ def create_folder(
677
+ self, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None
678
+ ) -> CreateFolderResponse:
679
+ """
680
+ Parameters
681
+ ----------
682
+ name : typing.Optional[str]
683
+ Name of the folder
684
+
685
+ request_options : typing.Optional[RequestOptions]
686
+ Request-specific configuration.
687
+
688
+ Returns
689
+ -------
690
+ CreateFolderResponse
691
+ successfully created
692
+
693
+ Examples
694
+ --------
695
+ from brevo import Brevo
696
+
697
+ client = Brevo(
698
+ api_key="YOUR_API_KEY",
699
+ )
700
+ client.contacts.create_folder()
701
+ """
702
+ _response = self._raw_client.create_folder(name=name, request_options=request_options)
703
+ return _response.data
704
+
705
+ def get_folder(self, folder_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> GetFolder:
706
+ """
707
+ <Note>
708
+ Ongoing changes for this endpoint.
709
+
710
+ We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
711
+
712
+ These are non breaking changes. The default value for the attributes will be 0.
713
+ </Note>
714
+
715
+ Parameters
716
+ ----------
717
+ folder_id : int
718
+ id of the folder
719
+
720
+ request_options : typing.Optional[RequestOptions]
721
+ Request-specific configuration.
722
+
723
+ Returns
724
+ -------
725
+ GetFolder
726
+ Folder details
727
+
728
+ Examples
729
+ --------
730
+ from brevo import Brevo
731
+
732
+ client = Brevo(
733
+ api_key="YOUR_API_KEY",
734
+ )
735
+ client.contacts.get_folder(
736
+ folder_id=1000000,
737
+ )
738
+ """
739
+ _response = self._raw_client.get_folder(folder_id, request_options=request_options)
740
+ return _response.data
741
+
742
+ def update_folder(
743
+ self,
744
+ folder_id: int,
745
+ *,
746
+ name: typing.Optional[str] = OMIT,
747
+ request_options: typing.Optional[RequestOptions] = None,
748
+ ) -> None:
749
+ """
750
+ Parameters
751
+ ----------
752
+ folder_id : int
753
+ Id of the folder
754
+
755
+ name : typing.Optional[str]
756
+ Name of the folder
757
+
758
+ request_options : typing.Optional[RequestOptions]
759
+ Request-specific configuration.
760
+
761
+ Returns
762
+ -------
763
+ None
764
+
765
+ Examples
766
+ --------
767
+ from brevo import Brevo
768
+
769
+ client = Brevo(
770
+ api_key="YOUR_API_KEY",
771
+ )
772
+ client.contacts.update_folder(
773
+ folder_id=1000000,
774
+ )
775
+ """
776
+ _response = self._raw_client.update_folder(folder_id, name=name, request_options=request_options)
777
+ return _response.data
778
+
779
+ def delete_folder(self, folder_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
780
+ """
781
+ Parameters
782
+ ----------
783
+ folder_id : int
784
+ Id of the folder
785
+
786
+ request_options : typing.Optional[RequestOptions]
787
+ Request-specific configuration.
788
+
789
+ Returns
790
+ -------
791
+ None
792
+
793
+ Examples
794
+ --------
795
+ from brevo import Brevo
796
+
797
+ client = Brevo(
798
+ api_key="YOUR_API_KEY",
799
+ )
800
+ client.contacts.delete_folder(
801
+ folder_id=1000000,
802
+ )
803
+ """
804
+ _response = self._raw_client.delete_folder(folder_id, request_options=request_options)
805
+ return _response.data
806
+
807
+ def get_folder_lists(
808
+ self,
809
+ folder_id: int,
810
+ *,
811
+ limit: typing.Optional[int] = None,
812
+ offset: typing.Optional[int] = None,
813
+ sort: typing.Optional[GetFolderListsRequestSort] = None,
814
+ request_options: typing.Optional[RequestOptions] = None,
815
+ ) -> GetFolderListsResponse:
816
+ """
817
+ <Note>
818
+ Ongoing changes for this endpoint.
819
+
820
+ We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
821
+
822
+ These are non breaking changes. The default value for the attributes will be 0.
823
+ </Note>
824
+
825
+ Parameters
826
+ ----------
827
+ folder_id : int
828
+ Id of the folder
829
+
830
+ limit : typing.Optional[int]
831
+ Number of documents per page
832
+
833
+ offset : typing.Optional[int]
834
+ Index of the first document of the page
835
+
836
+ sort : typing.Optional[GetFolderListsRequestSort]
837
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
838
+
839
+ request_options : typing.Optional[RequestOptions]
840
+ Request-specific configuration.
841
+
842
+ Returns
843
+ -------
844
+ GetFolderListsResponse
845
+ Folder's Lists details
846
+
847
+ Examples
848
+ --------
849
+ from brevo import Brevo
850
+
851
+ client = Brevo(
852
+ api_key="YOUR_API_KEY",
853
+ )
854
+ client.contacts.get_folder_lists(
855
+ folder_id=1000000,
856
+ )
857
+ """
858
+ _response = self._raw_client.get_folder_lists(
859
+ folder_id, limit=limit, offset=offset, sort=sort, request_options=request_options
860
+ )
861
+ return _response.data
862
+
863
+ def import_contacts(
864
+ self,
865
+ *,
866
+ disable_notification: typing.Optional[bool] = OMIT,
867
+ email_blacklist: typing.Optional[bool] = OMIT,
868
+ empty_contacts_attributes: typing.Optional[bool] = OMIT,
869
+ file_body: typing.Optional[str] = OMIT,
870
+ file_url: typing.Optional[str] = OMIT,
871
+ json_body: typing.Optional[typing.Sequence[ImportContactsRequestJsonBodyItem]] = OMIT,
872
+ list_ids: typing.Optional[typing.Sequence[int]] = OMIT,
873
+ new_list: typing.Optional[ImportContactsRequestNewList] = OMIT,
874
+ notify_url: typing.Optional[str] = OMIT,
875
+ sms_blacklist: typing.Optional[bool] = OMIT,
876
+ update_existing_contacts: typing.Optional[bool] = OMIT,
877
+ request_options: typing.Optional[RequestOptions] = None,
878
+ ) -> ImportContactsResponse:
879
+ """
880
+ It returns the background process ID which on completion calls the notify URL that you have set in the input. **Note**: - Any contact attribute that doesn't exist in your account will be ignored at import end.
881
+
882
+ Parameters
883
+ ----------
884
+ disable_notification : typing.Optional[bool]
885
+ To disable email notification
886
+
887
+ email_blacklist : typing.Optional[bool]
888
+ To blacklist all the contacts for email
889
+
890
+ empty_contacts_attributes : typing.Optional[bool]
891
+ To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in Brevo, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( **only available if `updateExistingContacts` set to true **)
892
+
893
+ file_body : typing.Optional[str]
894
+ **Mandatory if fileUrl and jsonBody is not defined.** CSV content to be imported. Use semicolon to separate multiple attributes. **Maximum allowed file body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files.
895
+
896
+ file_url : typing.Optional[str]
897
+ **Mandatory if fileBody and jsonBody is not defined.** URL of the file to be imported (**no local file**). Possible file formats: #### .txt, .csv, .json
898
+
899
+ json_body : typing.Optional[typing.Sequence[ImportContactsRequestJsonBodyItem]]
900
+ **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files.
901
+
902
+ list_ids : typing.Optional[typing.Sequence[int]]
903
+ **Mandatory if newList is not defined.** Ids of the lists in which the contacts shall be imported. For example, **[2, 4, 7]**.
904
+
905
+ new_list : typing.Optional[ImportContactsRequestNewList]
906
+ To create a new list and import the contacts into it, pass the listName and an optional folderId.
907
+
908
+ notify_url : typing.Optional[str]
909
+ URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
910
+
911
+ sms_blacklist : typing.Optional[bool]
912
+ To blacklist all the contacts for sms
913
+
914
+ update_existing_contacts : typing.Optional[bool]
915
+ To facilitate the choice to update the existing contacts
916
+
917
+ request_options : typing.Optional[RequestOptions]
918
+ Request-specific configuration.
919
+
920
+ Returns
921
+ -------
922
+ ImportContactsResponse
923
+ process id created
924
+
925
+ Examples
926
+ --------
927
+ from brevo import Brevo
928
+
929
+ client = Brevo(
930
+ api_key="YOUR_API_KEY",
931
+ )
932
+ client.contacts.import_contacts()
933
+ """
934
+ _response = self._raw_client.import_contacts(
935
+ disable_notification=disable_notification,
936
+ email_blacklist=email_blacklist,
937
+ empty_contacts_attributes=empty_contacts_attributes,
938
+ file_body=file_body,
939
+ file_url=file_url,
940
+ json_body=json_body,
941
+ list_ids=list_ids,
942
+ new_list=new_list,
943
+ notify_url=notify_url,
944
+ sms_blacklist=sms_blacklist,
945
+ update_existing_contacts=update_existing_contacts,
946
+ request_options=request_options,
947
+ )
948
+ return _response.data
949
+
950
+ def get_lists(
951
+ self,
952
+ *,
953
+ limit: typing.Optional[int] = None,
954
+ offset: typing.Optional[int] = None,
955
+ sort: typing.Optional[GetListsRequestSort] = None,
956
+ request_options: typing.Optional[RequestOptions] = None,
957
+ ) -> GetListsResponse:
958
+ """
959
+ <Note>
960
+ Ongoing changes for this endpoint.
961
+
962
+ We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
963
+
964
+ These are non breaking changes. The default value for the attributes will be 0.
965
+ </Note>
966
+
967
+ Parameters
968
+ ----------
969
+ limit : typing.Optional[int]
970
+ Number of documents per page
971
+
972
+ offset : typing.Optional[int]
973
+ Index of the first document of the page
974
+
975
+ sort : typing.Optional[GetListsRequestSort]
976
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
977
+
978
+ request_options : typing.Optional[RequestOptions]
979
+ Request-specific configuration.
980
+
981
+ Returns
982
+ -------
983
+ GetListsResponse
984
+ Lists informations
985
+
986
+ Examples
987
+ --------
988
+ from brevo import Brevo
989
+
990
+ client = Brevo(
991
+ api_key="YOUR_API_KEY",
992
+ )
993
+ client.contacts.get_lists()
994
+ """
995
+ _response = self._raw_client.get_lists(limit=limit, offset=offset, sort=sort, request_options=request_options)
996
+ return _response.data
997
+
998
+ def create_list(
999
+ self, *, folder_id: int, name: str, request_options: typing.Optional[RequestOptions] = None
1000
+ ) -> CreateListResponse:
1001
+ """
1002
+ Parameters
1003
+ ----------
1004
+ folder_id : int
1005
+ Id of the parent folder in which this list is to be created
1006
+
1007
+ name : str
1008
+ Name of the list
1009
+
1010
+ request_options : typing.Optional[RequestOptions]
1011
+ Request-specific configuration.
1012
+
1013
+ Returns
1014
+ -------
1015
+ CreateListResponse
1016
+ successfully created
1017
+
1018
+ Examples
1019
+ --------
1020
+ from brevo import Brevo
1021
+
1022
+ client = Brevo(
1023
+ api_key="YOUR_API_KEY",
1024
+ )
1025
+ client.contacts.create_list(
1026
+ folder_id=2,
1027
+ name="Magento Customer - ES",
1028
+ )
1029
+ """
1030
+ _response = self._raw_client.create_list(folder_id=folder_id, name=name, request_options=request_options)
1031
+ return _response.data
1032
+
1033
+ def get_list(
1034
+ self,
1035
+ list_id: int,
1036
+ *,
1037
+ start_date: typing.Optional[str] = None,
1038
+ end_date: typing.Optional[str] = None,
1039
+ request_options: typing.Optional[RequestOptions] = None,
1040
+ ) -> GetListResponse:
1041
+ """
1042
+ Parameters
1043
+ ----------
1044
+ list_id : int
1045
+ Id of the list
1046
+
1047
+ start_date : typing.Optional[str]
1048
+ **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result**
1049
+
1050
+ end_date : typing.Optional[str]
1051
+ **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result**
1052
+
1053
+ request_options : typing.Optional[RequestOptions]
1054
+ Request-specific configuration.
1055
+
1056
+ Returns
1057
+ -------
1058
+ GetListResponse
1059
+ List informations
1060
+
1061
+ Examples
1062
+ --------
1063
+ from brevo import Brevo
1064
+
1065
+ client = Brevo(
1066
+ api_key="YOUR_API_KEY",
1067
+ )
1068
+ client.contacts.get_list(
1069
+ list_id=1000000,
1070
+ )
1071
+ """
1072
+ _response = self._raw_client.get_list(
1073
+ list_id, start_date=start_date, end_date=end_date, request_options=request_options
1074
+ )
1075
+ return _response.data
1076
+
1077
+ def update_list(
1078
+ self,
1079
+ list_id: int,
1080
+ *,
1081
+ folder_id: typing.Optional[int] = OMIT,
1082
+ name: typing.Optional[str] = OMIT,
1083
+ request_options: typing.Optional[RequestOptions] = None,
1084
+ ) -> None:
1085
+ """
1086
+ Parameters
1087
+ ----------
1088
+ list_id : int
1089
+ Id of the list
1090
+
1091
+ folder_id : typing.Optional[int]
1092
+ Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time.
1093
+
1094
+ name : typing.Optional[str]
1095
+ Name of the list. Either of the two parameters (name, folderId) can be updated at a time.
1096
+
1097
+ request_options : typing.Optional[RequestOptions]
1098
+ Request-specific configuration.
1099
+
1100
+ Returns
1101
+ -------
1102
+ None
1103
+
1104
+ Examples
1105
+ --------
1106
+ from brevo import Brevo
1107
+
1108
+ client = Brevo(
1109
+ api_key="YOUR_API_KEY",
1110
+ )
1111
+ client.contacts.update_list(
1112
+ list_id=1000000,
1113
+ )
1114
+ """
1115
+ _response = self._raw_client.update_list(
1116
+ list_id, folder_id=folder_id, name=name, request_options=request_options
1117
+ )
1118
+ return _response.data
1119
+
1120
+ def delete_list(self, list_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
1121
+ """
1122
+ Parameters
1123
+ ----------
1124
+ list_id : int
1125
+ Id of the list
1126
+
1127
+ request_options : typing.Optional[RequestOptions]
1128
+ Request-specific configuration.
1129
+
1130
+ Returns
1131
+ -------
1132
+ None
1133
+
1134
+ Examples
1135
+ --------
1136
+ from brevo import Brevo
1137
+
1138
+ client = Brevo(
1139
+ api_key="YOUR_API_KEY",
1140
+ )
1141
+ client.contacts.delete_list(
1142
+ list_id=1000000,
1143
+ )
1144
+ """
1145
+ _response = self._raw_client.delete_list(list_id, request_options=request_options)
1146
+ return _response.data
1147
+
1148
+ def get_contacts_from_list(
1149
+ self,
1150
+ list_id: int,
1151
+ *,
1152
+ modified_since: typing.Optional[str] = None,
1153
+ limit: typing.Optional[int] = None,
1154
+ offset: typing.Optional[int] = None,
1155
+ sort: typing.Optional[GetContactsFromListRequestSort] = None,
1156
+ request_options: typing.Optional[RequestOptions] = None,
1157
+ ) -> GetContacts:
1158
+ """
1159
+ Parameters
1160
+ ----------
1161
+ list_id : int
1162
+ Id of the list
1163
+
1164
+ modified_since : typing.Optional[str]
1165
+ Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
1166
+
1167
+ limit : typing.Optional[int]
1168
+ Number of documents per page
1169
+
1170
+ offset : typing.Optional[int]
1171
+ Index of the first document of the page
1172
+
1173
+ sort : typing.Optional[GetContactsFromListRequestSort]
1174
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
1175
+
1176
+ request_options : typing.Optional[RequestOptions]
1177
+ Request-specific configuration.
1178
+
1179
+ Returns
1180
+ -------
1181
+ GetContacts
1182
+ Contact informations
1183
+
1184
+ Examples
1185
+ --------
1186
+ from brevo import Brevo
1187
+
1188
+ client = Brevo(
1189
+ api_key="YOUR_API_KEY",
1190
+ )
1191
+ client.contacts.get_contacts_from_list(
1192
+ list_id=1000000,
1193
+ )
1194
+ """
1195
+ _response = self._raw_client.get_contacts_from_list(
1196
+ list_id,
1197
+ modified_since=modified_since,
1198
+ limit=limit,
1199
+ offset=offset,
1200
+ sort=sort,
1201
+ request_options=request_options,
1202
+ )
1203
+ return _response.data
1204
+
1205
+ def add_contact_to_list(
1206
+ self,
1207
+ list_id: int,
1208
+ *,
1209
+ request: AddContactToListRequestBody,
1210
+ request_options: typing.Optional[RequestOptions] = None,
1211
+ ) -> PostContactInfo:
1212
+ """
1213
+ Parameters
1214
+ ----------
1215
+ list_id : int
1216
+ Id of the list
1217
+
1218
+ request : AddContactToListRequestBody
1219
+
1220
+ request_options : typing.Optional[RequestOptions]
1221
+ Request-specific configuration.
1222
+
1223
+ Returns
1224
+ -------
1225
+ PostContactInfo
1226
+ All contacts have been added successfully to the list with details of failed ones
1227
+
1228
+ Examples
1229
+ --------
1230
+ from brevo import Brevo
1231
+ from brevo.contacts import AddContactToListRequestBodyEmails
1232
+
1233
+ client = Brevo(
1234
+ api_key="YOUR_API_KEY",
1235
+ )
1236
+ client.contacts.add_contact_to_list(
1237
+ list_id=1000000,
1238
+ request=AddContactToListRequestBodyEmails(
1239
+ emails=["jeff32@example.com", "jim56@example.com"],
1240
+ ),
1241
+ )
1242
+ """
1243
+ _response = self._raw_client.add_contact_to_list(list_id, request=request, request_options=request_options)
1244
+ return _response.data
1245
+
1246
+ def remove_contact_from_list(
1247
+ self,
1248
+ list_id: int,
1249
+ *,
1250
+ request: RemoveContactFromListRequestBody,
1251
+ request_options: typing.Optional[RequestOptions] = None,
1252
+ ) -> PostContactInfo:
1253
+ """
1254
+ Parameters
1255
+ ----------
1256
+ list_id : int
1257
+ Id of the list
1258
+
1259
+ request : RemoveContactFromListRequestBody
1260
+
1261
+ request_options : typing.Optional[RequestOptions]
1262
+ Request-specific configuration.
1263
+
1264
+ Returns
1265
+ -------
1266
+ PostContactInfo
1267
+ All contacts have been removed successfully from the list with details of failed ones
1268
+
1269
+ Examples
1270
+ --------
1271
+ from brevo import Brevo
1272
+ from brevo.contacts import RemoveContactFromListRequestBodyAll
1273
+
1274
+ client = Brevo(
1275
+ api_key="YOUR_API_KEY",
1276
+ )
1277
+ client.contacts.remove_contact_from_list(
1278
+ list_id=1000000,
1279
+ request=RemoveContactFromListRequestBodyAll(
1280
+ all_=True,
1281
+ ),
1282
+ )
1283
+ """
1284
+ _response = self._raw_client.remove_contact_from_list(list_id, request=request, request_options=request_options)
1285
+ return _response.data
1286
+
1287
+ def get_segments(
1288
+ self,
1289
+ *,
1290
+ limit: typing.Optional[int] = None,
1291
+ offset: typing.Optional[int] = None,
1292
+ sort: typing.Optional[GetSegmentsRequestSort] = None,
1293
+ request_options: typing.Optional[RequestOptions] = None,
1294
+ ) -> GetSegmentsResponse:
1295
+ """
1296
+ Parameters
1297
+ ----------
1298
+ limit : typing.Optional[int]
1299
+ Number of documents per page
1300
+
1301
+ offset : typing.Optional[int]
1302
+ Index of the first document of the page
1303
+
1304
+ sort : typing.Optional[GetSegmentsRequestSort]
1305
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
1306
+
1307
+ request_options : typing.Optional[RequestOptions]
1308
+ Request-specific configuration.
1309
+
1310
+ Returns
1311
+ -------
1312
+ GetSegmentsResponse
1313
+ Segments informations
1314
+
1315
+ Examples
1316
+ --------
1317
+ from brevo import Brevo
1318
+
1319
+ client = Brevo(
1320
+ api_key="YOUR_API_KEY",
1321
+ )
1322
+ client.contacts.get_segments()
1323
+ """
1324
+ _response = self._raw_client.get_segments(
1325
+ limit=limit, offset=offset, sort=sort, request_options=request_options
1326
+ )
1327
+ return _response.data
1328
+
1329
+ def get_contact_info(
1330
+ self,
1331
+ identifier: GetContactInfoRequestIdentifier,
1332
+ *,
1333
+ identifier_type: typing.Optional[GetContactInfoRequestIdentifierType] = None,
1334
+ start_date: typing.Optional[str] = None,
1335
+ end_date: typing.Optional[str] = None,
1336
+ request_options: typing.Optional[RequestOptions] = None,
1337
+ ) -> GetContactInfoResponse:
1338
+ """
1339
+ <Note title="Follow this format when passing a SMS phone number as an attribute">
1340
+ Accepted Number Formats
1341
+
1342
+ 91xxxxxxxxxx
1343
+ +91xxxxxxxxxx
1344
+ 0091xxxxxxxxxx
1345
+ </Note>
1346
+
1347
+ There are 2 ways to get a contact <br><br> Option 1- https://api.brevo.com/v3/contacts/{identifier} <br><br> Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={} <br> <br> Option 1 only works if identifierType is email_id (for EMAIL), phone_id (for SMS) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL, SMS and ID of the contact. <br><br> Option 2 works for all identifierType, use email_id for EMAIL attribute, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute <br><br>Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` endpoint with the appropriate date ranges.
1348
+
1349
+ Parameters
1350
+ ----------
1351
+ identifier : GetContactInfoRequestIdentifier
1352
+ Email (urlencoded) OR ID of the contact OR its SMS attribute value OR EXT_ID attribute (urlencoded)
1353
+
1354
+ identifier_type : typing.Optional[GetContactInfoRequestIdentifierType]
1355
+ email_id for Email, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute
1356
+
1357
+ start_date : typing.Optional[str]
1358
+ **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
1359
+
1360
+ end_date : typing.Optional[str]
1361
+ **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate.
1362
+
1363
+ request_options : typing.Optional[RequestOptions]
1364
+ Request-specific configuration.
1365
+
1366
+ Returns
1367
+ -------
1368
+ GetContactInfoResponse
1369
+ Contact informations
1370
+
1371
+ Examples
1372
+ --------
1373
+ from brevo import Brevo
1374
+
1375
+ client = Brevo(
1376
+ api_key="YOUR_API_KEY",
1377
+ )
1378
+ client.contacts.get_contact_info(
1379
+ identifier="identifier",
1380
+ )
1381
+ """
1382
+ _response = self._raw_client.get_contact_info(
1383
+ identifier,
1384
+ identifier_type=identifier_type,
1385
+ start_date=start_date,
1386
+ end_date=end_date,
1387
+ request_options=request_options,
1388
+ )
1389
+ return _response.data
1390
+
1391
+ def update_contact(
1392
+ self,
1393
+ identifier: UpdateContactRequestIdentifier,
1394
+ *,
1395
+ identifier_type: typing.Optional[UpdateContactRequestIdentifierType] = None,
1396
+ attributes: typing.Optional[typing.Dict[str, UpdateContactRequestAttributesValue]] = OMIT,
1397
+ email_blacklisted: typing.Optional[bool] = OMIT,
1398
+ ext_id: typing.Optional[str] = OMIT,
1399
+ list_ids: typing.Optional[typing.Sequence[int]] = OMIT,
1400
+ sms_blacklisted: typing.Optional[bool] = OMIT,
1401
+ smtp_blacklist_sender: typing.Optional[typing.Sequence[str]] = OMIT,
1402
+ unlink_list_ids: typing.Optional[typing.Sequence[int]] = OMIT,
1403
+ request_options: typing.Optional[RequestOptions] = None,
1404
+ ) -> None:
1405
+ """
1406
+ There are 2 ways to update a contact <br><br> Option 1- https://api.brevo.com/v3/contacts/{identifier} <br><br> Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={} <br> <br> Option 1 only works if identifierType is email_id (for EMAIL) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL and ID of the contact. <br><br> Option 2 works for all identifierType, use email_id for EMAIL attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute
1407
+
1408
+ Parameters
1409
+ ----------
1410
+ identifier : UpdateContactRequestIdentifier
1411
+ Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE attribute value
1412
+
1413
+ identifier_type : typing.Optional[UpdateContactRequestIdentifierType]
1414
+ email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute
1415
+
1416
+ attributes : typing.Optional[typing.Dict[str, UpdateContactRequestAttributesValue]]
1417
+ Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, **{ "EMAIL":"newemail@domain.com", "FNAME":"Ellie", "LNAME":"Roger", "COUNTRIES":["India","China"]}**. The attribute's parameter should be passed in capital letter while updating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored .Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}**
1418
+
1419
+ email_blacklisted : typing.Optional[bool]
1420
+ Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)
1421
+
1422
+ ext_id : typing.Optional[str]
1423
+ Pass your own Id to update ext_id of a contact.
1424
+
1425
+ list_ids : typing.Optional[typing.Sequence[int]]
1426
+ Ids of the lists to add the contact to
1427
+
1428
+ sms_blacklisted : typing.Optional[bool]
1429
+ Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true)
1430
+
1431
+ smtp_blacklist_sender : typing.Optional[typing.Sequence[str]]
1432
+ transactional email forbidden sender for contact. Use only for email Contact
1433
+
1434
+ unlink_list_ids : typing.Optional[typing.Sequence[int]]
1435
+ Ids of the lists to remove the contact from
1436
+
1437
+ request_options : typing.Optional[RequestOptions]
1438
+ Request-specific configuration.
1439
+
1440
+ Returns
1441
+ -------
1442
+ None
1443
+
1444
+ Examples
1445
+ --------
1446
+ from brevo import Brevo
1447
+
1448
+ client = Brevo(
1449
+ api_key="YOUR_API_KEY",
1450
+ )
1451
+ client.contacts.update_contact(
1452
+ identifier="identifier",
1453
+ )
1454
+ """
1455
+ _response = self._raw_client.update_contact(
1456
+ identifier,
1457
+ identifier_type=identifier_type,
1458
+ attributes=attributes,
1459
+ email_blacklisted=email_blacklisted,
1460
+ ext_id=ext_id,
1461
+ list_ids=list_ids,
1462
+ sms_blacklisted=sms_blacklisted,
1463
+ smtp_blacklist_sender=smtp_blacklist_sender,
1464
+ unlink_list_ids=unlink_list_ids,
1465
+ request_options=request_options,
1466
+ )
1467
+ return _response.data
1468
+
1469
+ def delete_contact(
1470
+ self,
1471
+ identifier: DeleteContactRequestIdentifier,
1472
+ *,
1473
+ identifier_type: typing.Optional[DeleteContactRequestIdentifierType] = None,
1474
+ request_options: typing.Optional[RequestOptions] = None,
1475
+ ) -> None:
1476
+ """
1477
+ There are 2 ways to delete a contact <br><br> Option 1- https://api.brevo.com/v3/contacts/{identifier} <br><br> Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={} <br> <br> Option 1 only works if identifierType is email_id (for EMAIL) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL and ID of the contact. <br><br> Option 2 works for all identifierType, use email_id for EMAIL attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute.
1478
+
1479
+ Parameters
1480
+ ----------
1481
+ identifier : DeleteContactRequestIdentifier
1482
+ Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded)
1483
+
1484
+ identifier_type : typing.Optional[DeleteContactRequestIdentifierType]
1485
+ email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute
1486
+
1487
+ request_options : typing.Optional[RequestOptions]
1488
+ Request-specific configuration.
1489
+
1490
+ Returns
1491
+ -------
1492
+ None
1493
+
1494
+ Examples
1495
+ --------
1496
+ from brevo import Brevo
1497
+
1498
+ client = Brevo(
1499
+ api_key="YOUR_API_KEY",
1500
+ )
1501
+ client.contacts.delete_contact(
1502
+ identifier="identifier",
1503
+ )
1504
+ """
1505
+ _response = self._raw_client.delete_contact(
1506
+ identifier, identifier_type=identifier_type, request_options=request_options
1507
+ )
1508
+ return _response.data
1509
+
1510
+ def get_contact_stats(
1511
+ self,
1512
+ identifier: GetContactStatsRequestIdentifier,
1513
+ *,
1514
+ start_date: typing.Optional[str] = None,
1515
+ end_date: typing.Optional[str] = None,
1516
+ request_options: typing.Optional[RequestOptions] = None,
1517
+ ) -> GetContactStatsResponse:
1518
+ """
1519
+ Parameters
1520
+ ----------
1521
+ identifier : GetContactStatsRequestIdentifier
1522
+ Email (urlencoded) OR ID of the contact
1523
+
1524
+ start_date : typing.Optional[str]
1525
+ **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
1526
+
1527
+ end_date : typing.Optional[str]
1528
+ **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days
1529
+
1530
+ request_options : typing.Optional[RequestOptions]
1531
+ Request-specific configuration.
1532
+
1533
+ Returns
1534
+ -------
1535
+ GetContactStatsResponse
1536
+ Contact campaign statistics informations
1537
+
1538
+ Examples
1539
+ --------
1540
+ from brevo import Brevo
1541
+
1542
+ client = Brevo(
1543
+ api_key="YOUR_API_KEY",
1544
+ )
1545
+ client.contacts.get_contact_stats(
1546
+ identifier="identifier",
1547
+ )
1548
+ """
1549
+ _response = self._raw_client.get_contact_stats(
1550
+ identifier, start_date=start_date, end_date=end_date, request_options=request_options
1551
+ )
1552
+ return _response.data
1553
+
1554
+
1555
+ class AsyncContactsClient:
1556
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
1557
+ self._raw_client = AsyncRawContactsClient(client_wrapper=client_wrapper)
1558
+
1559
+ @property
1560
+ def with_raw_response(self) -> AsyncRawContactsClient:
1561
+ """
1562
+ Retrieves a raw implementation of this client that returns raw responses.
1563
+
1564
+ Returns
1565
+ -------
1566
+ AsyncRawContactsClient
1567
+ """
1568
+ return self._raw_client
1569
+
1570
+ async def get_contacts(
1571
+ self,
1572
+ *,
1573
+ limit: typing.Optional[int] = None,
1574
+ offset: typing.Optional[int] = None,
1575
+ modified_since: typing.Optional[str] = None,
1576
+ created_since: typing.Optional[str] = None,
1577
+ sort: typing.Optional[GetContactsRequestSort] = None,
1578
+ segment_id: typing.Optional[int] = None,
1579
+ list_ids: typing.Optional[typing.Union[int, typing.Sequence[int]]] = None,
1580
+ filter: typing.Optional[str] = None,
1581
+ request_options: typing.Optional[RequestOptions] = None,
1582
+ ) -> GetContacts:
1583
+ """
1584
+ <Note title="Follow this format when passing a SMS phone number as an attribute">
1585
+ Accepted Number Formats
1586
+
1587
+ 91xxxxxxxxxx
1588
+ +91xxxxxxxxxx
1589
+ 0091xxxxxxxxxx
1590
+ </Note>
1591
+
1592
+ Parameters
1593
+ ----------
1594
+ limit : typing.Optional[int]
1595
+ Number of documents per page
1596
+
1597
+ offset : typing.Optional[int]
1598
+ Index of the first document of the page
1599
+
1600
+ modified_since : typing.Optional[str]
1601
+ Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
1602
+
1603
+ created_since : typing.Optional[str]
1604
+ Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
1605
+
1606
+ sort : typing.Optional[GetContactsRequestSort]
1607
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
1608
+
1609
+ segment_id : typing.Optional[int]
1610
+ Id of the segment. **Either listIds or segmentId can be passed.**
1611
+
1612
+ list_ids : typing.Optional[typing.Union[int, typing.Sequence[int]]]
1613
+ Ids of the list. **Either listIds or segmentId can be passed.**
1614
+
1615
+ filter : typing.Optional[str]
1616
+ Filter the contacts on the basis of attributes. **Allowed operator: equals. For multiple-choice options, the filter will apply an AND condition between the options. For category attributes, the filter will work with both id and value. (e.g. filter=equals(FIRSTNAME,"Antoine"), filter=equals(B1, true), filter=equals(DOB, "1989-11-23"), filter=equals(GENDER, "1"), filter=equals(GENDER, "MALE"), filter=equals(COUNTRY,"USA, INDIA")**
1617
+
1618
+ request_options : typing.Optional[RequestOptions]
1619
+ Request-specific configuration.
1620
+
1621
+ Returns
1622
+ -------
1623
+ GetContacts
1624
+ All contacts listed
1625
+
1626
+ Examples
1627
+ --------
1628
+ import asyncio
1629
+
1630
+ from brevo import AsyncBrevo
1631
+
1632
+ client = AsyncBrevo(
1633
+ api_key="YOUR_API_KEY",
1634
+ )
1635
+
1636
+
1637
+ async def main() -> None:
1638
+ await client.contacts.get_contacts()
1639
+
1640
+
1641
+ asyncio.run(main())
1642
+ """
1643
+ _response = await self._raw_client.get_contacts(
1644
+ limit=limit,
1645
+ offset=offset,
1646
+ modified_since=modified_since,
1647
+ created_since=created_since,
1648
+ sort=sort,
1649
+ segment_id=segment_id,
1650
+ list_ids=list_ids,
1651
+ filter=filter,
1652
+ request_options=request_options,
1653
+ )
1654
+ return _response.data
1655
+
1656
+ async def create_contact(
1657
+ self,
1658
+ *,
1659
+ attributes: typing.Optional[typing.Dict[str, CreateContactRequestAttributesValue]] = OMIT,
1660
+ email: typing.Optional[str] = OMIT,
1661
+ email_blacklisted: typing.Optional[bool] = OMIT,
1662
+ ext_id: typing.Optional[str] = OMIT,
1663
+ list_ids: typing.Optional[typing.Sequence[int]] = OMIT,
1664
+ sms_blacklisted: typing.Optional[bool] = OMIT,
1665
+ smtp_blacklist_sender: typing.Optional[typing.Sequence[str]] = OMIT,
1666
+ update_enabled: typing.Optional[bool] = OMIT,
1667
+ request_options: typing.Optional[RequestOptions] = None,
1668
+ ) -> CreateContactResponse:
1669
+ """
1670
+ Creates new contacts on Brevo. Contacts can be created by passing either - <br><br> 1. email address of the contact (email_id), <br> 2. phone number of the contact (to be passed as "SMS" field in "attributes" along with proper country code), For example- {"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"} <br> 3. ext_id <br>
1671
+
1672
+ Parameters
1673
+ ----------
1674
+ attributes : typing.Optional[typing.Dict[str, CreateContactRequestAttributesValue]]
1675
+ Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored. **These attributes must be present in your Brevo account**. For eg: **{"FNAME":"Elly", "LNAME":"Roger", "COUNTRIES": ["India","China"]}**
1676
+
1677
+ email : typing.Optional[str]
1678
+ Email address of the user. **Mandatory if "ext_id" & "SMS" field is not passed.**
1679
+
1680
+ email_blacklisted : typing.Optional[bool]
1681
+ Set this field to blacklist the contact for emails (emailBlacklisted = true)
1682
+
1683
+ ext_id : typing.Optional[str]
1684
+ Pass your own Id to create a contact.
1685
+
1686
+ list_ids : typing.Optional[typing.Sequence[int]]
1687
+ Ids of the lists to add the contact to
1688
+
1689
+ sms_blacklisted : typing.Optional[bool]
1690
+ Set this field to blacklist the contact for SMS (smsBlacklisted = true)
1691
+
1692
+ smtp_blacklist_sender : typing.Optional[typing.Sequence[str]]
1693
+ transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true )
1694
+
1695
+ update_enabled : typing.Optional[bool]
1696
+ Facilitate to update the existing contact in the same request (updateEnabled = true)
1697
+
1698
+ request_options : typing.Optional[RequestOptions]
1699
+ Request-specific configuration.
1700
+
1701
+ Returns
1702
+ -------
1703
+ CreateContactResponse
1704
+ Contact created
1705
+
1706
+ Examples
1707
+ --------
1708
+ import asyncio
1709
+
1710
+ from brevo import AsyncBrevo
1711
+
1712
+ client = AsyncBrevo(
1713
+ api_key="YOUR_API_KEY",
1714
+ )
1715
+
1716
+
1717
+ async def main() -> None:
1718
+ await client.contacts.create_contact()
1719
+
1720
+
1721
+ asyncio.run(main())
1722
+ """
1723
+ _response = await self._raw_client.create_contact(
1724
+ attributes=attributes,
1725
+ email=email,
1726
+ email_blacklisted=email_blacklisted,
1727
+ ext_id=ext_id,
1728
+ list_ids=list_ids,
1729
+ sms_blacklisted=sms_blacklisted,
1730
+ smtp_blacklist_sender=smtp_blacklist_sender,
1731
+ update_enabled=update_enabled,
1732
+ request_options=request_options,
1733
+ )
1734
+ return _response.data
1735
+
1736
+ async def get_attributes(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetAttributesResponse:
1737
+ """
1738
+ Parameters
1739
+ ----------
1740
+ request_options : typing.Optional[RequestOptions]
1741
+ Request-specific configuration.
1742
+
1743
+ Returns
1744
+ -------
1745
+ GetAttributesResponse
1746
+ Attributes listed
1747
+
1748
+ Examples
1749
+ --------
1750
+ import asyncio
1751
+
1752
+ from brevo import AsyncBrevo
1753
+
1754
+ client = AsyncBrevo(
1755
+ api_key="YOUR_API_KEY",
1756
+ )
1757
+
1758
+
1759
+ async def main() -> None:
1760
+ await client.contacts.get_attributes()
1761
+
1762
+
1763
+ asyncio.run(main())
1764
+ """
1765
+ _response = await self._raw_client.get_attributes(request_options=request_options)
1766
+ return _response.data
1767
+
1768
+ async def create_attribute(
1769
+ self,
1770
+ attribute_category: CreateAttributeRequestAttributeCategory,
1771
+ attribute_name: str,
1772
+ *,
1773
+ enumeration: typing.Optional[typing.Sequence[CreateAttributeRequestEnumerationItem]] = OMIT,
1774
+ is_recurring: typing.Optional[bool] = OMIT,
1775
+ multi_category_options: typing.Optional[typing.Sequence[str]] = OMIT,
1776
+ type: typing.Optional[CreateAttributeRequestType] = OMIT,
1777
+ value: typing.Optional[str] = OMIT,
1778
+ request_options: typing.Optional[RequestOptions] = None,
1779
+ ) -> None:
1780
+ """
1781
+ Parameters
1782
+ ----------
1783
+ attribute_category : CreateAttributeRequestAttributeCategory
1784
+ Category of the attribute
1785
+
1786
+ attribute_name : str
1787
+ Name of the attribute
1788
+
1789
+ enumeration : typing.Optional[typing.Sequence[CreateAttributeRequestEnumerationItem]]
1790
+ List of values and labels that the attribute can take. **Use only if the attribute's category is "category"**. None of the category options can exceed max 200 characters. For example: **[{"value":1, "label":"male"}, {"value":2, "label":"female"}]**
1791
+
1792
+ is_recurring : typing.Optional[bool]
1793
+ Type of the attribute. **Use only if the attribute's category is 'calculated' or 'global'**
1794
+
1795
+ multi_category_options : typing.Optional[typing.Sequence[str]]
1796
+ List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is "normal" and attribute's type is "multiple-choice". None of the multicategory options can exceed max 200 characters.** For example: **["USA","INDIA"]**
1797
+
1798
+ type : typing.Optional[CreateAttributeRequestType]
1799
+ Type of the attribute. **Use only if the attribute's category is 'normal', 'category' or 'transactional'** Type **user and multiple-choice** is only available if the category is **normal** attribute Type **id** is only available if the category is **transactional** attribute Type **category** is only available if the category is **category** attribute
1800
+
1801
+ value : typing.Optional[str]
1802
+ Value of the attribute. **Use only if the attribute's category is 'calculated' or 'global'**
1803
+
1804
+ request_options : typing.Optional[RequestOptions]
1805
+ Request-specific configuration.
1806
+
1807
+ Returns
1808
+ -------
1809
+ None
1810
+
1811
+ Examples
1812
+ --------
1813
+ import asyncio
1814
+
1815
+ from brevo import AsyncBrevo
1816
+
1817
+ client = AsyncBrevo(
1818
+ api_key="YOUR_API_KEY",
1819
+ )
1820
+
1821
+
1822
+ async def main() -> None:
1823
+ await client.contacts.create_attribute(
1824
+ attribute_category="normal",
1825
+ attribute_name="attributeName",
1826
+ )
1827
+
1828
+
1829
+ asyncio.run(main())
1830
+ """
1831
+ _response = await self._raw_client.create_attribute(
1832
+ attribute_category,
1833
+ attribute_name,
1834
+ enumeration=enumeration,
1835
+ is_recurring=is_recurring,
1836
+ multi_category_options=multi_category_options,
1837
+ type=type,
1838
+ value=value,
1839
+ request_options=request_options,
1840
+ )
1841
+ return _response.data
1842
+
1843
+ async def update_attribute(
1844
+ self,
1845
+ attribute_category: UpdateAttributeRequestAttributeCategory,
1846
+ attribute_name: str,
1847
+ *,
1848
+ enumeration: typing.Optional[typing.Sequence[UpdateAttributeRequestEnumerationItem]] = OMIT,
1849
+ multi_category_options: typing.Optional[typing.Sequence[str]] = OMIT,
1850
+ value: typing.Optional[str] = OMIT,
1851
+ request_options: typing.Optional[RequestOptions] = None,
1852
+ ) -> None:
1853
+ """
1854
+ Parameters
1855
+ ----------
1856
+ attribute_category : UpdateAttributeRequestAttributeCategory
1857
+ Category of the attribute
1858
+
1859
+ attribute_name : str
1860
+ Name of the existing attribute
1861
+
1862
+ enumeration : typing.Optional[typing.Sequence[UpdateAttributeRequestEnumerationItem]]
1863
+ List of the values and labels that the attribute can take. **Use only if the attribute's category is "category"** None of the category options can exceed max 200 characters. For example, **[{"value":1, "label":"male"}, {"value":2, "label":"female"}]**
1864
+
1865
+ multi_category_options : typing.Optional[typing.Sequence[str]]
1866
+ Use this option to add multiple-choice attributes options only if the attribute's category is "normal". **This option is specifically designed for updating multiple-choice attributes. None of the multicategory options can exceed max 200 characters.**. For example: **["USA","INDIA"]**
1867
+
1868
+ value : typing.Optional[str]
1869
+ Value of the attribute to update. **Use only if the attribute's category is 'calculated' or 'global'**
1870
+
1871
+ request_options : typing.Optional[RequestOptions]
1872
+ Request-specific configuration.
1873
+
1874
+ Returns
1875
+ -------
1876
+ None
1877
+
1878
+ Examples
1879
+ --------
1880
+ import asyncio
1881
+
1882
+ from brevo import AsyncBrevo
1883
+
1884
+ client = AsyncBrevo(
1885
+ api_key="YOUR_API_KEY",
1886
+ )
1887
+
1888
+
1889
+ async def main() -> None:
1890
+ await client.contacts.update_attribute(
1891
+ attribute_category="category",
1892
+ attribute_name="attributeName",
1893
+ )
1894
+
1895
+
1896
+ asyncio.run(main())
1897
+ """
1898
+ _response = await self._raw_client.update_attribute(
1899
+ attribute_category,
1900
+ attribute_name,
1901
+ enumeration=enumeration,
1902
+ multi_category_options=multi_category_options,
1903
+ value=value,
1904
+ request_options=request_options,
1905
+ )
1906
+ return _response.data
1907
+
1908
+ async def delete_attribute(
1909
+ self,
1910
+ attribute_category: DeleteAttributeRequestAttributeCategory,
1911
+ attribute_name: str,
1912
+ *,
1913
+ request_options: typing.Optional[RequestOptions] = None,
1914
+ ) -> None:
1915
+ """
1916
+ Parameters
1917
+ ----------
1918
+ attribute_category : DeleteAttributeRequestAttributeCategory
1919
+ Category of the attribute
1920
+
1921
+ attribute_name : str
1922
+ Name of the existing attribute
1923
+
1924
+ request_options : typing.Optional[RequestOptions]
1925
+ Request-specific configuration.
1926
+
1927
+ Returns
1928
+ -------
1929
+ None
1930
+
1931
+ Examples
1932
+ --------
1933
+ import asyncio
1934
+
1935
+ from brevo import AsyncBrevo
1936
+
1937
+ client = AsyncBrevo(
1938
+ api_key="YOUR_API_KEY",
1939
+ )
1940
+
1941
+
1942
+ async def main() -> None:
1943
+ await client.contacts.delete_attribute(
1944
+ attribute_category="normal",
1945
+ attribute_name="attributeName",
1946
+ )
1947
+
1948
+
1949
+ asyncio.run(main())
1950
+ """
1951
+ _response = await self._raw_client.delete_attribute(
1952
+ attribute_category, attribute_name, request_options=request_options
1953
+ )
1954
+ return _response.data
1955
+
1956
+ async def delete_multi_attribute_options(
1957
+ self,
1958
+ multiple_choice_attribute: str,
1959
+ multiple_choice_attribute_option: str,
1960
+ *,
1961
+ request_options: typing.Optional[RequestOptions] = None,
1962
+ ) -> None:
1963
+ """
1964
+ Parameters
1965
+ ----------
1966
+ multiple_choice_attribute : str
1967
+ Name of the existing multiple-choice attribute
1968
+
1969
+ multiple_choice_attribute_option : str
1970
+ Name of the existing multiple-choice attribute option that you want to delete
1971
+
1972
+ request_options : typing.Optional[RequestOptions]
1973
+ Request-specific configuration.
1974
+
1975
+ Returns
1976
+ -------
1977
+ None
1978
+
1979
+ Examples
1980
+ --------
1981
+ import asyncio
1982
+
1983
+ from brevo import AsyncBrevo
1984
+
1985
+ client = AsyncBrevo(
1986
+ api_key="YOUR_API_KEY",
1987
+ )
1988
+
1989
+
1990
+ async def main() -> None:
1991
+ await client.contacts.delete_multi_attribute_options(
1992
+ multiple_choice_attribute="multipleChoiceAttribute",
1993
+ multiple_choice_attribute_option="multipleChoiceAttributeOption",
1994
+ )
1995
+
1996
+
1997
+ asyncio.run(main())
1998
+ """
1999
+ _response = await self._raw_client.delete_multi_attribute_options(
2000
+ multiple_choice_attribute, multiple_choice_attribute_option, request_options=request_options
2001
+ )
2002
+ return _response.data
2003
+
2004
+ async def update_batch_contacts(
2005
+ self,
2006
+ *,
2007
+ contacts: typing.Optional[typing.Sequence[UpdateBatchContactsRequestContactsItem]] = OMIT,
2008
+ request_options: typing.Optional[RequestOptions] = None,
2009
+ ) -> None:
2010
+ """
2011
+ Parameters
2012
+ ----------
2013
+ contacts : typing.Optional[typing.Sequence[UpdateBatchContactsRequestContactsItem]]
2014
+ List of contacts to be updated
2015
+
2016
+ request_options : typing.Optional[RequestOptions]
2017
+ Request-specific configuration.
2018
+
2019
+ Returns
2020
+ -------
2021
+ None
2022
+
2023
+ Examples
2024
+ --------
2025
+ import asyncio
2026
+
2027
+ from brevo import AsyncBrevo
2028
+
2029
+ client = AsyncBrevo(
2030
+ api_key="YOUR_API_KEY",
2031
+ )
2032
+
2033
+
2034
+ async def main() -> None:
2035
+ await client.contacts.update_batch_contacts()
2036
+
2037
+
2038
+ asyncio.run(main())
2039
+ """
2040
+ _response = await self._raw_client.update_batch_contacts(contacts=contacts, request_options=request_options)
2041
+ return _response.data
2042
+
2043
+ async def create_doi_contact(
2044
+ self,
2045
+ *,
2046
+ email: str,
2047
+ include_list_ids: typing.Sequence[int],
2048
+ redirection_url: str,
2049
+ template_id: int,
2050
+ attributes: typing.Optional[typing.Dict[str, CreateDoiContactRequestAttributesValue]] = OMIT,
2051
+ exclude_list_ids: typing.Optional[typing.Sequence[int]] = OMIT,
2052
+ request_options: typing.Optional[RequestOptions] = None,
2053
+ ) -> None:
2054
+ """
2055
+ <Note title="How to use attributes param?">
2056
+ attributes param in this endpoint is an object containing key-value pairs where values can be either a string, integer, array, or boolean. You can create key-value pairs with these four datatypes. When a value is an array, it should be an array of strings.
2057
+ </Note>
2058
+
2059
+ Parameters
2060
+ ----------
2061
+ email : str
2062
+ Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes.
2063
+
2064
+ include_list_ids : typing.Sequence[int]
2065
+ Lists under user account where contact should be added
2066
+
2067
+ redirection_url : str
2068
+ URL of the web page that user will be redirected to after clicking on the double opt in URL. When editing your DOI template you can reference this URL by using the tag **{{ params.DOIurl }}**.
2069
+
2070
+ template_id : int
2071
+ Id of the Double opt-in (DOI) template
2072
+
2073
+ attributes : typing.Optional[typing.Dict[str, CreateDoiContactRequestAttributesValue]]
2074
+ Pass the set of attributes and their values. **These attributes must be present in your Brevo account**. For eg. **{'FNAME':'Elly', 'LNAME':'Roger', 'COUNTRIES': ['India','China']}**
2075
+
2076
+ exclude_list_ids : typing.Optional[typing.Sequence[int]]
2077
+ Lists under user account where contact should not be added
2078
+
2079
+ request_options : typing.Optional[RequestOptions]
2080
+ Request-specific configuration.
2081
+
2082
+ Returns
2083
+ -------
2084
+ None
2085
+
2086
+ Examples
2087
+ --------
2088
+ import asyncio
2089
+
2090
+ from brevo import AsyncBrevo
2091
+
2092
+ client = AsyncBrevo(
2093
+ api_key="YOUR_API_KEY",
2094
+ )
2095
+
2096
+
2097
+ async def main() -> None:
2098
+ await client.contacts.create_doi_contact(
2099
+ email="elly@example.com",
2100
+ include_list_ids=[36],
2101
+ redirection_url="http://requestb.in/173lyyx1",
2102
+ template_id=2,
2103
+ )
2104
+
2105
+
2106
+ asyncio.run(main())
2107
+ """
2108
+ _response = await self._raw_client.create_doi_contact(
2109
+ email=email,
2110
+ include_list_ids=include_list_ids,
2111
+ redirection_url=redirection_url,
2112
+ template_id=template_id,
2113
+ attributes=attributes,
2114
+ exclude_list_ids=exclude_list_ids,
2115
+ request_options=request_options,
2116
+ )
2117
+ return _response.data
2118
+
2119
+ async def request_contact_export(
2120
+ self,
2121
+ *,
2122
+ custom_contact_filter: RequestContactExportRequestCustomContactFilter,
2123
+ disable_notification: typing.Optional[bool] = OMIT,
2124
+ export_attributes: typing.Optional[typing.Sequence[str]] = OMIT,
2125
+ export_mandatory_attributes: typing.Optional[bool] = OMIT,
2126
+ export_metadata: typing.Optional[typing.Sequence[str]] = OMIT,
2127
+ export_date_in_utc: typing.Optional[bool] = OMIT,
2128
+ export_subscription_status: typing.Optional[typing.Sequence[str]] = OMIT,
2129
+ notify_url: typing.Optional[str] = OMIT,
2130
+ request_options: typing.Optional[RequestOptions] = None,
2131
+ ) -> RequestContactExportResponse:
2132
+ """
2133
+ It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.
2134
+
2135
+ Parameters
2136
+ ----------
2137
+ custom_contact_filter : RequestContactExportRequestCustomContactFilter
2138
+ Set the filter for the contacts to be exported.
2139
+
2140
+ disable_notification : typing.Optional[bool]
2141
+ To avoid generating the email notification upon contact export, pass **true**
2142
+
2143
+ export_attributes : typing.Optional[typing.Sequence[str]]
2144
+ List of all the attributes that you want to export. **These attributes must be present in your contact database. It is required if exportMandatoryAttributes is set false. ** For example: **['fname', 'lname', 'email']**
2145
+
2146
+ export_mandatory_attributes : typing.Optional[bool]
2147
+ To export mandatory attributes like EMAIL, ADDED_TIME, MODIFIED_TIME
2148
+
2149
+ export_metadata : typing.Optional[typing.Sequence[str]]
2150
+ Export metadata of contacts such as _listIds, ADDED_TIME, MODIFIED_TIME.
2151
+
2152
+ export_date_in_utc : typing.Optional[bool]
2153
+ Specifies whether the date fields createdAt, modifiedAt in the exported data should be returned in UTC format.
2154
+
2155
+ export_subscription_status : typing.Optional[typing.Sequence[str]]
2156
+ Export subscription status of contacts for email & sms marketting. Pass email_marketing to obtain the marketing email subscription status & sms_marketing to retrieve the marketing SMS status of the contact.
2157
+
2158
+ notify_url : typing.Optional[str]
2159
+ Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
2160
+
2161
+ request_options : typing.Optional[RequestOptions]
2162
+ Request-specific configuration.
2163
+
2164
+ Returns
2165
+ -------
2166
+ RequestContactExportResponse
2167
+ process id created
2168
+
2169
+ Examples
2170
+ --------
2171
+ import asyncio
2172
+
2173
+ from brevo import AsyncBrevo
2174
+ from brevo.contacts import RequestContactExportRequestCustomContactFilter
2175
+
2176
+ client = AsyncBrevo(
2177
+ api_key="YOUR_API_KEY",
2178
+ )
2179
+
2180
+
2181
+ async def main() -> None:
2182
+ await client.contacts.request_contact_export(
2183
+ custom_contact_filter=RequestContactExportRequestCustomContactFilter(),
2184
+ )
2185
+
2186
+
2187
+ asyncio.run(main())
2188
+ """
2189
+ _response = await self._raw_client.request_contact_export(
2190
+ custom_contact_filter=custom_contact_filter,
2191
+ disable_notification=disable_notification,
2192
+ export_attributes=export_attributes,
2193
+ export_mandatory_attributes=export_mandatory_attributes,
2194
+ export_metadata=export_metadata,
2195
+ export_date_in_utc=export_date_in_utc,
2196
+ export_subscription_status=export_subscription_status,
2197
+ notify_url=notify_url,
2198
+ request_options=request_options,
2199
+ )
2200
+ return _response.data
2201
+
2202
+ async def get_folders(
2203
+ self,
2204
+ *,
2205
+ limit: typing.Optional[int] = None,
2206
+ offset: typing.Optional[int] = None,
2207
+ sort: typing.Optional[GetFoldersRequestSort] = None,
2208
+ request_options: typing.Optional[RequestOptions] = None,
2209
+ ) -> GetFoldersResponse:
2210
+ """
2211
+ <Note>
2212
+ Ongoing changes for this endpoint
2213
+
2214
+ We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
2215
+
2216
+ These are non breaking changes.
2217
+
2218
+ The default value for the attributes will be 0.
2219
+
2220
+ The uniqueSubscribers field is deprecated
2221
+ </Note>
2222
+
2223
+ Parameters
2224
+ ----------
2225
+ limit : typing.Optional[int]
2226
+ Number of documents per page
2227
+
2228
+ offset : typing.Optional[int]
2229
+ Index of the first document of the page
2230
+
2231
+ sort : typing.Optional[GetFoldersRequestSort]
2232
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
2233
+
2234
+ request_options : typing.Optional[RequestOptions]
2235
+ Request-specific configuration.
2236
+
2237
+ Returns
2238
+ -------
2239
+ GetFoldersResponse
2240
+ Folders informations
2241
+
2242
+ Examples
2243
+ --------
2244
+ import asyncio
2245
+
2246
+ from brevo import AsyncBrevo
2247
+
2248
+ client = AsyncBrevo(
2249
+ api_key="YOUR_API_KEY",
2250
+ )
2251
+
2252
+
2253
+ async def main() -> None:
2254
+ await client.contacts.get_folders()
2255
+
2256
+
2257
+ asyncio.run(main())
2258
+ """
2259
+ _response = await self._raw_client.get_folders(
2260
+ limit=limit, offset=offset, sort=sort, request_options=request_options
2261
+ )
2262
+ return _response.data
2263
+
2264
+ async def create_folder(
2265
+ self, *, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None
2266
+ ) -> CreateFolderResponse:
2267
+ """
2268
+ Parameters
2269
+ ----------
2270
+ name : typing.Optional[str]
2271
+ Name of the folder
2272
+
2273
+ request_options : typing.Optional[RequestOptions]
2274
+ Request-specific configuration.
2275
+
2276
+ Returns
2277
+ -------
2278
+ CreateFolderResponse
2279
+ successfully created
2280
+
2281
+ Examples
2282
+ --------
2283
+ import asyncio
2284
+
2285
+ from brevo import AsyncBrevo
2286
+
2287
+ client = AsyncBrevo(
2288
+ api_key="YOUR_API_KEY",
2289
+ )
2290
+
2291
+
2292
+ async def main() -> None:
2293
+ await client.contacts.create_folder()
2294
+
2295
+
2296
+ asyncio.run(main())
2297
+ """
2298
+ _response = await self._raw_client.create_folder(name=name, request_options=request_options)
2299
+ return _response.data
2300
+
2301
+ async def get_folder(self, folder_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> GetFolder:
2302
+ """
2303
+ <Note>
2304
+ Ongoing changes for this endpoint.
2305
+
2306
+ We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
2307
+
2308
+ These are non breaking changes. The default value for the attributes will be 0.
2309
+ </Note>
2310
+
2311
+ Parameters
2312
+ ----------
2313
+ folder_id : int
2314
+ id of the folder
2315
+
2316
+ request_options : typing.Optional[RequestOptions]
2317
+ Request-specific configuration.
2318
+
2319
+ Returns
2320
+ -------
2321
+ GetFolder
2322
+ Folder details
2323
+
2324
+ Examples
2325
+ --------
2326
+ import asyncio
2327
+
2328
+ from brevo import AsyncBrevo
2329
+
2330
+ client = AsyncBrevo(
2331
+ api_key="YOUR_API_KEY",
2332
+ )
2333
+
2334
+
2335
+ async def main() -> None:
2336
+ await client.contacts.get_folder(
2337
+ folder_id=1000000,
2338
+ )
2339
+
2340
+
2341
+ asyncio.run(main())
2342
+ """
2343
+ _response = await self._raw_client.get_folder(folder_id, request_options=request_options)
2344
+ return _response.data
2345
+
2346
+ async def update_folder(
2347
+ self,
2348
+ folder_id: int,
2349
+ *,
2350
+ name: typing.Optional[str] = OMIT,
2351
+ request_options: typing.Optional[RequestOptions] = None,
2352
+ ) -> None:
2353
+ """
2354
+ Parameters
2355
+ ----------
2356
+ folder_id : int
2357
+ Id of the folder
2358
+
2359
+ name : typing.Optional[str]
2360
+ Name of the folder
2361
+
2362
+ request_options : typing.Optional[RequestOptions]
2363
+ Request-specific configuration.
2364
+
2365
+ Returns
2366
+ -------
2367
+ None
2368
+
2369
+ Examples
2370
+ --------
2371
+ import asyncio
2372
+
2373
+ from brevo import AsyncBrevo
2374
+
2375
+ client = AsyncBrevo(
2376
+ api_key="YOUR_API_KEY",
2377
+ )
2378
+
2379
+
2380
+ async def main() -> None:
2381
+ await client.contacts.update_folder(
2382
+ folder_id=1000000,
2383
+ )
2384
+
2385
+
2386
+ asyncio.run(main())
2387
+ """
2388
+ _response = await self._raw_client.update_folder(folder_id, name=name, request_options=request_options)
2389
+ return _response.data
2390
+
2391
+ async def delete_folder(self, folder_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
2392
+ """
2393
+ Parameters
2394
+ ----------
2395
+ folder_id : int
2396
+ Id of the folder
2397
+
2398
+ request_options : typing.Optional[RequestOptions]
2399
+ Request-specific configuration.
2400
+
2401
+ Returns
2402
+ -------
2403
+ None
2404
+
2405
+ Examples
2406
+ --------
2407
+ import asyncio
2408
+
2409
+ from brevo import AsyncBrevo
2410
+
2411
+ client = AsyncBrevo(
2412
+ api_key="YOUR_API_KEY",
2413
+ )
2414
+
2415
+
2416
+ async def main() -> None:
2417
+ await client.contacts.delete_folder(
2418
+ folder_id=1000000,
2419
+ )
2420
+
2421
+
2422
+ asyncio.run(main())
2423
+ """
2424
+ _response = await self._raw_client.delete_folder(folder_id, request_options=request_options)
2425
+ return _response.data
2426
+
2427
+ async def get_folder_lists(
2428
+ self,
2429
+ folder_id: int,
2430
+ *,
2431
+ limit: typing.Optional[int] = None,
2432
+ offset: typing.Optional[int] = None,
2433
+ sort: typing.Optional[GetFolderListsRequestSort] = None,
2434
+ request_options: typing.Optional[RequestOptions] = None,
2435
+ ) -> GetFolderListsResponse:
2436
+ """
2437
+ <Note>
2438
+ Ongoing changes for this endpoint.
2439
+
2440
+ We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
2441
+
2442
+ These are non breaking changes. The default value for the attributes will be 0.
2443
+ </Note>
2444
+
2445
+ Parameters
2446
+ ----------
2447
+ folder_id : int
2448
+ Id of the folder
2449
+
2450
+ limit : typing.Optional[int]
2451
+ Number of documents per page
2452
+
2453
+ offset : typing.Optional[int]
2454
+ Index of the first document of the page
2455
+
2456
+ sort : typing.Optional[GetFolderListsRequestSort]
2457
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
2458
+
2459
+ request_options : typing.Optional[RequestOptions]
2460
+ Request-specific configuration.
2461
+
2462
+ Returns
2463
+ -------
2464
+ GetFolderListsResponse
2465
+ Folder's Lists details
2466
+
2467
+ Examples
2468
+ --------
2469
+ import asyncio
2470
+
2471
+ from brevo import AsyncBrevo
2472
+
2473
+ client = AsyncBrevo(
2474
+ api_key="YOUR_API_KEY",
2475
+ )
2476
+
2477
+
2478
+ async def main() -> None:
2479
+ await client.contacts.get_folder_lists(
2480
+ folder_id=1000000,
2481
+ )
2482
+
2483
+
2484
+ asyncio.run(main())
2485
+ """
2486
+ _response = await self._raw_client.get_folder_lists(
2487
+ folder_id, limit=limit, offset=offset, sort=sort, request_options=request_options
2488
+ )
2489
+ return _response.data
2490
+
2491
+ async def import_contacts(
2492
+ self,
2493
+ *,
2494
+ disable_notification: typing.Optional[bool] = OMIT,
2495
+ email_blacklist: typing.Optional[bool] = OMIT,
2496
+ empty_contacts_attributes: typing.Optional[bool] = OMIT,
2497
+ file_body: typing.Optional[str] = OMIT,
2498
+ file_url: typing.Optional[str] = OMIT,
2499
+ json_body: typing.Optional[typing.Sequence[ImportContactsRequestJsonBodyItem]] = OMIT,
2500
+ list_ids: typing.Optional[typing.Sequence[int]] = OMIT,
2501
+ new_list: typing.Optional[ImportContactsRequestNewList] = OMIT,
2502
+ notify_url: typing.Optional[str] = OMIT,
2503
+ sms_blacklist: typing.Optional[bool] = OMIT,
2504
+ update_existing_contacts: typing.Optional[bool] = OMIT,
2505
+ request_options: typing.Optional[RequestOptions] = None,
2506
+ ) -> ImportContactsResponse:
2507
+ """
2508
+ It returns the background process ID which on completion calls the notify URL that you have set in the input. **Note**: - Any contact attribute that doesn't exist in your account will be ignored at import end.
2509
+
2510
+ Parameters
2511
+ ----------
2512
+ disable_notification : typing.Optional[bool]
2513
+ To disable email notification
2514
+
2515
+ email_blacklist : typing.Optional[bool]
2516
+ To blacklist all the contacts for email
2517
+
2518
+ empty_contacts_attributes : typing.Optional[bool]
2519
+ To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in Brevo, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( **only available if `updateExistingContacts` set to true **)
2520
+
2521
+ file_body : typing.Optional[str]
2522
+ **Mandatory if fileUrl and jsonBody is not defined.** CSV content to be imported. Use semicolon to separate multiple attributes. **Maximum allowed file body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files.
2523
+
2524
+ file_url : typing.Optional[str]
2525
+ **Mandatory if fileBody and jsonBody is not defined.** URL of the file to be imported (**no local file**). Possible file formats: #### .txt, .csv, .json
2526
+
2527
+ json_body : typing.Optional[typing.Sequence[ImportContactsRequestJsonBodyItem]]
2528
+ **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files.
2529
+
2530
+ list_ids : typing.Optional[typing.Sequence[int]]
2531
+ **Mandatory if newList is not defined.** Ids of the lists in which the contacts shall be imported. For example, **[2, 4, 7]**.
2532
+
2533
+ new_list : typing.Optional[ImportContactsRequestNewList]
2534
+ To create a new list and import the contacts into it, pass the listName and an optional folderId.
2535
+
2536
+ notify_url : typing.Optional[str]
2537
+ URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
2538
+
2539
+ sms_blacklist : typing.Optional[bool]
2540
+ To blacklist all the contacts for sms
2541
+
2542
+ update_existing_contacts : typing.Optional[bool]
2543
+ To facilitate the choice to update the existing contacts
2544
+
2545
+ request_options : typing.Optional[RequestOptions]
2546
+ Request-specific configuration.
2547
+
2548
+ Returns
2549
+ -------
2550
+ ImportContactsResponse
2551
+ process id created
2552
+
2553
+ Examples
2554
+ --------
2555
+ import asyncio
2556
+
2557
+ from brevo import AsyncBrevo
2558
+
2559
+ client = AsyncBrevo(
2560
+ api_key="YOUR_API_KEY",
2561
+ )
2562
+
2563
+
2564
+ async def main() -> None:
2565
+ await client.contacts.import_contacts()
2566
+
2567
+
2568
+ asyncio.run(main())
2569
+ """
2570
+ _response = await self._raw_client.import_contacts(
2571
+ disable_notification=disable_notification,
2572
+ email_blacklist=email_blacklist,
2573
+ empty_contacts_attributes=empty_contacts_attributes,
2574
+ file_body=file_body,
2575
+ file_url=file_url,
2576
+ json_body=json_body,
2577
+ list_ids=list_ids,
2578
+ new_list=new_list,
2579
+ notify_url=notify_url,
2580
+ sms_blacklist=sms_blacklist,
2581
+ update_existing_contacts=update_existing_contacts,
2582
+ request_options=request_options,
2583
+ )
2584
+ return _response.data
2585
+
2586
+ async def get_lists(
2587
+ self,
2588
+ *,
2589
+ limit: typing.Optional[int] = None,
2590
+ offset: typing.Optional[int] = None,
2591
+ sort: typing.Optional[GetListsRequestSort] = None,
2592
+ request_options: typing.Optional[RequestOptions] = None,
2593
+ ) -> GetListsResponse:
2594
+ """
2595
+ <Note>
2596
+ Ongoing changes for this endpoint.
2597
+
2598
+ We're dropping support for the response attributes totalSubscribers and totalBlacklisted.
2599
+
2600
+ These are non breaking changes. The default value for the attributes will be 0.
2601
+ </Note>
2602
+
2603
+ Parameters
2604
+ ----------
2605
+ limit : typing.Optional[int]
2606
+ Number of documents per page
2607
+
2608
+ offset : typing.Optional[int]
2609
+ Index of the first document of the page
2610
+
2611
+ sort : typing.Optional[GetListsRequestSort]
2612
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
2613
+
2614
+ request_options : typing.Optional[RequestOptions]
2615
+ Request-specific configuration.
2616
+
2617
+ Returns
2618
+ -------
2619
+ GetListsResponse
2620
+ Lists informations
2621
+
2622
+ Examples
2623
+ --------
2624
+ import asyncio
2625
+
2626
+ from brevo import AsyncBrevo
2627
+
2628
+ client = AsyncBrevo(
2629
+ api_key="YOUR_API_KEY",
2630
+ )
2631
+
2632
+
2633
+ async def main() -> None:
2634
+ await client.contacts.get_lists()
2635
+
2636
+
2637
+ asyncio.run(main())
2638
+ """
2639
+ _response = await self._raw_client.get_lists(
2640
+ limit=limit, offset=offset, sort=sort, request_options=request_options
2641
+ )
2642
+ return _response.data
2643
+
2644
+ async def create_list(
2645
+ self, *, folder_id: int, name: str, request_options: typing.Optional[RequestOptions] = None
2646
+ ) -> CreateListResponse:
2647
+ """
2648
+ Parameters
2649
+ ----------
2650
+ folder_id : int
2651
+ Id of the parent folder in which this list is to be created
2652
+
2653
+ name : str
2654
+ Name of the list
2655
+
2656
+ request_options : typing.Optional[RequestOptions]
2657
+ Request-specific configuration.
2658
+
2659
+ Returns
2660
+ -------
2661
+ CreateListResponse
2662
+ successfully created
2663
+
2664
+ Examples
2665
+ --------
2666
+ import asyncio
2667
+
2668
+ from brevo import AsyncBrevo
2669
+
2670
+ client = AsyncBrevo(
2671
+ api_key="YOUR_API_KEY",
2672
+ )
2673
+
2674
+
2675
+ async def main() -> None:
2676
+ await client.contacts.create_list(
2677
+ folder_id=2,
2678
+ name="Magento Customer - ES",
2679
+ )
2680
+
2681
+
2682
+ asyncio.run(main())
2683
+ """
2684
+ _response = await self._raw_client.create_list(folder_id=folder_id, name=name, request_options=request_options)
2685
+ return _response.data
2686
+
2687
+ async def get_list(
2688
+ self,
2689
+ list_id: int,
2690
+ *,
2691
+ start_date: typing.Optional[str] = None,
2692
+ end_date: typing.Optional[str] = None,
2693
+ request_options: typing.Optional[RequestOptions] = None,
2694
+ ) -> GetListResponse:
2695
+ """
2696
+ Parameters
2697
+ ----------
2698
+ list_id : int
2699
+ Id of the list
2700
+
2701
+ start_date : typing.Optional[str]
2702
+ **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result**
2703
+
2704
+ end_date : typing.Optional[str]
2705
+ **Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result**
2706
+
2707
+ request_options : typing.Optional[RequestOptions]
2708
+ Request-specific configuration.
2709
+
2710
+ Returns
2711
+ -------
2712
+ GetListResponse
2713
+ List informations
2714
+
2715
+ Examples
2716
+ --------
2717
+ import asyncio
2718
+
2719
+ from brevo import AsyncBrevo
2720
+
2721
+ client = AsyncBrevo(
2722
+ api_key="YOUR_API_KEY",
2723
+ )
2724
+
2725
+
2726
+ async def main() -> None:
2727
+ await client.contacts.get_list(
2728
+ list_id=1000000,
2729
+ )
2730
+
2731
+
2732
+ asyncio.run(main())
2733
+ """
2734
+ _response = await self._raw_client.get_list(
2735
+ list_id, start_date=start_date, end_date=end_date, request_options=request_options
2736
+ )
2737
+ return _response.data
2738
+
2739
+ async def update_list(
2740
+ self,
2741
+ list_id: int,
2742
+ *,
2743
+ folder_id: typing.Optional[int] = OMIT,
2744
+ name: typing.Optional[str] = OMIT,
2745
+ request_options: typing.Optional[RequestOptions] = None,
2746
+ ) -> None:
2747
+ """
2748
+ Parameters
2749
+ ----------
2750
+ list_id : int
2751
+ Id of the list
2752
+
2753
+ folder_id : typing.Optional[int]
2754
+ Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time.
2755
+
2756
+ name : typing.Optional[str]
2757
+ Name of the list. Either of the two parameters (name, folderId) can be updated at a time.
2758
+
2759
+ request_options : typing.Optional[RequestOptions]
2760
+ Request-specific configuration.
2761
+
2762
+ Returns
2763
+ -------
2764
+ None
2765
+
2766
+ Examples
2767
+ --------
2768
+ import asyncio
2769
+
2770
+ from brevo import AsyncBrevo
2771
+
2772
+ client = AsyncBrevo(
2773
+ api_key="YOUR_API_KEY",
2774
+ )
2775
+
2776
+
2777
+ async def main() -> None:
2778
+ await client.contacts.update_list(
2779
+ list_id=1000000,
2780
+ )
2781
+
2782
+
2783
+ asyncio.run(main())
2784
+ """
2785
+ _response = await self._raw_client.update_list(
2786
+ list_id, folder_id=folder_id, name=name, request_options=request_options
2787
+ )
2788
+ return _response.data
2789
+
2790
+ async def delete_list(self, list_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
2791
+ """
2792
+ Parameters
2793
+ ----------
2794
+ list_id : int
2795
+ Id of the list
2796
+
2797
+ request_options : typing.Optional[RequestOptions]
2798
+ Request-specific configuration.
2799
+
2800
+ Returns
2801
+ -------
2802
+ None
2803
+
2804
+ Examples
2805
+ --------
2806
+ import asyncio
2807
+
2808
+ from brevo import AsyncBrevo
2809
+
2810
+ client = AsyncBrevo(
2811
+ api_key="YOUR_API_KEY",
2812
+ )
2813
+
2814
+
2815
+ async def main() -> None:
2816
+ await client.contacts.delete_list(
2817
+ list_id=1000000,
2818
+ )
2819
+
2820
+
2821
+ asyncio.run(main())
2822
+ """
2823
+ _response = await self._raw_client.delete_list(list_id, request_options=request_options)
2824
+ return _response.data
2825
+
2826
+ async def get_contacts_from_list(
2827
+ self,
2828
+ list_id: int,
2829
+ *,
2830
+ modified_since: typing.Optional[str] = None,
2831
+ limit: typing.Optional[int] = None,
2832
+ offset: typing.Optional[int] = None,
2833
+ sort: typing.Optional[GetContactsFromListRequestSort] = None,
2834
+ request_options: typing.Optional[RequestOptions] = None,
2835
+ ) -> GetContacts:
2836
+ """
2837
+ Parameters
2838
+ ----------
2839
+ list_id : int
2840
+ Id of the list
2841
+
2842
+ modified_since : typing.Optional[str]
2843
+ Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**
2844
+
2845
+ limit : typing.Optional[int]
2846
+ Number of documents per page
2847
+
2848
+ offset : typing.Optional[int]
2849
+ Index of the first document of the page
2850
+
2851
+ sort : typing.Optional[GetContactsFromListRequestSort]
2852
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
2853
+
2854
+ request_options : typing.Optional[RequestOptions]
2855
+ Request-specific configuration.
2856
+
2857
+ Returns
2858
+ -------
2859
+ GetContacts
2860
+ Contact informations
2861
+
2862
+ Examples
2863
+ --------
2864
+ import asyncio
2865
+
2866
+ from brevo import AsyncBrevo
2867
+
2868
+ client = AsyncBrevo(
2869
+ api_key="YOUR_API_KEY",
2870
+ )
2871
+
2872
+
2873
+ async def main() -> None:
2874
+ await client.contacts.get_contacts_from_list(
2875
+ list_id=1000000,
2876
+ )
2877
+
2878
+
2879
+ asyncio.run(main())
2880
+ """
2881
+ _response = await self._raw_client.get_contacts_from_list(
2882
+ list_id,
2883
+ modified_since=modified_since,
2884
+ limit=limit,
2885
+ offset=offset,
2886
+ sort=sort,
2887
+ request_options=request_options,
2888
+ )
2889
+ return _response.data
2890
+
2891
+ async def add_contact_to_list(
2892
+ self,
2893
+ list_id: int,
2894
+ *,
2895
+ request: AddContactToListRequestBody,
2896
+ request_options: typing.Optional[RequestOptions] = None,
2897
+ ) -> PostContactInfo:
2898
+ """
2899
+ Parameters
2900
+ ----------
2901
+ list_id : int
2902
+ Id of the list
2903
+
2904
+ request : AddContactToListRequestBody
2905
+
2906
+ request_options : typing.Optional[RequestOptions]
2907
+ Request-specific configuration.
2908
+
2909
+ Returns
2910
+ -------
2911
+ PostContactInfo
2912
+ All contacts have been added successfully to the list with details of failed ones
2913
+
2914
+ Examples
2915
+ --------
2916
+ import asyncio
2917
+
2918
+ from brevo import AsyncBrevo
2919
+ from brevo.contacts import AddContactToListRequestBodyEmails
2920
+
2921
+ client = AsyncBrevo(
2922
+ api_key="YOUR_API_KEY",
2923
+ )
2924
+
2925
+
2926
+ async def main() -> None:
2927
+ await client.contacts.add_contact_to_list(
2928
+ list_id=1000000,
2929
+ request=AddContactToListRequestBodyEmails(
2930
+ emails=["jeff32@example.com", "jim56@example.com"],
2931
+ ),
2932
+ )
2933
+
2934
+
2935
+ asyncio.run(main())
2936
+ """
2937
+ _response = await self._raw_client.add_contact_to_list(
2938
+ list_id, request=request, request_options=request_options
2939
+ )
2940
+ return _response.data
2941
+
2942
+ async def remove_contact_from_list(
2943
+ self,
2944
+ list_id: int,
2945
+ *,
2946
+ request: RemoveContactFromListRequestBody,
2947
+ request_options: typing.Optional[RequestOptions] = None,
2948
+ ) -> PostContactInfo:
2949
+ """
2950
+ Parameters
2951
+ ----------
2952
+ list_id : int
2953
+ Id of the list
2954
+
2955
+ request : RemoveContactFromListRequestBody
2956
+
2957
+ request_options : typing.Optional[RequestOptions]
2958
+ Request-specific configuration.
2959
+
2960
+ Returns
2961
+ -------
2962
+ PostContactInfo
2963
+ All contacts have been removed successfully from the list with details of failed ones
2964
+
2965
+ Examples
2966
+ --------
2967
+ import asyncio
2968
+
2969
+ from brevo import AsyncBrevo
2970
+ from brevo.contacts import RemoveContactFromListRequestBodyAll
2971
+
2972
+ client = AsyncBrevo(
2973
+ api_key="YOUR_API_KEY",
2974
+ )
2975
+
2976
+
2977
+ async def main() -> None:
2978
+ await client.contacts.remove_contact_from_list(
2979
+ list_id=1000000,
2980
+ request=RemoveContactFromListRequestBodyAll(
2981
+ all_=True,
2982
+ ),
2983
+ )
2984
+
2985
+
2986
+ asyncio.run(main())
2987
+ """
2988
+ _response = await self._raw_client.remove_contact_from_list(
2989
+ list_id, request=request, request_options=request_options
2990
+ )
2991
+ return _response.data
2992
+
2993
+ async def get_segments(
2994
+ self,
2995
+ *,
2996
+ limit: typing.Optional[int] = None,
2997
+ offset: typing.Optional[int] = None,
2998
+ sort: typing.Optional[GetSegmentsRequestSort] = None,
2999
+ request_options: typing.Optional[RequestOptions] = None,
3000
+ ) -> GetSegmentsResponse:
3001
+ """
3002
+ Parameters
3003
+ ----------
3004
+ limit : typing.Optional[int]
3005
+ Number of documents per page
3006
+
3007
+ offset : typing.Optional[int]
3008
+ Index of the first document of the page
3009
+
3010
+ sort : typing.Optional[GetSegmentsRequestSort]
3011
+ Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
3012
+
3013
+ request_options : typing.Optional[RequestOptions]
3014
+ Request-specific configuration.
3015
+
3016
+ Returns
3017
+ -------
3018
+ GetSegmentsResponse
3019
+ Segments informations
3020
+
3021
+ Examples
3022
+ --------
3023
+ import asyncio
3024
+
3025
+ from brevo import AsyncBrevo
3026
+
3027
+ client = AsyncBrevo(
3028
+ api_key="YOUR_API_KEY",
3029
+ )
3030
+
3031
+
3032
+ async def main() -> None:
3033
+ await client.contacts.get_segments()
3034
+
3035
+
3036
+ asyncio.run(main())
3037
+ """
3038
+ _response = await self._raw_client.get_segments(
3039
+ limit=limit, offset=offset, sort=sort, request_options=request_options
3040
+ )
3041
+ return _response.data
3042
+
3043
+ async def get_contact_info(
3044
+ self,
3045
+ identifier: GetContactInfoRequestIdentifier,
3046
+ *,
3047
+ identifier_type: typing.Optional[GetContactInfoRequestIdentifierType] = None,
3048
+ start_date: typing.Optional[str] = None,
3049
+ end_date: typing.Optional[str] = None,
3050
+ request_options: typing.Optional[RequestOptions] = None,
3051
+ ) -> GetContactInfoResponse:
3052
+ """
3053
+ <Note title="Follow this format when passing a SMS phone number as an attribute">
3054
+ Accepted Number Formats
3055
+
3056
+ 91xxxxxxxxxx
3057
+ +91xxxxxxxxxx
3058
+ 0091xxxxxxxxxx
3059
+ </Note>
3060
+
3061
+ There are 2 ways to get a contact <br><br> Option 1- https://api.brevo.com/v3/contacts/{identifier} <br><br> Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={} <br> <br> Option 1 only works if identifierType is email_id (for EMAIL), phone_id (for SMS) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL, SMS and ID of the contact. <br><br> Option 2 works for all identifierType, use email_id for EMAIL attribute, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute <br><br>Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` endpoint with the appropriate date ranges.
3062
+
3063
+ Parameters
3064
+ ----------
3065
+ identifier : GetContactInfoRequestIdentifier
3066
+ Email (urlencoded) OR ID of the contact OR its SMS attribute value OR EXT_ID attribute (urlencoded)
3067
+
3068
+ identifier_type : typing.Optional[GetContactInfoRequestIdentifierType]
3069
+ email_id for Email, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute
3070
+
3071
+ start_date : typing.Optional[str]
3072
+ **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
3073
+
3074
+ end_date : typing.Optional[str]
3075
+ **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate.
3076
+
3077
+ request_options : typing.Optional[RequestOptions]
3078
+ Request-specific configuration.
3079
+
3080
+ Returns
3081
+ -------
3082
+ GetContactInfoResponse
3083
+ Contact informations
3084
+
3085
+ Examples
3086
+ --------
3087
+ import asyncio
3088
+
3089
+ from brevo import AsyncBrevo
3090
+
3091
+ client = AsyncBrevo(
3092
+ api_key="YOUR_API_KEY",
3093
+ )
3094
+
3095
+
3096
+ async def main() -> None:
3097
+ await client.contacts.get_contact_info(
3098
+ identifier="identifier",
3099
+ )
3100
+
3101
+
3102
+ asyncio.run(main())
3103
+ """
3104
+ _response = await self._raw_client.get_contact_info(
3105
+ identifier,
3106
+ identifier_type=identifier_type,
3107
+ start_date=start_date,
3108
+ end_date=end_date,
3109
+ request_options=request_options,
3110
+ )
3111
+ return _response.data
3112
+
3113
+ async def update_contact(
3114
+ self,
3115
+ identifier: UpdateContactRequestIdentifier,
3116
+ *,
3117
+ identifier_type: typing.Optional[UpdateContactRequestIdentifierType] = None,
3118
+ attributes: typing.Optional[typing.Dict[str, UpdateContactRequestAttributesValue]] = OMIT,
3119
+ email_blacklisted: typing.Optional[bool] = OMIT,
3120
+ ext_id: typing.Optional[str] = OMIT,
3121
+ list_ids: typing.Optional[typing.Sequence[int]] = OMIT,
3122
+ sms_blacklisted: typing.Optional[bool] = OMIT,
3123
+ smtp_blacklist_sender: typing.Optional[typing.Sequence[str]] = OMIT,
3124
+ unlink_list_ids: typing.Optional[typing.Sequence[int]] = OMIT,
3125
+ request_options: typing.Optional[RequestOptions] = None,
3126
+ ) -> None:
3127
+ """
3128
+ There are 2 ways to update a contact <br><br> Option 1- https://api.brevo.com/v3/contacts/{identifier} <br><br> Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={} <br> <br> Option 1 only works if identifierType is email_id (for EMAIL) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL and ID of the contact. <br><br> Option 2 works for all identifierType, use email_id for EMAIL attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute
3129
+
3130
+ Parameters
3131
+ ----------
3132
+ identifier : UpdateContactRequestIdentifier
3133
+ Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE attribute value
3134
+
3135
+ identifier_type : typing.Optional[UpdateContactRequestIdentifierType]
3136
+ email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE attribute
3137
+
3138
+ attributes : typing.Optional[typing.Dict[str, UpdateContactRequestAttributesValue]]
3139
+ Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, **{ "EMAIL":"newemail@domain.com", "FNAME":"Ellie", "LNAME":"Roger", "COUNTRIES":["India","China"]}**. The attribute's parameter should be passed in capital letter while updating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored .Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}**
3140
+
3141
+ email_blacklisted : typing.Optional[bool]
3142
+ Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)
3143
+
3144
+ ext_id : typing.Optional[str]
3145
+ Pass your own Id to update ext_id of a contact.
3146
+
3147
+ list_ids : typing.Optional[typing.Sequence[int]]
3148
+ Ids of the lists to add the contact to
3149
+
3150
+ sms_blacklisted : typing.Optional[bool]
3151
+ Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true)
3152
+
3153
+ smtp_blacklist_sender : typing.Optional[typing.Sequence[str]]
3154
+ transactional email forbidden sender for contact. Use only for email Contact
3155
+
3156
+ unlink_list_ids : typing.Optional[typing.Sequence[int]]
3157
+ Ids of the lists to remove the contact from
3158
+
3159
+ request_options : typing.Optional[RequestOptions]
3160
+ Request-specific configuration.
3161
+
3162
+ Returns
3163
+ -------
3164
+ None
3165
+
3166
+ Examples
3167
+ --------
3168
+ import asyncio
3169
+
3170
+ from brevo import AsyncBrevo
3171
+
3172
+ client = AsyncBrevo(
3173
+ api_key="YOUR_API_KEY",
3174
+ )
3175
+
3176
+
3177
+ async def main() -> None:
3178
+ await client.contacts.update_contact(
3179
+ identifier="identifier",
3180
+ )
3181
+
3182
+
3183
+ asyncio.run(main())
3184
+ """
3185
+ _response = await self._raw_client.update_contact(
3186
+ identifier,
3187
+ identifier_type=identifier_type,
3188
+ attributes=attributes,
3189
+ email_blacklisted=email_blacklisted,
3190
+ ext_id=ext_id,
3191
+ list_ids=list_ids,
3192
+ sms_blacklisted=sms_blacklisted,
3193
+ smtp_blacklist_sender=smtp_blacklist_sender,
3194
+ unlink_list_ids=unlink_list_ids,
3195
+ request_options=request_options,
3196
+ )
3197
+ return _response.data
3198
+
3199
+ async def delete_contact(
3200
+ self,
3201
+ identifier: DeleteContactRequestIdentifier,
3202
+ *,
3203
+ identifier_type: typing.Optional[DeleteContactRequestIdentifierType] = None,
3204
+ request_options: typing.Optional[RequestOptions] = None,
3205
+ ) -> None:
3206
+ """
3207
+ There are 2 ways to delete a contact <br><br> Option 1- https://api.brevo.com/v3/contacts/{identifier} <br><br> Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={} <br> <br> Option 1 only works if identifierType is email_id (for EMAIL) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL and ID of the contact. <br><br> Option 2 works for all identifierType, use email_id for EMAIL attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute.
3208
+
3209
+ Parameters
3210
+ ----------
3211
+ identifier : DeleteContactRequestIdentifier
3212
+ Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded)
3213
+
3214
+ identifier_type : typing.Optional[DeleteContactRequestIdentifierType]
3215
+ email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute
3216
+
3217
+ request_options : typing.Optional[RequestOptions]
3218
+ Request-specific configuration.
3219
+
3220
+ Returns
3221
+ -------
3222
+ None
3223
+
3224
+ Examples
3225
+ --------
3226
+ import asyncio
3227
+
3228
+ from brevo import AsyncBrevo
3229
+
3230
+ client = AsyncBrevo(
3231
+ api_key="YOUR_API_KEY",
3232
+ )
3233
+
3234
+
3235
+ async def main() -> None:
3236
+ await client.contacts.delete_contact(
3237
+ identifier="identifier",
3238
+ )
3239
+
3240
+
3241
+ asyncio.run(main())
3242
+ """
3243
+ _response = await self._raw_client.delete_contact(
3244
+ identifier, identifier_type=identifier_type, request_options=request_options
3245
+ )
3246
+ return _response.data
3247
+
3248
+ async def get_contact_stats(
3249
+ self,
3250
+ identifier: GetContactStatsRequestIdentifier,
3251
+ *,
3252
+ start_date: typing.Optional[str] = None,
3253
+ end_date: typing.Optional[str] = None,
3254
+ request_options: typing.Optional[RequestOptions] = None,
3255
+ ) -> GetContactStatsResponse:
3256
+ """
3257
+ Parameters
3258
+ ----------
3259
+ identifier : GetContactStatsRequestIdentifier
3260
+ Email (urlencoded) OR ID of the contact
3261
+
3262
+ start_date : typing.Optional[str]
3263
+ **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
3264
+
3265
+ end_date : typing.Optional[str]
3266
+ **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days
3267
+
3268
+ request_options : typing.Optional[RequestOptions]
3269
+ Request-specific configuration.
3270
+
3271
+ Returns
3272
+ -------
3273
+ GetContactStatsResponse
3274
+ Contact campaign statistics informations
3275
+
3276
+ Examples
3277
+ --------
3278
+ import asyncio
3279
+
3280
+ from brevo import AsyncBrevo
3281
+
3282
+ client = AsyncBrevo(
3283
+ api_key="YOUR_API_KEY",
3284
+ )
3285
+
3286
+
3287
+ async def main() -> None:
3288
+ await client.contacts.get_contact_stats(
3289
+ identifier="identifier",
3290
+ )
3291
+
3292
+
3293
+ asyncio.run(main())
3294
+ """
3295
+ _response = await self._raw_client.get_contact_stats(
3296
+ identifier, start_date=start_date, end_date=end_date, request_options=request_options
3297
+ )
3298
+ return _response.data