klaviyo-api-sdk 17.0.0 → 18.0.0

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 (201) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +932 -414
  4. data/klaviyo-api-sdk.gemspec +1 -1
  5. data/lib/klaviyo-api-sdk/api/accounts_api.rb +12 -12
  6. data/lib/klaviyo-api-sdk/api/campaigns_api.rb +215 -155
  7. data/lib/klaviyo-api-sdk/api/catalogs_api.rb +585 -381
  8. data/lib/klaviyo-api-sdk/api/client_api.rb +100 -0
  9. data/lib/klaviyo-api-sdk/api/conversations_api.rb +3 -3
  10. data/lib/klaviyo-api-sdk/api/coupons_api.rb +187 -108
  11. data/lib/klaviyo-api-sdk/api/custom_objects_api.rb +2755 -83
  12. data/lib/klaviyo-api-sdk/api/data_privacy_api.rb +3 -3
  13. data/lib/klaviyo-api-sdk/api/events_api.rb +72 -58
  14. data/lib/klaviyo-api-sdk/api/flows_api.rb +238 -152
  15. data/lib/klaviyo-api-sdk/api/forms_api.rb +81 -60
  16. data/lib/klaviyo-api-sdk/api/images_api.rb +48 -27
  17. data/lib/klaviyo-api-sdk/api/lists_api.rb +113 -88
  18. data/lib/klaviyo-api-sdk/api/metrics_api.rb +184 -156
  19. data/lib/klaviyo-api-sdk/api/profiles_api.rb +445 -226
  20. data/lib/klaviyo-api-sdk/api/reporting_api.rb +76 -27
  21. data/lib/klaviyo-api-sdk/api/reviews_api.rb +38 -31
  22. data/lib/klaviyo-api-sdk/api/segments_api.rb +107 -82
  23. data/lib/klaviyo-api-sdk/api/tags_api.rb +164 -128
  24. data/lib/klaviyo-api-sdk/api/templates_api.rb +113 -60
  25. data/lib/klaviyo-api-sdk/api/tracking_settings_api.rb +24 -17
  26. data/lib/klaviyo-api-sdk/api/web_feeds_api.rb +41 -27
  27. data/lib/klaviyo-api-sdk/api/webhooks_api.rb +73 -31
  28. data/lib/klaviyo-api-sdk/api_client.rb +1 -1
  29. data/lib/klaviyo-api-sdk/models/action_output_condition.rb +1 -1
  30. data/lib/klaviyo-api-sdk/models/action_output_condition_filter.rb +78 -195
  31. data/lib/klaviyo-api-sdk/models/action_output_split_action_data.rb +2 -6
  32. data/lib/klaviyo-api-sdk/models/{flow_push_notification_additional_filters.rb → action_output_split_action_data_action_output_filter.rb} +4 -4
  33. data/lib/klaviyo-api-sdk/models/{action_output_condition_condition_group.rb → action_output_split_action_data_action_output_filter_condition_groups_inner.rb} +3 -3
  34. data/lib/klaviyo-api-sdk/models/age_gate_properties.rb +11 -1
  35. data/lib/klaviyo-api-sdk/models/api_schema_property.rb +301 -0
  36. data/lib/klaviyo-api-sdk/models/back_in_stock_email_consent_checkbox_properties.rb +11 -1
  37. data/lib/klaviyo-api-sdk/models/base_event_create_query_bulk_entry_resource_object_attributes.rb +15 -2
  38. data/lib/klaviyo-api-sdk/models/base_style_properties.rb +15 -5
  39. data/lib/klaviyo-api-sdk/models/button_action.rb +1 -0
  40. data/lib/klaviyo-api-sdk/models/button_properties.rb +11 -1
  41. data/lib/klaviyo-api-sdk/models/button_styles.rb +25 -3
  42. data/lib/klaviyo-api-sdk/models/{action_output_condition_filter2.rb → button_styles_height.rb} +3 -7
  43. data/lib/klaviyo-api-sdk/models/cart_content.rb +277 -0
  44. data/lib/klaviyo-api-sdk/models/cart_content_properties.rb +236 -0
  45. data/lib/klaviyo-api-sdk/models/checkboxes_properties.rb +11 -1
  46. data/lib/klaviyo-api-sdk/models/conditional_branch_action_data_profile_filter_condition_groups_inner_conditions_inner.rb +5 -0
  47. data/lib/klaviyo-api-sdk/models/constant_property_mapping.rb +287 -0
  48. data/lib/klaviyo-api-sdk/models/{price_drop_condition_filter2.rb → constant_property_mapping_value.rb} +6 -16
  49. data/lib/klaviyo-api-sdk/models/content_experiment_action.rb +1 -1
  50. data/lib/klaviyo-api-sdk/models/{send_push_notification_action_content_experiment_action_data.rb → content_experiment_action_data.rb} +6 -5
  51. data/lib/klaviyo-api-sdk/models/{send_push_notification_action_current_experiment.rb → content_experiment_action_data_current_experiment.rb} +6 -6
  52. data/lib/klaviyo-api-sdk/models/{low_inventory_condition_filter2.rb → content_experiment_action_data_main_action.rb} +3 -16
  53. data/lib/klaviyo-api-sdk/models/countdown_timer_properties.rb +11 -1
  54. data/lib/klaviyo-api-sdk/models/coupon_properties.rb +11 -1
  55. data/lib/klaviyo-api-sdk/models/custom_css.rb +231 -0
  56. data/lib/klaviyo-api-sdk/models/custom_html.rb +292 -0
  57. data/lib/klaviyo-api-sdk/models/custom_html_properties.rb +263 -0
  58. data/lib/klaviyo-api-sdk/models/custom_object_date_trigger.rb +450 -0
  59. data/lib/klaviyo-api-sdk/models/custom_object_property_condition.rb +1 -1
  60. data/lib/klaviyo-api-sdk/models/custom_object_relationship_source.rb +328 -0
  61. data/lib/klaviyo-api-sdk/models/date_properties.rb +11 -1
  62. data/lib/klaviyo-api-sdk/models/display_options.rb +24 -4
  63. data/lib/klaviyo-api-sdk/models/dropdown_properties.rb +11 -1
  64. data/lib/klaviyo-api-sdk/models/email_properties.rb +11 -1
  65. data/lib/klaviyo-api-sdk/models/email_subscription_parameters.rb +13 -9
  66. data/lib/klaviyo-api-sdk/models/email_unsubscription_parameters.rb +13 -9
  67. data/lib/klaviyo-api-sdk/models/embedded_object_schema_resource_object.rb +237 -0
  68. data/lib/klaviyo-api-sdk/models/embedded_object_schema_resource_object_attributes.rb +292 -0
  69. data/lib/klaviyo-api-sdk/models/embedded_object_schema_resource_object_attributes_source_mapping.rb +224 -0
  70. data/lib/klaviyo-api-sdk/models/event_create_query_v2_resource_object_attributes.rb +15 -2
  71. data/lib/klaviyo-api-sdk/models/events_bulk_create_query_resource_object_attributes.rb +14 -1
  72. data/lib/klaviyo-api-sdk/models/flow_definition_profile_filter_condition_groups_inner_conditions_inner.rb +5 -0
  73. data/lib/klaviyo-api-sdk/models/flow_definition_triggers_inner.rb +1 -0
  74. data/lib/klaviyo-api-sdk/models/flow_email.rb +1 -1
  75. data/lib/klaviyo-api-sdk/models/flow_push_notification.rb +14 -4
  76. data/lib/klaviyo-api-sdk/models/flow_sms.rb +15 -2
  77. data/lib/klaviyo-api-sdk/models/form_create_query_resource_object_attributes.rb +2 -2
  78. data/lib/klaviyo-api-sdk/models/html_text_properties.rb +11 -1
  79. data/lib/klaviyo-api-sdk/models/iaf_deeplink_to_screen.rb +305 -0
  80. data/lib/klaviyo-api-sdk/models/iaf_deeplink_to_screen_properties.rb +220 -0
  81. data/lib/klaviyo-api-sdk/models/image_action.rb +1 -0
  82. data/lib/klaviyo-api-sdk/models/image_block_cropping_properties.rb +0 -35
  83. data/lib/klaviyo-api-sdk/models/image_properties.rb +11 -1
  84. data/lib/klaviyo-api-sdk/models/low_inventory_condition.rb +1 -1
  85. data/lib/klaviyo-api-sdk/models/low_inventory_trigger.rb +2 -6
  86. data/lib/klaviyo-api-sdk/models/{low_inventory_condition_filter.rb → low_inventory_trigger_trigger_filter.rb} +4 -4
  87. data/lib/klaviyo-api-sdk/models/{low_inventory_condition_condition_group.rb → low_inventory_trigger_trigger_filter_condition_groups_inner.rb} +3 -3
  88. data/lib/klaviyo-api-sdk/models/metric_aggregate_query_resource_object_attributes.rb +2 -2
  89. data/lib/klaviyo-api-sdk/models/metric_property_condition.rb +1 -1
  90. data/lib/klaviyo-api-sdk/models/metric_property_condition_filter.rb +87 -195
  91. data/lib/klaviyo-api-sdk/models/metric_trigger.rb +2 -1
  92. data/lib/klaviyo-api-sdk/models/{flow_email_additional_filters.rb → metric_trigger_trigger_filter.rb} +4 -4
  93. data/lib/klaviyo-api-sdk/models/{flow_email_additional_filters_condition_groups_inner.rb → metric_trigger_trigger_filter_condition_groups_inner.rb} +4 -4
  94. data/lib/klaviyo-api-sdk/models/mobile_push_content_create.rb +18 -5
  95. data/lib/klaviyo-api-sdk/models/mobile_push_content_update.rb +18 -5
  96. data/lib/klaviyo-api-sdk/models/mobile_push_options_on_open.rb +2 -1
  97. data/lib/klaviyo-api-sdk/models/multi_branch_split_branch_branch_filter_condition_groups_inner_conditions_inner.rb +5 -0
  98. data/lib/klaviyo-api-sdk/models/object_record_bulk_delete_job_enum.rb +35 -0
  99. data/lib/klaviyo-api-sdk/models/object_record_delete_job_create_query.rb +223 -0
  100. data/lib/klaviyo-api-sdk/models/object_record_delete_job_create_query_resource_object.rb +237 -0
  101. data/lib/klaviyo-api-sdk/models/{flow_push_notification_additional_filters_condition_groups_inner.rb → object_record_delete_job_create_query_resource_object_relationships.rb} +13 -15
  102. data/lib/klaviyo-api-sdk/models/object_record_delete_job_create_query_resource_object_relationships_object_records.rb +220 -0
  103. data/lib/klaviyo-api-sdk/models/object_record_delete_job_rels_records_data_inner.rb +238 -0
  104. data/lib/klaviyo-api-sdk/models/object_record_enum.rb +35 -0
  105. data/lib/klaviyo-api-sdk/models/object_schema_create_query.rb +223 -0
  106. data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object.rb +246 -0
  107. data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object_attributes.rb +322 -0
  108. data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object_relationships.rb +218 -0
  109. data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object_relationships_object_type.rb +218 -0
  110. data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object_relationships_object_type_data.rb +238 -0
  111. data/lib/klaviyo-api-sdk/models/object_schema_enum.rb +35 -0
  112. data/lib/klaviyo-api-sdk/models/object_schema_partial_update_query.rb +223 -0
  113. data/lib/klaviyo-api-sdk/models/object_schema_partial_update_query_resource_object.rb +252 -0
  114. data/lib/klaviyo-api-sdk/models/object_schema_partial_update_query_resource_object_attributes.rb +302 -0
  115. data/lib/klaviyo-api-sdk/models/object_schema_relationship_create_meta.rb +237 -0
  116. data/lib/klaviyo-api-sdk/models/{metric_property_condition_condition_group.rb → object_schema_relationship_create_query.rb} +14 -14
  117. data/lib/klaviyo-api-sdk/models/{flow_sms_additional_filters_condition_groups_inner.rb → object_schema_relationship_create_query_data_inner.rb} +37 -15
  118. data/lib/klaviyo-api-sdk/models/object_schema_relationship_delete_meta.rb +224 -0
  119. data/lib/klaviyo-api-sdk/models/object_schema_relationship_delete_query.rb +225 -0
  120. data/lib/klaviyo-api-sdk/models/object_schema_relationship_delete_query_data_inner.rb +247 -0
  121. data/lib/klaviyo-api-sdk/models/object_schema_relationship_partial_update_query.rb +223 -0
  122. data/lib/klaviyo-api-sdk/models/object_schema_relationship_partial_update_query_data.rb +247 -0
  123. data/lib/klaviyo-api-sdk/models/object_schema_relationship_update_meta.rb +246 -0
  124. data/lib/klaviyo-api-sdk/models/object_type_create_query.rb +223 -0
  125. data/lib/klaviyo-api-sdk/models/object_type_create_query_resource_object.rb +237 -0
  126. data/lib/klaviyo-api-sdk/models/object_type_create_query_resource_object_attributes.rb +307 -0
  127. data/lib/klaviyo-api-sdk/models/object_type_create_query_resource_object_attributes_object_schema.rb +224 -0
  128. data/lib/klaviyo-api-sdk/models/object_type_enum.rb +35 -0
  129. data/lib/klaviyo-api-sdk/models/onsite_profile_meta.rb +13 -4
  130. data/lib/klaviyo-api-sdk/models/open_tracking_subscription_parameters.rb +258 -0
  131. data/lib/klaviyo-api-sdk/models/open_tracking_unsubscription_parameters.rb +258 -0
  132. data/lib/klaviyo-api-sdk/models/opt_in_code_properties.rb +11 -1
  133. data/lib/klaviyo-api-sdk/models/patch_identifiers.rb +227 -0
  134. data/lib/klaviyo-api-sdk/models/phone_number_properties.rb +11 -1
  135. data/lib/klaviyo-api-sdk/models/price_drop_condition.rb +1 -1
  136. data/lib/klaviyo-api-sdk/models/price_drop_trigger.rb +2 -6
  137. data/lib/klaviyo-api-sdk/models/{flow_sms_additional_filters.rb → price_drop_trigger_trigger_filter.rb} +4 -4
  138. data/lib/klaviyo-api-sdk/models/{price_drop_condition_condition_group.rb → price_drop_trigger_trigger_filter_condition_groups_inner.rb} +3 -3
  139. data/lib/klaviyo-api-sdk/models/profile_event_tracked_properties.rb +19 -9
  140. data/lib/klaviyo-api-sdk/models/profile_has_not_received_email_message_condition.rb +1 -1
  141. data/lib/klaviyo-api-sdk/models/{profile_has_not_received_push_message_condition_timeframe_filter.rb → profile_has_not_received_email_message_condition_timeframe_filter.rb} +1 -1
  142. data/lib/klaviyo-api-sdk/models/profile_has_not_received_push_message_condition.rb +1 -1
  143. data/lib/klaviyo-api-sdk/models/profile_has_not_received_sms_message_condition.rb +1 -1
  144. data/lib/klaviyo-api-sdk/models/profile_meta.rb +13 -4
  145. data/lib/klaviyo-api-sdk/models/profile_not_in_flow_condition.rb +1 -1
  146. data/lib/klaviyo-api-sdk/models/profile_object_schema_enum.rb +35 -0
  147. data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_create_query.rb +225 -0
  148. data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_create_query_data_inner.rb +247 -0
  149. data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_delete_query.rb +225 -0
  150. data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_delete_query_data_inner.rb +247 -0
  151. data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_partial_update_query.rb +223 -0
  152. data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_partial_update_query_data.rb +247 -0
  153. data/lib/klaviyo-api-sdk/models/profile_predictive_analytics_channel_affinity_priority_condition.rb +2 -2
  154. data/lib/klaviyo-api-sdk/models/profile_predictive_analytics_channel_affinity_rank_condition.rb +2 -2
  155. data/lib/klaviyo-api-sdk/models/profile_relationship_source.rb +330 -0
  156. data/lib/klaviyo-api-sdk/models/property_filter.rb +237 -0
  157. data/lib/klaviyo-api-sdk/models/property_source.rb +254 -0
  158. data/lib/klaviyo-api-sdk/models/push_action_button.rb +1 -5
  159. data/lib/klaviyo-api-sdk/models/push_action_button_definition.rb +261 -0
  160. data/lib/klaviyo-api-sdk/models/push_on_open_web_url.rb +268 -0
  161. data/lib/klaviyo-api-sdk/models/quote_style.rb +21 -1
  162. data/lib/klaviyo-api-sdk/models/radio_buttons_properties.rb +11 -1
  163. data/lib/klaviyo-api-sdk/models/redirect_properties.rb +2 -5
  164. data/lib/klaviyo-api-sdk/models/related_id_path.rb +273 -0
  165. data/lib/klaviyo-api-sdk/models/review_block_styles.rb +13 -13
  166. data/lib/klaviyo-api-sdk/models/review_properties.rb +11 -1
  167. data/lib/klaviyo-api-sdk/models/reviewer_name_style.rb +21 -1
  168. data/lib/klaviyo-api-sdk/models/row_v0_blocks_inner.rb +1 -0
  169. data/lib/klaviyo-api-sdk/models/signup_counter_properties.rb +11 -1
  170. data/lib/klaviyo-api-sdk/models/simple_property_mapping.rb +287 -0
  171. data/lib/klaviyo-api-sdk/models/simple_relationship_mapping.rb +287 -0
  172. data/lib/klaviyo-api-sdk/models/simple_relationship_mapping_source.rb +105 -0
  173. data/lib/klaviyo-api-sdk/models/sms_consent_checkbox_properties.rb +11 -1
  174. data/lib/klaviyo-api-sdk/models/sms_disclosure_link_text_style.rb +319 -0
  175. data/lib/klaviyo-api-sdk/models/sms_disclosure_properties.rb +11 -1
  176. data/lib/klaviyo-api-sdk/models/sms_disclosure_styles.rb +1 -1
  177. data/lib/klaviyo-api-sdk/models/source_mapping_create_query_resource_object.rb +237 -0
  178. data/lib/klaviyo-api-sdk/models/source_mapping_create_query_resource_object_attributes.rb +235 -0
  179. data/lib/klaviyo-api-sdk/models/source_mapping_create_query_resource_object_attributes_property_mappings_inner.rb +104 -0
  180. data/lib/klaviyo-api-sdk/models/source_mapping_enum.rb +35 -0
  181. data/lib/klaviyo-api-sdk/models/source_mapping_partial_update_query.rb +223 -0
  182. data/lib/klaviyo-api-sdk/models/source_mapping_partial_update_query_resource_object.rb +252 -0
  183. data/lib/klaviyo-api-sdk/models/spin_to_win_properties.rb +11 -1
  184. data/lib/klaviyo-api-sdk/models/string_phone_operator_string_array_filter.rb +1 -1
  185. data/lib/klaviyo-api-sdk/models/table_fallback_image_sub_block.rb +0 -13
  186. data/lib/klaviyo-api-sdk/models/table_image_sub_block.rb +0 -13
  187. data/lib/klaviyo-api-sdk/models/template_definition.rb +1 -0
  188. data/lib/klaviyo-api-sdk/models/text_properties.rb +11 -1
  189. data/lib/klaviyo-api-sdk/models/version.rb +39 -4
  190. data/lib/klaviyo-api-sdk/models/version_properties.rb +14 -4
  191. data/lib/klaviyo-api-sdk/models/version_styles.rb +15 -6
  192. data/lib/klaviyo-api-sdk/models/version_triggers_inner.rb +1 -0
  193. data/lib/klaviyo-api-sdk.rb +86 -23
  194. data/lib/klaviyo-api-sdk.rb.bak +87 -24
  195. metadata +88 -25
  196. data/lib/klaviyo-api-sdk/models/custom_object_property_condition_filter.rb +0 -117
  197. data/lib/klaviyo-api-sdk/models/flow_email_additional_filters_condition_groups_inner_conditions_inner.rb +0 -116
  198. data/lib/klaviyo-api-sdk/models/flow_push_notification_additional_filters_condition_groups_inner_conditions_inner.rb +0 -116
  199. data/lib/klaviyo-api-sdk/models/flow_sms_additional_filters_condition_groups_inner_conditions_inner.rb +0 -116
  200. data/lib/klaviyo-api-sdk/models/metric_property_condition_filter2.rb +0 -117
  201. data/lib/klaviyo-api-sdk/models/price_drop_condition_filter.rb +0 -225
@@ -19,9 +19,10 @@ module KlaviyoAPI
19
19
  @api_client = api_client
20
20
  end
21
21
  # Clone Template
22
- # Create a clone of a template with the given template ID. If there are 1,000 or more templates in an account, cloning will fail as there is a limit of 1,000 templates that can be created via the API.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write`
22
+ # Create a clone of a template with the given template ID. If there are 1,000 or more templates in an account, cloning will fail as there is a limit of 1,000 templates that can be created via the API.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write` [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/clone_template.json)
23
23
  # @param template_clone_query [TemplateCloneQuery]
24
24
  # @param [Hash] opts the optional parameters
25
+ # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
25
26
  # @return [Hash<String, Object>]
26
27
  def clone_template(template_clone_query, opts = {})
27
28
  data, _status_code, _headers = clone_template_with_http_info(template_clone_query, opts)
@@ -32,9 +33,10 @@ module KlaviyoAPI
32
33
  alias create_template_clone clone_template
33
34
 
34
35
  # Clone Template
35
- # Create a clone of a template with the given template ID. If there are 1,000 or more templates in an account, cloning will fail as there is a limit of 1,000 templates that can be created via the API.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60;
36
+ # Create a clone of a template with the given template ID. If there are 1,000 or more templates in an account, cloning will fail as there is a limit of 1,000 templates that can be created via the API.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60; [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/clone_template.json)
36
37
  # @param template_clone_query [TemplateCloneQuery]
37
38
  # @param [Hash] opts the optional parameters
39
+ # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
38
40
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
39
41
  def clone_template_with_http_info(template_clone_query, opts = {})
40
42
  if @api_client.config.debugging
@@ -44,16 +46,21 @@ module KlaviyoAPI
44
46
  if @api_client.config.client_side_validation && template_clone_query.nil?
45
47
  fail ArgumentError, "Missing the required parameter 'template_clone_query' when calling TemplatesApi.clone_template"
46
48
  end
49
+ allowable_values = ["amp", "created", "editor_type", "html", "id", "name", "text", "updated"]
50
+ if @api_client.config.client_side_validation && opts[:'fields_template'] && !opts[:'fields_template'].all? { |item| allowable_values.include?(item) }
51
+ fail ArgumentError, "invalid value for \"fields_template\", must include one of #{allowable_values}"
52
+ end
47
53
  # resource path
48
54
  local_var_path = '/api/template-clone'
49
55
 
50
56
  # query parameters
51
57
  query_params = opts[:query_params] || {}
58
+ query_params[:'fields[template]'] = @api_client.build_collection_param(opts[:'fields_template'], :csv) if !opts[:'fields_template'].nil?
52
59
 
53
60
  # header parameters
54
61
  header_params = opts[:header_params] || {}
55
62
  # klaviyo api revision
56
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-04-15"
63
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-07-15"
57
64
  # HTTP header 'Accept' (if needed)
58
65
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
59
66
  # HTTP header 'Content-Type'
@@ -95,10 +102,11 @@ module KlaviyoAPI
95
102
  alias create_template_clone_with_http_info clone_template_with_http_info
96
103
 
97
104
  # Create Template
98
- # Create a new HTML or drag-and-drop template. If there are 1,000 or more templates in an account, creation will fail as there is a limit of 1,000 templates that can be created via the API. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets).<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write`
105
+ # Create a new HTML or drag-and-drop template. If there are 1,000 or more templates in an account, creation will fail as there is a limit of 1,000 templates that can be created via the API. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets).<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write` [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/create_template.json)
99
106
  # @param template_create_html_or_dnd_query [TemplateCreateHtmlOrDndQuery]
100
107
  # @param [Hash] opts the optional parameters
101
108
  # @option opts [Array<String>] :additional_fields_template Request additional fields not included by default in the response. Supported values: &#39;definition&#39;
109
+ # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
102
110
  # @return [Hash<String, Object>]
103
111
  def create_template(template_create_html_or_dnd_query, opts = {})
104
112
  data, _status_code, _headers = create_template_with_http_info(template_create_html_or_dnd_query, opts)
@@ -106,10 +114,11 @@ module KlaviyoAPI
106
114
  end
107
115
 
108
116
  # Create Template
109
- # Create a new HTML or drag-and-drop template. If there are 1,000 or more templates in an account, creation will fail as there is a limit of 1,000 templates that can be created via the API. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60;
117
+ # Create a new HTML or drag-and-drop template. If there are 1,000 or more templates in an account, creation will fail as there is a limit of 1,000 templates that can be created via the API. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60; [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/create_template.json)
110
118
  # @param template_create_html_or_dnd_query [TemplateCreateHtmlOrDndQuery]
111
119
  # @param [Hash] opts the optional parameters
112
120
  # @option opts [Array<String>] :additional_fields_template Request additional fields not included by default in the response. Supported values: &#39;definition&#39;
121
+ # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
113
122
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
114
123
  def create_template_with_http_info(template_create_html_or_dnd_query, opts = {})
115
124
  if @api_client.config.debugging
@@ -123,17 +132,22 @@ module KlaviyoAPI
123
132
  if @api_client.config.client_side_validation && opts[:'additional_fields_template'] && !opts[:'additional_fields_template'].all? { |item| allowable_values.include?(item) }
124
133
  fail ArgumentError, "invalid value for \"additional_fields_template\", must include one of #{allowable_values}"
125
134
  end
135
+ allowable_values = ["amp", "created", "definition", "definition.body", "definition.body.id", "definition.body.properties", "definition.body.properties.css_class", "definition.body.properties.id", "definition.body.sections", "definition.body.styles", "definition.body.styles.background_color", "definition.body.styles.width", "definition.id", "definition.styles", "definition.template_id", "editor_type", "html", "id", "name", "text", "updated"]
136
+ if @api_client.config.client_side_validation && opts[:'fields_template'] && !opts[:'fields_template'].all? { |item| allowable_values.include?(item) }
137
+ fail ArgumentError, "invalid value for \"fields_template\", must include one of #{allowable_values}"
138
+ end
126
139
  # resource path
127
140
  local_var_path = '/api/templates'
128
141
 
129
142
  # query parameters
130
143
  query_params = opts[:query_params] || {}
131
144
  query_params[:'additional-fields[template]'] = @api_client.build_collection_param(opts[:'additional_fields_template'], :csv) if !opts[:'additional_fields_template'].nil?
145
+ query_params[:'fields[template]'] = @api_client.build_collection_param(opts[:'fields_template'], :csv) if !opts[:'fields_template'].nil?
132
146
 
133
147
  # header parameters
134
148
  header_params = opts[:header_params] || {}
135
149
  # klaviyo api revision
136
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-04-15"
150
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-07-15"
137
151
  # HTTP header 'Accept' (if needed)
138
152
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
139
153
  # HTTP header 'Content-Type'
@@ -172,9 +186,10 @@ module KlaviyoAPI
172
186
  end
173
187
 
174
188
  # Create Universal Content
175
- # Create universal content. Currently supported block types are: `button`, `drop_shadow`, `horizontal_rule`, `html`, `image`, `spacer`, and `text`.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write`
189
+ # Create universal content. Currently supported block types are: `button`, `drop_shadow`, `horizontal_rule`, `html`, `image`, `spacer`, and `text`.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write` [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/create_universal_content.json)
176
190
  # @param universal_content_create_query [UniversalContentCreateQuery] Create a template universal content
177
191
  # @param [Hash] opts the optional parameters
192
+ # @option opts [Array<String>] :fields_template_universal_content For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
178
193
  # @return [Hash<String, Object>]
179
194
  def create_universal_content(universal_content_create_query, opts = {})
180
195
  data, _status_code, _headers = create_universal_content_with_http_info(universal_content_create_query, opts)
@@ -185,9 +200,10 @@ module KlaviyoAPI
185
200
  alias create_template_universal_content create_universal_content
186
201
 
187
202
  # Create Universal Content
188
- # Create universal content. Currently supported block types are: &#x60;button&#x60;, &#x60;drop_shadow&#x60;, &#x60;horizontal_rule&#x60;, &#x60;html&#x60;, &#x60;image&#x60;, &#x60;spacer&#x60;, and &#x60;text&#x60;.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60;
203
+ # Create universal content. Currently supported block types are: &#x60;button&#x60;, &#x60;drop_shadow&#x60;, &#x60;horizontal_rule&#x60;, &#x60;html&#x60;, &#x60;image&#x60;, &#x60;spacer&#x60;, and &#x60;text&#x60;.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60; [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/create_universal_content.json)
189
204
  # @param universal_content_create_query [UniversalContentCreateQuery] Create a template universal content
190
205
  # @param [Hash] opts the optional parameters
206
+ # @option opts [Array<String>] :fields_template_universal_content For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
191
207
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
192
208
  def create_universal_content_with_http_info(universal_content_create_query, opts = {})
193
209
  if @api_client.config.debugging
@@ -197,16 +213,21 @@ module KlaviyoAPI
197
213
  if @api_client.config.client_side_validation && universal_content_create_query.nil?
198
214
  fail ArgumentError, "Missing the required parameter 'universal_content_create_query' when calling TemplatesApi.create_universal_content"
199
215
  end
216
+ allowable_values = ["created", "definition", "definition.content_type", "definition.data", "definition.data.content", "definition.data.display_options", "definition.data.display_options.content_repeat", "definition.data.display_options.content_repeat.item_alias", "definition.data.display_options.content_repeat.repeat_for", "definition.data.display_options.show_on", "definition.data.display_options.visible_check", "definition.data.styles", "definition.data.styles.background_color", "definition.data.styles.block_background_color", "definition.data.styles.block_border_color", "definition.data.styles.block_border_style", "definition.data.styles.block_border_width", "definition.data.styles.block_padding_bottom", "definition.data.styles.block_padding_left", "definition.data.styles.block_padding_right", "definition.data.styles.block_padding_top", "definition.data.styles.color", "definition.data.styles.extra_css_class", "definition.data.styles.font_family", "definition.data.styles.font_size", "definition.data.styles.font_style", "definition.data.styles.font_weight", "definition.data.styles.inner_padding_bottom", "definition.data.styles.inner_padding_left", "definition.data.styles.inner_padding_right", "definition.data.styles.inner_padding_top", "definition.data.styles.letter_spacing", "definition.data.styles.line_height", "definition.data.styles.mobile_stretch_content", "definition.data.styles.text_align", "definition.data.styles.text_decoration", "definition.data.styles.text_table_layout", "definition.type", "id", "name", "screenshot_status", "screenshot_url", "updated"]
217
+ if @api_client.config.client_side_validation && opts[:'fields_template_universal_content'] && !opts[:'fields_template_universal_content'].all? { |item| allowable_values.include?(item) }
218
+ fail ArgumentError, "invalid value for \"fields_template_universal_content\", must include one of #{allowable_values}"
219
+ end
200
220
  # resource path
201
221
  local_var_path = '/api/template-universal-content'
202
222
 
203
223
  # query parameters
204
224
  query_params = opts[:query_params] || {}
225
+ query_params[:'fields[template-universal-content]'] = @api_client.build_collection_param(opts[:'fields_template_universal_content'], :csv) if !opts[:'fields_template_universal_content'].nil?
205
226
 
206
227
  # header parameters
207
228
  header_params = opts[:header_params] || {}
208
229
  # klaviyo api revision
209
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-04-15"
230
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-07-15"
210
231
  # HTTP header 'Accept' (if needed)
211
232
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
212
233
  # HTTP header 'Content-Type'
@@ -248,7 +269,7 @@ module KlaviyoAPI
248
269
  alias create_template_universal_content_with_http_info create_universal_content_with_http_info
249
270
 
250
271
  # Delete Template
251
- # Delete a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write`
272
+ # Delete a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write` [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/delete_template.json)
252
273
  # @param id [String] The ID of template
253
274
  # @param [Hash] opts the optional parameters
254
275
  # @return [nil]
@@ -258,7 +279,7 @@ module KlaviyoAPI
258
279
  end
259
280
 
260
281
  # Delete Template
261
- # Delete a template with the given template ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60;
282
+ # Delete a template with the given template ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60; [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/delete_template.json)
262
283
  # @param id [String] The ID of template
263
284
  # @param [Hash] opts the optional parameters
264
285
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -279,7 +300,7 @@ module KlaviyoAPI
279
300
  # header parameters
280
301
  header_params = opts[:header_params] || {}
281
302
  # klaviyo api revision
282
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-04-15"
303
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-07-15"
283
304
  # HTTP header 'Accept' (if needed)
284
305
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
285
306
 
@@ -313,7 +334,7 @@ module KlaviyoAPI
313
334
  end
314
335
 
315
336
  # Delete Universal Content
316
- # Delete the universal content with the given ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write`
337
+ # Delete the universal content with the given ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write` [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/delete_universal_content.json)
317
338
  # @param id [String] The ID of the template universal content
318
339
  # @param [Hash] opts the optional parameters
319
340
  # @return [nil]
@@ -326,7 +347,7 @@ module KlaviyoAPI
326
347
  alias delete_template_universal_content delete_universal_content
327
348
 
328
349
  # Delete Universal Content
329
- # Delete the universal content with the given ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60;
350
+ # Delete the universal content with the given ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60; [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/delete_universal_content.json)
330
351
  # @param id [String] The ID of the template universal content
331
352
  # @param [Hash] opts the optional parameters
332
353
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -347,7 +368,7 @@ module KlaviyoAPI
347
368
  # header parameters
348
369
  header_params = opts[:header_params] || {}
349
370
  # klaviyo api revision
350
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-04-15"
371
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-07-15"
351
372
  # HTTP header 'Accept' (if needed)
352
373
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
353
374
 
@@ -384,13 +405,13 @@ module KlaviyoAPI
384
405
  alias delete_template_universal_content_with_http_info delete_universal_content_with_http_info
385
406
 
386
407
  # Get All Universal Content
387
- # Get all universal content in an account.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:read`
408
+ # Get all universal content in an account.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:read` [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_all_universal_content.json)
388
409
  # @param [Hash] opts the optional parameters
389
- # @option opts [Array<String>] :fields_template_universal_content For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
390
- # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;id&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;name&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;created&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;&lt;br&gt;&#x60;updated&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;&lt;br&gt;&#x60;definition.content_type&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;definition.type&#x60;: &#x60;equals&#x60;
391
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#pagination
410
+ # @option opts [Array<String>] :fields_template_universal_content For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
411
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;id&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;name&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;created&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;&lt;br&gt;&#x60;updated&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;&lt;br&gt;&#x60;definition.content_type&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;definition.type&#x60;: &#x60;equals&#x60;
412
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#pagination
392
413
  # @option opts [Integer] :page_size Default: 20. Min: 1. Max: 100. (default to 20)
393
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sorting
414
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sorting
394
415
  # @return [Hash<String, Object>]
395
416
  def get_all_universal_content(opts = {})
396
417
  data, _status_code, _headers = get_all_universal_content_with_http_info(opts)
@@ -401,19 +422,19 @@ module KlaviyoAPI
401
422
  alias get_template_universal_content get_all_universal_content
402
423
 
403
424
  # Get All Universal Content
404
- # Get all universal content in an account.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:read&#x60;
425
+ # Get all universal content in an account.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:read&#x60; [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_all_universal_content.json)
405
426
  # @param [Hash] opts the optional parameters
406
- # @option opts [Array<String>] :fields_template_universal_content For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
407
- # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;id&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;name&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;created&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;&lt;br&gt;&#x60;updated&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;&lt;br&gt;&#x60;definition.content_type&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;definition.type&#x60;: &#x60;equals&#x60;
408
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#pagination
427
+ # @option opts [Array<String>] :fields_template_universal_content For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
428
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;id&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;name&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;created&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;&lt;br&gt;&#x60;updated&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;&lt;br&gt;&#x60;definition.content_type&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;definition.type&#x60;: &#x60;equals&#x60;
429
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#pagination
409
430
  # @option opts [Integer] :page_size Default: 20. Min: 1. Max: 100. (default to 20)
410
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sorting
431
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sorting
411
432
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
412
433
  def get_all_universal_content_with_http_info(opts = {})
413
434
  if @api_client.config.debugging
414
435
  @api_client.config.logger.debug 'Calling API: TemplatesApi.get_all_universal_content ...'
415
436
  end
416
- allowable_values = ["created", "definition", "definition.content_type", "definition.data", "definition.data.content", "definition.data.display_options", "definition.data.display_options.content_repeat", "definition.data.display_options.content_repeat.item_alias", "definition.data.display_options.content_repeat.repeat_for", "definition.data.display_options.show_on", "definition.data.display_options.visible_check", "definition.data.styles", "definition.data.styles.background_color", "definition.data.styles.block_background_color", "definition.data.styles.block_border_color", "definition.data.styles.block_border_style", "definition.data.styles.block_border_width", "definition.data.styles.block_padding_bottom", "definition.data.styles.block_padding_left", "definition.data.styles.block_padding_right", "definition.data.styles.block_padding_top", "definition.data.styles.color", "definition.data.styles.extra_css_class", "definition.data.styles.font_family", "definition.data.styles.font_size", "definition.data.styles.font_style", "definition.data.styles.font_weight", "definition.data.styles.inner_padding_bottom", "definition.data.styles.inner_padding_left", "definition.data.styles.inner_padding_right", "definition.data.styles.inner_padding_top", "definition.data.styles.letter_spacing", "definition.data.styles.line_height", "definition.data.styles.mobile_stretch_content", "definition.data.styles.text_align", "definition.data.styles.text_decoration", "definition.data.styles.text_table_layout", "definition.type", "name", "screenshot_status", "screenshot_url", "updated"]
437
+ allowable_values = ["created", "definition", "definition.content_type", "definition.data", "definition.data.content", "definition.data.display_options", "definition.data.display_options.content_repeat", "definition.data.display_options.content_repeat.item_alias", "definition.data.display_options.content_repeat.repeat_for", "definition.data.display_options.show_on", "definition.data.display_options.visible_check", "definition.data.styles", "definition.data.styles.background_color", "definition.data.styles.block_background_color", "definition.data.styles.block_border_color", "definition.data.styles.block_border_style", "definition.data.styles.block_border_width", "definition.data.styles.block_padding_bottom", "definition.data.styles.block_padding_left", "definition.data.styles.block_padding_right", "definition.data.styles.block_padding_top", "definition.data.styles.color", "definition.data.styles.extra_css_class", "definition.data.styles.font_family", "definition.data.styles.font_size", "definition.data.styles.font_style", "definition.data.styles.font_weight", "definition.data.styles.inner_padding_bottom", "definition.data.styles.inner_padding_left", "definition.data.styles.inner_padding_right", "definition.data.styles.inner_padding_top", "definition.data.styles.letter_spacing", "definition.data.styles.line_height", "definition.data.styles.mobile_stretch_content", "definition.data.styles.text_align", "definition.data.styles.text_decoration", "definition.data.styles.text_table_layout", "definition.type", "id", "name", "screenshot_status", "screenshot_url", "updated"]
417
438
  if @api_client.config.client_side_validation && opts[:'fields_template_universal_content'] && !opts[:'fields_template_universal_content'].all? { |item| allowable_values.include?(item) }
418
439
  fail ArgumentError, "invalid value for \"fields_template_universal_content\", must include one of #{allowable_values}"
419
440
  end
@@ -443,7 +464,7 @@ module KlaviyoAPI
443
464
  # header parameters
444
465
  header_params = opts[:header_params] || {}
445
466
  # klaviyo api revision
446
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-04-15"
467
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-07-15"
447
468
  # HTTP header 'Accept' (if needed)
448
469
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
449
470
 
@@ -480,11 +501,11 @@ module KlaviyoAPI
480
501
  alias get_template_universal_content_with_http_info get_all_universal_content_with_http_info
481
502
 
482
503
  # Get Template
483
- # Get a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:read`
504
+ # Get a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:read` [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_template.json)
484
505
  # @param id [String] The ID of template
485
506
  # @param [Hash] opts the optional parameters
486
507
  # @option opts [Array<String>] :additional_fields_template Request additional fields not included by default in the response. Supported values: &#39;definition&#39;
487
- # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
508
+ # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
488
509
  # @return [Hash<String, Object>]
489
510
  def get_template(id, opts = {})
490
511
  data, _status_code, _headers = get_template_with_http_info(id, opts)
@@ -492,11 +513,11 @@ module KlaviyoAPI
492
513
  end
493
514
 
494
515
  # Get Template
495
- # Get a template with the given template ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:read&#x60;
516
+ # Get a template with the given template ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:read&#x60; [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_template.json)
496
517
  # @param id [String] The ID of template
497
518
  # @param [Hash] opts the optional parameters
498
519
  # @option opts [Array<String>] :additional_fields_template Request additional fields not included by default in the response. Supported values: &#39;definition&#39;
499
- # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
520
+ # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
500
521
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
501
522
  def get_template_with_http_info(id, opts = {})
502
523
  if @api_client.config.debugging
@@ -510,7 +531,7 @@ module KlaviyoAPI
510
531
  if @api_client.config.client_side_validation && opts[:'additional_fields_template'] && !opts[:'additional_fields_template'].all? { |item| allowable_values.include?(item) }
511
532
  fail ArgumentError, "invalid value for \"additional_fields_template\", must include one of #{allowable_values}"
512
533
  end
513
- allowable_values = ["amp", "created", "definition", "definition.body", "definition.body.id", "definition.body.properties", "definition.body.properties.css_class", "definition.body.properties.id", "definition.body.sections", "definition.body.styles", "definition.body.styles.background_color", "definition.body.styles.width", "definition.id", "definition.styles", "definition.template_id", "editor_type", "html", "name", "text", "updated"]
534
+ allowable_values = ["amp", "created", "definition", "definition.body", "definition.body.id", "definition.body.properties", "definition.body.properties.css_class", "definition.body.properties.id", "definition.body.sections", "definition.body.styles", "definition.body.styles.background_color", "definition.body.styles.width", "definition.id", "definition.styles", "definition.template_id", "editor_type", "html", "id", "name", "text", "updated"]
514
535
  if @api_client.config.client_side_validation && opts[:'fields_template'] && !opts[:'fields_template'].all? { |item| allowable_values.include?(item) }
515
536
  fail ArgumentError, "invalid value for \"fields_template\", must include one of #{allowable_values}"
516
537
  end
@@ -525,7 +546,7 @@ module KlaviyoAPI
525
546
  # header parameters
526
547
  header_params = opts[:header_params] || {}
527
548
  # klaviyo api revision
528
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-04-15"
549
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-07-15"
529
550
  # HTTP header 'Accept' (if needed)
530
551
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
531
552
 
@@ -559,13 +580,14 @@ module KlaviyoAPI
559
580
  end
560
581
 
561
582
  # Get Templates
562
- # Get all templates in an account. Use `additional-fields[template]=definition` to include the full template definition for SYSTEM_DRAGGABLE templates.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:read`
583
+ # Get all templates in an account. Use `additional-fields[template]=definition` to include the full template definition for SYSTEM_DRAGGABLE templates.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:read` [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_templates.json)
563
584
  # @param [Hash] opts the optional parameters
564
585
  # @option opts [Array<String>] :additional_fields_template Request additional fields not included by default in the response. Supported values: &#39;definition&#39;
565
- # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
566
- # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;id&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;name&#x60;: &#x60;any&#x60;, &#x60;contains&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;created&#x60;: &#x60;equals&#x60;, &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;&lt;br&gt;&#x60;updated&#x60;: &#x60;equals&#x60;, &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;
567
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#pagination
568
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sorting
586
+ # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
587
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;id&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;name&#x60;: &#x60;any&#x60;, &#x60;contains&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;created&#x60;: &#x60;equals&#x60;, &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;&lt;br&gt;&#x60;updated&#x60;: &#x60;equals&#x60;, &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;
588
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#pagination
589
+ # @option opts [Integer] :page_size Default: 10. Min: 1. Max: 10. (default to 10)
590
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sorting
569
591
  # @return [Hash<String, Object>]
570
592
  def get_templates(opts = {})
571
593
  data, _status_code, _headers = get_templates_with_http_info(opts)
@@ -573,13 +595,14 @@ module KlaviyoAPI
573
595
  end
574
596
 
575
597
  # Get Templates
576
- # Get all templates in an account. Use &#x60;additional-fields[template]&#x3D;definition&#x60; to include the full template definition for SYSTEM_DRAGGABLE templates.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:read&#x60;
598
+ # Get all templates in an account. Use &#x60;additional-fields[template]&#x3D;definition&#x60; to include the full template definition for SYSTEM_DRAGGABLE templates.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:read&#x60; [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_templates.json)
577
599
  # @param [Hash] opts the optional parameters
578
600
  # @option opts [Array<String>] :additional_fields_template Request additional fields not included by default in the response. Supported values: &#39;definition&#39;
579
- # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
580
- # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;id&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;name&#x60;: &#x60;any&#x60;, &#x60;contains&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;created&#x60;: &#x60;equals&#x60;, &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;&lt;br&gt;&#x60;updated&#x60;: &#x60;equals&#x60;, &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;
581
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#pagination
582
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sorting
601
+ # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
602
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;id&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;name&#x60;: &#x60;any&#x60;, &#x60;contains&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;created&#x60;: &#x60;equals&#x60;, &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;&lt;br&gt;&#x60;updated&#x60;: &#x60;equals&#x60;, &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;
603
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#pagination
604
+ # @option opts [Integer] :page_size Default: 10. Min: 1. Max: 10. (default to 10)
605
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sorting
583
606
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
584
607
  def get_templates_with_http_info(opts = {})
585
608
  if @api_client.config.debugging
@@ -589,10 +612,18 @@ module KlaviyoAPI
589
612
  if @api_client.config.client_side_validation && opts[:'additional_fields_template'] && !opts[:'additional_fields_template'].all? { |item| allowable_values.include?(item) }
590
613
  fail ArgumentError, "invalid value for \"additional_fields_template\", must include one of #{allowable_values}"
591
614
  end
592
- allowable_values = ["amp", "created", "definition", "definition.body", "definition.body.id", "definition.body.properties", "definition.body.properties.css_class", "definition.body.properties.id", "definition.body.sections", "definition.body.styles", "definition.body.styles.background_color", "definition.body.styles.width", "definition.id", "definition.styles", "definition.template_id", "editor_type", "html", "name", "text", "updated"]
615
+ allowable_values = ["amp", "created", "definition", "definition.body", "definition.body.id", "definition.body.properties", "definition.body.properties.css_class", "definition.body.properties.id", "definition.body.sections", "definition.body.styles", "definition.body.styles.background_color", "definition.body.styles.width", "definition.id", "definition.styles", "definition.template_id", "editor_type", "html", "id", "name", "text", "updated"]
593
616
  if @api_client.config.client_side_validation && opts[:'fields_template'] && !opts[:'fields_template'].all? { |item| allowable_values.include?(item) }
594
617
  fail ArgumentError, "invalid value for \"fields_template\", must include one of #{allowable_values}"
595
618
  end
619
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10
620
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TemplatesApi.get_templates, must be smaller than or equal to 10.'
621
+ end
622
+
623
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
624
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TemplatesApi.get_templates, must be greater than or equal to 1.'
625
+ end
626
+
596
627
  allowable_values = ["created", "-created", "id", "-id", "name", "-name", "updated", "-updated"]
597
628
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
598
629
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
@@ -606,12 +637,13 @@ module KlaviyoAPI
606
637
  query_params[:'fields[template]'] = @api_client.build_collection_param(opts[:'fields_template'], :csv) if !opts[:'fields_template'].nil?
607
638
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
608
639
  query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
640
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
609
641
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
610
642
 
611
643
  # header parameters
612
644
  header_params = opts[:header_params] || {}
613
645
  # klaviyo api revision
614
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-04-15"
646
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-07-15"
615
647
  # HTTP header 'Accept' (if needed)
616
648
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
617
649
 
@@ -645,10 +677,10 @@ module KlaviyoAPI
645
677
  end
646
678
 
647
679
  # Get Universal Content
648
- # Get the universal content with the given ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:read`
680
+ # Get the universal content with the given ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:read` [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_universal_content.json)
649
681
  # @param id [String] The ID of the universal content
650
682
  # @param [Hash] opts the optional parameters
651
- # @option opts [Array<String>] :fields_template_universal_content For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
683
+ # @option opts [Array<String>] :fields_template_universal_content For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
652
684
  # @return [Hash<String, Object>]
653
685
  def get_universal_content(id, opts = {})
654
686
  data, _status_code, _headers = get_universal_content_with_http_info(id, opts)
@@ -656,10 +688,10 @@ module KlaviyoAPI
656
688
  end
657
689
 
658
690
  # Get Universal Content
659
- # Get the universal content with the given ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:read&#x60;
691
+ # Get the universal content with the given ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:read&#x60; [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_universal_content.json)
660
692
  # @param id [String] The ID of the universal content
661
693
  # @param [Hash] opts the optional parameters
662
- # @option opts [Array<String>] :fields_template_universal_content For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
694
+ # @option opts [Array<String>] :fields_template_universal_content For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
663
695
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
664
696
  def get_universal_content_with_http_info(id, opts = {})
665
697
  if @api_client.config.debugging
@@ -669,7 +701,7 @@ module KlaviyoAPI
669
701
  if @api_client.config.client_side_validation && id.nil?
670
702
  fail ArgumentError, "Missing the required parameter 'id' when calling TemplatesApi.get_universal_content"
671
703
  end
672
- allowable_values = ["created", "definition", "definition.content_type", "definition.data", "definition.data.content", "definition.data.display_options", "definition.data.display_options.content_repeat", "definition.data.display_options.content_repeat.item_alias", "definition.data.display_options.content_repeat.repeat_for", "definition.data.display_options.show_on", "definition.data.display_options.visible_check", "definition.data.styles", "definition.data.styles.background_color", "definition.data.styles.block_background_color", "definition.data.styles.block_border_color", "definition.data.styles.block_border_style", "definition.data.styles.block_border_width", "definition.data.styles.block_padding_bottom", "definition.data.styles.block_padding_left", "definition.data.styles.block_padding_right", "definition.data.styles.block_padding_top", "definition.data.styles.color", "definition.data.styles.extra_css_class", "definition.data.styles.font_family", "definition.data.styles.font_size", "definition.data.styles.font_style", "definition.data.styles.font_weight", "definition.data.styles.inner_padding_bottom", "definition.data.styles.inner_padding_left", "definition.data.styles.inner_padding_right", "definition.data.styles.inner_padding_top", "definition.data.styles.letter_spacing", "definition.data.styles.line_height", "definition.data.styles.mobile_stretch_content", "definition.data.styles.text_align", "definition.data.styles.text_decoration", "definition.data.styles.text_table_layout", "definition.type", "name", "screenshot_status", "screenshot_url", "updated"]
704
+ allowable_values = ["created", "definition", "definition.content_type", "definition.data", "definition.data.content", "definition.data.display_options", "definition.data.display_options.content_repeat", "definition.data.display_options.content_repeat.item_alias", "definition.data.display_options.content_repeat.repeat_for", "definition.data.display_options.show_on", "definition.data.display_options.visible_check", "definition.data.styles", "definition.data.styles.background_color", "definition.data.styles.block_background_color", "definition.data.styles.block_border_color", "definition.data.styles.block_border_style", "definition.data.styles.block_border_width", "definition.data.styles.block_padding_bottom", "definition.data.styles.block_padding_left", "definition.data.styles.block_padding_right", "definition.data.styles.block_padding_top", "definition.data.styles.color", "definition.data.styles.extra_css_class", "definition.data.styles.font_family", "definition.data.styles.font_size", "definition.data.styles.font_style", "definition.data.styles.font_weight", "definition.data.styles.inner_padding_bottom", "definition.data.styles.inner_padding_left", "definition.data.styles.inner_padding_right", "definition.data.styles.inner_padding_top", "definition.data.styles.letter_spacing", "definition.data.styles.line_height", "definition.data.styles.mobile_stretch_content", "definition.data.styles.text_align", "definition.data.styles.text_decoration", "definition.data.styles.text_table_layout", "definition.type", "id", "name", "screenshot_status", "screenshot_url", "updated"]
673
705
  if @api_client.config.client_side_validation && opts[:'fields_template_universal_content'] && !opts[:'fields_template_universal_content'].all? { |item| allowable_values.include?(item) }
674
706
  fail ArgumentError, "invalid value for \"fields_template_universal_content\", must include one of #{allowable_values}"
675
707
  end
@@ -683,7 +715,7 @@ module KlaviyoAPI
683
715
  # header parameters
684
716
  header_params = opts[:header_params] || {}
685
717
  # klaviyo api revision
686
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-04-15"
718
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-07-15"
687
719
  # HTTP header 'Accept' (if needed)
688
720
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
689
721
 
@@ -717,9 +749,10 @@ module KlaviyoAPI
717
749
  end
718
750
 
719
751
  # Render Template
720
- # Render a template with the given template ID and context attribute. Returns the AMP, HTML, and plain text versions of the email template. **Request body parameters** (nested under `attributes`): * `return_fields`: Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets). * `context`: This is the context your email template will be rendered with. You must pass in a `context` object as a JSON object. Email templates are rendered with contexts in a similar manner to Django templates. Nested template variables can be referenced via dot notation. Template variables without corresponding `context` values are treated as `FALSE` and output nothing. Ex. `{ \"name\" : \"George Washington\", \"state\" : \"VA\" }`<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `templates:read`
752
+ # Render a template with the given template ID and context attribute. Returns the AMP, HTML, and plain text versions of the email template. **Request body parameters** (nested under `attributes`): * `return_fields`: Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets). * `context`: This is the context your email template will be rendered with. You must pass in a `context` object as a JSON object. Email templates are rendered with contexts in a similar manner to Django templates. Nested template variables can be referenced via dot notation. Template variables without corresponding `context` values are treated as `FALSE` and output nothing. Ex. `{ \"name\" : \"George Washington\", \"state\" : \"VA\" }`<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `templates:read` [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/render_template.json)
721
753
  # @param template_render_query [TemplateRenderQuery]
722
754
  # @param [Hash] opts the optional parameters
755
+ # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
723
756
  # @return [Hash<String, Object>]
724
757
  def render_template(template_render_query, opts = {})
725
758
  data, _status_code, _headers = render_template_with_http_info(template_render_query, opts)
@@ -730,9 +763,10 @@ module KlaviyoAPI
730
763
  alias create_template_render render_template
731
764
 
732
765
  # Render Template
733
- # Render a template with the given template ID and context attribute. Returns the AMP, HTML, and plain text versions of the email template. **Request body parameters** (nested under &#x60;attributes&#x60;): * &#x60;return_fields&#x60;: Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets). * &#x60;context&#x60;: This is the context your email template will be rendered with. You must pass in a &#x60;context&#x60; object as a JSON object. Email templates are rendered with contexts in a similar manner to Django templates. Nested template variables can be referenced via dot notation. Template variables without corresponding &#x60;context&#x60; values are treated as &#x60;FALSE&#x60; and output nothing. Ex. &#x60;{ \&quot;name\&quot; : \&quot;George Washington\&quot;, \&quot;state\&quot; : \&quot;VA\&quot; }&#x60;&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;templates:read&#x60;
766
+ # Render a template with the given template ID and context attribute. Returns the AMP, HTML, and plain text versions of the email template. **Request body parameters** (nested under &#x60;attributes&#x60;): * &#x60;return_fields&#x60;: Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets). * &#x60;context&#x60;: This is the context your email template will be rendered with. You must pass in a &#x60;context&#x60; object as a JSON object. Email templates are rendered with contexts in a similar manner to Django templates. Nested template variables can be referenced via dot notation. Template variables without corresponding &#x60;context&#x60; values are treated as &#x60;FALSE&#x60; and output nothing. Ex. &#x60;{ \&quot;name\&quot; : \&quot;George Washington\&quot;, \&quot;state\&quot; : \&quot;VA\&quot; }&#x60;&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;templates:read&#x60; [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/render_template.json)
734
767
  # @param template_render_query [TemplateRenderQuery]
735
768
  # @param [Hash] opts the optional parameters
769
+ # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
736
770
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
737
771
  def render_template_with_http_info(template_render_query, opts = {})
738
772
  if @api_client.config.debugging
@@ -742,16 +776,21 @@ module KlaviyoAPI
742
776
  if @api_client.config.client_side_validation && template_render_query.nil?
743
777
  fail ArgumentError, "Missing the required parameter 'template_render_query' when calling TemplatesApi.render_template"
744
778
  end
779
+ allowable_values = ["amp", "created", "editor_type", "html", "id", "name", "text", "updated"]
780
+ if @api_client.config.client_side_validation && opts[:'fields_template'] && !opts[:'fields_template'].all? { |item| allowable_values.include?(item) }
781
+ fail ArgumentError, "invalid value for \"fields_template\", must include one of #{allowable_values}"
782
+ end
745
783
  # resource path
746
784
  local_var_path = '/api/template-render'
747
785
 
748
786
  # query parameters
749
787
  query_params = opts[:query_params] || {}
788
+ query_params[:'fields[template]'] = @api_client.build_collection_param(opts[:'fields_template'], :csv) if !opts[:'fields_template'].nil?
750
789
 
751
790
  # header parameters
752
791
  header_params = opts[:header_params] || {}
753
792
  # klaviyo api revision
754
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-04-15"
793
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-07-15"
755
794
  # HTTP header 'Accept' (if needed)
756
795
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
757
796
  # HTTP header 'Content-Type'
@@ -793,11 +832,12 @@ module KlaviyoAPI
793
832
  alias create_template_render_with_http_info render_template_with_http_info
794
833
 
795
834
  # Update Template
796
- # Update a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write`
835
+ # Update a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write` [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/update_template.json)
797
836
  # @param id [String] The ID of template
798
837
  # @param template_update_html_or_dnd_query [TemplateUpdateHtmlOrDndQuery]
799
838
  # @param [Hash] opts the optional parameters
800
839
  # @option opts [Array<String>] :additional_fields_template Request additional fields not included by default in the response. Supported values: &#39;definition&#39;
840
+ # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
801
841
  # @return [Hash<String, Object>]
802
842
  def update_template(id, template_update_html_or_dnd_query, opts = {})
803
843
  data, _status_code, _headers = update_template_with_http_info(id, template_update_html_or_dnd_query, opts)
@@ -805,11 +845,12 @@ module KlaviyoAPI
805
845
  end
806
846
 
807
847
  # Update Template
808
- # Update a template with the given template ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60;
848
+ # Update a template with the given template ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60; [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/update_template.json)
809
849
  # @param id [String] The ID of template
810
850
  # @param template_update_html_or_dnd_query [TemplateUpdateHtmlOrDndQuery]
811
851
  # @param [Hash] opts the optional parameters
812
852
  # @option opts [Array<String>] :additional_fields_template Request additional fields not included by default in the response. Supported values: &#39;definition&#39;
853
+ # @option opts [Array<String>] :fields_template For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
813
854
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
814
855
  def update_template_with_http_info(id, template_update_html_or_dnd_query, opts = {})
815
856
  if @api_client.config.debugging
@@ -827,17 +868,22 @@ module KlaviyoAPI
827
868
  if @api_client.config.client_side_validation && opts[:'additional_fields_template'] && !opts[:'additional_fields_template'].all? { |item| allowable_values.include?(item) }
828
869
  fail ArgumentError, "invalid value for \"additional_fields_template\", must include one of #{allowable_values}"
829
870
  end
871
+ allowable_values = ["amp", "created", "definition", "definition.body", "definition.body.id", "definition.body.properties", "definition.body.properties.css_class", "definition.body.properties.id", "definition.body.sections", "definition.body.styles", "definition.body.styles.background_color", "definition.body.styles.width", "definition.id", "definition.styles", "definition.template_id", "editor_type", "html", "id", "name", "text", "updated"]
872
+ if @api_client.config.client_side_validation && opts[:'fields_template'] && !opts[:'fields_template'].all? { |item| allowable_values.include?(item) }
873
+ fail ArgumentError, "invalid value for \"fields_template\", must include one of #{allowable_values}"
874
+ end
830
875
  # resource path
831
876
  local_var_path = '/api/templates/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
832
877
 
833
878
  # query parameters
834
879
  query_params = opts[:query_params] || {}
835
880
  query_params[:'additional-fields[template]'] = @api_client.build_collection_param(opts[:'additional_fields_template'], :csv) if !opts[:'additional_fields_template'].nil?
881
+ query_params[:'fields[template]'] = @api_client.build_collection_param(opts[:'fields_template'], :csv) if !opts[:'fields_template'].nil?
836
882
 
837
883
  # header parameters
838
884
  header_params = opts[:header_params] || {}
839
885
  # klaviyo api revision
840
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-04-15"
886
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-07-15"
841
887
  # HTTP header 'Accept' (if needed)
842
888
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
843
889
  # HTTP header 'Content-Type'
@@ -876,10 +922,11 @@ module KlaviyoAPI
876
922
  end
877
923
 
878
924
  # Update Universal Content
879
- # Update universal content. The `definition` field can only be updated on the following block types at this time: `button`, `drop_shadow`, `horizontal_rule`, `html`, `image`, `spacer`, and `text`.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write`
925
+ # Update universal content. The `definition` field can only be updated on the following block types at this time: `button`, `drop_shadow`, `horizontal_rule`, `html`, `image`, `spacer`, and `text`.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `750/m` **Scopes:** `templates:write` [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/update_universal_content.json)
880
926
  # @param id [String] The ID of the template universal content
881
927
  # @param universal_content_partial_update_query [UniversalContentPartialUpdateQuery] Update a universal content by ID
882
928
  # @param [Hash] opts the optional parameters
929
+ # @option opts [Array<String>] :fields_template_universal_content For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
883
930
  # @return [Hash<String, Object>]
884
931
  def update_universal_content(id, universal_content_partial_update_query, opts = {})
885
932
  data, _status_code, _headers = update_universal_content_with_http_info(id, universal_content_partial_update_query, opts)
@@ -890,10 +937,11 @@ module KlaviyoAPI
890
937
  alias update_template_universal_content update_universal_content
891
938
 
892
939
  # Update Universal Content
893
- # Update universal content. The &#x60;definition&#x60; field can only be updated on the following block types at this time: &#x60;button&#x60;, &#x60;drop_shadow&#x60;, &#x60;horizontal_rule&#x60;, &#x60;html&#x60;, &#x60;image&#x60;, &#x60;spacer&#x60;, and &#x60;text&#x60;.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60;
940
+ # Update universal content. The &#x60;definition&#x60; field can only be updated on the following block types at this time: &#x60;button&#x60;, &#x60;drop_shadow&#x60;, &#x60;horizontal_rule&#x60;, &#x60;html&#x60;, &#x60;image&#x60;, &#x60;spacer&#x60;, and &#x60;text&#x60;.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;750/m&#x60; **Scopes:** &#x60;templates:write&#x60; [OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/update_universal_content.json)
894
941
  # @param id [String] The ID of the template universal content
895
942
  # @param universal_content_partial_update_query [UniversalContentPartialUpdateQuery] Update a universal content by ID
896
943
  # @param [Hash] opts the optional parameters
944
+ # @option opts [Array<String>] :fields_template_universal_content For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets
897
945
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
898
946
  def update_universal_content_with_http_info(id, universal_content_partial_update_query, opts = {})
899
947
  if @api_client.config.debugging
@@ -907,16 +955,21 @@ module KlaviyoAPI
907
955
  if @api_client.config.client_side_validation && universal_content_partial_update_query.nil?
908
956
  fail ArgumentError, "Missing the required parameter 'universal_content_partial_update_query' when calling TemplatesApi.update_universal_content"
909
957
  end
958
+ allowable_values = ["created", "definition", "definition.content_type", "definition.data", "definition.data.content", "definition.data.display_options", "definition.data.display_options.content_repeat", "definition.data.display_options.content_repeat.item_alias", "definition.data.display_options.content_repeat.repeat_for", "definition.data.display_options.show_on", "definition.data.display_options.visible_check", "definition.data.styles", "definition.data.styles.background_color", "definition.data.styles.block_background_color", "definition.data.styles.block_border_color", "definition.data.styles.block_border_style", "definition.data.styles.block_border_width", "definition.data.styles.block_padding_bottom", "definition.data.styles.block_padding_left", "definition.data.styles.block_padding_right", "definition.data.styles.block_padding_top", "definition.data.styles.color", "definition.data.styles.extra_css_class", "definition.data.styles.font_family", "definition.data.styles.font_size", "definition.data.styles.font_style", "definition.data.styles.font_weight", "definition.data.styles.inner_padding_bottom", "definition.data.styles.inner_padding_left", "definition.data.styles.inner_padding_right", "definition.data.styles.inner_padding_top", "definition.data.styles.letter_spacing", "definition.data.styles.line_height", "definition.data.styles.mobile_stretch_content", "definition.data.styles.text_align", "definition.data.styles.text_decoration", "definition.data.styles.text_table_layout", "definition.type", "id", "name", "screenshot_status", "screenshot_url", "updated"]
959
+ if @api_client.config.client_side_validation && opts[:'fields_template_universal_content'] && !opts[:'fields_template_universal_content'].all? { |item| allowable_values.include?(item) }
960
+ fail ArgumentError, "invalid value for \"fields_template_universal_content\", must include one of #{allowable_values}"
961
+ end
910
962
  # resource path
911
963
  local_var_path = '/api/template-universal-content/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
912
964
 
913
965
  # query parameters
914
966
  query_params = opts[:query_params] || {}
967
+ query_params[:'fields[template-universal-content]'] = @api_client.build_collection_param(opts[:'fields_template_universal_content'], :csv) if !opts[:'fields_template_universal_content'].nil?
915
968
 
916
969
  # header parameters
917
970
  header_params = opts[:header_params] || {}
918
971
  # klaviyo api revision
919
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-04-15"
972
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2026-07-15"
920
973
  # HTTP header 'Accept' (if needed)
921
974
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
922
975
  # HTTP header 'Content-Type'