Skip to content

Instantly share code, notes, and snippets.

@ryancraigmartin
Created April 25, 2023 22:35
Show Gist options
  • Save ryancraigmartin/b161b1efda765e40ce89f37dea7c4680 to your computer and use it in GitHub Desktop.
Save ryancraigmartin/b161b1efda765e40ce89f37dea7c4680 to your computer and use it in GitHub Desktop.
Klaviyo API TypeScript types based on the version: 2023-02-22 openapi spec using openapi-typescript
/**
* This file was auto-generated by openapi-typescript.
* json source: https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable.json
* gemerate command run: npx openapi-typescript klaviyo-api.json --output klaviyo.d.ts
*/
export interface paths {
'/api/campaigns/': {
/**
* Get Campaigns
* @description Returns some or all campaigns based on [optional] filters<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Read`
*/
get: operations['get_campaigns']
/**
* Create Campaign
* @description Creates a campaign given a set of parameters, then returns it.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
post: operations['create_campaign']
}
'/api/campaigns/{id}/': {
/**
* Get Campaign
* @description Returns a specific campaign based on a required id.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Read`
*/
get: operations['get_campaign']
/**
* Delete Campaign
* @description Delete a campaign with the given campaign ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
delete: operations['delete_campaign']
/**
* Update Campaign
* @description Update a campaign with the given campaign ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
patch: operations['update_campaign']
}
'/api/campaign-messages/{id}/': {
/**
* Get Campaign Message
* @description Returns a specific message based on a required id.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Read`
*/
get: operations['get_campaign_message']
/**
* Update Campaign Message
* @description Update a campaign message<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
patch: operations['update_campaign_message']
}
'/api/campaigns/{campaign_id}/tags/': {
/**
* Get Campaign Tags
* @description Return all tags that belong to the given campaign.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Campaigns Read`
* `Tags Read`
*/
get: operations['get_campaign_tags']
}
'/api/campaign-send-jobs/{id}/': {
/**
* Get Campaign Send Job
* @description Get a campaign send job<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Read`
*/
get: operations['get_campaign_send_job']
/**
* Update Campaign Send Job
* @description Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
patch: operations['update_campaign_send_job']
}
'/api/campaign-recipient-estimation-jobs/{id}/': {
/**
* Get Campaign Recipient Estimation Job
* @description Retrieve the status of a recipient estimation job triggered with the `Create Campaign Recipient Estimation Job` endpoint.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Read`
*/
get: operations['get_campaign_recipient_estimation_job']
}
'/api/campaign-recipient-estimations/{id}/': {
/**
* Get Campaign Recipient Estimation
* @description Get the estimated recipient count for a campaign with the provided campaign ID. You can refresh this count by using the `Create Campaign Recipient Estimation Job` endpoint.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Read`
*/
get: operations['get_campaign_recipient_estimation']
}
'/api/campaign-clone/': {
/**
* Create Campaign Clone
* @description Clones an existing campaign, returning a new campaign based on the original with a new ID and name.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
post: operations['create_campaign_clone']
}
'/api/campaign-message-assign-template/': {
/**
* Assign Campaign Message Template
* @description Creates a non-reusable version of the template and assigns it to the message.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
post: operations['create_campaign_message_assign_template']
}
'/api/campaign-send-jobs/': {
/**
* Create Campaign Send Job
* @description Trigger a campaign to send asynchronously<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
post: operations['create_campaign_send_job']
}
'/api/campaign-recipient-estimation-jobs/': {
/**
* Create Campaign Recipient Estimation Job
* @description Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
post: operations['create_campaign_recipient_estimation_job']
}
'/api/campaigns/{id}/relationships/tags/': {
/**
* Get Campaign Relationships Tags
* @description Returns the IDs of all tags associated with the given campaign.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Campaigns Read`
* `Tags Read`
*/
get: operations['get_campaign_relationships_tags']
}
'/api/catalog-items/': {
/**
* Get Catalog Items
* @description Get all catalog items in an account.
* Catalog items can be sorted by the following fields, in ascending and descending order: `created`
* Include parameters can be provided to get the following related resource data: `variants`
* Returns a maximum of 100 items per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_catalog_items']
/**
* Create Catalog Item
* @description Create a new catalog item.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['create_catalog_item']
}
'/api/catalog-items/{id}/': {
/**
* Get Catalog Item
* @description Get a specific catalog item with the given item ID.
* Include parameters can be provided to get the following related resource data: `variants`<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_catalog_item']
/**
* Delete Catalog Item
* @description Delete a catalog item with the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
delete: operations['delete_catalog_item']
/**
* Update Catalog Item
* @description Update a catalog item with the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
patch: operations['update_catalog_item']
}
'/api/catalog-categories/{category_id}/items/': {
/**
* Get Catalog Category Items
* @description Get all items in a category with the given category ID.
* Items can be sorted by the following fields, in ascending and descending order: `created`
* Include parameters can be provided to get the following related resource data: `variants`
* Returns a maximum of 100 items per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_catalog_category_items']
}
'/api/catalog-variants/': {
/**
* Get Catalog Variants
* @description Get all variants in an account.
* Variants can be sorted by the following fields, in ascending and descending order: `created`
* Returns a maximum of 100 variants per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_catalog_variants']
/**
* Create Catalog Variant
* @description Create a new variant for a related catalog item.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['create_catalog_variant']
}
'/api/catalog-variants/{id}/': {
/**
* Get Catalog Variant
* @description Get a catalog item variant with the given variant ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_catalog_variant']
/**
* Delete Catalog Variant
* @description Delete a catalog item variant with the given variant ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
delete: operations['delete_catalog_variant']
/**
* Update Catalog Variant
* @description Update a catalog item variant with the given variant ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
patch: operations['update_catalog_variant']
}
'/api/catalog-items/{item_id}/variants/': {
/**
* Get Catalog Item Variants
* @description Get all variants related to the given item ID.
* Variants can be sorted by the following fields, in ascending and descending order: `created`
* Returns a maximum of 100 variants per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_catalog_item_variants']
}
'/api/catalog-categories/': {
/**
* Get Catalog Categories
* @description Get all catalog categories in an account.
* Catalog categories can be sorted by the following fields, in ascending and descending order: `created`
* Returns a maximum of 100 categories per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_catalog_categories']
/**
* Create Catalog Category
* @description Create a new catalog category.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['create_catalog_category']
}
'/api/catalog-categories/{id}/': {
/**
* Get Catalog Category
* @description Get a catalog category with the given category ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_catalog_category']
/**
* Delete Catalog Category
* @description Delete a catalog category using the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
delete: operations['delete_catalog_category']
/**
* Update Catalog Category
* @description Update a catalog category with the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
patch: operations['update_catalog_category']
}
'/api/catalog-items/{item_id}/categories/': {
/**
* Get Catalog Item Categories
* @description Get all catalog categories that an item with the given item ID is in.
* Catalog categories can be sorted by the following fields, in ascending and descending order: `created`
* Returns a maximum of 100 categories per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_catalog_item_categories']
}
'/api/catalog-item-bulk-create-jobs/': {
/**
* Get Create Items Jobs
* @description Get all catalog item bulk create jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_create_items_jobs']
/**
* Spawn Create Items Job
* @description Create a catalog item bulk create job to create a batch of catalog items.
* Accepts up to 100 catalog items per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['spawn_create_items_job']
}
'/api/catalog-item-bulk-create-jobs/{job_id}/': {
/**
* Get Create Items Job
* @description Get a catalog item bulk create job with the given job ID.
* An `include` parameter can be provided to get the following related resource data: `items`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_create_items_job']
}
'/api/catalog-item-bulk-update-jobs/': {
/**
* Get Update Items Jobs
* @description Get all catalog item bulk update jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_update_items_jobs']
/**
* Spawn Update Items Job
* @description Create a catalog item bulk update job to update a batch of catalog items.
* Accepts up to 100 catalog items per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['spawn_update_items_job']
}
'/api/catalog-item-bulk-update-jobs/{job_id}/': {
/**
* Get Update Items Job
* @description Get a catalog item bulk update job with the given job ID.
* An `include` parameter can be provided to get the following related resource data: `items`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_update_items_job']
}
'/api/catalog-item-bulk-delete-jobs/': {
/**
* Get Delete Items Jobs
* @description Get all catalog item bulk delete jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_delete_items_jobs']
/**
* Spawn Delete Items Job
* @description Create a catalog item bulk delete job to delete a batch of catalog items.
* Accepts up to 100 catalog items per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['spawn_delete_items_job']
}
'/api/catalog-item-bulk-delete-jobs/{job_id}/': {
/**
* Get Delete Items Job
* @description Get a catalog item bulk delete job with the given job ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_delete_items_job']
}
'/api/catalog-variant-bulk-create-jobs/': {
/**
* Get Create Variants Jobs
* @description Get all catalog variant bulk create jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_create_variants_jobs']
/**
* Spawn Create Variants Job
* @description Create a catalog variant bulk create job to create a batch of catalog variants.
* Accepts up to 100 catalog variants per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['spawn_create_variants_job']
}
'/api/catalog-variant-bulk-create-jobs/{job_id}/': {
/**
* Get Create Variants Job
* @description Get a catalog variant bulk create job with the given job ID.
* An `include` parameter can be provided to get the following related resource data: `variants`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_create_variants_job']
}
'/api/catalog-variant-bulk-update-jobs/': {
/**
* Get Update Variants Jobs
* @description Get all catalog variant bulk update jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_update_variants_jobs']
/**
* Spawn Update Variants Job
* @description Create a catalog variant bulk update job to update a batch of catalog variants.
* Accepts up to 100 catalog variants per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['spawn_update_variants_job']
}
'/api/catalog-variant-bulk-update-jobs/{job_id}/': {
/**
* Get Update Variants Job
* @description Get a catalog variate bulk update job with the given job ID.
* An `include` parameter can be provided to get the following related resource data: `variants`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_update_variants_job']
}
'/api/catalog-variant-bulk-delete-jobs/': {
/**
* Get Delete Variants Jobs
* @description Get all catalog variant bulk delete jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_delete_variants_jobs']
/**
* Spawn Delete Variants Job
* @description Create a catalog variant bulk delete job to delete a batch of catalog variants.
* Accepts up to 100 catalog variants per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['spawn_delete_variants_job']
}
'/api/catalog-variant-bulk-delete-jobs/{job_id}/': {
/**
* Get Delete Variants Job
* @description Get a catalog variant bulk delete job with the given job ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_delete_variants_job']
}
'/api/catalog-category-bulk-create-jobs/': {
/**
* Get Create Categories Jobs
* @description Get all catalog category bulk create jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_create_categories_jobs']
/**
* Spawn Create Categories Job
* @description Create a catalog category bulk create job to create a batch of catalog categories.
* Accepts up to 100 catalog categories per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['spawn_create_categories_job']
}
'/api/catalog-category-bulk-create-jobs/{job_id}/': {
/**
* Get Create Categories Job
* @description Get a catalog category bulk create job with the given job ID.
* An `include` parameter can be provided to get the following related resource data: `categories`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_create_categories_job']
}
'/api/catalog-category-bulk-update-jobs/': {
/**
* Get Update Categories Jobs
* @description Get all catalog category bulk update jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_update_categories_jobs']
/**
* Spawn Update Categories Job
* @description Create a catalog category bulk update job to update a batch of catalog categories.
* Accepts up to 100 catalog categories per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['spawn_update_categories_job']
}
'/api/catalog-category-bulk-update-jobs/{job_id}/': {
/**
* Get Update Categories Job
* @description Get a catalog category bulk update job with the given job ID.
* An `include` parameter can be provided to get the following related resource data: `categories`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_update_categories_job']
}
'/api/catalog-category-bulk-delete-jobs/': {
/**
* Get Delete Categories Jobs
* @description Get all catalog category bulk delete jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_delete_categories_jobs']
/**
* Spawn Delete Categories Job
* @description Create a catalog category bulk delete job to delete a batch of catalog categories.
* Accepts up to 100 catalog categories per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['spawn_delete_categories_job']
}
'/api/catalog-category-bulk-delete-jobs/{job_id}/': {
/**
* Get Delete Categories Job
* @description Get a catalog category bulk delete job with the given job ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_delete_categories_job']
}
'/api/catalog-categories/{id}/relationships/items/': {
/**
* Get Catalog Category Relationships Items
* @description Get all items in the given category ID.
* Returns a maximum of 100 items per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_catalog_category_relationships_items']
/**
* Create Catalog Category Relationships Items
* @description Create a new item relationship for the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['create_catalog_category_relationships_items']
/**
* Delete Catalog Category Relationships Items
* @description Delete item relationships for the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
delete: operations['delete_catalog_category_relationships_items']
/**
* Update Catalog Category Relationships Items
* @description Update item relationships for the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
patch: operations['update_catalog_category_relationships_items']
}
'/api/catalog-items/{id}/relationships/categories/': {
/**
* Get Catalog Item Relationships Categories
* @description Get all catalog categories that a particular item is in.
* Returns a maximum of 100 categories per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get: operations['get_catalog_item_relationships_categories']
/**
* Create Catalog Item Relationships Categories
* @description Create a new catalog category relationship for the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
post: operations['create_catalog_item_relationships_categories']
/**
* Delete Catalog Item Relationships Categories
* @description Delete catalog category relationships for the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
delete: operations['delete_catalog_item_relationships_categories']
/**
* Update Catalog Item Relationships Categories
* @description Update catalog category relationships for the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
patch: operations['update_catalog_item_relationships_categories']
}
'/api/data-privacy-deletion-jobs/': {
/**
* Request Profile Deletion
* @description Request a deletion for the profiles corresponding to one of the following identifiers: `email`, `phone_number`, or `profile_id`. If multiple identifiers are provided, we will return an error.
* All profiles that match the provided identifier will be deleted.
* The deletion occurs asynchronously; however, once it has completed, the deleted profile will appear on the [Deleted Profiles page](https://www.klaviyo.com/account/deleted).
* For more information on the deletion process, please refer to our [Help Center docs on how to handle GDPR and CCPA deletion requests](https://help.klaviyo.com/hc/en-us/articles/360004217631-How-to-Handle-GDPR-Requests#record-gdpr-and-ccpa%20%20-deletion-requests2).<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Data Privacy Write`
*/
post: operations['request_profile_deletion']
}
'/api/events/': {
/**
* Get Events
* @description Get all events in an account
* Requests can be sorted by the following fields: `datetime`, `timestamp`
* Include parameters can be provided to get the following related resource data: `metrics`, `profiles`
* Returns a maximum of 200 events per page.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Read`
*/
get: operations['get_events']
/**
* Create Event
* @description Create an event. Events are created asynchronously.
* Successful response indicates that the event was validated and submitted for processing, but does not guarantee that processing is complete.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Write`
*/
post: operations['create_event']
}
'/api/events/{id}/': {
/**
* Get Event
* @description Get an event with the given event ID.
* Include parameters can be provided to get the following related resource data: `metrics`, `profiles`<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Events Read`
*/
get: operations['get_event']
}
'/api/events/{id}/metrics/': {
/**
* Get Event Metrics
* @description Get the metric for an event with the given event ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Read`
* `Metrics Read`
*/
get: operations['get_event_metrics']
}
'/api/events/{id}/profiles/': {
/**
* Get Event Profiles
* @description Get the profile associated with an event with the given event ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Read`
* `Profiles Read`
*/
get: operations['get_event_profiles']
}
'/api/events/{id}/relationships/metrics/': {
/**
* Get Event Relationships Metrics
* @description Get a list of related Metrics for an Event<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Read`
* `Metrics Read`
*/
get: operations['get_event_relationships_metrics']
}
'/api/events/{id}/relationships/profiles/': {
/**
* Get Event Relationships Profiles
* @description Get profile [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for an event with the given event ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Read`
* `Profiles Read`
*/
get: operations['get_event_relationships_profiles']
}
'/api/flows/': {
/**
* Get Flows
* @description Get all flows in an account.
*
* Returns a maximum of 50 flows per request, which can be paginated with cursor-based pagination.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get: operations['get_flows']
}
'/api/flows/{id}/': {
/**
* Get Flow
* @description Get a flow with the given flow ID.
* Include parameters can be provided to get the following related resource data: `flow-actions`<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get: operations['get_flow']
/**
* Update Flow Status
* @description Update the status of a flow with the given flow ID, and all actions in that flow.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Write`
*/
patch: operations['update_flow']
}
'/api/flows/{flow_id}/flow-actions/': {
/**
* Get Flow Actions For Flow
* @description Get all flow actions associated with the given flow ID.
*
* Returns a maximum of 50 flows per request, which can be paginated with cursor-based pagination.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get: operations['get_flow_flow_actions']
}
'/api/flows/{flow_id}/tags/': {
/**
* Get Flow Tags
* @description Return all tags associated with the given flow ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
* `Tags Read`
*/
get: operations['get_flow_tags']
}
'/api/flow-actions/{id}/': {
/**
* Get Flow Action
* @description Get a flow action from a flow with the given flow action ID.
* Include parameters can be provided to get the following related resource data: `flows`, `flow-messages`<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get: operations['get_flow_action']
}
'/api/flow-actions/{action_id}/flow/': {
/**
* Get Flow For Flow Action
* @description Get the flow associated with the given action ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get: operations['get_flow_action_flow']
}
'/api/flow-actions/{action_id}/flow-messages/': {
/**
* Get Messages For Flow Action
* @description Get all flow messages associated with the given flow action ID.
*
* Returns a maximum of 50 flow message relationships per request, which can be paginated with cursor-based pagination.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get: operations['get_flow_action_messages']
}
'/api/flow-messages/{id}/': {
/**
* Get Flow Message
* @description Get the flow message of a flow with the given message ID.
* Include parameters can be provided to get the following related resource data: 'flow-actions'<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get: operations['get_flow_message']
}
'/api/flow-messages/{message_id}/flow-action/': {
/**
* Get Flow Action For Message
* @description Get the flow action for a flow message with the given message ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get: operations['get_flow_message_action']
}
'/api/flows/{id}/relationships/flow-actions/': {
/**
* Get Flow Relationships Flow Actions
* @description Get all [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for flow actions associated with the given flow ID.
* Flow action relationships can be sorted by the following fields, in ascending and descending order: `id`, `status`, `created`, `updated`
* Use filters to narrow your results.
* Returns a maximum of 50 flow action relationships per request, which can be paginated with offset pagination. Offset pagination uses the following parameters: `page[size]` and `page[number]`.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get: operations['get_flow_relationships_flow_actions']
}
'/api/flows/{id}/relationships/tags/': {
/**
* Get Flow Relationships Tags
* @description Return the tag IDs of all tags associated with the given flow.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
* `Tags Read`
*/
get: operations['get_flow_relationships_tags']
}
'/api/flow-actions/{id}/relationships/flow/': {
/**
* Get Flow Action Relationships Flow
* @description Get the flow associated with the given action ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get: operations['get_flow_action_relationships_flow']
}
'/api/flow-actions/{id}/relationships/flow-messages/': {
/**
* Get Flow Action Relationships Messages
* @description Get all relationships for flow messages associated with the given flow action ID.
*
* Returns a maximum of 50 flow message relationships per request, which can be paginated with cursor-based pagination.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get: operations['get_flow_action_relationships_messages']
}
'/api/flow-messages/{id}/relationships/flow-action/': {
/**
* Get Flow Message Relationships Action
* @description Get the [relationship](https://developers.klaviyo.com/en/reference/api_overview#relationships) for a flow message's flow action, given the flow ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get: operations['get_flow_message_relationships_action']
}
'/api/lists/': {
/**
* Get Lists
* @description Get all lists in an account.
* Filter to request a subset of all lists. Lists can be filtered by `id`, `name`, `created`, and `updated` fields.
* Returns a maximum of 10 results per page.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Read`
*/
get: operations['get_lists']
/**
* Create List
* @description Create a new list.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Write`
*/
post: operations['create_list']
}
'/api/lists/{id}/': {
/**
* Get List
* @description Get a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Write`
*/
get: operations['get_list']
/**
* Delete List
* @description Delete a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Write`
*/
delete: operations['delete_list']
/**
* Update List
* @description Update the name of a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Write`
*/
patch: operations['update_list']
}
'/api/lists/{list_id}/tags/': {
/**
* Get List Tags
* @description Return all tags associated with the given list ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Read`
* `Tags Read`
*/
get: operations['get_list_tags']
}
'/api/lists/{list_id}/profiles/': {
/**
* Get List Profiles
* @description Get all profiles within a list with the given list ID.
* Filter to request a subset of all profiles. Profiles can be filtered by `email`, `phone_number`, and `push_token` fields.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Read`
* `Profiles Read`
*/
get: operations['get_list_profiles']
}
'/api/lists/{id}/relationships/tags/': {
/**
* Get List Relationships Tags
* @description Returns the tag IDs of all tags associated with the given list.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Read`
* `Tags Read`
*/
get: operations['get_list_relationships_tags']
}
'/api/lists/{id}/relationships/profiles/': {
/**
* Get List Relationships Profiles
* @description Get profile membership [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Read`
* `Profiles Read`
*/
get: operations['get_list_relationships_profiles']
/**
* Add Profile To List
* @description Add a profile to a list with the given list ID.
* It is recommended that you use the [Subscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/subscribe_profiles) if you're trying to give a profile consent to receive email marketing.
* This endpoint accepts a maximum of 1000 profiles per call.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Write`
* `Profiles Write`
*/
post: operations['create_list_relationships']
/**
* Remove Profile From List
* @description Remove a profile from a list with the given list ID.
* The provided profile will no longer receive marketing from this particular list once removed.
* Removing a profile from a list will not impact the profile's consent status or subscription status in general. To update a profile's subscription status, please use the [Unsubscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/unsubscribe_profiles).
* This endpoint accepts a maximum of 1000 profiles per call.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Write`
* `Profiles Write`
*/
delete: operations['delete_list_relationships']
}
'/api/metrics/': {
/**
* Get Metrics
* @description Get all metrics in an account.
* Requests can be filtered by the following fields: integration `name`, integration `category`
* Returns a maximum of 200 results per page.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Metrics Read`
*/
get: operations['get_metrics']
}
'/api/metrics/{id}/': {
/**
* Get Metric
* @description Get a metric with the given metric ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Metrics Read`
*/
get: operations['get_metric']
}
'/api/metric-aggregates/': {
/**
* Query Metric Aggregates
* @description Query and aggregate event data associated with a metric, including native Klaviyo metrics, integration-specific metrics, and custom events. Queries must be passed in the JSON body of your `POST` request.
*
* Results can be filtered and grouped by time, event, or profile dimensions.
*
* **Request body parameters** (nested under `attributes`):
*
* * `return_fields`: request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets)
* * `sort`: sort results by a specified field, such as `"-timestamp"`
* * `page_cursor`: results can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/reference/api_overview#pagination)
* * `page_size`: limit the number of returned results per page
* * `by`: optional attributes used to group by the aggregation function
* * When using `by` attributes, an empty `dimensions` response is expected when the counts for the events do not have the associated dimension requested by the set `by` attribute. For example, a query including `"by": ["$flow"]` will return an empty dimensions response for counts of metrics not associated with a `$flow`
* * `measurement`: the measurement key supports the following values:
* * `"sum_value"`: perform a summation of the `_Event Value_`, optionally partitioned over any dimension provided in the `by` field
* * `"count"`: counts the number of events associated to a metric, optionally partitioned over any dimension provided in the `by` field
* * `"unique"` counts the number of unique customers associated to a metric, optionally partitioned over any dimension provided in the `by` field
* * `interval`: aggregation interval, such as `"hour"`,`"day"`,`"week"`, and `"month"`
* * `metric_id`: the metric ID used in the aggregation
* * `filter`: list of filters for specific fields, must include time range using ISO 8601 format (`"YYYY-MM-DDTHH:MM:SS.mmmmmm"`)
* * The time range can be filtered by providing a `greater-or-equal` filter on the datetime field, such as `"greater-or-equal(datetime,2021-07-01T00:00:00)"` and a `less-than` filter on the same datetime field, such as `"less-than(datetime,2022-07-01T00:00:00)"`
* * The time range may span a maximum of one year. Time range dates may be set to a maximum of 5 years prior to the current date
* * Filter the list of supported aggregate dimensions using the common filter syntax, such as `"equals(URL,\"https://www.klaviyo.com/\")"`
* * `timezone`: the timezone used when processing the query. Case sensitive. This field is validated against a list of common timezones from the [IANA Time Zone Database](https://www.iana.org/time-zones)
* * While the payload accepts a timezone, the response datetimes returned will be in UTC.
*
* For a comprehensive list of native Klaviyo metrics and their associated attributes for grouping and filtering, please refer to the [metrics attributes guide](https://developers.klaviyo.com/en/docs/supported_metrics_and_attributes).<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Metrics Read`
*/
post: operations['query_metric_aggregates']
}
'/api/profiles/': {
/**
* Get Profiles
* @description Get all profiles in an account.
* Profiles can be sorted by the following fields in ascending and descending order: `id`, `created`, `updated`, `email`<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Profiles Read`
*/
get: operations['get_profiles']
/**
* Create Profile
* @description Create a new profile.
* If you use a phone number as the profile identifier and SMS is not set up in the Klaviyo account, you'll need to include at least one other identifier attribute (`email` or `external_id`) in addition to the `phone_number` attribute for the API call to work.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Profiles Write`
*/
post: operations['create_profile']
}
'/api/profiles/{id}/': {
/**
* Get Profile
* @description Get the profile with the given profile ID.
* Include parameters can be provided to get the following related resource data: `lists` memberships, `segments` memberships"<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Profiles Read`
*/
get: operations['get_profile']
/**
* Update Profile
* @description Update the profile with the given profile ID.
* If you use a phone number as the profile identifier and SMS is not set up in the Klaviyo account, you'll need to include at least one other identifier attribute (`email` or `external_id`) in addition to the `phone_number` attribute for the API call to work.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Profiles Write`
*/
patch: operations['update_profile']
}
'/api/profiles/{profile_id}/lists/': {
/**
* Get Profile Lists
* @description Get list memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Read`
* `Profiles Read`
*/
get: operations['get_profile_lists']
}
'/api/profiles/{profile_id}/segments/': {
/**
* Get Profile Segments
* @description Get segment memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Profiles Read`
* `Segments Read`
*/
get: operations['get_profile_segments']
}
'/api/profile-suppression-bulk-create-jobs/': {
/**
* Suppress Profiles
* @description Manually suppress one or more profiles. Such profiles will have `USER_SUPPRESSED` as their suppression reason. Manually suppressed profiles _will not_ receive email marketing. Learn more about suppressed profiles [in this document](https://help.klaviyo.com/hc/en-us/articles/115005246108-Understanding-suppressed-email-profiles#what-is-a-suppressed-profile-1).
* Not supported for SMS marketing.
* Maximum number of profile can be submitted for suppression: 100<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Profiles Write`
* `Subscriptions Write`
*/
post: operations['suppress_profiles']
}
'/api/profile-unsuppression-bulk-create-jobs/': {
/**
* Unsuppress Profiles
* @description Unsuppress one or more profiles, this will remove any Manual Suppressions (USER_SUPPRESSED) on these profiles. A profile may receive email marketing after a manual suppression is removed so long as they have not revoked consent, i.e. unsubscribed.
* Not supported for SMS marketing. Only manual suppressions (USER_SUPPRESSED) will be removed. `UNSUBSCRIBE` and `SPAM_REPORT` suppressions are removed whenever a [profile resubscribes](https://developers.klaviyo.com/en/reference/subscribe_profiles). `INVALID_EMAIL` and `HARD_BOUNCE` suppressions cannot be removed by the API.
* Maximum number of profile can be submitted for unsuppression: 100<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Subscriptions Write`
*/
post: operations['unsuppress_profiles']
}
'/api/profile-subscription-bulk-create-jobs/': {
/**
* Subscribe Profiles
* @description Subscribe one or more profiles to email marketing, SMS marketing, or both. If the list has double opt-in enabled, profiles will receive a message requiring their confirmation before subscribing. Otherwise, profiles will be immediately subscribed without receiving a confirmation message.
* To add someone to a list without changing their subscription status, use [Add Profile to List](https://developers.klaviyo.com/en/reference/create_list_relationships).
* This API will remove any `UNSUBSCRIBE`, `SPAM_REPORT` or `USER_SUPPRESSED` suppressions from the provided profiles. Learn more about suppressed profiles in [this document](https://help.klaviyo.com/hc/en-us/articles/115005246108-Understanding-suppressed-email-profiles#what-is-a-suppressed-profile-1).
* Maximum number of profile can be submitted for subscription: 100<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `List Write`
* `Profiles Write`
* `Subscriptions Write`
*/
post: operations['subscribe_profiles']
}
'/api/profile-unsubscription-bulk-create-jobs/': {
/**
* Unsubscribe Profiles
* @description Unsubscribe one or more profiles to email marketing, SMS marketing, or both.
* To remove someone from a list without changing their subscription status, use [Remove Profile from List](https://developers.klaviyo.com/en/reference/delete_list_relationships).
* Maximum number of profile can be submitted for unsubscription: 100<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `List Write`
* `Profiles Write`
* `Subscriptions Write`
*/
post: operations['unsubscribe_profiles']
}
'/api/profiles/{id}/relationships/lists/': {
/**
* Get Profile Relationships Lists
* @description Get list memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Read`
* `Profiles Read`
*/
get: operations['get_profile_relationships_lists']
}
'/api/profiles/{id}/relationships/segments/': {
/**
* Get Profile Relationships Segments
* @description Get segment membership relationships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Profiles Read`
* `Segments Read`
*/
get: operations['get_profile_relationships_segments']
}
'/api/segments/': {
/**
* Get Segments
* @description Get all segments in an account.
* Filter to request a subset of all segments. Segments can be filtered by `name`, `created`, and `updated` fields.
* Returns a maximum of 10 results per page.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Segments Read`
*/
get: operations['get_segments']
}
'/api/segments/{id}/': {
/**
* Get Segment
* @description Get a segment with the given segment ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Segments Read`
*/
get: operations['get_segment']
/**
* Update Segment
* @description Update the name of a segment with the given segment ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Segments Write`
*/
patch: operations['update_segment']
}
'/api/segments/{segment_id}/tags/': {
/**
* Get Segment Tags
* @description Return all tags associated with the given segment ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Segments Read`
* `Tags Read`
*/
get: operations['get_segment_tags']
}
'/api/segments/{segment_id}/profiles/': {
/**
* Get Segment Profiles
* @description Get all profiles within the given segment ID.
* Filter to request a subset of all profiles. Profiles can be filtered by `email`, `phone_number`, and `push_token` fields.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Profiles Read`
* `Segments Read`
*/
get: operations['get_segment_profiles']
}
'/api/segments/{id}/relationships/tags/': {
/**
* Get Segment Relationships Tags
* @description If `related_resource` is `tags`, returns the tag IDs of all tags associated with the given segment ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Segments Read`
* `Tags Read`
*/
get: operations['get_segment_relationships_tags']
}
'/api/segments/{id}/relationships/profiles/': {
/**
* Get Segment Relationships Profiles
* @description Get all profile membership [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for the given segment ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Profiles Read`
* `Segments Read`
*/
get: operations['get_segment_relationships_profiles']
}
'/api/tags/': {
/**
* Get Tags
* @description List all tags in an account.
* Tags can be filtered by `name`, and sorted by `name` or `id` in ascending or descending order.
* Returns a maximum of 50 tags per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get: operations['get_tags']
/**
* Create Tag
* @description Create a tag. An account cannot have more than **500** unique tags.
* A tag belongs to a single tag group. If the `tag_group_id` is not specified, the tag is added to the account's default tag group.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
* `Tags Write`
*/
post: operations['create_tag']
}
'/api/tags/{id}/': {
/**
* Get Tag
* @description Retrieve the tag with the given tag ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get: operations['get_tag']
/**
* Delete Tag
* @description Delete the tag with the given tag ID. Any associations between the tag and other resources will also be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
* `Tags Write`
*/
delete: operations['delete_tag']
/**
* Update Tag
* @description Update the tag with the given tag ID.
* Only a tag's `name` can be changed. A tag cannot be moved from one tag group to another.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
* `Tags Write`
*/
patch: operations['update_tag']
}
'/api/tag-groups/': {
/**
* Get Tag Groups
* @description List all tag groups in an account. Every account has one default tag group.
* Tag groups can be filtered by `name`, `exclusive`, and `default`, and sorted by `name` or `id` in ascending or descending order.
* Returns a maximum of 25 tag groups per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get: operations['get_tag_groups']
/**
* Create Tag Group
* @description Create a tag group. An account cannot have more than **50** unique tag groups.
* If `exclusive` is not specified `true` or `false`, the tag group defaults to non-exclusive.
* If a tag group is non-exclusive, any given related resource (campaign, flow, etc.) can be linked to multiple tags from that tag group. If a tag group is exclusive, any given related resource can only be linked to one tag from that tag group.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
* `Tags Write`
*/
post: operations['create_tag_group']
}
'/api/tag-groups/{id}/': {
/**
* Get Tag Group
* @description Retrieve the tag group with the given tag group ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get: operations['get_tag_group']
/**
* Delete Tag Group
* @description Delete the tag group with the given tag group ID.
* Any tags inside that tag group, and any associations between those tags and other resources, will also be removed. The default tag group cannot be deleted.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
* `Tags Write`
*/
delete: operations['delete_tag_group']
/**
* Update Tag Group
* @description Update the tag group with the given tag group ID.
* Only a tag group's `name` can be changed. A tag group's `exclusive` or `default` value cannot be changed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
* `Tags Write`
*/
patch: operations['update_tag_group']
}
'/api/tags/{id}/tag-group/': {
/**
* Get Tag Tag Group
* @description Returns the tag group resource for a given tag ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get: operations['get_tag_tag_group']
}
'/api/tag-groups/{id}/tags/': {
/**
* Get Tag Group Tags
* @description Return the tags for a given tag group ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get: operations['get_tag_group_tags']
}
'/api/tags/{id}/relationships/flows/': {
/**
* Get Tag Relationships Flows
* @description Returns the IDs of all flows associated with the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
* `Tags Read`
*/
get: operations['get_tag_relationships_flows']
/**
* Create Tag Relationships Flows
* @description Associate a tag with one or more flows. Any flow cannot be associated with more than **100** tags.
*
* Use the request body to pass in the ID(s) of the flow(s) that will be associated with the tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Write`
* `Tags Write`
*/
post: operations['create_tag_relationships_flows']
/**
* Delete Tag Relationships Flows
* @description Remove a tag's association with one or more flows.
*
* Use the request body to pass in the ID(s) of the flows(s) whose association with the tag will be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Write`
* `Tags Write`
*/
delete: operations['delete_tag_relationships_flows']
}
'/api/tags/{id}/relationships/campaigns/': {
/**
* Get Tag Relationships Campaigns
* @description Returns the IDs of all campaigns associated with the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Campaigns Read`
* `Tags Read`
*/
get: operations['get_tag_relationships_campaigns']
/**
* Create Tag Relationships Campaigns
* @description Associate a tag with one or more campaigns. Any campaign cannot be associated with more than **100** tags.
*
* Use the request body to pass in the ID(s) of the campaign(s) that will be associated with the tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Campaigns Write`
* `Tags Write`
*/
post: operations['create_tag_relationships_campaigns']
/**
* Delete Tag Relationships Campaigns
* @description Remove a tag's association with one or more campaigns.
*
* Use the request body to pass in the ID(s) of the campaign(s) whose association with the tag will be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Campaigns Write`
* `Tags Write`
*/
delete: operations['delete_tag_relationships_campaigns']
}
'/api/tags/{id}/relationships/lists/': {
/**
* Get Tag Relationships Lists
* @description Returns the IDs of all lists associated with the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Read`
* `Tags Read`
*/
get: operations['get_tag_relationships_lists']
/**
* Create Tag Relationships Lists
* @description Associate a tag with one or more lists. Any list cannot be associated with more than **100** tags.
*
* Use the request body to pass in the ID(s) of the lists(s) that will be associated with the tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Write`
* `Tags Write`
*/
post: operations['create_tag_relationships_lists']
/**
* Delete Tag Relationships Lists
* @description Remove a tag's association with one or more lists.
*
* Use the request body to pass in the ID(s) of the list(s) whose association with the tag will be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Write`
* `Tags Write`
*/
delete: operations['delete_tag_relationships_lists']
}
'/api/tags/{id}/relationships/segments/': {
/**
* Get Tag Relationships Segments
* @description Returns the IDs of all segments associated with the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Segments Read`
* `Tags Read`
*/
get: operations['get_tag_relationships_segments']
/**
* Create Tag Relationships Segments
* @description Associate a tag with one or more segments. Any segment cannot be associated with more than **100** tags.
*
* Use the request body to pass in the ID(s) of the segments(s) that will be associated with the tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Segments Write`
* `Tags Write`
*/
post: operations['create_tag_relationships_segments']
/**
* Delete Tag Relationships Segments
* @description Remove a tag's association with one or more segments.
*
* Use the request body to pass in the ID(s) of the segments(s) whose association with the tag will be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Segments Write`
* `Tags Write`
*/
delete: operations['delete_tag_relationships_segments']
}
'/api/tags/{id}/relationships/tag-group/': {
/**
* Get Tag Relationships Tag Group
* @description Returns the ids of all tag groups related to the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get: operations['get_tag_relationships_tag_group']
}
'/api/tag-groups/{id}/relationships/tags/': {
/**
* Get Tag Group Relationships Tags
* @description Returns the tag IDs of all tags inside the given tag group.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get: operations['get_tag_group_relationships_tags']
}
'/api/templates/': {
/**
* Get Templates
* @description Get all templates in an account.
* Filter to request a subset of all templates. Templates can be sorted by the following fields, in ascending and descending order: `id`, `name`, `created`, `updated`
* Returns a maximum of 20 results per page.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Templates Read`
*/
get: operations['get_templates']
/**
* Create Template
* @description Create a new custom HTML 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: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Templates Write`
*/
post: operations['create_template']
}
'/api/templates/{id}/': {
/**
* Get Template
* @description Get a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Templates Read`
*/
get: operations['get_template']
/**
* Delete Template
* @description Delete a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Templates Write`
*/
delete: operations['delete_template']
/**
* Update Template
* @description Update a template with the given template ID. Does not currently update drag & drop templates.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Templates Write`
*/
patch: operations['update_template']
}
'/api/template-render/': {
/**
* Create Template Render
* @description Render a template with the given template ID and context attribute. Returns the 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`
*/
post: operations['create_template_render']
}
'/api/template-clone/': {
/**
* Create Template Clone
* @description Create a clone of a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Templates Write`
*/
post: operations['create_template_clone']
}
'/client/subscriptions/': {
/**
* Create Client Subscription
* @description Create a new subscription for the given list ID and channel:
*
* * Email `email`
* * SMS `phone_number`
*
* This endpoint is specifically designed to be called from publicly-browseable, client-side environments only. To create subscriptions from server-based applications, please use [POST /api/profile-subscription-bulk-create-jobs](https://developers.klaviyo.com/en/reference/subscribe_profiles)<br><br>*Rate limits*:<br>Burst: `100/s`<br>Steady: `100/m`
*
* **Scopes:**
* `Subscriptions Write`
*/
post: operations['create_client_subscription']
}
'/client/events/': {
/**
* Create Client Event
* @description Create a new event to track a profile's activity.
* This endpoint is specifically designed to be called from publicly-browseable, client-side environments only. To create events from server-based applications, please use [POST /api/events](https://developers.klaviyo.com/en/reference/create_event)<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Write`
*/
post: operations['create_client_event']
}
'/client/profiles/': {
/**
* Create or Update Client Profile
* @description Create and update properties about a profile without tracking an associated event.
* This endpoint is specifically designed to be called from publicly-browseable, client-side environments only. To create profiles from server applications (e.g. custom server-side scripts / applications), please use [POST /api/profiles](https://developers.klaviyo.com/en/reference/create_profile)<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Profiles Write`
*/
post: operations['create_client_profile']
}
}
export type webhooks = Record<string, never>
export interface components {
schemas: {
CatalogItemResponseObjectResource: {
type: components['schemas']['CatalogItemEnum']
/**
* @description The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-ITEM-1
*/
id: string
attributes: {
/**
* @description The ID of the catalog item in an external system.
* @example SAMPLE-DATA-ITEM-1
*/
external_id?: string
/**
* @description The title of the catalog item.
* @example Ocean Blue Shirt (Sample)
*/
title?: string
/**
* @description A description of the catalog item.
* @example Ocean blue cotton shirt with a narrow collar and buttons down the front and long sleeves. Comfortable fit and titled kaleidoscope patterns.
*/
description?: string
/**
* @description This field can be used to set the price on the catalog item, which is what gets displayed for the item when included in emails. For most price-update use cases, you will also want to update the `price` on any child variants, using the [Update Catalog Variant Endpoint](https://developers.klaviyo.com/en/reference/update_catalog_variant).
* @example 42
*/
price?: number
/**
* @description URL pointing to the location of the catalog item on your website.
* @example https://via.placeholder.com/150
*/
url?: string
/**
* @description URL pointing to the location of a full image of the catalog item.
* @example https://via.placeholder.com/300
*/
image_full_url?: string
/**
* @description URL pointing to the location of an image thumbnail of the catalog item
* @example https://via.placeholder.com/150
*/
image_thumbnail_url?: string
/**
* @description List of URLs pointing to the locations of images of the catalog item.
* @example [
* "https://via.placeholder.com/150"
* ]
*/
images?: string[]
/**
* @description Flat JSON blob to provide custom metadata about the catalog item. May not exceed 100kb.
* @example {
* "Top Pick": true
* }
*/
custom_metadata?: Record<string, never>
/**
* @description Boolean value indicating whether the catalog item is published.
* @example true
*/
published?: boolean
/**
* Format: date-time
* @description Date and time when the catalog item was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the catalog item was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
GetCatalogItemResponseCollectionCompoundDocument: {
data: (components['schemas']['CatalogItemResponseObjectResource'] & {
relationships?: {
variants?: {
data: {
/** @enum {string} */
type: 'catalog-variant'
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
included?: components['schemas']['CatalogVariantResponseObjectResource'][]
}
GetCatalogItemResponseCompoundDocument: {
data: components['schemas']['CatalogItemResponseObjectResource'] & {
relationships?: {
variants?: {
data: {
/** @enum {string} */
type: 'catalog-variant'
id: string
}[]
}
}
}
included?: components['schemas']['CatalogVariantResponseObjectResource'][]
}
CatalogVariantResponseObjectResource: {
type: components['schemas']['CatalogVariantEnum']
/**
* @description The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM
*/
id: string
attributes: {
/**
* @description The ID of the catalog item variant in an external system.
* @example SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM
*/
external_id?: string
/**
* @description The title of the catalog item variant.
* @example Ocean Blue Shirt (Sample) Variant Medium
*/
title?: string
/**
* @description A description of the catalog item variant.
* @example Ocean blue cotton shirt with a narrow collar and buttons down the front and long sleeves. Comfortable fit and titled kaleidoscope patterns.
*/
description?: string
/**
* @description The SKU of the catalog item variant.
* @example OBS-MD
*/
sku?: string
/**
* @description This field controls the visibility of this catalog item variant in product feeds/blocks. This field supports the following values:
* `1`: a product will not appear in dynamic product recommendation feeds and blocks if it is out of stock.
* `0` or `2`: a product can appear in dynamic product recommendation feeds and blocks regardless of inventory quantity.
*
* @example 2
* @enum {integer}
*/
inventory_policy?: 0 | 1 | 2
/**
* @description The quantity of the catalog item variant currently in stock.
* @example 25
*/
inventory_quantity?: number
/**
* @description This field can be used to set the price on the catalog item variant, which is what gets displayed for the item variant when included in emails. For most price-update use cases, you will also want to update the `price` on any parent items using the [Update Catalog Item Endpoint](https://developers.klaviyo.com/en/reference/update_catalog_item).
* @example 42
*/
price?: number
/**
* @description URL pointing to the location of the catalog item variant on your website.
* @example https://via.placeholder.com/150
*/
url?: string
/**
* @description URL pointing to the location of a full image of the catalog item variant.
* @example https://via.placeholder.com/300
*/
image_full_url?: string
/**
* @description URL pointing to the location of an image thumbnail of the catalog item variant.
* @example https://via.placeholder.com/150
*/
image_thumbnail_url?: string
/**
* @description List of URLs pointing to the locations of images of the catalog item variant.
* @example [
* "https://via.placeholder.com/150"
* ]
*/
images?: string[]
/**
* @description Flat JSON blob to provide custom metadata about the catalog item variant. May not exceed 100kb.
* @example {
* "Top Pick": true
* }
*/
custom_metadata?: Record<string, never>
/**
* @description Boolean value indicating whether the catalog item variant is published.
* @example true
*/
published?: boolean
/**
* Format: date-time
* @description Date and time when the catalog item variant was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the catalog item variant was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
GetCatalogVariantResponseCollection: {
data: components['schemas']['CatalogVariantResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetCatalogVariantResponse: {
data: components['schemas']['CatalogVariantResponseObjectResource']
}
CatalogCategoryResponseObjectResource: {
type: components['schemas']['CatalogCategoryEnum']
/**
* @description The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL
*/
id: string
attributes: {
/**
* @description The ID of the catalog category in an external system.
* @example SAMPLE-DATA-CATEGORY-APPAREL
*/
external_id?: string
/**
* @description The name of the catalog category.
* @example Sample Data Category Apparel
*/
name?: string
/**
* Format: date-time
* @description Date and time when the catalog category was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
GetCatalogCategoryResponseCollection: {
data: components['schemas']['CatalogCategoryResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetCatalogCategoryResponse: {
data: components['schemas']['CatalogCategoryResponseObjectResource']
}
GetCatalogCategoryItemListResponseCollection: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
GetCatalogItemCategoryListResponseCollection: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
EventResponseObjectResource: {
type: components['schemas']['EventEnum']
/** @description The Event ID */
id: string
attributes: {
/** @description The Metric ID */
metric_id: string
/** @description Profile ID of the associated profile, if available */
profile_id?: string
/** @description Event timestamp in seconds */
timestamp?: string
/** @description Event properties, can include attribution data, identifiers and extra properties */
event_properties?: Record<string, never>
/** @description Event timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm) */
datetime?: string
/** @description A unique identifier for the event, this can be used as a cursor in pagination */
uuid?: string
}
links: components['schemas']['ObjectLinks']
}
GetEventResponseCollectionCompoundDocument: {
data: (components['schemas']['EventResponseObjectResource'] & {
relationships?: {
metrics?: {
data: {
/** @enum {string} */
type: 'metric'
id: string
}[]
}
profiles?: {
data: {
/** @enum {string} */
type: 'profile'
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
included?: (
| components['schemas']['MetricResponseObjectResource']
| components['schemas']['ProfileResponseObjectResource']
)[]
}
GetEventResponseCompoundDocument: {
data: components['schemas']['EventResponseObjectResource'] & {
relationships?: {
metrics?: {
data: {
/** @enum {string} */
type: 'metric'
id: string
}[]
}
profiles?: {
data: {
/** @enum {string} */
type: 'profile'
id: string
}[]
}
}
}
included?: (
| components['schemas']['MetricResponseObjectResource']
| components['schemas']['ProfileResponseObjectResource']
)[]
}
MetricResponseObjectResource: {
type: components['schemas']['MetricEnum']
/** @description The Metric ID */
id: string
attributes: {
/** @description The name of the metric */
name?: string
/** @description Creation time in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm) */
created?: string
/** @description Last updated time in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm) */
updated?: string
/** @description The integration associated with the event */
integration?: Record<string, never>
}
links: components['schemas']['ObjectLinks']
}
GetMetricResponseCollection: {
data: components['schemas']['MetricResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
ProfileLocation: {
/**
* @description First line of street address
* @example 89 E 42nd St
*/
address1?: string
/**
* @description Second line of street address
* @example 1st floor
*/
address2?: string
/**
* @description City name
* @example New York
*/
city?: string
/**
* @description Country name
* @example United States
*/
country?: string
/**
* @description Latitude coordinate. We recommend providing a precision of four decimal places.
* @example 40.7128
*/
latitude?: string | number
/**
* @description Longitude coordinate. We recommend providing a precision of four decimal places.
* @example 74.0060
*/
longitude?: string | number
/**
* @description Region within a country, such as state or province
* @example NY
*/
region?: string
/**
* @description Zip code
* @example 10017
*/
zip?: string
/**
* @description Time zone name. We recommend using time zones from the IANA Time Zone Database.
* @example America/New_York
*/
timezone?: string
}
EmailMarketingSuppression: {
/**
* @description The reason the profile was suppressed from the list.
* @example HARD_BOUNCE
*/
reason: string
/**
* Format: date-time
* @description The timestamp when the profile was suppressed from the list, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2023-02-21T20:07:38+00:00
*/
timestamp: string
}
EmailMarketingListSuppression: {
/**
* @description The ID of list to which the suppression applies.
* @example Y6nRLr
*/
list_id: string
/**
* @description The reason the profile was suppressed from the list.
* @example USER_SUPPRESSED
*/
reason: string
/**
* Format: date-time
* @description The timestamp when the profile was suppressed from the list, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2023-02-21T20:07:38+00:00
*/
timestamp: string
}
EmailMarketing: {
/**
* @description The consent status for email marketing.
* @example SUBSCRIBED
*/
consent: string
/**
* Format: date-time
* @description The timestamp when consent record or updated for email marketing, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2023-02-21T20:07:38+00:00
*/
timestamp?: string
/**
* @description The method by which the profile was subscribed to email marketing.
* @example PREFERENCE_PAGE
*/
method: string
/**
* @description Additional details about the method by which the profile was subscribed to SMS marketing. This may be empty if no details were provided.
* @example mydomain.com/signup
*/
method_detail?: string
/**
* @description Additional detail provided by the caller when the profile was subscribed. This may be empty if no details were provided.
* @example marketing drive
*/
custom_method_detail?: string
/**
* @description Whether the profile was subscribed to email marketing using a double opt-in.
* @example True
*/
double_optin?: boolean
/** @description The global email marketing suppressions for this profile. */
suppressions?: components['schemas']['EmailMarketingSuppression']
/** @description The list suppressions for this profile. */
list_suppressions?: components['schemas']['EmailMarketingListSuppression']
}
EmailChannel: {
/** @description The email marketing subscription. */
marketing?: components['schemas']['EmailMarketing']
}
SMSMarketing: {
/**
* @description The consent status for SMS marketing.
* @example SUBSCRIBED
*/
consent: string
/**
* Format: date-time
* @description The timestamp when consent record or updated for SMS marketing, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2023-02-21T20:07:38+00:00
*/
timestamp: string
/**
* @description The method by which the profile was subscribed to SMS marketing.
* @example TEXT
*/
method: string
/**
* @description Additional details about the method which the profile was subscribed to SMS marketing. This may be empty if no details were provided.
* @example JOIN
*/
method_detail: string
}
SMSChannel: {
/** @description The SMS marketing subscription. */
marketing?: components['schemas']['SMSMarketing']
}
Subscriptions: {
/** @description The email channel subscription. */
email?: components['schemas']['EmailChannel']
/** @description The SMS channel subscription. */
sms?: components['schemas']['SMSChannel']
}
PredictiveAnalytics: {
/**
* @description Total value of all historically placed orders
* @example 93.87
*/
historic_clv?: number
/**
* @description Predicted value of all placed orders in the next 365 days
* @example 27.24
*/
predicted_clv?: number
/**
* @description Sum of historic and predicted CLV
* @example 121.11
*/
total_clv?: number
/**
* @description Number of already placed orders
* @example 2
*/
historic_number_of_orders?: number
/**
* @description Predicted number of placed orders in the next 365 days
* @example 0.54
*/
predicted_number_of_orders?: number
/**
* @description Average number of days between orders (None if only one order has been placed)
* @example 189
*/
average_days_between_orders?: number
/**
* @description Average value of placed orders
* @example 46.94
*/
average_order_value?: number
/**
* @description Probability the customer has churned
* @example 0.89
*/
churn_probability?: number
/**
* Format: date-time
* @description Expected date of next order, as calculated at the time of their most recent order
* @example 2022-11-08T00:00:00
*/
expected_date_of_next_order?: string
}
ProfileResponseObjectResource: {
type: components['schemas']['ProfileEnum']
/**
* @description Primary key that uniquely identifies this profile. Generated by Klaviyo.
* @example 01GDDKASAP8TKDDA2GRZDSVP4H
*/
id: string
attributes: {
/**
* @description Individual's email address
* @example [email protected]
*/
email?: string
/**
* @description Individual's phone number in E.164 format
* @example +15005550006
*/
phone_number?: string
/**
* @description A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.
* @example 63f64a2b-c6bf-40c7-b81f-bed08162edbe
*/
external_id?: string
/**
* @description Individual's first name
* @example Sarah
*/
first_name?: string
/**
* @description Individual's last name
* @example Mason
*/
last_name?: string
/**
* @description Name of the company or organization within the company for whom the individual works
* @example Klaviyo
*/
organization?: string
/**
* @description Individual's job title
* @example Engineer
*/
title?: string
/**
* @description URL pointing to the location of a profile image
* @example https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg
*/
image?: string
/**
* Format: date-time
* @description Date and time when the profile was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the profile was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
updated?: string
/**
* Format: date-time
* @description Date and time of the most recent event the triggered an update to the profile, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
last_event_date?: string
location?: components['schemas']['ProfileLocation']
/**
* @description An object containing key/value pairs for any custom properties assigned to this profile
* @example {
* "pseudonym": "Dr. Octopus"
* }
*/
properties?: Record<string, never>
subscriptions?: components['schemas']['Subscriptions']
}
links: components['schemas']['ObjectLinks']
}
GetProfileResponseCollection: {
data: ({
type?: components['schemas']['ProfileEnum']
attributes?: {
predictive_analytics?: components['schemas']['PredictiveAnalytics']
}
} & components['schemas']['ProfileResponseObjectResource'])[]
links: components['schemas']['CollectionLinks']
}
GetEventMetricsRelationshipListResponseCollection: {
data: {
/** @enum {string} */
type: 'metric'
id: string
}[]
}
GetEventProfilesRelationshipListResponseCollection: {
data: {
/** @enum {string} */
type: 'profile'
id: string
}[]
}
GetMetricResponse: {
data: components['schemas']['MetricResponseObjectResource']
}
ListResponseObjectResource: {
type: components['schemas']['ListEnum']
/**
* @description Primary key that uniquely identifies this list. Generated by Klaviyo.
* @example Y6nRLr
*/
id: string
attributes: {
/**
* @description A helpful name to label the list
* @example Newsletter
*/
name?: string
/**
* Format: date-time
* @description Date and time when the list was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the list was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
GetListResponseCollectionCompoundDocument: {
data: components['schemas']['ListResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetListResponseCompoundDocument: {
data: components['schemas']['ListResponseObjectResource']
}
GetListTagRelationshipListResponseCollection: {
data: {
/** @enum {string} */
type: 'tag'
id: string
}[]
}
ListTagResponseObjectResource: {
type: components['schemas']['TagEnum']
/**
* @description The Tag ID
* @example abcd1234-ef56-gh78-ij90-abcdef123456
*/
id: string
attributes: {
/**
* @description The Tag name
* @example My Tag
*/
name: string
}
links: components['schemas']['ObjectLinks']
}
GetListTagResponseCollection: {
data: components['schemas']['ListTagResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetListRelationshipsResponseCollection: {
data: {
/** @enum {string} */
type: 'profile'
id: string
}[]
}
SegmentResponseObjectResource: {
type: components['schemas']['SegmentEnum']
id: string
attributes: {
/**
* @description A helpful name to label the segment
* @example Repeat Purchasers
*/
name?: string
/**
* Format: date-time
* @description Date and time when the segment was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the segment was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
GetSegmentResponseCollectionCompoundDocument: {
data: components['schemas']['SegmentResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetSegmentResponseCompoundDocument: {
data: components['schemas']['SegmentResponseObjectResource']
}
GetSegmentTagRelationshipListResponseCollection: {
data: {
/** @enum {string} */
type: 'tag'
id: string
}[]
}
SegmentTagResponseObjectResource: {
type: components['schemas']['TagEnum']
/**
* @description The Tag ID
* @example abcd1234-ef56-gh78-ij90-abcdef123456
*/
id: string
attributes: {
/**
* @description The Tag name
* @example My Tag
*/
name: string
}
links: components['schemas']['ObjectLinks']
}
GetSegmentTagResponseCollection: {
data: components['schemas']['SegmentTagResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetSegmentRelationshipsResponseCollection: {
data: {
/** @enum {string} */
type: 'profile'
id: string
}[]
}
GetProfileResponseCollectionCompoundDocument: {
data: (components['schemas']['ProfileResponseObjectResource'] & {
relationships?: {
lists?: {
data: {
/** @enum {string} */
type: 'list'
id: string
}[]
}
segments?: {
data: {
/** @enum {string} */
type: 'segment'
id: string
}[]
}
}
} & {
type?: components['schemas']['ProfileEnum']
attributes?: {
predictive_analytics?: components['schemas']['PredictiveAnalytics']
}
})[]
links: components['schemas']['CollectionLinks']
included?: (
| components['schemas']['ListResponseObjectResource']
| components['schemas']['SegmentResponseObjectResource']
)[]
}
GetProfileResponseCompoundDocument: {
data: components['schemas']['ProfileResponseObjectResource'] & {
relationships?: {
lists?: {
data: {
/** @enum {string} */
type: 'list'
id: string
}[]
}
segments?: {
data: {
/** @enum {string} */
type: 'segment'
id: string
}[]
}
}
} & {
type?: components['schemas']['ProfileEnum']
attributes?: {
predictive_analytics?: components['schemas']['PredictiveAnalytics']
}
}
included?: (
| components['schemas']['ListResponseObjectResource']
| components['schemas']['SegmentResponseObjectResource']
)[]
}
GetListResponseCollection: {
data: components['schemas']['ListResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetProfileListRelationshipsResponseCollection: {
data: {
/** @enum {string} */
type: 'list'
id: string
}[]
}
GetSegmentResponseCollection: {
data: components['schemas']['SegmentResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetProfileSegmentRelationshipsResponseCollection: {
data: {
/** @enum {string} */
type: 'segment'
id: string
}[]
}
FlowResponseObjectResource: {
type: components['schemas']['FlowEnum']
id: string
attributes: {
name?: string
status?: string
archived?: boolean
/**
* Format: date-time
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @example 2022-11-08T00:00:00
*/
updated?: string
trigger_type?: string
}
links: components['schemas']['ObjectLinks']
}
GetFlowResponseCollectionCompoundDocument: {
data: (components['schemas']['FlowResponseObjectResource'] & {
relationships?: {
'flow-actions'?: {
data: {
/** @enum {string} */
type: 'flow-action'
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
included?: components['schemas']['FlowActionResponseObjectResource'][]
}
GetFlowResponseCompoundDocument: {
data: components['schemas']['FlowResponseObjectResource'] & {
relationships?: {
'flow-actions'?: {
data: {
/** @enum {string} */
type: 'flow-action'
id: string
}[]
}
}
}
included?: components['schemas']['FlowActionResponseObjectResource'][]
}
UtmParamInfo: {
name: string
value: string
}
EmailTrackingOptions: {
add_utm: boolean
utm_params: components['schemas']['UtmParamInfo'][]
is_tracking_opens: boolean
is_tracking_clicks: boolean
}
SMSTrackingOptions: {
add_utm: boolean
utm_params: components['schemas']['UtmParamInfo'][]
}
SendOptions: {
use_smart_sending: boolean
is_transactional: boolean
}
SMSRenderOptions: {
shorten_links: boolean
add_org_prefix: boolean
add_info_link: boolean
add_opt_out_language: boolean
}
FlowActionResponseObjectResource: {
type: components['schemas']['FlowActionEnum']
id: string
attributes: {
action_type?: string
status?: string
/**
* Format: date-time
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @example 2022-11-08T00:00:00
*/
updated?: string
settings?: Record<string, never>
tracking_options?:
| components['schemas']['EmailTrackingOptions']
| components['schemas']['SMSTrackingOptions']
send_options?: components['schemas']['SendOptions']
render_options?: components['schemas']['SMSRenderOptions']
}
links: components['schemas']['ObjectLinks']
}
GetFlowActionResponseCollection: {
data: components['schemas']['FlowActionResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetFlowFlowActionRelationshipListResponseCollection: {
data: {
/** @enum {string} */
type: 'flow-action'
id: string
}[]
}
GetFlowTagRelationshipListResponseCollection: {
data: {
/** @enum {string} */
type: 'tag'
id: string
}[]
}
FlowTagResponseObjectResource: {
type: components['schemas']['TagEnum']
/**
* @description The Tag ID
* @example abcd1234-ef56-gh78-ij90-abcdef123456
*/
id: string
attributes: {
/**
* @description The Tag name
* @example My Tag
*/
name: string
}
links: components['schemas']['ObjectLinks']
}
GetFlowTagResponseCollection: {
data: components['schemas']['FlowTagResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetFlowActionResponseCompoundDocument: {
data: components['schemas']['FlowActionResponseObjectResource'] & {
relationships?: {
'flow-messages'?: {
data: {
/** @enum {string} */
type: 'flow-message'
id: string
}[]
}
flows?: {
data: {
/** @enum {string} */
type: 'flow'
id: string
}[]
}
}
}
included?: (
| components['schemas']['FlowMessageResponseObjectResource']
| components['schemas']['FlowResponseObjectResource']
)[]
}
GetFlowResponse: {
data: components['schemas']['FlowResponseObjectResource']
}
GetFlowActionFlowRelationshipResponseCollection: {
data: {
/** @enum {string} */
type: 'flow'
id: string
}
}
EmailMessageContent: {
subject: string
preview_text: string
from_email: string
from_name: string
}
SMSMessageContent: {
body: string
media: string
}
FlowMessageResponseObjectResource: {
type: components['schemas']['FlowMessageEnum']
id: string
attributes: {
name: string
channel: string
content:
| components['schemas']['EmailMessageContent']
| components['schemas']['SMSMessageContent']
/**
* Format: date-time
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
GetFlowMessageResponseCollection: {
data: components['schemas']['FlowMessageResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetFlowActionFlowMessageRelationshipResponseCollection: {
data: {
/** @enum {string} */
type: 'flow-message'
id: string
}
}
GetFlowMessageResponseCompoundDocument: {
data: components['schemas']['FlowMessageResponseObjectResource'] & {
relationships?: {
'flow-action'?: {
data: {
/** @enum {string} */
type: 'flow-action'
id: string
}
}
}
}
included?: components['schemas']['FlowActionResponseObjectResource'][]
}
GetFlowActionResponse: {
data: components['schemas']['FlowActionResponseObjectResource']
}
GetFlowMessageFlowActionRelationshipResponseCollection: {
data: {
/** @enum {string} */
type: 'flow-action'
id: string
}
}
AudiencesSubObject: {
/**
* @description A list of included audiences
* @example [
* "Y6nRLr"
* ]
*/
included?: string[]
/**
* @description An optional list of excluded audiences
* @example [
* "UTd5ui"
* ]
*/
excluded?: string[]
}
SendOptionsSubObject: {
/** @description Use smart sending. Defaults to True */
use_smart_sending?: boolean
}
UTMParamsSubObject: {
/**
* @description Name of the UTM param
* @example utm_medium
*/
name: string
/**
* @description Value of the UTM param. Can be templated data.
* @example campaign
*/
value: string
}
TrackingOptionsSubObject: {
/** @description Whether the campaign is tracking open events. If not specified, uses company defaults. */
is_tracking_opens?: boolean
/** @description Whether the campaign is tracking click events. If not specified, uses company defaults. */
is_tracking_clicks?: boolean
/** @description Whether the campaign needs UTM parameters. If set to False, UTM params will not be used. */
is_add_utm?: boolean
/** @description A list of UTM parameters. If an empty list is given and is_add_utm is True, uses company defaults. */
utm_params?: components['schemas']['UTMParamsSubObject'][]
}
StaticScheduleOptions: {
/**
* Format: date-time
* @description The time to send at
* @example 2022-11-08T00:00:00
*/
datetime: string
/** @description If the campaign should be sent with local recipient timezone send (requires UTC time) or statically sent at the given time. Defaults to False. */
is_local?: boolean
/** @description Determines if we should send to local recipient timezone if the given time has passed. Only applicable to local sends. Defaults to False. */
send_past_recipients_immediately?: boolean
}
ThrottledScheduleOptions: {
/**
* Format: date-time
* @description The time to send at
*/
datetime: string
/** @description The percentage of recipients per hour to send to. Allowed values: [10, 11, 13, 14, 17, 20, 25, 33, 50] */
throttle_percentage: number
}
STOScheduleOptions: {
/**
* Format: date
* @description The day to send on
*/
date: string
}
SendStrategySubObject: {
/**
* @description Describes the shape of the options object. Allowed values: ['static', 'throttled', 'immediate', 'smart_send_time']
* @example static
*/
method: string
/** @description The send configuration options the campaign will send with. These define variables that alter the send strategy and must match the given method. Intended to be used with the 'static' method. */
options_static?: components['schemas']['StaticScheduleOptions']
/** @description The send configuration options the campaign will send with. These define variables that alter the send strategy and must match the given method. Intended to be used with the 'throttled' method. */
options_throttled?: components['schemas']['ThrottledScheduleOptions']
/** @description The send configuration options the campaign will send with. These define variables that alter the send strategy and must match the given method. Intended to be used with the 'smart_send_time' method. */
options_sto?: components['schemas']['STOScheduleOptions']
}
CampaignResponseObjectResource: {
type: components['schemas']['CampaignEnum']
/** @description The campaign ID */
id: string
attributes: {
/** @description The campaign name */
name: string
/** @description The current status of the campaign */
status: string
/** @description Whether the campaign has been archived or not */
archived: boolean
/** @description The type of campaign */
channel: string
/** @description The audiences to be included and/or excluded from the campaign */
audiences: components['schemas']['AudiencesSubObject']
/** @description Options to use when sending a campaign */
send_options: components['schemas']['SendOptionsSubObject']
/** @description The id of the message associated with the campaign */
message: string
/** @description The tracking options associated with the campaign */
tracking_options: components['schemas']['TrackingOptionsSubObject']
/** @description The send strategy the campaign will send with */
send_strategy: components['schemas']['SendStrategySubObject']
/**
* Format: date-time
* @description The datetime when the campaign was created
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* Format: date-time
* @description The datetime when the campaign was scheduled for future sending
* @example 2022-11-08T00:00:00
*/
scheduled_at: string
/**
* Format: date-time
* @description The datetime when the campaign was last updated by a user or the system
* @example 2022-11-08T00:00:00
*/
updated_at: string
/**
* Format: date-time
* @description The datetime when the campaign will be / was sent or None if not yet scheduled by a send_job.
* @example 2022-11-08T00:00:00
*/
send_time: string
}
links: components['schemas']['ObjectLinks']
}
GetCampaignResponseCollectionCompoundDocument: {
data: (components['schemas']['CampaignResponseObjectResource'] & {
relationships?: {
tags?: {
data: {
/** @enum {string} */
type: 'tag'
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
included?: components['schemas']['TagResponseObjectResource'][]
}
GetCampaignResponseCompoundDocument: {
data: components['schemas']['CampaignResponseObjectResource'] & {
relationships?: {
tags?: {
data: {
/** @enum {string} */
type: 'tag'
id: string
}[]
}
}
}
included?: components['schemas']['TagResponseObjectResource'][]
}
ContentSubObject: {
/**
* @description The subject of the message
* @example Buy our product!
*/
subject?: string
/**
* @description Preview text associated with the message
* @example My preview text
*/
preview_text?: string
/**
* @description The email the message should be sent from
* @example [email protected]
*/
from_email?: string
/**
* @description The label associated with the from_email
* @example My Company
*/
from_label?: string
/**
* @description The ID of the template associated to the message
* @example RipRmi
*/
template_id?: string
/**
* @description The name of the template associated to the message
* @example My email template
*/
template_name?: string
}
SendTimeSubObject: {
/**
* Format: date-time
* @description The datetime that the message is to be sent
* @example 2022-11-08T00:00:00
*/
datetime: string
/** @description Whether that datetime is to be a local datetime for the recipient */
is_local: boolean
}
CampaignMessageResponseObjectResource: {
type: components['schemas']['CampaignMessageEnum']
/** @description The message ID */
id: string
attributes: {
/** @description The label or name on the message */
label: string
/** @description The channel the message is to be sent on */
channel: string
/** @description Additional attributes relating to the content of the message */
content: components['schemas']['ContentSubObject']
/** @description The list of appropriate Send Time Sub-objects associated with the message */
send_times?: components['schemas']['SendTimeSubObject'][]
/**
* Format: date-time
* @description The datetime when the message was created
* @example 2022-11-08T00:00:00
*/
created_at?: string
/**
* Format: date-time
* @description The datetime when the message was last updated
* @example 2022-11-08T00:00:00
*/
updated_at?: string
/** @description The parent campaign id */
campaign_id: string
}
links: components['schemas']['ObjectLinks']
}
GetCampaignMessageResponse: {
data: components['schemas']['CampaignMessageResponseObjectResource']
}
GetCampaignTagRelationshipListResponseCollection: {
data: {
/** @enum {string} */
type: 'tag'
id: string
}[]
}
CampaignTagResponseObjectResource: {
type: components['schemas']['TagEnum']
/**
* @description The Tag ID
* @example abcd1234-ef56-gh78-ij90-abcdef123456
*/
id: string
attributes: {
/**
* @description The Tag name
* @example My Tag
*/
name: string
}
links: components['schemas']['ObjectLinks']
}
GetCampaignTagResponseCollection: {
data: components['schemas']['CampaignTagResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
CampaignSendJobResponseObjectResource: {
type: components['schemas']['CampaignSendJobEnum']
/** @description The ID of the campaign to send */
id: string
attributes: {
/**
* @description The status of the send job
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
}
links: components['schemas']['ObjectLinks']
}
GetCampaignSendJobResponse: {
data: components['schemas']['CampaignSendJobResponseObjectResource']
}
CampaignRecipientEstimationJobResponseObjectResource: {
type: components['schemas']['CampaignRecipientEstimationJobEnum']
/**
* @description The ID of the campaign used for estimating recipients
* @example 01GMRWDSA0ARTAKE1SFX8JGXAY
*/
id: string
attributes: {
/**
* @description The status of the recipient estimation job
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
}
links: components['schemas']['ObjectLinks']
}
GetCampaignRecipientEstimationJobResponse: {
data: components['schemas']['CampaignRecipientEstimationJobResponseObjectResource']
}
CampaignRecipientEstimationResponseObjectResource: {
type: components['schemas']['CampaignRecipientEstimationEnum']
/** @description The ID of the campaign for which to get the estimated number of recipients */
id: string
attributes: {
/** @description The estimated number of unique recipients the campaign will send to */
estimated_recipient_count: number
}
links: components['schemas']['ObjectLinks']
}
GetCampaignRecipientEstimationResponse: {
data: components['schemas']['CampaignRecipientEstimationResponseObjectResource']
}
TemplateResponseObjectResource: {
type: components['schemas']['TemplateEnum']
/** @description The ID of template */
id: string
attributes: {
/**
* @description The ID of the company the template belongs to
* @example COMPANY_ID
*/
company_id: string
/** @description The name of the template */
name: string
/**
* @description `editor_type` has a fixed set of values:
* * SYSTEM_DRAGGABLE: indicates a drag-and-drop editor template
* * SIMPLE: A rich text editor template
* * CODE: A custom HTML template
* * USER_DRAGGABLE: A hybrid template, using custom HTML in the drag-and-drop editor
*/
editor_type: string
/** @description The rendered HTML of the template */
html: string
/** @description The template plain_text */
text?: string
/**
* Format: date-time
* @description The date the template was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description The date the template was updated in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
GetTemplateResponseCollection: {
data: components['schemas']['TemplateResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetTemplateResponse: {
data: components['schemas']['TemplateResponseObjectResource']
}
ErrorSource: {
/**
* @description A pointer to the source of the error in the request payload.
* @default /data
* @example /data
*/
pointer: string
}
CatalogJobErrorPayload: {
/**
* @description Unique identifier for the error.
* @example e4eebb08-b055-4a6f-bb13-c8cb69c9eb94
*/
id: string
/**
* @description A code for classifying the error type.
* @example invalid
*/
code: string
/**
* @description A high-level message about the error.
* @example Invalid input
*/
title: string
/**
* @description Specific details about the error.
* @example The payload provided in the request is invalid.
*/
detail: string
/** @description Additional information on the source of the error. */
source: components['schemas']['ErrorSource']
}
CatalogItemCreateJobResponseObjectResource: {
type: components['schemas']['CatalogItemBulkCreateJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
links: components['schemas']['ObjectLinks']
}
GetCatalogItemCreateJobResponseCollectionCompoundDocument: {
data: (components['schemas']['CatalogItemCreateJobResponseObjectResource'] & {
relationships?: {
items?: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
included?: components['schemas']['CatalogItemResponseObjectResource'][]
}
GetCatalogItemCreateJobResponseCompoundDocument: {
data: components['schemas']['CatalogItemCreateJobResponseObjectResource'] & {
relationships?: {
items?: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
}
}
included?: components['schemas']['CatalogItemResponseObjectResource'][]
}
CatalogItemUpdateJobResponseObjectResource: {
type: components['schemas']['CatalogItemBulkUpdateJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
links: components['schemas']['ObjectLinks']
}
GetCatalogItemUpdateJobResponseCollectionCompoundDocument: {
data: (components['schemas']['CatalogItemUpdateJobResponseObjectResource'] & {
relationships?: {
items?: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
included?: components['schemas']['CatalogItemResponseObjectResource'][]
}
GetCatalogItemUpdateJobResponseCompoundDocument: {
data: components['schemas']['CatalogItemUpdateJobResponseObjectResource'] & {
relationships?: {
items?: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
}
}
included?: components['schemas']['CatalogItemResponseObjectResource'][]
}
CatalogItemDeleteJobResponseObjectResource: {
type: components['schemas']['CatalogItemBulkDeleteJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
links: components['schemas']['ObjectLinks']
}
GetCatalogItemDeleteJobResponseCollection: {
data: (components['schemas']['CatalogItemDeleteJobResponseObjectResource'] & {
relationships?: {
items?: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
}
GetCatalogItemDeleteJobResponse: {
data: components['schemas']['CatalogItemDeleteJobResponseObjectResource'] & {
relationships?: {
items?: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
}
}
}
CatalogVariantCreateJobResponseObjectResource: {
type: components['schemas']['CatalogVariantBulkCreateJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
links: components['schemas']['ObjectLinks']
}
GetCatalogVariantCreateJobResponseCollectionCompoundDocument: {
data: (components['schemas']['CatalogVariantCreateJobResponseObjectResource'] & {
relationships?: {
variants?: {
data: {
/** @enum {string} */
type: 'catalog-variant'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM */
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
included?: components['schemas']['CatalogVariantResponseObjectResource'][]
}
GetCatalogVariantCreateJobResponseCompoundDocument: {
data: components['schemas']['CatalogVariantCreateJobResponseObjectResource'] & {
relationships?: {
variants?: {
data: {
/** @enum {string} */
type: 'catalog-variant'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM */
id: string
}[]
}
}
}
included?: components['schemas']['CatalogVariantResponseObjectResource'][]
}
CatalogVariantUpdateJobResponseObjectResource: {
type: components['schemas']['CatalogVariantBulkUpdateJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
links: components['schemas']['ObjectLinks']
}
GetCatalogVariantUpdateJobResponseCollectionCompoundDocument: {
data: (components['schemas']['CatalogVariantUpdateJobResponseObjectResource'] & {
relationships?: {
variants?: {
data: {
/** @enum {string} */
type: 'catalog-variant'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM */
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
included?: components['schemas']['CatalogVariantResponseObjectResource'][]
}
GetCatalogVariantUpdateJobResponseCompoundDocument: {
data: components['schemas']['CatalogVariantUpdateJobResponseObjectResource'] & {
relationships?: {
variants?: {
data: {
/** @enum {string} */
type: 'catalog-variant'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM */
id: string
}[]
}
}
}
included?: components['schemas']['CatalogVariantResponseObjectResource'][]
}
CatalogVariantDeleteJobResponseObjectResource: {
type: components['schemas']['CatalogVariantBulkDeleteJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
links: components['schemas']['ObjectLinks']
}
GetCatalogVariantDeleteJobResponseCollection: {
data: (components['schemas']['CatalogVariantDeleteJobResponseObjectResource'] & {
relationships?: {
variants?: {
data: {
/** @enum {string} */
type: 'catalog-variant'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM */
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
}
GetCatalogVariantDeleteJobResponse: {
data: components['schemas']['CatalogVariantDeleteJobResponseObjectResource'] & {
relationships?: {
variants?: {
data: {
/** @enum {string} */
type: 'catalog-variant'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM */
id: string
}[]
}
}
}
}
CatalogCategoryCreateJobResponseObjectResource: {
type: components['schemas']['CatalogCategoryBulkCreateJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
links: components['schemas']['ObjectLinks']
}
GetCatalogCategoryCreateJobResponseCollectionCompoundDocument: {
data: (components['schemas']['CatalogCategoryCreateJobResponseObjectResource'] & {
relationships?: {
categories?: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
included?: components['schemas']['CatalogCategoryResponseObjectResource'][]
}
GetCatalogCategoryCreateJobResponseCompoundDocument: {
data: components['schemas']['CatalogCategoryCreateJobResponseObjectResource'] & {
relationships?: {
categories?: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
}
}
included?: components['schemas']['CatalogCategoryResponseObjectResource'][]
}
CatalogCategoryUpdateJobResponseObjectResource: {
type: components['schemas']['CatalogCategoryBulkUpdateJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
links: components['schemas']['ObjectLinks']
}
GetCatalogCategoryUpdateJobResponseCollectionCompoundDocument: {
data: (components['schemas']['CatalogCategoryUpdateJobResponseObjectResource'] & {
relationships?: {
categories?: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
included?: components['schemas']['CatalogCategoryResponseObjectResource'][]
}
GetCatalogCategoryUpdateJobResponseCompoundDocument: {
data: components['schemas']['CatalogCategoryUpdateJobResponseObjectResource'] & {
relationships?: {
categories?: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
}
}
included?: components['schemas']['CatalogCategoryResponseObjectResource'][]
}
CatalogCategoryDeleteJobResponseObjectResource: {
type: components['schemas']['CatalogCategoryBulkDeleteJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
links: components['schemas']['ObjectLinks']
}
GetCatalogCategoryDeleteJobResponseCollection: {
data: (components['schemas']['CatalogCategoryDeleteJobResponseObjectResource'] & {
relationships?: {
categories?: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
}
})[]
links: components['schemas']['CollectionLinks']
}
GetCatalogCategoryDeleteJobResponse: {
data: components['schemas']['CatalogCategoryDeleteJobResponseObjectResource'] & {
relationships?: {
categories?: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
}
}
}
TagResponseObjectResource: {
type: components['schemas']['TagEnum']
/**
* @description The Tag ID
* @example abcd1234-ef56-gh78-ij90-abcdef123456
*/
id: string
attributes: {
/**
* @description The Tag name
* @example My Tag
*/
name: string
}
links: components['schemas']['ObjectLinks']
}
GetTagResponseCollection: {
data: components['schemas']['TagResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetTagResponse: {
data: components['schemas']['TagResponseObjectResource']
}
TagGroupResponseObjectResource: {
type: components['schemas']['TagGroupEnum']
/**
* @description The Tag Group ID
* @example zyxw9876-vu54-ts32-rq10-zyxwvu654321
*/
id: string
attributes: {
/**
* @description The Tag Group name
* @example My Tag Group
*/
name: string
/** @description If a tag group is non-exclusive, any given related resource (campaign, flow, etc.) can be linked to multiple tags from that tag group. If a tag group is exclusive, any given related resource can only be linked to one tag from that tag group. */
exclusive: boolean
/** @description Every company automatically has one Default Tag Group. The Default Tag Group cannot be deleted, and no other Default Tag Groups can be created. This value is true for the Default Tag Group and false for all other Tag Groups. */
default: boolean
}
links: components['schemas']['ObjectLinks']
}
GetTagGroupResponseCollection: {
data: components['schemas']['TagGroupResponseObjectResource'][]
links: components['schemas']['CollectionLinks']
}
GetTagGroupResponse: {
data: components['schemas']['TagGroupResponseObjectResource']
}
GetTagFlowRelationshipsResponseCollection: {
data: {
/** @enum {string} */
type: 'flow'
id: string
}[]
}
GetTagCampaignRelationshipsResponseCollection: {
data: {
/** @enum {string} */
type: 'campaign'
id: string
}[]
}
GetTagListRelationshipsResponseCollection: {
data: {
/** @enum {string} */
type: 'list'
id: string
}[]
}
GetTagSegmentRelationshipsResponseCollection: {
data: {
/** @enum {string} */
type: 'segment'
id: string
}[]
}
GetTagTagGroupRelationshipsResponseCollection: {
data: {
/** @enum {string} */
type: 'tag-group'
/** @example zyxw9876-vu54-ts32-rq10-zyxwvu654321 */
id: string
}[]
}
GetTagGroupTagRelationshipsResponseCollection: {
data: {
/** @enum {string} */
type: 'tag'
/**
* @example [
* "abcd1234-ef56-gh78-ij90-abcdef123456",
* "klmn1234-op56-qr78-st90-klmnop123456"
* ]
*/
id: string
}[]
}
ApiAnalyticsSampleResponseObjectResource: {
type: components['schemas']['TestApiAnalyticsSampleEnum']
id: string
attributes: {
name?: string
}
links: components['schemas']['ObjectLinks']
}
CatalogItemCreateQueryResourceObject: {
type: components['schemas']['CatalogItemEnum']
attributes: {
/**
* @description The ID of the catalog item in an external system.
* @example SAMPLE-DATA-ITEM-1
*/
external_id: string
/**
* @description The integration type. Currently only "$custom" is supported.
* @enum {string}
*/
integration_type?: '$custom'
/**
* @description The title of the catalog item.
* @example Ocean Blue Shirt (Sample)
*/
title: string
/**
* @description This field can be used to set the price on the catalog item, which is what gets displayed for the item when included in emails. For most price-update use cases, you will also want to update the `price` on any child variants, using the [Update Catalog Variant Endpoint](https://developers.klaviyo.com/en/reference/update_catalog_variant).
* @example 42
*/
price?: number
/**
* @description The type of catalog. Currently only "$default" is supported.
* @default $default
* @example $default
*/
catalog_type?: string
/**
* @description A description of the catalog item.
* @example Ocean blue cotton shirt with a narrow collar and buttons down the front and long sleeves. Comfortable fit and titled kaleidoscope patterns.
*/
description: string
/**
* @description URL pointing to the location of the catalog item on your website.
* @example https://via.placeholder.com/150
*/
url: string
/**
* @description URL pointing to the location of a full image of the catalog item.
* @example https://via.placeholder.com/300
*/
image_full_url?: string
/**
* @description URL pointing to the location of an image thumbnail of the catalog item
* @example https://via.placeholder.com/150
*/
image_thumbnail_url?: string
/**
* @description List of URLs pointing to the locations of images of the catalog item.
* @example [
* "https://via.placeholder.com/150"
* ]
*/
images?: string[]
/**
* @description Flat JSON blob to provide custom metadata about the catalog item. May not exceed 100kb.
* @example {
* "Top Pick": true
* }
*/
custom_metadata?: Record<string, never>
/**
* @description Boolean value indicating whether the catalog item is published.
* @default true
* @example true
*/
published?: boolean
}
relationships?: {
categories?: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
}
}
CatalogItemCreateQuery: {
data: components['schemas']['CatalogItemCreateQueryResourceObject']
}
PostCatalogItemResponse: {
data: {
type: components['schemas']['CatalogItemEnum']
/**
* @description The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-ITEM-1
*/
id: string
attributes: {
/**
* @description The ID of the catalog item in an external system.
* @example SAMPLE-DATA-ITEM-1
*/
external_id?: string
/**
* @description The title of the catalog item.
* @example Ocean Blue Shirt (Sample)
*/
title?: string
/**
* @description A description of the catalog item.
* @example Ocean blue cotton shirt with a narrow collar and buttons down the front and long sleeves. Comfortable fit and titled kaleidoscope patterns.
*/
description?: string
/**
* @description This field can be used to set the price on the catalog item, which is what gets displayed for the item when included in emails. For most price-update use cases, you will also want to update the `price` on any child variants, using the [Update Catalog Variant Endpoint](https://developers.klaviyo.com/en/reference/update_catalog_variant).
* @example 42
*/
price?: number
/**
* @description URL pointing to the location of the catalog item on your website.
* @example https://via.placeholder.com/150
*/
url?: string
/**
* @description URL pointing to the location of a full image of the catalog item.
* @example https://via.placeholder.com/300
*/
image_full_url?: string
/**
* @description URL pointing to the location of an image thumbnail of the catalog item
* @example https://via.placeholder.com/150
*/
image_thumbnail_url?: string
/**
* @description List of URLs pointing to the locations of images of the catalog item.
* @example [
* "https://via.placeholder.com/150"
* ]
*/
images?: string[]
/**
* @description Flat JSON blob to provide custom metadata about the catalog item. May not exceed 100kb.
* @example {
* "Top Pick": true
* }
*/
custom_metadata?: Record<string, never>
/**
* @description Boolean value indicating whether the catalog item is published.
* @example true
*/
published?: boolean
/**
* Format: date-time
* @description Date and time when the catalog item was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the catalog item was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
}
CatalogVariantCreateQueryResourceObject: {
type: components['schemas']['CatalogVariantEnum']
attributes: {
/**
* @description The ID of the catalog item variant in an external system.
* @example SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM
*/
external_id: string
/**
* @description The type of catalog. Currently only "$default" is supported.
* @default $default
* @example $default
*/
catalog_type?: string
/**
* @description The integration type. Currently only "$custom" is supported.
* @enum {string}
*/
integration_type?: '$custom'
/**
* @description The title of the catalog item variant.
* @example Ocean Blue Shirt (Sample) Variant Medium
*/
title: string
/**
* @description A description of the catalog item variant.
* @example Ocean blue cotton shirt with a narrow collar and buttons down the front and long sleeves. Comfortable fit and titled kaleidoscope patterns.
*/
description: string
/**
* @description The SKU of the catalog item variant.
* @example OBS-MD
*/
sku: string
/**
* @description This field controls the visibility of this catalog item variant in product feeds/blocks. This field supports the following values:
* `1`: a product will not appear in dynamic product recommendation feeds and blocks if it is out of stock.
* `0` or `2`: a product can appear in dynamic product recommendation feeds and blocks regardless of inventory quantity.
*
* @example 25
* @enum {integer}
*/
inventory_policy?: 0 | 1 | 2
/**
* @description The quantity of the catalog item variant currently in stock.
* @example 25
*/
inventory_quantity: number
/**
* @description This field can be used to set the price on the catalog item variant, which is what gets displayed for the item variant when included in emails. For most price-update use cases, you will also want to update the `price` on any parent items using the [Update Catalog Item Endpoint](https://developers.klaviyo.com/en/reference/update_catalog_item).
* @example 42
*/
price: number
/**
* @description URL pointing to the location of the catalog item variant on your website.
* @example https://via.placeholder.com/150
*/
url: string
/**
* @description URL pointing to the location of a full image of the catalog item variant.
* @example https://via.placeholder.com/300
*/
image_full_url?: string
/**
* @description URL pointing to the location of an image thumbnail of the catalog item variant.
* @example https://via.placeholder.com/150
*/
image_thumbnail_url?: string
/**
* @description List of URLs pointing to the locations of images of the catalog item variant.
* @example [
* "https://via.placeholder.com/150"
* ]
*/
images?: string[]
/**
* @description Flat JSON blob to provide custom metadata about the catalog item variant. May not exceed 100kb.
* @example {
* "Top Pick": true
* }
*/
custom_metadata?: Record<string, never>
/**
* @description Boolean value indicating whether the catalog item variant is published.
* @default true
* @example true
*/
published?: boolean
}
relationships?: {
items?: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
}
}
CatalogVariantCreateQuery: {
data: components['schemas']['CatalogVariantCreateQueryResourceObject']
}
PostCatalogVariantResponse: {
data: {
type: components['schemas']['CatalogVariantEnum']
/**
* @description The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM
*/
id: string
attributes: {
/**
* @description The ID of the catalog item variant in an external system.
* @example SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM
*/
external_id?: string
/**
* @description The title of the catalog item variant.
* @example Ocean Blue Shirt (Sample) Variant Medium
*/
title?: string
/**
* @description A description of the catalog item variant.
* @example Ocean blue cotton shirt with a narrow collar and buttons down the front and long sleeves. Comfortable fit and titled kaleidoscope patterns.
*/
description?: string
/**
* @description The SKU of the catalog item variant.
* @example OBS-MD
*/
sku?: string
/**
* @description This field controls the visibility of this catalog item variant in product feeds/blocks. This field supports the following values:
* `1`: a product will not appear in dynamic product recommendation feeds and blocks if it is out of stock.
* `0` or `2`: a product can appear in dynamic product recommendation feeds and blocks regardless of inventory quantity.
*
* @example 2
* @enum {integer}
*/
inventory_policy?: 0 | 1 | 2
/**
* @description The quantity of the catalog item variant currently in stock.
* @example 25
*/
inventory_quantity?: number
/**
* @description This field can be used to set the price on the catalog item variant, which is what gets displayed for the item variant when included in emails. For most price-update use cases, you will also want to update the `price` on any parent items using the [Update Catalog Item Endpoint](https://developers.klaviyo.com/en/reference/update_catalog_item).
* @example 42
*/
price?: number
/**
* @description URL pointing to the location of the catalog item variant on your website.
* @example https://via.placeholder.com/150
*/
url?: string
/**
* @description URL pointing to the location of a full image of the catalog item variant.
* @example https://via.placeholder.com/300
*/
image_full_url?: string
/**
* @description URL pointing to the location of an image thumbnail of the catalog item variant.
* @example https://via.placeholder.com/150
*/
image_thumbnail_url?: string
/**
* @description List of URLs pointing to the locations of images of the catalog item variant.
* @example [
* "https://via.placeholder.com/150"
* ]
*/
images?: string[]
/**
* @description Flat JSON blob to provide custom metadata about the catalog item variant. May not exceed 100kb.
* @example {
* "Top Pick": true
* }
*/
custom_metadata?: Record<string, never>
/**
* @description Boolean value indicating whether the catalog item variant is published.
* @example true
*/
published?: boolean
/**
* Format: date-time
* @description Date and time when the catalog item variant was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the catalog item variant was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
}
CatalogCategoryCreateQueryResourceObject: {
type: components['schemas']['CatalogCategoryEnum']
attributes: {
/**
* @description The ID of the catalog category in an external system.
* @example SAMPLE-DATA-CATEGORY-APPAREL
*/
external_id: string
/**
* @description The name of the catalog category.
* @example Sample Data Category Apparel
*/
name: string
/**
* @description The integration type. Currently only "$custom" is supported.
* @enum {string}
*/
integration_type?: '$custom'
/**
* @description The type of catalog. Currently only "$default" is supported.
* @default $default
* @example $default
*/
catalog_type?: string
}
relationships?: {
items?: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
}
}
CatalogCategoryCreateQuery: {
data: components['schemas']['CatalogCategoryCreateQueryResourceObject']
}
PostCatalogCategoryResponse: {
data: {
type: components['schemas']['CatalogCategoryEnum']
/**
* @description The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL
*/
id: string
attributes: {
/**
* @description The ID of the catalog category in an external system.
* @example SAMPLE-DATA-CATEGORY-APPAREL
*/
external_id?: string
/**
* @description The name of the catalog category.
* @example Sample Data Category Apparel
*/
name?: string
/**
* Format: date-time
* @description Date and time when the catalog category was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
}
CatalogCategoryItemOp: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
CatalogItemCategoryOp: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
_MetricCreateQuery: {
/**
* @description Name of the event. Must be less than 128 characters.
* @example Viewed Product
*/
name: string
/** @description This is for advanced usage. For api requests, this should use the default, which is set to api. */
service?: string
}
EventCreateQueryResourceObject: {
type: components['schemas']['EventEnum']
attributes: {
/**
* @description
* Properties of the profile that triggered this event. The profile must contain an
* identifier. The $email and/or $phone_number can be used as the identify the profile.
* Other key value pairs can be used to create segments. For example, to create a list of
* people on trial plans, include a profile's plan type in the profile. The profile
* supports special fields. The fields include: $email (string), $first_name (string),
* $last_name (string), $phone_number (string), $city (string), $region (string; state or
* other region), $country (string), $zip (string), $image (string; url to a photo of a
* person), and $consent (list of strings; eg: ['sms', 'email', 'web', 'directmail',
* 'mobile']).
*
* @example {
* "$email": "[email protected]"
* }
*/
profile: Record<string, never>
/**
* @description The associated metric for the event. An account can have up to 200 unique metrics.
* @example {
* "name": "Viewed Product"
* }
*/
metric: components['schemas']['_MetricCreateQuery']
/**
* @description
* Properties of this event. Any top level property (that are not objects) can be
* used to create segments. The $extra property is a special property. This records any
* non-segmentable values that can be references later. For example, HTML templates are
* useful on a segment, but itself is not used in creating a segment. There are limits
* placed onto the size of the data present. This must not exceed 5 MB. This must not
* exceed 300 event properties. A single string cannot be larger than 100 KB. Each array
* must not exceed 4000 elements. The properties cannot contain more than 10 nested levels.
*
* @example {
* "Brand": "Kids Book",
* "Categories": [
* "Fiction",
* "Children"
* ],
* "ProductID": 1111,
* "ProductName": "Winnie the Pooh",
* "$extra": {
* "URL": "http://www.example.com/path/to/product",
* "ImageURL": "http://www.example.com/path/to/product/image.png"
* }
* }
*/
properties: Record<string, never>
/**
* Format: date-time
* @description
* When this event occurred. By default, the time the request was received will be used.
* The time is truncated to the second. The time must be after the year 2000 and can only
* be up to 1 year in the future.
*
* @example 2022-11-08T00:00:00
*/
time?: string
/**
* @description A numeric value to associate with this event. For example, the dollar amount of a purchase.
* @example 9.99
*/
value?: number
/**
* @description
* A unique identifier for an event. If the unique_id is repeated for the same
* profile and metric, only the first processed event will be recorded. If this is not
* present, this will use the time to the second. Using the default, this limits only one
* event per profile per second.
*/
unique_id?: string
}
}
EventCreateQuery: {
data: components['schemas']['EventCreateQueryResourceObject']
}
MetricAggregateQueryResourceObject: {
type: components['schemas']['MetricAggregateEnum']
attributes: {
/**
* @description The metric ID used in the aggregation.
* @example 0rG4eQ
*/
metric_id: string
/** @description Optional pagination cursor to iterate over large result sets */
page_cursor?: string
/**
* @description Measurement key, e.g. `unique`, `sum_value`, `count`
* @example count
*/
measurements: ('count' | 'sum_value' | 'unique')[]
/**
* @description Aggregation interval, e.g. "hour", "day", "week", "month"
* @example day
* @enum {string}
*/
interval: 'day' | 'hour' | 'month' | 'week'
/**
* @description Alter the maximum number of returned rows in a single page of aggregation results
* @default 500
* @example 500
*/
page_size?: number
/**
* @description Optional attribute(s) used for partitioning by the aggregation function
* @example $message
*/
by?: (
| '$attributed_channel'
| '$attributed_flow'
| '$attributed_message'
| '$attributed_variation'
| '$campaign_channel'
| '$flow'
| '$flow_channel'
| '$message'
| '$message_send_cohort'
| '$variation'
| '$variation_send_cohort'
| 'Bounce Type'
| 'Campaign Name'
| 'Client Canonical'
| 'Client Name'
| 'Client Type'
| 'Email Domain'
| 'Failure Source'
| 'Failure Type'
| 'From Number'
| 'From Phone Region'
| 'List'
| 'Message Name'
| 'Message Type'
| 'Method'
| 'Subject'
| 'To Number'
| 'To Phone Region'
| 'URL'
| 'form_id'
)[]
/** @description Provide fields to limit the returned data */
return_fields?: string[]
/**
* @description List of filters, must include time range using ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* These filters follow a similar format to those in `GET` requests, the primary difference is that this endpoint asks for a list.
* The time range can be filtered by providing a `greater-or-equal` and a `less-than` filter on the `datetime` field.
* @example [
* "greater-or-equal(datetime,2022-12-01T00:00:00)",
* "less-than(datetime,2022-12-08T00:00:00"
* ]
*/
filter: string[]
/**
* @description The timezone used for processing the query, e.g. `'America/New_York'`.
* This field is validated against a list of common timezones from the [IANA Time Zone Database](https://www.iana.org/time-zones).
* While most are supported, a few notable exceptions are `Factory`, `Europe/Kyiv` and `Pacific/Kanton`. This field is case-sensitive.
* @default UTC
* @example America/New_York
*/
timezone?: string
/**
* @description Provide a sort key (e.g. -$message)
* @enum {string}
*/
sort?:
| '$attributed_channel'
| '-$attributed_channel'
| '$attributed_flow'
| '-$attributed_flow'
| '$attributed_message'
| '-$attributed_message'
| '$attributed_variation'
| '-$attributed_variation'
| '$campaign_channel'
| '-$campaign_channel'
| '$flow'
| '-$flow'
| '$flow_channel'
| '-$flow_channel'
| '$message'
| '-$message'
| '$message_send_cohort'
| '-$message_send_cohort'
| '$variation'
| '-$variation'
| '$variation_send_cohort'
| '-$variation_send_cohort'
| 'Bounce Type'
| '-Bounce Type'
| 'Campaign Name'
| '-Campaign Name'
| 'Client Canonical'
| '-Client Canonical'
| 'Client Name'
| '-Client Name'
| 'Client Type'
| '-Client Type'
| 'Email Domain'
| '-Email Domain'
| 'Failure Source'
| '-Failure Source'
| 'Failure Type'
| '-Failure Type'
| 'From Number'
| '-From Number'
| 'From Phone Region'
| '-From Phone Region'
| 'List'
| '-List'
| 'Message Name'
| '-Message Name'
| 'Message Type'
| '-Message Type'
| 'Method'
| '-Method'
| 'Subject'
| '-Subject'
| 'To Number'
| '-To Number'
| 'To Phone Region'
| '-To Phone Region'
| 'URL'
| '-URL'
| 'count'
| '-count'
| 'form_id'
| '-form_id'
| 'sum_value'
| '-sum_value'
| 'unique'
| '-unique'
}
}
MetricAggregateQuery: {
data: components['schemas']['MetricAggregateQueryResourceObject']
}
MetricAggregateRowDTO: {
/** @description List of dimensions associated with this set of measurements */
dimensions: string[]
/** @description Dictionary of measurement_key, values */
measurements: Record<string, never>
}
PostMetricAggregateResponse: {
data: {
type: components['schemas']['MetricAggregateEnum']
/** @description Ephemeral ID associated with the aggregation query */
id: string
attributes: {
/** @description The dates of the query range */
dates: string[]
/** @description Aggregation result data */
data: components['schemas']['MetricAggregateRowDTO'][]
}
links: components['schemas']['ObjectLinks']
}
}
ListCreateQueryResourceObject: {
type: components['schemas']['ListEnum']
attributes: {
/**
* @description A helpful name to label the list
* @example Newsletter
*/
name: string
}
}
ListCreateQuery: {
data: components['schemas']['ListCreateQueryResourceObject']
}
PostListResponse: {
data: {
type: components['schemas']['ListEnum']
/**
* @description Primary key that uniquely identifies this list. Generated by Klaviyo.
* @example Y6nRLr
*/
id: string
attributes: {
/**
* @description A helpful name to label the list
* @example Newsletter
*/
name?: string
/**
* Format: date-time
* @description Date and time when the list was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the list was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
}
ListMembersAddQuery: {
data: {
/** @enum {string} */
type: 'profile'
id: string
}[]
}
ProfileCreateQueryResourceObject: {
type: components['schemas']['ProfileEnum']
attributes: {
/**
* @description Individual's email address
* @example [email protected]
*/
email?: string
/**
* @description Individual's phone number in E.164 format
* @example +15005550006
*/
phone_number?: string
/**
* @description A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.
* @example 63f64a2b-c6bf-40c7-b81f-bed08162edbe
*/
external_id?: string
/**
* @description Individual's first name
* @example Sarah
*/
first_name?: string
/**
* @description Individual's last name
* @example Mason
*/
last_name?: string
/**
* @description Name of the company or organization within the company for whom the individual works
* @example Klaviyo
*/
organization?: string
/**
* @description Individual's job title
* @example Engineer
*/
title?: string
/**
* @description URL pointing to the location of a profile image
* @example https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg
*/
image?: string
location?: components['schemas']['ProfileLocation']
/**
* @description An object containing key/value pairs for any custom properties assigned to this profile
* @example {
* "pseudonym": "Dr. Octopus"
* }
*/
properties?: Record<string, never>
}
}
ProfileCreateQuery: {
data: components['schemas']['ProfileCreateQueryResourceObject']
}
PostProfileResponse: {
data: {
type: components['schemas']['ProfileEnum']
/**
* @description Primary key that uniquely identifies this profile. Generated by Klaviyo.
* @example 01GDDKASAP8TKDDA2GRZDSVP4H
*/
id: string
attributes: {
/**
* @description Individual's email address
* @example [email protected]
*/
email?: string
/**
* @description Individual's phone number in E.164 format
* @example +15005550006
*/
phone_number?: string
/**
* @description A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.
* @example 63f64a2b-c6bf-40c7-b81f-bed08162edbe
*/
external_id?: string
/**
* @description Individual's first name
* @example Sarah
*/
first_name?: string
/**
* @description Individual's last name
* @example Mason
*/
last_name?: string
/**
* @description Name of the company or organization within the company for whom the individual works
* @example Klaviyo
*/
organization?: string
/**
* @description Individual's job title
* @example Engineer
*/
title?: string
/**
* @description URL pointing to the location of a profile image
* @example https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg
*/
image?: string
/**
* Format: date-time
* @description Date and time when the profile was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the profile was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
updated?: string
/**
* Format: date-time
* @description Date and time of the most recent event the triggered an update to the profile, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
last_event_date?: string
location?: components['schemas']['ProfileLocation']
/**
* @description An object containing key/value pairs for any custom properties assigned to this profile
* @example {
* "pseudonym": "Dr. Octopus"
* }
*/
properties?: Record<string, never>
subscriptions?: components['schemas']['Subscriptions']
predictive_analytics?: components['schemas']['PredictiveAnalytics']
}
links: components['schemas']['ObjectLinks']
}
}
CampaignCreateQueryResourceObject: {
type: components['schemas']['CampaignEnum']
attributes: {
/**
* @description The campaign name
* @example My new campaign
*/
name: string
/**
* @description The type of campaign (email or sms, for example)
* @example email
*/
channel: string
/** @description The audiences to be included and/or excluded from the campaign */
audiences: components['schemas']['AudiencesSubObject']
/** @description The send strategy the campaign will send with. Defaults to 'Immediate' send strategy. */
send_strategy: components['schemas']['SendStrategySubObject']
/** @description Options to use when sending a campaign */
send_options: components['schemas']['SendOptionsSubObject']
/** @description The tracking options associated with the campaign */
tracking_options?: components['schemas']['TrackingOptionsSubObject']
}
}
CampaignCreateQuery: {
data: components['schemas']['CampaignCreateQueryResourceObject']
}
PostCampaignResponse: {
data: {
type: components['schemas']['CampaignEnum']
/** @description The campaign ID */
id: string
attributes: {
/** @description The campaign name */
name: string
/** @description The current status of the campaign */
status: string
/** @description Whether the campaign has been archived or not */
archived: boolean
/** @description The type of campaign */
channel: string
/** @description The audiences to be included and/or excluded from the campaign */
audiences: components['schemas']['AudiencesSubObject']
/** @description Options to use when sending a campaign */
send_options: components['schemas']['SendOptionsSubObject']
/** @description The id of the message associated with the campaign */
message: string
/** @description The tracking options associated with the campaign */
tracking_options: components['schemas']['TrackingOptionsSubObject']
/** @description The send strategy the campaign will send with */
send_strategy: components['schemas']['SendStrategySubObject']
/**
* Format: date-time
* @description The datetime when the campaign was created
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* Format: date-time
* @description The datetime when the campaign was scheduled for future sending
* @example 2022-11-08T00:00:00
*/
scheduled_at: string
/**
* Format: date-time
* @description The datetime when the campaign was last updated by a user or the system
* @example 2022-11-08T00:00:00
*/
updated_at: string
/**
* Format: date-time
* @description The datetime when the campaign will be / was sent or None if not yet scheduled by a send_job.
* @example 2022-11-08T00:00:00
*/
send_time: string
}
links: components['schemas']['ObjectLinks']
}
}
CampaignCloneQueryResourceObject: {
type: components['schemas']['CampaignEnum']
attributes: {
/** @description The campaign ID to be cloned */
id: string
/**
* @description The name for the new cloned campaign
* @example My cloned campaign's new name
*/
new_name?: string
}
}
CampaignCloneQuery: {
data: components['schemas']['CampaignCloneQueryResourceObject']
}
CampaignMessageAssignTemplateQueryResourceObject: {
type: components['schemas']['CampaignMessageEnum']
attributes: {
/** @description The message ID to be assigned to */
id: string
/**
* @description The template ID to assign
* @example RipRmi
*/
template_id: string
}
}
CampaignMessageAssignTemplateQuery: {
data: components['schemas']['CampaignMessageAssignTemplateQueryResourceObject']
}
PostCampaignMessageResponse: {
data: {
type: components['schemas']['CampaignMessageEnum']
/** @description The message ID */
id: string
attributes: {
/** @description The label or name on the message */
label: string
/** @description The channel the message is to be sent on */
channel: string
/** @description Additional attributes relating to the content of the message */
content: components['schemas']['ContentSubObject']
/** @description The list of appropriate Send Time Sub-objects associated with the message */
send_times?: components['schemas']['SendTimeSubObject'][]
/**
* Format: date-time
* @description The datetime when the message was created
* @example 2022-11-08T00:00:00
*/
created_at?: string
/**
* Format: date-time
* @description The datetime when the message was last updated
* @example 2022-11-08T00:00:00
*/
updated_at?: string
/** @description The parent campaign id */
campaign_id: string
}
links: components['schemas']['ObjectLinks']
}
}
CampaignSendJobCreateQueryResourceObject: {
type: components['schemas']['CampaignSendJobEnum']
attributes: {
/** @description The ID of the campaign to send */
id: string
}
}
CampaignSendJobCreateQuery: {
data: components['schemas']['CampaignSendJobCreateQueryResourceObject']
}
PostCampaignSendJobResponse: {
data: {
type: components['schemas']['CampaignSendJobEnum']
/** @description The ID of the campaign to send */
id: string
attributes: {
/**
* @description The status of the send job
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
}
links: components['schemas']['ObjectLinks']
}
}
CampaignRecipientEstimationJobCreateQueryResourceObject: {
type: components['schemas']['CampaignRecipientEstimationJobEnum']
attributes: {
/** @description The ID of the campaign to perform recipient estimation */
id: string
}
}
CampaignRecipientEstimationJobCreateQuery: {
data: components['schemas']['CampaignRecipientEstimationJobCreateQueryResourceObject']
}
PostCampaignRecipientEstimationJobResponse: {
data: {
type: components['schemas']['CampaignRecipientEstimationJobEnum']
/**
* @description The ID of the campaign used for estimating recipients
* @example 01GMRWDSA0ARTAKE1SFX8JGXAY
*/
id: string
attributes: {
/**
* @description The status of the recipient estimation job
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
}
links: components['schemas']['ObjectLinks']
}
}
TemplateCreateQueryResourceObject: {
type: components['schemas']['TemplateEnum']
attributes: {
/**
* @description The name of the template
* @example Monthly Newsletter Template
*/
name: string
/** @description Restricted to CODE */
editor_type: string
/**
* @description The HTML contents of the template
* @example
* <html>
* <body>
* hello world
* </body>
* </html>
*/
html?: string
/**
* @description The plaintext version of the template
* @example hello world
*/
text?: string
/** @description Provide fields to limit the returned data */
return_fields?: string[]
}
}
TemplateCreateQuery: {
data: components['schemas']['TemplateCreateQueryResourceObject']
}
PostTemplateResponse: {
data: {
type: components['schemas']['TemplateEnum']
/** @description The ID of template */
id: string
attributes: {
/**
* @description The ID of the company the template belongs to
* @example COMPANY_ID
*/
company_id: string
/** @description The name of the template */
name: string
/**
* @description `editor_type` has a fixed set of values:
* * SYSTEM_DRAGGABLE: indicates a drag-and-drop editor template
* * SIMPLE: A rich text editor template
* * CODE: A custom HTML template
* * USER_DRAGGABLE: A hybrid template, using custom HTML in the drag-and-drop editor
*/
editor_type: string
/** @description The rendered HTML of the template */
html: string
/** @description The template plain_text */
text?: string
/**
* Format: date-time
* @description The date the template was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description The date the template was updated in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
}
TemplateRenderQueryResourceObject: {
type: components['schemas']['TemplateEnum']
attributes: {
/** @description The ID of template */
id: string
/**
* @description The context for the template render. This must be a JSON object which has values for any tags used in the template. See [this doc](https://help.klaviyo.com/hc/en-us/articles/115005084927-Template-tags-and-variable-syntax-reference-classic-editor-) for more details.
* @example {
* "first_name": "Jane",
* "last_name": "Smith"
* }
*/
context: Record<string, never>
/** @description Provide fields to limit the returned data */
return_fields?: string[]
}
}
TemplateRenderQuery: {
data: components['schemas']['TemplateRenderQueryResourceObject']
}
TemplateCloneQueryResourceObject: {
type: components['schemas']['TemplateEnum']
attributes: {
/** @description The ID of template to be cloned */
id: string
/**
* @description The name of the template
* @example Clone of Monthly Newsletter Template
*/
name?: string
/** @description Any subset of TemplateResponse fields */
return_fields?: string[]
}
}
TemplateCloneQuery: {
data: components['schemas']['TemplateCloneQueryResourceObject']
}
CatalogItemCreateJobCreateQueryResourceObject: {
type: components['schemas']['CatalogItemBulkCreateJobEnum']
attributes: {
/** @description Array of catalog items to create. */
items: components['schemas']['CatalogItemCreateQueryResourceObject'][]
}
}
CatalogItemCreateJobCreateQuery: {
data: components['schemas']['CatalogItemCreateJobCreateQueryResourceObject']
}
PostCatalogItemCreateJobResponse: {
data: {
type: components['schemas']['CatalogItemBulkCreateJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
relationships?: {
items?: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
}
links: components['schemas']['ObjectLinks']
}
}
CatalogItemUpdateJobCreateQueryResourceObject: {
type: components['schemas']['CatalogItemBulkUpdateJobEnum']
attributes: {
/** @description Array of catalog items to update. */
items: components['schemas']['CatalogItemUpdateQueryResourceObject'][]
}
}
CatalogItemUpdateJobCreateQuery: {
data: components['schemas']['CatalogItemUpdateJobCreateQueryResourceObject']
}
PostCatalogItemUpdateJobResponse: {
data: {
type: components['schemas']['CatalogItemBulkUpdateJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
relationships?: {
items?: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
}
links: components['schemas']['ObjectLinks']
}
}
CatalogItemDeleteJobCreateQueryResourceObject: {
type: components['schemas']['CatalogItemBulkDeleteJobEnum']
attributes: {
/** @description Array of catalog items to delete. */
items: components['schemas']['CatalogItemDeleteQueryResourceObject'][]
}
}
CatalogItemDeleteJobCreateQuery: {
data: components['schemas']['CatalogItemDeleteJobCreateQueryResourceObject']
}
PostCatalogItemDeleteJobResponse: {
data: {
type: components['schemas']['CatalogItemBulkDeleteJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
relationships?: {
items?: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
}
links: components['schemas']['ObjectLinks']
}
}
CatalogVariantCreateJobCreateQueryResourceObject: {
type: components['schemas']['CatalogVariantBulkCreateJobEnum']
attributes: {
/** @description Array of catalog variants to create. */
variants: components['schemas']['CatalogVariantCreateQueryResourceObject'][]
}
}
CatalogVariantCreateJobCreateQuery: {
data: components['schemas']['CatalogVariantCreateJobCreateQueryResourceObject']
}
PostCatalogVariantCreateJobResponse: {
data: {
type: components['schemas']['CatalogVariantBulkCreateJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
relationships?: {
variants?: {
data: {
/** @enum {string} */
type: 'catalog-variant'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM */
id: string
}[]
}
}
links: components['schemas']['ObjectLinks']
}
}
CatalogVariantUpdateJobCreateQueryResourceObject: {
type: components['schemas']['CatalogVariantBulkUpdateJobEnum']
attributes: {
/** @description Array of catalog variants to update. */
variants: components['schemas']['CatalogVariantUpdateQueryResourceObject'][]
}
}
CatalogVariantUpdateJobCreateQuery: {
data: components['schemas']['CatalogVariantUpdateJobCreateQueryResourceObject']
}
PostCatalogVariantUpdateJobResponse: {
data: {
type: components['schemas']['CatalogVariantBulkUpdateJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
relationships?: {
variants?: {
data: {
/** @enum {string} */
type: 'catalog-variant'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM */
id: string
}[]
}
}
links: components['schemas']['ObjectLinks']
}
}
CatalogVariantDeleteJobCreateQueryResourceObject: {
type: components['schemas']['CatalogVariantBulkDeleteJobEnum']
attributes: {
/** @description Array of catalog variants to delete. */
variants: components['schemas']['CatalogVariantDeleteQueryResourceObject'][]
}
}
CatalogVariantDeleteJobCreateQuery: {
data: components['schemas']['CatalogVariantDeleteJobCreateQueryResourceObject']
}
PostCatalogVariantDeleteJobResponse: {
data: {
type: components['schemas']['CatalogVariantBulkDeleteJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
relationships?: {
variants?: {
data: {
/** @enum {string} */
type: 'catalog-variant'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM */
id: string
}[]
}
}
links: components['schemas']['ObjectLinks']
}
}
CatalogCategoryCreateJobCreateQueryResourceObject: {
type: components['schemas']['CatalogCategoryBulkCreateJobEnum']
attributes: {
/** @description Array of catalog categories to create. */
categories: components['schemas']['CatalogCategoryCreateQueryResourceObject'][]
}
}
CatalogCategoryCreateJobCreateQuery: {
data: components['schemas']['CatalogCategoryCreateJobCreateQueryResourceObject']
}
PostCatalogCategoryCreateJobResponse: {
data: {
type: components['schemas']['CatalogCategoryBulkCreateJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
relationships?: {
categories?: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
}
links: components['schemas']['ObjectLinks']
}
}
CatalogCategoryUpdateJobCreateQueryResourceObject: {
type: components['schemas']['CatalogCategoryBulkUpdateJobEnum']
attributes: {
/** @description Array of catalog categories to update. */
categories: components['schemas']['CatalogCategoryUpdateQueryResourceObject'][]
}
}
CatalogCategoryUpdateJobCreateQuery: {
data: components['schemas']['CatalogCategoryUpdateJobCreateQueryResourceObject']
}
PostCatalogCategoryUpdateJobResponse: {
data: {
type: components['schemas']['CatalogCategoryBulkUpdateJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
relationships?: {
categories?: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
}
links: components['schemas']['ObjectLinks']
}
}
CatalogCategoryDeleteJobCreateQueryResourceObject: {
type: components['schemas']['CatalogCategoryBulkDeleteJobEnum']
attributes: {
/** @description Array of catalog categories to delete. */
categories: components['schemas']['CatalogCategoryDeleteQueryResourceObject'][]
}
}
CatalogCategoryDeleteJobCreateQuery: {
data: components['schemas']['CatalogCategoryDeleteJobCreateQueryResourceObject']
}
PostCatalogCategoryDeleteJobResponse: {
data: {
type: components['schemas']['CatalogCategoryBulkDeleteJobEnum']
attributes: {
/** @description Unique identifier for retrieving the job. Generated by Klaviyo. */
job_id: string
/**
* @description Status of the asynchronous job.
* @example processing
* @enum {string}
*/
status: 'cancelled' | 'complete' | 'processing' | 'queued'
/**
* Format: date-time
* @description The date and time the job was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* @description The total number of operations to be processed by the job. See `completed_count` for the job's current progress.
* @example 10
*/
total_count: number
/**
* @description The total number of operations that have been completed by the job.
* @example 9
*/
completed_count?: number
/**
* @description The total number of operations that have failed as part of the job.
* @example 1
*/
failed_count?: number
/**
* Format: date-time
* @description Date and time the job was completed in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
completed_at?: string
/**
* Format: date-time
* @description Date and time the job expires in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
expires_at?: string
/** @description Array of errors encountered during the processing of the job. */
errors?: components['schemas']['CatalogJobErrorPayload'][]
}
relationships?: {
categories?: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
}
links: components['schemas']['ObjectLinks']
}
}
TagCreateQueryResourceObject: {
type: components['schemas']['TagEnum']
attributes: {
/**
* @description The Tag name
* @example My Tag
*/
name: string
/**
* @description The ID of the Tag Group to associate the Tag with. If this field is not specified, the Tag will be associated with the company's Default Tag Group.
* @example zyxw9876-vu54-ts32-rq10-zyxwvu654321
*/
tag_group_id?: string
}
}
TagCreateQuery: {
data: components['schemas']['TagCreateQueryResourceObject']
}
PostTagResponse: {
data: {
type: components['schemas']['TagEnum']
/**
* @description The Tag ID
* @example abcd1234-ef56-gh78-ij90-abcdef123456
*/
id: string
attributes: {
/**
* @description The Tag name
* @example My Tag
*/
name: string
}
links: components['schemas']['ObjectLinks']
}
}
TagGroupCreateQueryResourceObject: {
type: components['schemas']['TagGroupEnum']
attributes: {
/**
* @description The Tag Group name
* @example My Tag Group
*/
name: string
exclusive?: boolean
}
}
TagGroupCreateQuery: {
data: components['schemas']['TagGroupCreateQueryResourceObject']
}
PostTagGroupResponse: {
data: {
type: components['schemas']['TagGroupEnum']
/**
* @description The Tag Group ID
* @example zyxw9876-vu54-ts32-rq10-zyxwvu654321
*/
id: string
attributes: {
/**
* @description The Tag Group name
* @example My Tag Group
*/
name: string
/** @description If a tag group is non-exclusive, any given related resource (campaign, flow, etc.) can be linked to multiple tags from that tag group. If a tag group is exclusive, any given related resource can only be linked to one tag from that tag group. */
exclusive: boolean
/** @description Every company automatically has one Default Tag Group. The Default Tag Group cannot be deleted, and no other Default Tag Groups can be created. This value is true for the Default Tag Group and false for all other Tag Groups. */
default: boolean
}
links: components['schemas']['ObjectLinks']
}
}
TagFlowOp: {
data: {
/** @enum {string} */
type: 'flow'
id: string
}[]
}
TagCampaignOp: {
data: {
/** @enum {string} */
type: 'campaign'
id: string
}[]
}
TagListOp: {
data: {
/** @enum {string} */
type: 'list'
id: string
}[]
}
TagSegmentOp: {
data: {
/** @enum {string} */
type: 'segment'
id: string
}[]
}
Suppression: {
/**
* @description The email of the profile to suppress / unsuppress.
* @example [email protected]
*/
email: string
}
SuppressionCreateJobCreateQueryResourceObject: {
type: components['schemas']['ProfileSuppressionBulkCreateJobEnum']
attributes: {
/** @description One or more suppressions to be created. */
suppressions: components['schemas']['Suppression'][]
}
}
SuppressionCreateJobCreateQuery: {
data: components['schemas']['SuppressionCreateJobCreateQueryResourceObject']
}
UnsuppressionCreateJobCreateQueryResourceObject: {
type: components['schemas']['ProfileUnsuppressionBulkCreateJobEnum']
attributes: {
/** @description One or more suppressions to be removed. */
suppressions: components['schemas']['Suppression'][]
}
}
UnsuppressionCreateJobCreateQuery: {
data: components['schemas']['UnsuppressionCreateJobCreateQueryResourceObject']
}
SubscriptionChannels: {
/**
* @description The communication types to subscribe to on the "EMAIL" Channel. Currently supports "MARKETING".
* @example [
* "MARKETING"
* ]
*/
email?: 'MARKETING'[]
/**
* @description The communication types to subscribe to on the "SMS" Channel. Currently supports "MARKETING".
* @example [
* "MARKETING"
* ]
*/
sms?: 'MARKETING'[]
}
Subscription: {
/** @description When provided, this will provide consent for the indicated message types on the specified channels. If omitted, we will subscribe the profile to all message types on the channels corresponding to the provided identifiers. */
channels?: components['schemas']['SubscriptionChannels']
/**
* @description The email address to subscribe or to set on the profile if `channels` is specified and the email channel is omitted.
* @example [email protected]
*/
email?: string
/**
* @description The phone number to subscribe or to set on the profile if `channels` is specified and the SMS channel is omitted.
* @example +15005550006
*/
phone_number?: string
/**
* @description The ID of the profile to subscribe. If provided, this will be used to perform the lookup.
* @example 01GDDKASAP8TKDDA2GRZDSVP4H
*/
profile_id?: string
}
SubscriptionCreateJobCreateQueryResourceObject: {
type: components['schemas']['ProfileSubscriptionBulkCreateJobEnum']
attributes: {
/**
* @description The list to add the newly subscribed profiles to
* @example Y6nRLr
*/
list_id: string
/**
* @description A custom method detail or source to store on the consent records.
* @example Marketing Event
*/
custom_source?: string
/** @description One or more subscriptions to be created. */
subscriptions: components['schemas']['Subscription'][]
}
}
SubscriptionCreateJobCreateQuery: {
data: components['schemas']['SubscriptionCreateJobCreateQueryResourceObject']
}
UnsubscriptionCreateJobCreateQueryResourceObject: {
type: components['schemas']['ProfileUnsubscriptionBulkCreateJobEnum']
attributes: {
/**
* @description Optional, the list to remove the profiles from
* @example Y6nRLr
*/
list_id?: string
/**
* @description The emails to unsubscribe if any.
* @example ["[email protected]", "[email protected]"
*/
emails?: string[]
/**
* @description The phone numbers to unsubscribe if any.
* @example ["+15005550006","+15005550007"]
*/
phone_numbers?: string[]
}
}
UnsubscriptionCreateJobCreateQuery: {
data: components['schemas']['UnsubscriptionCreateJobCreateQueryResourceObject']
}
DataPrivacyCreateDeletionJobQueryResourceObject: {
type: components['schemas']['DataPrivacyDeletionJobEnum']
attributes: {
/**
* @description The ID of the profile to delete. This is the `id` field on the profile object.
* @example 01F2VWQ645BES947MP1BPAKVMB
*/
profile_id?: string
/**
* @description The email address of the profile to delete.
* @example [email protected]
*/
email?: string
/**
* @description The phone number of the profile to delete.
* @example +15005550006
*/
phone_number?: string
}
}
DataPrivacyCreateDeletionJobQuery: {
data: components['schemas']['DataPrivacyCreateDeletionJobQueryResourceObject']
}
OnsiteSubscriptionCreateQueryResourceObject: {
type: components['schemas']['SubscriptionEnum']
attributes: {
/**
* @description The list ID to add the newly subscribed profile to.
* @example Y6nRLr
*/
list_id: string
/**
* @description A custom method detail or source to store on the consent records for this subscription.
* @example Homepage footer signup form
*/
custom_source?: string
/**
* @description Email address to create subscription and email consent record for.
* @example [email protected]
*/
email?: string
/**
* @description Phone number to create subscription and SMS consent record for, in E.164 format.
* @example +15005550006
*/
phone_number?: string
/**
* @description Profile properties to set on the newly subscribed profile.
* @example {
* "first_name": "Matt",
* "last_name": "Kemp",
* "favorite_color": "Blue"
* }
*/
properties?: Record<string, never>
}
}
OnsiteSubscriptionCreateQuery: {
data: components['schemas']['OnsiteSubscriptionCreateQueryResourceObject']
}
_OnsiteProfileMetaIdentifiers: {
/**
* @description Primary key that uniquely identifies this profile. Generated by Klaviyo.
* @example 01GDDKASAP8TKDDA2GRZDSVP4H
*/
id?: string
/**
* @description Individual's email address
* @example [email protected]
*/
email?: string
/**
* @description Individual's phone number in E.164 format
* @example +15005550006
*/
phone_number?: string
/**
* @description A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.
* @example 63f64a2b-c6bf-40c7-b81f-bed08162edbe
*/
external_id?: string
anonymous_id?: string
/**
* @description
* Also known as the `exchange_id`, this is an encrypted identifier used for identifying a
* profile by Klaviyo's web tracking.
*
* You can use this field as a filter when retrieving profiles via the Get Profiles endpoint.
*
* @example J8fjcn003Wy6b-3ILNlOyZXabW6dcFwTyeuxrowMers%3D.McN66
*/
_kx?: string
}
_OnsiteProfileMeta: {
identifiers: components['schemas']['_OnsiteProfileMetaIdentifiers']
}
OnsiteProfileCreateQueryResourceObject: {
type: components['schemas']['ProfileEnum']
attributes: {
/**
* @description Individual's email address
* @example [email protected]
*/
email?: string
/**
* @description Individual's phone number in E.164 format
* @example +15005550006
*/
phone_number?: string
/**
* @description A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.
* @example 63f64a2b-c6bf-40c7-b81f-bed08162edbe
*/
external_id?: string
anonymous_id?: string
/**
* @description Individual's first name
* @example Sarah
*/
first_name?: string
/**
* @description Individual's last name
* @example Mason
*/
last_name?: string
/**
* @description Name of the company or organization within the company for whom the individual works
* @example Klaviyo
*/
organization?: string
/**
* @description Individual's job title
* @example Engineer
*/
title?: string
/**
* @description URL pointing to the location of a profile image
* @example https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg
*/
image?: string
location?: components['schemas']['ProfileLocation']
/**
* @description An object containing key/value pairs for any custom properties assigned to this profile
* @example {
* "pseudonym": "Dr. Octopus"
* }
*/
properties?: Record<string, never>
}
meta?: components['schemas']['_OnsiteProfileMeta']
}
OnsiteProfileCreateQuery: {
data: components['schemas']['OnsiteProfileCreateQueryResourceObject']
}
NestedListItemResponseElement: {
nested_name: string
nested_number: number
}
CatalogItemUpdateQueryResourceObject: {
type: components['schemas']['CatalogItemEnum']
/**
* @description The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-ITEM-1
*/
id: string
attributes: {
/**
* @description The title of the catalog item.
* @example Ocean Blue Shirt (Sample)
*/
title?: string
/**
* @description This field can be used to set the price on the catalog item, which is what gets displayed for the item when included in emails. For most price-update use cases, you will also want to update the `price` on any child variants, using the [Update Catalog Variant Endpoint](https://developers.klaviyo.com/en/reference/update_catalog_variant).
* @example 42
*/
price?: number
/**
* @description A description of the catalog item.
* @example A description of the catalog item.
*/
description?: string
/**
* @description URL pointing to the location of the catalog item on your website.
* @example https://via.placeholder.com/150
*/
url?: string
/**
* @description URL pointing to the location of a full image of the catalog item.
* @example https://via.placeholder.com/300
*/
image_full_url?: string
/**
* @description URL pointing to the location of an image thumbnail of the catalog item
* @example https://via.placeholder.com/150
*/
image_thumbnail_url?: string
/**
* @description List of URLs pointing to the locations of images of the catalog item.
* @example [
* "https://via.placeholder.com/150"
* ]
*/
images?: string[]
/**
* @description Flat JSON blob to provide custom metadata about the catalog item. May not exceed 100kb.
* @example {
* "Top Pick": true
* }
*/
custom_metadata?: Record<string, never>
/**
* @description Boolean value indicating whether the catalog item is published.
* @example true
*/
published?: boolean
}
relationships?: {
categories?: {
data: {
/** @enum {string} */
type: 'catalog-category'
/** @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL */
id: string
}[]
}
}
}
CatalogItemUpdateQuery: {
data: components['schemas']['CatalogItemUpdateQueryResourceObject']
}
PatchCatalogItemResponse: {
data: {
type: components['schemas']['CatalogItemEnum']
/**
* @description The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-ITEM-1
*/
id: string
attributes: {
/**
* @description The ID of the catalog item in an external system.
* @example SAMPLE-DATA-ITEM-1
*/
external_id?: string
/**
* @description The title of the catalog item.
* @example Ocean Blue Shirt (Sample)
*/
title?: string
/**
* @description A description of the catalog item.
* @example Ocean blue cotton shirt with a narrow collar and buttons down the front and long sleeves. Comfortable fit and titled kaleidoscope patterns.
*/
description?: string
/**
* @description This field can be used to set the price on the catalog item, which is what gets displayed for the item when included in emails. For most price-update use cases, you will also want to update the `price` on any child variants, using the [Update Catalog Variant Endpoint](https://developers.klaviyo.com/en/reference/update_catalog_variant).
* @example 42
*/
price?: number
/**
* @description URL pointing to the location of the catalog item on your website.
* @example https://via.placeholder.com/150
*/
url?: string
/**
* @description URL pointing to the location of a full image of the catalog item.
* @example https://via.placeholder.com/300
*/
image_full_url?: string
/**
* @description URL pointing to the location of an image thumbnail of the catalog item
* @example https://via.placeholder.com/150
*/
image_thumbnail_url?: string
/**
* @description List of URLs pointing to the locations of images of the catalog item.
* @example [
* "https://via.placeholder.com/150"
* ]
*/
images?: string[]
/**
* @description Flat JSON blob to provide custom metadata about the catalog item. May not exceed 100kb.
* @example {
* "Top Pick": true
* }
*/
custom_metadata?: Record<string, never>
/**
* @description Boolean value indicating whether the catalog item is published.
* @example true
*/
published?: boolean
/**
* Format: date-time
* @description Date and time when the catalog item was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the catalog item was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
}
CatalogVariantUpdateQueryResourceObject: {
type: components['schemas']['CatalogVariantEnum']
/**
* @description The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM
*/
id: string
attributes: {
/**
* @description The title of the catalog item variant.
* @example Ocean Blue Shirt (Sample) Variant Medium
*/
title?: string
/**
* @description A description of the catalog item variant.
* @example Ocean blue cotton shirt with a narrow collar and buttons down the front and long sleeves. Comfortable fit and titled kaleidoscope patterns.
*/
description?: string
/**
* @description The SKU of the catalog item variant.
* @example OBS-MD
*/
sku?: string
/**
* @description This field controls the visibility of this catalog item variant in product feeds/blocks. This field supports the following values:
* `1`: a product will not appear in dynamic product recommendation feeds and blocks if it is out of stock.
* `0` or `2`: a product can appear in dynamic product recommendation feeds and blocks regardless of inventory quantity.
*
* @example 2
* @enum {integer}
*/
inventory_policy?: 0 | 1 | 2
/**
* @description The quantity of the catalog item variant currently in stock.
* @example 25
*/
inventory_quantity?: number
/**
* @description This field can be used to set the price on the catalog item variant, which is what gets displayed for the item variant when included in emails. For most price-update use cases, you will also want to update the `price` on any parent items using the [Update Catalog Item Endpoint](https://developers.klaviyo.com/en/reference/update_catalog_item).
* @example 42
*/
price?: number
/**
* @description URL pointing to the location of the catalog item variant on your website.
* @example https://via.placeholder.com/150
*/
url?: string
/**
* @description URL pointing to the location of a full image of the catalog item variant.
* @example https://via.placeholder.com/300
*/
image_full_url?: string
/**
* @description URL pointing to the location of an image thumbnail of the catalog item variant.
* @example https://via.placeholder.com/150
*/
image_thumbnail_url?: string
/**
* @description List of URLs pointing to the locations of images of the catalog item variant.
* @example [
* "https://via.placeholder.com/150"
* ]
*/
images?: string[]
/**
* @description Flat JSON blob to provide custom metadata about the catalog item variant. May not exceed 100kb.
* @example {
* "Top Pick": true
* }
*/
custom_metadata?: Record<string, never>
/**
* @description Boolean value indicating whether the catalog item variant is published.
* @example true
*/
published?: boolean
}
}
CatalogVariantUpdateQuery: {
data: components['schemas']['CatalogVariantUpdateQueryResourceObject']
}
PatchCatalogVariantResponse: {
data: {
type: components['schemas']['CatalogVariantEnum']
/**
* @description The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM
*/
id: string
attributes: {
/**
* @description The ID of the catalog item variant in an external system.
* @example SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM
*/
external_id?: string
/**
* @description The title of the catalog item variant.
* @example Ocean Blue Shirt (Sample) Variant Medium
*/
title?: string
/**
* @description A description of the catalog item variant.
* @example Ocean blue cotton shirt with a narrow collar and buttons down the front and long sleeves. Comfortable fit and titled kaleidoscope patterns.
*/
description?: string
/**
* @description The SKU of the catalog item variant.
* @example OBS-MD
*/
sku?: string
/**
* @description This field controls the visibility of this catalog item variant in product feeds/blocks. This field supports the following values:
* `1`: a product will not appear in dynamic product recommendation feeds and blocks if it is out of stock.
* `0` or `2`: a product can appear in dynamic product recommendation feeds and blocks regardless of inventory quantity.
*
* @example 2
* @enum {integer}
*/
inventory_policy?: 0 | 1 | 2
/**
* @description The quantity of the catalog item variant currently in stock.
* @example 25
*/
inventory_quantity?: number
/**
* @description This field can be used to set the price on the catalog item variant, which is what gets displayed for the item variant when included in emails. For most price-update use cases, you will also want to update the `price` on any parent items using the [Update Catalog Item Endpoint](https://developers.klaviyo.com/en/reference/update_catalog_item).
* @example 42
*/
price?: number
/**
* @description URL pointing to the location of the catalog item variant on your website.
* @example https://via.placeholder.com/150
*/
url?: string
/**
* @description URL pointing to the location of a full image of the catalog item variant.
* @example https://via.placeholder.com/300
*/
image_full_url?: string
/**
* @description URL pointing to the location of an image thumbnail of the catalog item variant.
* @example https://via.placeholder.com/150
*/
image_thumbnail_url?: string
/**
* @description List of URLs pointing to the locations of images of the catalog item variant.
* @example [
* "https://via.placeholder.com/150"
* ]
*/
images?: string[]
/**
* @description Flat JSON blob to provide custom metadata about the catalog item variant. May not exceed 100kb.
* @example {
* "Top Pick": true
* }
*/
custom_metadata?: Record<string, never>
/**
* @description Boolean value indicating whether the catalog item variant is published.
* @example true
*/
published?: boolean
/**
* Format: date-time
* @description Date and time when the catalog item variant was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the catalog item variant was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
}
CatalogCategoryUpdateQueryResourceObject: {
type: components['schemas']['CatalogCategoryEnum']
/**
* @description The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL
*/
id: string
attributes: {
/**
* @description The name of the catalog category.
* @example Sample Data Category Apparel
*/
name?: string
}
relationships?: {
items?: {
data: {
/** @enum {string} */
type: 'catalog-item'
/** @example $custom:::$default:::SAMPLE-DATA-ITEM-1 */
id: string
}[]
}
}
}
CatalogCategoryUpdateQuery: {
data: components['schemas']['CatalogCategoryUpdateQueryResourceObject']
}
PatchCatalogCategoryResponse: {
data: {
type: components['schemas']['CatalogCategoryEnum']
/**
* @description The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL
*/
id: string
attributes: {
/**
* @description The ID of the catalog category in an external system.
* @example SAMPLE-DATA-CATEGORY-APPAREL
*/
external_id?: string
/**
* @description The name of the catalog category.
* @example Sample Data Category Apparel
*/
name?: string
/**
* Format: date-time
* @description Date and time when the catalog category was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
}
ListPartialUpdateQueryResourceObject: {
type: components['schemas']['ListEnum']
/**
* @description Primary key that uniquely identifies this list. Generated by Klaviyo.
* @example Y6nRLr
*/
id: string
attributes: {
/**
* @description A helpful name to label the list
* @example Newsletter
*/
name: string
}
}
ListPartialUpdateQuery: {
data: components['schemas']['ListPartialUpdateQueryResourceObject']
}
PatchListResponse: {
data: {
type: components['schemas']['ListEnum']
/**
* @description Primary key that uniquely identifies this list. Generated by Klaviyo.
* @example Y6nRLr
*/
id: string
attributes: {
/**
* @description A helpful name to label the list
* @example Newsletter
*/
name?: string
/**
* Format: date-time
* @description Date and time when the list was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the list was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
}
SegmentPartialUpdateQueryResourceObject: {
type: components['schemas']['SegmentEnum']
id: string
attributes: {
name: string
}
}
SegmentPartialUpdateQuery: {
data: components['schemas']['SegmentPartialUpdateQueryResourceObject']
}
PatchSegmentResponse: {
data: {
type: components['schemas']['SegmentEnum']
id: string
attributes: {
/**
* @description A helpful name to label the segment
* @example Repeat Purchasers
*/
name?: string
/**
* Format: date-time
* @description Date and time when the segment was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the segment was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
}
ProfilePartialUpdateQueryResourceObject: {
type: components['schemas']['ProfileEnum']
/**
* @description Primary key that uniquely identifies this profile. Generated by Klaviyo.
* @example 01GDDKASAP8TKDDA2GRZDSVP4H
*/
id: string
attributes: {
/**
* @description Individual's email address
* @example [email protected]
*/
email?: string
/**
* @description Individual's phone number in E.164 format
* @example +15005550006
*/
phone_number?: string
/**
* @description A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.
* @example 63f64a2b-c6bf-40c7-b81f-bed08162edbe
*/
external_id?: string
anonymous_id?: string
/**
* @description Individual's first name
* @example Sarah
*/
first_name?: string
/**
* @description Individual's last name
* @example Mason
*/
last_name?: string
/**
* @description Name of the company or organization within the company for whom the individual works
* @example Klaviyo
*/
organization?: string
/**
* @description Individual's job title
* @example Engineer
*/
title?: string
/**
* @description URL pointing to the location of a profile image
* @example https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg
*/
image?: string
location?: components['schemas']['ProfileLocation']
/**
* @description An object containing key/value pairs for any custom properties assigned to this profile
* @example {
* "pseudonym": "Dr. Octopus"
* }
*/
properties?: Record<string, never>
}
}
ProfilePartialUpdateQuery: {
data: components['schemas']['ProfilePartialUpdateQueryResourceObject']
}
PatchProfileResponse: {
data: {
type: components['schemas']['ProfileEnum']
/**
* @description Primary key that uniquely identifies this profile. Generated by Klaviyo.
* @example 01GDDKASAP8TKDDA2GRZDSVP4H
*/
id: string
attributes: {
/**
* @description Individual's email address
* @example [email protected]
*/
email?: string
/**
* @description Individual's phone number in E.164 format
* @example +15005550006
*/
phone_number?: string
/**
* @description A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.
* @example 63f64a2b-c6bf-40c7-b81f-bed08162edbe
*/
external_id?: string
/**
* @description Individual's first name
* @example Sarah
*/
first_name?: string
/**
* @description Individual's last name
* @example Mason
*/
last_name?: string
/**
* @description Name of the company or organization within the company for whom the individual works
* @example Klaviyo
*/
organization?: string
/**
* @description Individual's job title
* @example Engineer
*/
title?: string
/**
* @description URL pointing to the location of a profile image
* @example https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg
*/
image?: string
/**
* Format: date-time
* @description Date and time when the profile was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description Date and time when the profile was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
updated?: string
/**
* Format: date-time
* @description Date and time of the most recent event the triggered an update to the profile, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
last_event_date?: string
location?: components['schemas']['ProfileLocation']
/**
* @description An object containing key/value pairs for any custom properties assigned to this profile
* @example {
* "pseudonym": "Dr. Octopus"
* }
*/
properties?: Record<string, never>
subscriptions?: components['schemas']['Subscriptions']
predictive_analytics?: components['schemas']['PredictiveAnalytics']
}
links: components['schemas']['ObjectLinks']
}
}
FlowUpdateQueryResourceObject: {
type: components['schemas']['FlowEnum']
/** @description ID of the Flow to update. Ex: XVTP5Q */
id: string
attributes: {
/** @description Status you want to update the flow to. ['draft', 'manual', or 'live'] */
status: string
}
}
FlowUpdateQuery: {
data: components['schemas']['FlowUpdateQueryResourceObject']
}
PatchFlowResponse: {
data: {
type: components['schemas']['FlowEnum']
id: string
attributes: {
name?: string
status?: string
archived?: boolean
/**
* Format: date-time
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @example 2022-11-08T00:00:00
*/
updated?: string
trigger_type?: string
}
links: components['schemas']['ObjectLinks']
}
}
CampaignPartialUpdateQueryResourceObject: {
type: components['schemas']['CampaignEnum']
/** @description The campaign ID to be retrieved */
id: string
attributes: {
/**
* @description The campaign name
* @example My new campaign
*/
name?: string
/** @description The audiences to be included and/or excluded from the campaign */
audiences?: components['schemas']['AudiencesSubObject']
/** @description Options to use when sending a campaign */
send_options?: components['schemas']['SendOptionsSubObject']
/** @description The tracking options associated with the campaign */
tracking_options?: components['schemas']['TrackingOptionsSubObject']
/** @description The send strategy the campaign will send with */
send_strategy?: components['schemas']['SendStrategySubObject']
}
}
CampaignPartialUpdateQuery: {
data: components['schemas']['CampaignPartialUpdateQueryResourceObject']
}
PatchCampaignResponse: {
data: {
type: components['schemas']['CampaignEnum']
/** @description The campaign ID */
id: string
attributes: {
/** @description The campaign name */
name: string
/** @description The current status of the campaign */
status: string
/** @description Whether the campaign has been archived or not */
archived: boolean
/** @description The type of campaign */
channel: string
/** @description The audiences to be included and/or excluded from the campaign */
audiences: components['schemas']['AudiencesSubObject']
/** @description Options to use when sending a campaign */
send_options: components['schemas']['SendOptionsSubObject']
/** @description The id of the message associated with the campaign */
message: string
/** @description The tracking options associated with the campaign */
tracking_options: components['schemas']['TrackingOptionsSubObject']
/** @description The send strategy the campaign will send with */
send_strategy: components['schemas']['SendStrategySubObject']
/**
* Format: date-time
* @description The datetime when the campaign was created
* @example 2022-11-08T00:00:00
*/
created_at: string
/**
* Format: date-time
* @description The datetime when the campaign was scheduled for future sending
* @example 2022-11-08T00:00:00
*/
scheduled_at: string
/**
* Format: date-time
* @description The datetime when the campaign was last updated by a user or the system
* @example 2022-11-08T00:00:00
*/
updated_at: string
/**
* Format: date-time
* @description The datetime when the campaign will be / was sent or None if not yet scheduled by a send_job.
* @example 2022-11-08T00:00:00
*/
send_time: string
}
links: components['schemas']['ObjectLinks']
}
}
CampaignMessagePartialUpdateQueryResourceObject: {
type: components['schemas']['CampaignMessageEnum']
/** @description The message ID to be retrieved */
id: string
attributes: {
/**
* @description The label or name on the message
* @example My message name
*/
label?: string
/** @description Additional attributes relating to the content of the message */
content?: components['schemas']['ContentSubObject']
}
}
CampaignMessagePartialUpdateQuery: {
data: components['schemas']['CampaignMessagePartialUpdateQueryResourceObject']
}
PatchCampaignMessageResponse: {
data: {
type: components['schemas']['CampaignMessageEnum']
/** @description The message ID */
id: string
attributes: {
/** @description The label or name on the message */
label: string
/** @description The channel the message is to be sent on */
channel: string
/** @description Additional attributes relating to the content of the message */
content: components['schemas']['ContentSubObject']
/** @description The list of appropriate Send Time Sub-objects associated with the message */
send_times?: components['schemas']['SendTimeSubObject'][]
/**
* Format: date-time
* @description The datetime when the message was created
* @example 2022-11-08T00:00:00
*/
created_at?: string
/**
* Format: date-time
* @description The datetime when the message was last updated
* @example 2022-11-08T00:00:00
*/
updated_at?: string
/** @description The parent campaign id */
campaign_id: string
}
links: components['schemas']['ObjectLinks']
}
}
CampaignSendJobPartialUpdateQueryResourceObject: {
type: components['schemas']['CampaignSendJobEnum']
/** @description The ID of the currently sending campaign to cancel or revert */
id: string
attributes: {
/**
* @description The action you would like to take with this send job from among 'cancel' and 'revert'
* @example cancel
*/
action: string
}
}
CampaignSendJobPartialUpdateQuery: {
data: components['schemas']['CampaignSendJobPartialUpdateQueryResourceObject']
}
TemplateUpdateQueryResourceObject: {
type: components['schemas']['TemplateEnum']
/** @description The ID of template */
id: string
attributes: {
/**
* @description The name of the template
* @example Monthly Newsletter Template
*/
name?: string
/**
* @description The HTML of the template
* @example
* <html>
* <body>
* hello world
* </body>
* </html>
*/
html?: string
/**
* @description The plaintext of the template
* @example hello world
*/
text?: string
/** @description Provide fields to limit the returned data */
return_fields?: string[]
}
}
TemplateUpdateQuery: {
data: components['schemas']['TemplateUpdateQueryResourceObject']
}
PatchTemplateResponse: {
data: {
type: components['schemas']['TemplateEnum']
/** @description The ID of template */
id: string
attributes: {
/**
* @description The ID of the company the template belongs to
* @example COMPANY_ID
*/
company_id: string
/** @description The name of the template */
name: string
/**
* @description `editor_type` has a fixed set of values:
* * SYSTEM_DRAGGABLE: indicates a drag-and-drop editor template
* * SIMPLE: A rich text editor template
* * CODE: A custom HTML template
* * USER_DRAGGABLE: A hybrid template, using custom HTML in the drag-and-drop editor
*/
editor_type: string
/** @description The rendered HTML of the template */
html: string
/** @description The template plain_text */
text?: string
/**
* Format: date-time
* @description The date the template was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description The date the template was updated in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
}
TagUpdateQueryResourceObject: {
type: components['schemas']['TagEnum']
/**
* @description The Tag ID
* @example abcd1234-ef56-gh78-ij90-abcdef123456
*/
id: string
attributes: {
/**
* @description The Tag name
* @example My Tag
*/
name: string
}
}
TagUpdateQuery: {
data: components['schemas']['TagUpdateQueryResourceObject']
}
PatchTagResponse: {
data: {
type: components['schemas']['TagEnum']
/**
* @description The Tag ID
* @example abcd1234-ef56-gh78-ij90-abcdef123456
*/
id: string
attributes: {
/**
* @description The Tag name
* @example My Tag
*/
name: string
}
links: components['schemas']['ObjectLinks']
}
}
TagGroupUpdateQueryResourceObject: {
type: components['schemas']['TagGroupEnum']
/**
* @description The Tag Group ID
* @example zyxw9876-vu54-ts32-rq10-zyxwvu654321
*/
id: string
attributes: {
/**
* @description The Tag Group name
* @example My Tag Group
*/
name: string
return_fields?: string[]
}
}
TagGroupUpdateQuery: {
data: components['schemas']['TagGroupUpdateQueryResourceObject']
}
PatchTagGroupResponse: {
data: {
type: components['schemas']['TagGroupEnum']
/**
* @description The Tag Group ID
* @example zyxw9876-vu54-ts32-rq10-zyxwvu654321
*/
id: string
attributes: {
/**
* @description The Tag Group name
* @example My Tag Group
*/
name: string
/** @description If a tag group is non-exclusive, any given related resource (campaign, flow, etc.) can be linked to multiple tags from that tag group. If a tag group is exclusive, any given related resource can only be linked to one tag from that tag group. */
exclusive: boolean
/** @description Every company automatically has one Default Tag Group. The Default Tag Group cannot be deleted, and no other Default Tag Groups can be created. This value is true for the Default Tag Group and false for all other Tag Groups. */
default: boolean
}
links: components['schemas']['ObjectLinks']
}
}
CatalogItemDeleteQueryResourceObject: {
type: components['schemas']['CatalogItemEnum']
/**
* @description The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-ITEM-1
*/
id: string
}
CatalogVariantDeleteQueryResourceObject: {
type: components['schemas']['CatalogVariantEnum']
/**
* @description The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM
*/
id: string
}
CatalogCategoryDeleteQueryResourceObject: {
type: components['schemas']['CatalogCategoryEnum']
/**
* @description The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
* @example $custom:::$default:::SAMPLE-DATA-CATEGORY-APPAREL
*/
id: string
}
ListMembersDeleteQuery: {
data: {
/** @enum {string} */
type: 'profile'
id: string
}[]
}
DeleteTemplateResponse: {
data: {
type: components['schemas']['TemplateEnum']
/** @description The ID of template */
id: string
attributes: {
/**
* @description The ID of the company the template belongs to
* @example COMPANY_ID
*/
company_id: string
/** @description The name of the template */
name: string
/**
* @description `editor_type` has a fixed set of values:
* * SYSTEM_DRAGGABLE: indicates a drag-and-drop editor template
* * SIMPLE: A rich text editor template
* * CODE: A custom HTML template
* * USER_DRAGGABLE: A hybrid template, using custom HTML in the drag-and-drop editor
*/
editor_type: string
/** @description The rendered HTML of the template */
html: string
/** @description The template plain_text */
text?: string
/**
* Format: date-time
* @description The date the template was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
created?: string
/**
* Format: date-time
* @description The date the template was updated in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
* @example 2022-11-08T00:00:00
*/
updated?: string
}
links: components['schemas']['ObjectLinks']
}
}
DeleteTagResponse: {
data: {
type: components['schemas']['TagEnum']
/**
* @description The Tag ID
* @example abcd1234-ef56-gh78-ij90-abcdef123456
*/
id: string
attributes: {
/**
* @description The Tag name
* @example My Tag
*/
name: string
}
links: components['schemas']['ObjectLinks']
}
}
DeleteTagGroupResponse: {
data: {
type: components['schemas']['TagGroupEnum']
/**
* @description The Tag Group ID
* @example zyxw9876-vu54-ts32-rq10-zyxwvu654321
*/
id: string
attributes: {
/**
* @description The Tag Group name
* @example My Tag Group
*/
name: string
/** @description If a tag group is non-exclusive, any given related resource (campaign, flow, etc.) can be linked to multiple tags from that tag group. If a tag group is exclusive, any given related resource can only be linked to one tag from that tag group. */
exclusive: boolean
/** @description Every company automatically has one Default Tag Group. The Default Tag Group cannot be deleted, and no other Default Tag Groups can be created. This value is true for the Default Tag Group and false for all other Tag Groups. */
default: boolean
}
links: components['schemas']['ObjectLinks']
}
}
CollectionLinks: {
/** Format: uri */
self: string
/** Format: uri */
first?: string
/** Format: uri */
last?: string
/** Format: uri */
prev?: string
/** Format: uri */
next?: string
}
ObjectLinks: {
/** Format: uri */
self: string
}
/** @enum {string} */
CatalogItemEnum: 'catalog-item'
/** @enum {string} */
CatalogVariantEnum: 'catalog-variant'
/** @enum {string} */
CatalogCategoryEnum: 'catalog-category'
/** @enum {string} */
EventEnum: 'event'
/** @enum {string} */
MetricEnum: 'metric'
/** @enum {string} */
ProfileEnum: 'profile'
/** @enum {string} */
ListEnum: 'list'
/** @enum {string} */
TagEnum: 'tag'
/** @enum {string} */
SegmentEnum: 'segment'
/** @enum {string} */
ProfileAggregateEnum: 'profile-aggregate'
/** @enum {string} */
FlowEnum: 'flow'
/** @enum {string} */
FlowActionEnum: 'flow-action'
/** @enum {string} */
FlowMessageEnum: 'flow-message'
/** @enum {string} */
CampaignEnum: 'campaign'
/** @enum {string} */
CampaignMessageEnum: 'campaign-message'
/** @enum {string} */
CampaignSendJobEnum: 'campaign-send-job'
/** @enum {string} */
CampaignRecipientEstimationJobEnum: 'campaign-recipient-estimation-job'
/** @enum {string} */
CampaignRecipientEstimationEnum: 'campaign-recipient-estimation'
/** @enum {string} */
TemplateEnum: 'template'
/** @enum {string} */
CatalogItemBulkCreateJobEnum: 'catalog-item-bulk-create-job'
/** @enum {string} */
CatalogItemBulkUpdateJobEnum: 'catalog-item-bulk-update-job'
/** @enum {string} */
CatalogItemBulkDeleteJobEnum: 'catalog-item-bulk-delete-job'
/** @enum {string} */
CatalogVariantBulkCreateJobEnum: 'catalog-variant-bulk-create-job'
/** @enum {string} */
CatalogVariantBulkUpdateJobEnum: 'catalog-variant-bulk-update-job'
/** @enum {string} */
CatalogVariantBulkDeleteJobEnum: 'catalog-variant-bulk-delete-job'
/** @enum {string} */
CatalogCategoryBulkCreateJobEnum: 'catalog-category-bulk-create-job'
/** @enum {string} */
CatalogCategoryBulkUpdateJobEnum: 'catalog-category-bulk-update-job'
/** @enum {string} */
CatalogCategoryBulkDeleteJobEnum: 'catalog-category-bulk-delete-job'
/** @enum {string} */
TagGroupEnum: 'tag-group'
/** @enum {string} */
TestApiAnalyticsSampleEnum: 'test-api-analytics-sample'
/** @enum {string} */
MetricAggregateEnum: 'metric-aggregate'
/** @enum {string} */
ProfileSuppressionBulkCreateJobEnum: 'profile-suppression-bulk-create-job'
/** @enum {string} */
ProfileUnsuppressionBulkCreateJobEnum: 'profile-unsuppression-bulk-create-job'
/** @enum {string} */
ProfileSubscriptionBulkCreateJobEnum: 'profile-subscription-bulk-create-job'
/** @enum {string} */
ProfileUnsubscriptionBulkCreateJobEnum: 'profile-unsubscription-bulk-create-job'
/** @enum {string} */
DataPrivacyDeletionJobEnum: 'data-privacy-deletion-job'
/** @enum {string} */
SubscriptionEnum: 'subscription'
/** @enum {string} */
TestListEnum: 'test-list'
}
responses: {
/** @description Client Error */
ClientError: {
content: {
'application/json': {
errors: {
id: string
code: string
title: string
detail: string
source?: {
pointer?: string
parameter?: string
}
}[]
}
}
}
/** @description Server Error */
ServerError: {
content: {
'application/json': {
errors: {
id: string
code: string
title: string
detail: string
source?: {
pointer?: string
parameter?: string
}
}[]
}
}
}
}
parameters: never
requestBodies: never
headers: never
pathItems: never
}
export type external = Record<string, never>
export interface operations {
/**
* Get Campaigns
* @description Returns some or all campaigns based on [optional] filters<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Read`
*/
get_campaigns: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[campaign]'?: (
| 'name'
| 'status'
| 'archived'
| 'channel'
| 'audiences'
| 'audiences.included'
| 'audiences.excluded'
| 'send_options'
| 'send_options.use_smart_sending'
| 'message'
| 'tracking_options'
| 'tracking_options.is_tracking_opens'
| 'tracking_options.is_tracking_clicks'
| 'tracking_options.is_add_utm'
| 'tracking_options.utm_params'
| 'send_strategy'
| 'send_strategy.method'
| 'send_strategy.options_static'
| 'send_strategy.options_static.datetime'
| 'send_strategy.options_static.is_local'
| 'send_strategy.options_static.send_past_recipients_immediately'
| 'send_strategy.options_throttled'
| 'send_strategy.options_throttled.datetime'
| 'send_strategy.options_throttled.throttle_percentage'
| 'send_strategy.options_sto'
| 'send_strategy.options_sto.date'
| 'created_at'
| 'scheduled_at'
| 'updated_at'
| 'send_time'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[tag]'?: 'name'[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'tags'[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?:
| 'created_at'
| '-created_at'
| 'id'
| '-id'
| 'name'
| '-name'
| 'scheduled_at'
| '-scheduled_at'
| 'updated_at'
| '-updated_at'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCampaignResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Campaign
* @description Creates a campaign given a set of parameters, then returns it.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
create_campaign: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Creates a campaign from parameters */
requestBody: {
content: {
'application/json': components['schemas']['CampaignCreateQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostCampaignResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Campaign
* @description Returns a specific campaign based on a required id.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Read`
*/
get_campaign: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[campaign]'?: (
| 'name'
| 'status'
| 'archived'
| 'channel'
| 'audiences'
| 'audiences.included'
| 'audiences.excluded'
| 'send_options'
| 'send_options.use_smart_sending'
| 'message'
| 'tracking_options'
| 'tracking_options.is_tracking_opens'
| 'tracking_options.is_tracking_clicks'
| 'tracking_options.is_add_utm'
| 'tracking_options.utm_params'
| 'send_strategy'
| 'send_strategy.method'
| 'send_strategy.options_static'
| 'send_strategy.options_static.datetime'
| 'send_strategy.options_static.is_local'
| 'send_strategy.options_static.send_past_recipients_immediately'
| 'send_strategy.options_throttled'
| 'send_strategy.options_throttled.datetime'
| 'send_strategy.options_throttled.throttle_percentage'
| 'send_strategy.options_sto'
| 'send_strategy.options_sto.date'
| 'created_at'
| 'scheduled_at'
| 'updated_at'
| 'send_time'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[tag]'?: 'name'[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'tags'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The campaign ID to be retrieved */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCampaignResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Campaign
* @description Delete a campaign with the given campaign ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
delete_campaign: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The campaign ID to be deleted */
id: string
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Campaign
* @description Update a campaign with the given campaign ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
update_campaign: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The campaign ID to be retrieved */
id: string
}
}
/** @description Update a campaign and return it */
requestBody: {
content: {
'application/json': components['schemas']['CampaignPartialUpdateQuery']
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['PatchCampaignResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Campaign Message
* @description Returns a specific message based on a required id.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Read`
*/
get_campaign_message: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[campaign-message]'?: (
| 'label'
| 'channel'
| 'content'
| 'content.subject'
| 'content.preview_text'
| 'content.from_email'
| 'content.from_label'
| 'content.template_id'
| 'content.template_name'
| 'send_times'
| 'created_at'
| 'updated_at'
| 'campaign_id'
)[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The message ID to be retrieved */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCampaignMessageResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Campaign Message
* @description Update a campaign message<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
update_campaign_message: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The message ID to be retrieved */
id: string
}
}
/** @description Update a message and return it */
requestBody: {
content: {
'application/json': components['schemas']['CampaignMessagePartialUpdateQuery']
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['PatchCampaignMessageResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Campaign Tags
* @description Return all tags that belong to the given campaign.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Campaigns Read`
* `Tags Read`
*/
get_campaign_tags: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[tag]'?: 'name'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
campaign_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCampaignTagResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Campaign Send Job
* @description Get a campaign send job<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Read`
*/
get_campaign_send_job: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[campaign-send-job]'?: 'status'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The ID of the campaign to send */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCampaignSendJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Campaign Send Job
* @description Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
update_campaign_send_job: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The ID of the currently sending campaign to cancel or revert */
id: string
}
}
/** @description Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT */
requestBody: {
content: {
'application/json': components['schemas']['CampaignSendJobPartialUpdateQuery']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Campaign Recipient Estimation Job
* @description Retrieve the status of a recipient estimation job triggered with the `Create Campaign Recipient Estimation Job` endpoint.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Read`
*/
get_campaign_recipient_estimation_job: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[campaign-recipient-estimation-job]'?: 'status'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The ID of the campaign to get recipient estimation status */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCampaignRecipientEstimationJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Campaign Recipient Estimation
* @description Get the estimated recipient count for a campaign with the provided campaign ID. You can refresh this count by using the `Create Campaign Recipient Estimation Job` endpoint.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Read`
*/
get_campaign_recipient_estimation: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[campaign-recipient-estimation]'?: 'estimated_recipient_count'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The ID of the campaign for which to get the estimated number of recipients */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCampaignRecipientEstimationResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Campaign Clone
* @description Clones an existing campaign, returning a new campaign based on the original with a new ID and name.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
create_campaign_clone: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Clones a campaign from an existing campaign */
requestBody: {
content: {
'application/json': components['schemas']['CampaignCloneQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostCampaignResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Assign Campaign Message Template
* @description Creates a non-reusable version of the template and assigns it to the message.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
create_campaign_message_assign_template: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Takes a reusable template, clones it, and assigns the non-reusable clone to the message. */
requestBody: {
content: {
'application/json': components['schemas']['CampaignMessageAssignTemplateQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostCampaignMessageResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Campaign Send Job
* @description Trigger a campaign to send asynchronously<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
create_campaign_send_job: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Trigger the campaign to send asynchronously */
requestBody: {
content: {
'application/json': components['schemas']['CampaignSendJobCreateQuery']
}
}
responses: {
202: {
content: {
'application/json': components['schemas']['PostCampaignSendJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Campaign Recipient Estimation Job
* @description Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Campaigns Write`
*/
create_campaign_recipient_estimation_job: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign. */
requestBody: {
content: {
'application/json': components['schemas']['CampaignRecipientEstimationJobCreateQuery']
}
}
responses: {
202: {
content: {
'application/json': components['schemas']['PostCampaignRecipientEstimationJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Campaign Relationships Tags
* @description Returns the IDs of all tags associated with the given campaign.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Campaigns Read`
* `Tags Read`
*/
get_campaign_relationships_tags: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCampaignTagRelationshipListResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Catalog Items
* @description Get all catalog items in an account.
* Catalog items can be sorted by the following fields, in ascending and descending order: `created`
* Include parameters can be provided to get the following related resource data: `variants`
* Returns a maximum of 100 items per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_catalog_items: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-item]'?: (
| 'external_id'
| 'title'
| 'description'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant]'?: (
| 'external_id'
| 'title'
| 'description'
| 'sku'
| 'inventory_policy'
| 'inventory_quantity'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'variants'[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'created' | '-created'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogItemResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Catalog Item
* @description Create a new catalog item.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
create_catalog_item: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogItemCreateQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostCatalogItemResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Catalog Item
* @description Get a specific catalog item with the given item ID.
* Include parameters can be provided to get the following related resource data: `variants`<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_catalog_item: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-item]'?: (
| 'external_id'
| 'title'
| 'description'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant]'?: (
| 'external_id'
| 'title'
| 'description'
| 'sku'
| 'inventory_policy'
| 'inventory_quantity'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'variants'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogItemResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Catalog Item
* @description Delete a catalog item with the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
delete_catalog_item: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. */
id: string
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Catalog Item
* @description Update a catalog item with the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
update_catalog_item: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. */
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogItemUpdateQuery']
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['PatchCatalogItemResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Catalog Category Items
* @description Get all items in a category with the given category ID.
* Items can be sorted by the following fields, in ascending and descending order: `created`
* Include parameters can be provided to get the following related resource data: `variants`
* Returns a maximum of 100 items per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_catalog_category_items: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-item]'?: (
| 'external_id'
| 'title'
| 'description'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant]'?: (
| 'external_id'
| 'title'
| 'description'
| 'sku'
| 'inventory_policy'
| 'inventory_quantity'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'variants'[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'created' | '-created'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. */
category_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogItemResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Catalog Variants
* @description Get all variants in an account.
* Variants can be sorted by the following fields, in ascending and descending order: `created`
* Returns a maximum of 100 variants per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_catalog_variants: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant]'?: (
| 'external_id'
| 'title'
| 'description'
| 'sku'
| 'inventory_policy'
| 'inventory_quantity'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'created' | '-created'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogVariantResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Catalog Variant
* @description Create a new variant for a related catalog item.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
create_catalog_variant: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogVariantCreateQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostCatalogVariantResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Catalog Variant
* @description Get a catalog item variant with the given variant ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_catalog_variant: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant]'?: (
| 'external_id'
| 'title'
| 'description'
| 'sku'
| 'inventory_policy'
| 'inventory_quantity'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogVariantResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Catalog Variant
* @description Delete a catalog item variant with the given variant ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
delete_catalog_variant: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. */
id: string
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Catalog Variant
* @description Update a catalog item variant with the given variant ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
update_catalog_variant: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. */
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogVariantUpdateQuery']
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['PatchCatalogVariantResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Catalog Item Variants
* @description Get all variants related to the given item ID.
* Variants can be sorted by the following fields, in ascending and descending order: `created`
* Returns a maximum of 100 variants per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_catalog_item_variants: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant]'?: (
| 'external_id'
| 'title'
| 'description'
| 'sku'
| 'inventory_policy'
| 'inventory_quantity'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'created' | '-created'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. */
item_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogVariantResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Catalog Categories
* @description Get all catalog categories in an account.
* Catalog categories can be sorted by the following fields, in ascending and descending order: `created`
* Returns a maximum of 100 categories per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_catalog_categories: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-category]'?: ('external_id' | 'name' | 'updated')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'created' | '-created'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogCategoryResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Catalog Category
* @description Create a new catalog category.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
create_catalog_category: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogCategoryCreateQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostCatalogCategoryResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Catalog Category
* @description Get a catalog category with the given category ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_catalog_category: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-category]'?: ('external_id' | 'name' | 'updated')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogCategoryResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Catalog Category
* @description Delete a catalog category using the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
delete_catalog_category: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. */
id: string
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Catalog Category
* @description Update a catalog category with the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
update_catalog_category: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. */
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogCategoryUpdateQuery']
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['PatchCatalogCategoryResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Catalog Item Categories
* @description Get all catalog categories that an item with the given item ID is in.
* Catalog categories can be sorted by the following fields, in ascending and descending order: `created`
* Returns a maximum of 100 categories per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_catalog_item_categories: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-category]'?: ('external_id' | 'name' | 'updated')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'created' | '-created'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. */
item_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogCategoryResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Create Items Jobs
* @description Get all catalog item bulk create jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_create_items_jobs: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-item-bulk-create-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogItemCreateJobResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Spawn Create Items Job
* @description Create a catalog item bulk create job to create a batch of catalog items.
* Accepts up to 100 catalog items per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
spawn_create_items_job: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogItemCreateJobCreateQuery']
}
}
responses: {
202: {
content: {
'application/json': components['schemas']['PostCatalogItemCreateJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Create Items Job
* @description Get a catalog item bulk create job with the given job ID.
* An `include` parameter can be provided to get the following related resource data: `items`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_create_items_job: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-item-bulk-create-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-item]'?: (
| 'external_id'
| 'title'
| 'description'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'items'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the job to retrieve. */
job_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogItemCreateJobResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Update Items Jobs
* @description Get all catalog item bulk update jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_update_items_jobs: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-item-bulk-update-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogItemUpdateJobResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Spawn Update Items Job
* @description Create a catalog item bulk update job to update a batch of catalog items.
* Accepts up to 100 catalog items per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
spawn_update_items_job: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogItemUpdateJobCreateQuery']
}
}
responses: {
202: {
content: {
'application/json': components['schemas']['PostCatalogItemUpdateJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Update Items Job
* @description Get a catalog item bulk update job with the given job ID.
* An `include` parameter can be provided to get the following related resource data: `items`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_update_items_job: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-item-bulk-update-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-item]'?: (
| 'external_id'
| 'title'
| 'description'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'items'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the job to retrieve. */
job_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogItemUpdateJobResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Delete Items Jobs
* @description Get all catalog item bulk delete jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_delete_items_jobs: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-item-bulk-delete-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogItemDeleteJobResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Spawn Delete Items Job
* @description Create a catalog item bulk delete job to delete a batch of catalog items.
* Accepts up to 100 catalog items per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
spawn_delete_items_job: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogItemDeleteJobCreateQuery']
}
}
responses: {
202: {
content: {
'application/json': components['schemas']['PostCatalogItemDeleteJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Delete Items Job
* @description Get a catalog item bulk delete job with the given job ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_delete_items_job: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-item-bulk-delete-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the job to retrieve. */
job_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogItemDeleteJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Create Variants Jobs
* @description Get all catalog variant bulk create jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_create_variants_jobs: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant-bulk-create-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogVariantCreateJobResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Spawn Create Variants Job
* @description Create a catalog variant bulk create job to create a batch of catalog variants.
* Accepts up to 100 catalog variants per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
spawn_create_variants_job: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogVariantCreateJobCreateQuery']
}
}
responses: {
202: {
content: {
'application/json': components['schemas']['PostCatalogVariantCreateJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Create Variants Job
* @description Get a catalog variant bulk create job with the given job ID.
* An `include` parameter can be provided to get the following related resource data: `variants`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_create_variants_job: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant-bulk-create-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant]'?: (
| 'external_id'
| 'title'
| 'description'
| 'sku'
| 'inventory_policy'
| 'inventory_quantity'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'variants'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the job to retrieve. */
job_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogVariantCreateJobResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Update Variants Jobs
* @description Get all catalog variant bulk update jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_update_variants_jobs: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant-bulk-update-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogVariantUpdateJobResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Spawn Update Variants Job
* @description Create a catalog variant bulk update job to update a batch of catalog variants.
* Accepts up to 100 catalog variants per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
spawn_update_variants_job: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogVariantUpdateJobCreateQuery']
}
}
responses: {
202: {
content: {
'application/json': components['schemas']['PostCatalogVariantUpdateJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Update Variants Job
* @description Get a catalog variate bulk update job with the given job ID.
* An `include` parameter can be provided to get the following related resource data: `variants`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_update_variants_job: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant-bulk-update-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant]'?: (
| 'external_id'
| 'title'
| 'description'
| 'sku'
| 'inventory_policy'
| 'inventory_quantity'
| 'price'
| 'url'
| 'image_full_url'
| 'image_thumbnail_url'
| 'images'
| 'custom_metadata'
| 'published'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'variants'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the job to retrieve. */
job_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogVariantUpdateJobResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Delete Variants Jobs
* @description Get all catalog variant bulk delete jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_delete_variants_jobs: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant-bulk-delete-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogVariantDeleteJobResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Spawn Delete Variants Job
* @description Create a catalog variant bulk delete job to delete a batch of catalog variants.
* Accepts up to 100 catalog variants per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
spawn_delete_variants_job: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogVariantDeleteJobCreateQuery']
}
}
responses: {
202: {
content: {
'application/json': components['schemas']['PostCatalogVariantDeleteJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Delete Variants Job
* @description Get a catalog variant bulk delete job with the given job ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_delete_variants_job: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-variant-bulk-delete-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the job to retrieve. */
job_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogVariantDeleteJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Create Categories Jobs
* @description Get all catalog category bulk create jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_create_categories_jobs: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-category-bulk-create-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogCategoryCreateJobResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Spawn Create Categories Job
* @description Create a catalog category bulk create job to create a batch of catalog categories.
* Accepts up to 100 catalog categories per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
spawn_create_categories_job: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogCategoryCreateJobCreateQuery']
}
}
responses: {
202: {
content: {
'application/json': components['schemas']['PostCatalogCategoryCreateJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Create Categories Job
* @description Get a catalog category bulk create job with the given job ID.
* An `include` parameter can be provided to get the following related resource data: `categories`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_create_categories_job: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-category-bulk-create-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-category]'?: ('external_id' | 'name' | 'updated')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'categories'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the job to retrieve. */
job_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogCategoryCreateJobResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Update Categories Jobs
* @description Get all catalog category bulk update jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_update_categories_jobs: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-category-bulk-update-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogCategoryUpdateJobResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Spawn Update Categories Job
* @description Create a catalog category bulk update job to update a batch of catalog categories.
* Accepts up to 100 catalog categories per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
spawn_update_categories_job: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogCategoryUpdateJobCreateQuery']
}
}
responses: {
202: {
content: {
'application/json': components['schemas']['PostCatalogCategoryUpdateJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Update Categories Job
* @description Get a catalog category bulk update job with the given job ID.
* An `include` parameter can be provided to get the following related resource data: `categories`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_update_categories_job: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-category-bulk-update-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-category]'?: ('external_id' | 'name' | 'updated')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'categories'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the job to retrieve. */
job_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogCategoryUpdateJobResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Delete Categories Jobs
* @description Get all catalog category bulk delete jobs.
* Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_delete_categories_jobs: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-category-bulk-delete-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogCategoryDeleteJobResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Spawn Delete Categories Job
* @description Create a catalog category bulk delete job to delete a batch of catalog categories.
* Accepts up to 100 catalog categories per request. The maximum allowed payload size is 4MB.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
spawn_delete_categories_job: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogCategoryDeleteJobCreateQuery']
}
}
responses: {
202: {
content: {
'application/json': components['schemas']['PostCatalogCategoryDeleteJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Delete Categories Job
* @description Get a catalog category bulk delete job with the given job ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_delete_categories_job: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[catalog-category-bulk-delete-job]'?: (
| 'job_id'
| 'status'
| 'created_at'
| 'total_count'
| 'completed_count'
| 'failed_count'
| 'completed_at'
| 'expires_at'
| 'errors'
)[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the job to retrieve. */
job_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogCategoryDeleteJobResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Catalog Category Relationships Items
* @description Get all items in the given category ID.
* Returns a maximum of 100 items per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_catalog_category_relationships_items: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogCategoryItemListResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Catalog Category Relationships Items
* @description Create a new item relationship for the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
create_catalog_category_relationships_items: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogCategoryItemOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Catalog Category Relationships Items
* @description Delete item relationships for the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
delete_catalog_category_relationships_items: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogCategoryItemOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Catalog Category Relationships Items
* @description Update item relationships for the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
update_catalog_category_relationships_items: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogCategoryItemOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Catalog Item Relationships Categories
* @description Get all catalog categories that a particular item is in.
* Returns a maximum of 100 categories per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Catalogs Read`
*/
get_catalog_item_relationships_categories: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetCatalogItemCategoryListResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Catalog Item Relationships Categories
* @description Create a new catalog category relationship for the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
create_catalog_item_relationships_categories: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogItemCategoryOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Catalog Item Relationships Categories
* @description Delete catalog category relationships for the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
delete_catalog_item_relationships_categories: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogItemCategoryOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Catalog Item Relationships Categories
* @description Update catalog category relationships for the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Catalogs Write`
*/
update_catalog_item_relationships_categories: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['CatalogItemCategoryOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Request Profile Deletion
* @description Request a deletion for the profiles corresponding to one of the following identifiers: `email`, `phone_number`, or `profile_id`. If multiple identifiers are provided, we will return an error.
* All profiles that match the provided identifier will be deleted.
* The deletion occurs asynchronously; however, once it has completed, the deleted profile will appear on the [Deleted Profiles page](https://www.klaviyo.com/account/deleted).
* For more information on the deletion process, please refer to our [Help Center docs on how to handle GDPR and CCPA deletion requests](https://help.klaviyo.com/hc/en-us/articles/360004217631-How-to-Handle-GDPR-Requests#record-gdpr-and-ccpa%20%20-deletion-requests2).<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Data Privacy Write`
*/
request_profile_deletion: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['DataPrivacyCreateDeletionJobQuery']
}
}
responses: {
202: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Events
* @description Get all events in an account
* Requests can be sorted by the following fields: `datetime`, `timestamp`
* Include parameters can be provided to get the following related resource data: `metrics`, `profiles`
* Returns a maximum of 200 events per page.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Read`
*/
get_events: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[event]'?: (
| 'metric_id'
| 'profile_id'
| 'timestamp'
| 'event_properties'
| 'datetime'
| 'uuid'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[metric]'?: ('name' | 'created' | 'updated' | 'integration')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[profile]'?: (
| 'email'
| 'phone_number'
| 'external_id'
| 'first_name'
| 'last_name'
| 'organization'
| 'title'
| 'image'
| 'created'
| 'updated'
| 'last_event_date'
| 'location'
| 'location.address1'
| 'location.address2'
| 'location.city'
| 'location.country'
| 'location.latitude'
| 'location.longitude'
| 'location.region'
| 'location.zip'
| 'location.timezone'
| 'properties'
| 'subscriptions'
| 'subscriptions.email'
| 'subscriptions.email.marketing'
| 'subscriptions.email.marketing.consent'
| 'subscriptions.email.marketing.timestamp'
| 'subscriptions.email.marketing.method'
| 'subscriptions.email.marketing.method_detail'
| 'subscriptions.email.marketing.custom_method_detail'
| 'subscriptions.email.marketing.double_optin'
| 'subscriptions.email.marketing.suppressions'
| 'subscriptions.email.marketing.suppressions.reason'
| 'subscriptions.email.marketing.suppressions.timestamp'
| 'subscriptions.email.marketing.list_suppressions'
| 'subscriptions.email.marketing.list_suppressions.list_id'
| 'subscriptions.email.marketing.list_suppressions.reason'
| 'subscriptions.email.marketing.list_suppressions.timestamp'
| 'subscriptions.sms'
| 'subscriptions.sms.marketing'
| 'subscriptions.sms.marketing.consent'
| 'subscriptions.sms.marketing.timestamp'
| 'subscriptions.sms.marketing.method'
| 'subscriptions.sms.marketing.method_detail'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`metric_id`: `equals`<br>`profile_id`: `equals`<br>`datetime`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: ('metrics' | 'profiles')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'datetime' | '-datetime' | 'timestamp' | '-timestamp'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetEventResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Event
* @description Create an event. Events are created asynchronously.
* Successful response indicates that the event was validated and submitted for processing, but does not guarantee that processing is complete.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Write`
*/
create_event: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Event to create. */
requestBody: {
content: {
'application/json': components['schemas']['EventCreateQuery']
}
}
responses: {
202: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Event
* @description Get an event with the given event ID.
* Include parameters can be provided to get the following related resource data: `metrics`, `profiles`<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Events Read`
*/
get_event: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[event]'?: (
| 'metric_id'
| 'profile_id'
| 'timestamp'
| 'event_properties'
| 'datetime'
| 'uuid'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[metric]'?: ('name' | 'created' | 'updated' | 'integration')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[profile]'?: (
| 'email'
| 'phone_number'
| 'external_id'
| 'first_name'
| 'last_name'
| 'organization'
| 'title'
| 'image'
| 'created'
| 'updated'
| 'last_event_date'
| 'location'
| 'location.address1'
| 'location.address2'
| 'location.city'
| 'location.country'
| 'location.latitude'
| 'location.longitude'
| 'location.region'
| 'location.zip'
| 'location.timezone'
| 'properties'
| 'subscriptions'
| 'subscriptions.email'
| 'subscriptions.email.marketing'
| 'subscriptions.email.marketing.consent'
| 'subscriptions.email.marketing.timestamp'
| 'subscriptions.email.marketing.method'
| 'subscriptions.email.marketing.method_detail'
| 'subscriptions.email.marketing.custom_method_detail'
| 'subscriptions.email.marketing.double_optin'
| 'subscriptions.email.marketing.suppressions'
| 'subscriptions.email.marketing.suppressions.reason'
| 'subscriptions.email.marketing.suppressions.timestamp'
| 'subscriptions.email.marketing.list_suppressions'
| 'subscriptions.email.marketing.list_suppressions.list_id'
| 'subscriptions.email.marketing.list_suppressions.reason'
| 'subscriptions.email.marketing.list_suppressions.timestamp'
| 'subscriptions.sms'
| 'subscriptions.sms.marketing'
| 'subscriptions.sms.marketing.consent'
| 'subscriptions.sms.marketing.timestamp'
| 'subscriptions.sms.marketing.method'
| 'subscriptions.sms.marketing.method_detail'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: ('metrics' | 'profiles')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the event */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetEventResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Event Metrics
* @description Get the metric for an event with the given event ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Read`
* `Metrics Read`
*/
get_event_metrics: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[metric]'?: ('name' | 'created' | 'updated' | 'integration')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the event */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetMetricResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Event Profiles
* @description Get the profile associated with an event with the given event ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Read`
* `Profiles Read`
*/
get_event_profiles: {
parameters: {
query: {
/** @description Request additional fields not included by default in the response. Supported values: 'predictive_analytics' */
'additional-fields[profile]'?: 'predictive_analytics'[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[profile]'?: (
| 'email'
| 'phone_number'
| 'external_id'
| 'first_name'
| 'last_name'
| 'organization'
| 'title'
| 'image'
| 'created'
| 'updated'
| 'last_event_date'
| 'location'
| 'location.address1'
| 'location.address2'
| 'location.city'
| 'location.country'
| 'location.latitude'
| 'location.longitude'
| 'location.region'
| 'location.zip'
| 'location.timezone'
| 'properties'
| 'subscriptions'
| 'subscriptions.email'
| 'subscriptions.email.marketing'
| 'subscriptions.email.marketing.consent'
| 'subscriptions.email.marketing.timestamp'
| 'subscriptions.email.marketing.method'
| 'subscriptions.email.marketing.method_detail'
| 'subscriptions.email.marketing.custom_method_detail'
| 'subscriptions.email.marketing.double_optin'
| 'subscriptions.email.marketing.suppressions'
| 'subscriptions.email.marketing.suppressions.reason'
| 'subscriptions.email.marketing.suppressions.timestamp'
| 'subscriptions.email.marketing.list_suppressions'
| 'subscriptions.email.marketing.list_suppressions.list_id'
| 'subscriptions.email.marketing.list_suppressions.reason'
| 'subscriptions.email.marketing.list_suppressions.timestamp'
| 'subscriptions.sms'
| 'subscriptions.sms.marketing'
| 'subscriptions.sms.marketing.consent'
| 'subscriptions.sms.marketing.timestamp'
| 'subscriptions.sms.marketing.method'
| 'subscriptions.sms.marketing.method_detail'
| 'predictive_analytics'
| 'predictive_analytics.historic_clv'
| 'predictive_analytics.predicted_clv'
| 'predictive_analytics.total_clv'
| 'predictive_analytics.historic_number_of_orders'
| 'predictive_analytics.predicted_number_of_orders'
| 'predictive_analytics.average_days_between_orders'
| 'predictive_analytics.average_order_value'
| 'predictive_analytics.churn_probability'
| 'predictive_analytics.expected_date_of_next_order'
)[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the event */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetProfileResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Event Relationships Metrics
* @description Get a list of related Metrics for an Event<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Read`
* `Metrics Read`
*/
get_event_relationships_metrics: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetEventMetricsRelationshipListResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Event Relationships Profiles
* @description Get profile [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for an event with the given event ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Read`
* `Profiles Read`
*/
get_event_relationships_profiles: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetEventProfilesRelationshipListResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flows
* @description Get all flows in an account.
*
* Returns a maximum of 50 flows per request, which can be paginated with cursor-based pagination.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get_flows: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow-action]'?: (
| 'action_type'
| 'status'
| 'created'
| 'updated'
| 'settings'
| 'tracking_options'
| 'send_options'
| 'send_options.use_smart_sending'
| 'send_options.is_transactional'
| 'render_options'
| 'render_options.shorten_links'
| 'render_options.add_org_prefix'
| 'render_options.add_info_link'
| 'render_options.add_opt_out_language'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow]'?: ('name' | 'status' | 'archived' | 'created' | 'updated' | 'trigger_type')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`status`: `equals`<br>`archived`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`trigger_type`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'flow-actions'[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description Default: 50. Min: 1. Max: 50. */
'page[size]'?: number
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?:
| 'created'
| '-created'
| 'id'
| '-id'
| 'name'
| '-name'
| 'status'
| '-status'
| 'trigger_type'
| '-trigger_type'
| 'updated'
| '-updated'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flow
* @description Get a flow with the given flow ID.
* Include parameters can be provided to get the following related resource data: `flow-actions`<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get_flow: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow-action]'?: (
| 'action_type'
| 'status'
| 'created'
| 'updated'
| 'settings'
| 'tracking_options'
| 'send_options'
| 'send_options.use_smart_sending'
| 'send_options.is_transactional'
| 'render_options'
| 'render_options.shorten_links'
| 'render_options.add_org_prefix'
| 'render_options.add_info_link'
| 'render_options.add_opt_out_language'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow]'?: ('name' | 'status' | 'archived' | 'created' | 'updated' | 'trigger_type')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'flow-actions'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Flow Status
* @description Update the status of a flow with the given flow ID, and all actions in that flow.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Write`
*/
update_flow: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description ID of the Flow to update. Ex: XVTP5Q */
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['FlowUpdateQuery']
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['PatchFlowResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flow Actions For Flow
* @description Get all flow actions associated with the given flow ID.
*
* Returns a maximum of 50 flows per request, which can be paginated with cursor-based pagination.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get_flow_flow_actions: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow-action]'?: (
| 'action_type'
| 'status'
| 'created'
| 'updated'
| 'settings'
| 'tracking_options'
| 'send_options'
| 'send_options.use_smart_sending'
| 'send_options.is_transactional'
| 'render_options'
| 'render_options.shorten_links'
| 'render_options.add_org_prefix'
| 'render_options.add_info_link'
| 'render_options.add_opt_out_language'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`action_type`: `any`, `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description Default: 50. Min: 1. Max: 50. */
'page[size]'?: number
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?:
| 'action_type'
| '-action_type'
| 'created'
| '-created'
| 'id'
| '-id'
| 'status'
| '-status'
| 'updated'
| '-updated'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
flow_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowActionResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flow Tags
* @description Return all tags associated with the given flow ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
* `Tags Read`
*/
get_flow_tags: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[tag]'?: 'name'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
flow_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowTagResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flow Action
* @description Get a flow action from a flow with the given flow action ID.
* Include parameters can be provided to get the following related resource data: `flows`, `flow-messages`<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get_flow_action: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow-action]'?: (
| 'action_type'
| 'status'
| 'created'
| 'updated'
| 'settings'
| 'tracking_options'
| 'send_options'
| 'send_options.use_smart_sending'
| 'send_options.is_transactional'
| 'render_options'
| 'render_options.shorten_links'
| 'render_options.add_org_prefix'
| 'render_options.add_info_link'
| 'render_options.add_opt_out_language'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow-message]'?: ('name' | 'channel' | 'content' | 'created' | 'updated')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow]'?: ('name' | 'status' | 'archived' | 'created' | 'updated' | 'trigger_type')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: ('flow-messages' | 'flows')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowActionResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flow For Flow Action
* @description Get the flow associated with the given action ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get_flow_action_flow: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow]'?: ('name' | 'status' | 'archived' | 'created' | 'updated' | 'trigger_type')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
action_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Messages For Flow Action
* @description Get all flow messages associated with the given flow action ID.
*
* Returns a maximum of 50 flow message relationships per request, which can be paginated with cursor-based pagination.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get_flow_action_messages: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow-message]'?: ('name' | 'channel' | 'content' | 'created' | 'updated')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description Default: 50. Min: 1. Max: 50. */
'page[size]'?: number
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'created' | '-created' | 'id' | '-id' | 'name' | '-name' | 'updated' | '-updated'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
action_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowMessageResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flow Message
* @description Get the flow message of a flow with the given message ID.
* Include parameters can be provided to get the following related resource data: 'flow-actions'<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get_flow_message: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow-action]'?: (
| 'action_type'
| 'status'
| 'created'
| 'updated'
| 'settings'
| 'tracking_options'
| 'send_options'
| 'send_options.use_smart_sending'
| 'send_options.is_transactional'
| 'render_options'
| 'render_options.shorten_links'
| 'render_options.add_org_prefix'
| 'render_options.add_info_link'
| 'render_options.add_opt_out_language'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow-message]'?: ('name' | 'channel' | 'content' | 'created' | 'updated')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: 'flow-action'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowMessageResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flow Action For Message
* @description Get the flow action for a flow message with the given message ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get_flow_message_action: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[flow-action]'?: (
| 'action_type'
| 'status'
| 'created'
| 'updated'
| 'settings'
| 'tracking_options'
| 'send_options'
| 'send_options.use_smart_sending'
| 'send_options.is_transactional'
| 'render_options'
| 'render_options.shorten_links'
| 'render_options.add_org_prefix'
| 'render_options.add_info_link'
| 'render_options.add_opt_out_language'
)[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
message_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowActionResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flow Relationships Flow Actions
* @description Get all [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for flow actions associated with the given flow ID.
* Flow action relationships can be sorted by the following fields, in ascending and descending order: `id`, `status`, `created`, `updated`
* Use filters to narrow your results.
* Returns a maximum of 50 flow action relationships per request, which can be paginated with offset pagination. Offset pagination uses the following parameters: `page[size]` and `page[number]`.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get_flow_relationships_flow_actions: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`action_type`: `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` */
filter?: string
/** @description Default: 50. Min: 1. Max: 100. */
'page[size]'?: number
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'created' | '-created' | 'id' | '-id' | 'status' | '-status' | 'updated' | '-updated'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowFlowActionRelationshipListResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flow Relationships Tags
* @description Return the tag IDs of all tags associated with the given flow.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
* `Tags Read`
*/
get_flow_relationships_tags: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowTagRelationshipListResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flow Action Relationships Flow
* @description Get the flow associated with the given action ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get_flow_action_relationships_flow: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowActionFlowRelationshipResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flow Action Relationships Messages
* @description Get all relationships for flow messages associated with the given flow action ID.
*
* Returns a maximum of 50 flow message relationships per request, which can be paginated with cursor-based pagination.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get_flow_action_relationships_messages: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description Default: 50. Min: 1. Max: 50. */
'page[size]'?: number
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'created' | '-created' | 'id' | '-id' | 'name' | '-name' | 'updated' | '-updated'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowActionFlowMessageRelationshipResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Flow Message Relationships Action
* @description Get the [relationship](https://developers.klaviyo.com/en/reference/api_overview#relationships) for a flow message's flow action, given the flow ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
*/
get_flow_message_relationships_action: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetFlowMessageFlowActionRelationshipResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Lists
* @description Get all lists in an account.
* Filter to request a subset of all lists. Lists can be filtered by `id`, `name`, `created`, and `updated` fields.
* Returns a maximum of 10 results per page.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Read`
*/
get_lists: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[list]'?: ('name' | 'created' | 'updated')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetListResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create List
* @description Create a new list.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Write`
*/
create_list: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['ListCreateQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostListResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get List
* @description Get a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Write`
*/
get_list: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[list]'?: ('name' | 'created' | 'updated')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description Primary key that uniquely identifies this list. Generated by Klaviyo. */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetListResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete List
* @description Delete a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Write`
*/
delete_list: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description Primary key that uniquely identifies this list. Generated by Klaviyo. */
id: string
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update List
* @description Update the name of a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Write`
*/
update_list: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description Primary key that uniquely identifies this list. Generated by Klaviyo. */
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['ListPartialUpdateQuery']
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['PatchListResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get List Tags
* @description Return all tags associated with the given list ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Read`
* `Tags Read`
*/
get_list_tags: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[tag]'?: 'name'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description Primary key that uniquely identifies this list. Generated by Klaviyo. */
list_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetListTagResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get List Profiles
* @description Get all profiles within a list with the given list ID.
* Filter to request a subset of all profiles. Profiles can be filtered by `email`, `phone_number`, and `push_token` fields.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Read`
* `Profiles Read`
*/
get_list_profiles: {
parameters: {
query: {
/** @description Request additional fields not included by default in the response. Supported values: 'predictive_analytics' */
'additional-fields[profile]'?: 'predictive_analytics'[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[profile]'?: (
| 'email'
| 'phone_number'
| 'external_id'
| 'first_name'
| 'last_name'
| 'organization'
| 'title'
| 'image'
| 'created'
| 'updated'
| 'last_event_date'
| 'location'
| 'location.address1'
| 'location.address2'
| 'location.city'
| 'location.country'
| 'location.latitude'
| 'location.longitude'
| 'location.region'
| 'location.zip'
| 'location.timezone'
| 'properties'
| 'subscriptions'
| 'subscriptions.email'
| 'subscriptions.email.marketing'
| 'subscriptions.email.marketing.consent'
| 'subscriptions.email.marketing.timestamp'
| 'subscriptions.email.marketing.method'
| 'subscriptions.email.marketing.method_detail'
| 'subscriptions.email.marketing.custom_method_detail'
| 'subscriptions.email.marketing.double_optin'
| 'subscriptions.email.marketing.suppressions'
| 'subscriptions.email.marketing.suppressions.reason'
| 'subscriptions.email.marketing.suppressions.timestamp'
| 'subscriptions.email.marketing.list_suppressions'
| 'subscriptions.email.marketing.list_suppressions.list_id'
| 'subscriptions.email.marketing.list_suppressions.reason'
| 'subscriptions.email.marketing.list_suppressions.timestamp'
| 'subscriptions.sms'
| 'subscriptions.sms.marketing'
| 'subscriptions.sms.marketing.consent'
| 'subscriptions.sms.marketing.timestamp'
| 'subscriptions.sms.marketing.method'
| 'subscriptions.sms.marketing.method_detail'
| 'predictive_analytics'
| 'predictive_analytics.historic_clv'
| 'predictive_analytics.predicted_clv'
| 'predictive_analytics.total_clv'
| 'predictive_analytics.historic_number_of_orders'
| 'predictive_analytics.predicted_number_of_orders'
| 'predictive_analytics.average_days_between_orders'
| 'predictive_analytics.average_order_value'
| 'predictive_analytics.churn_probability'
| 'predictive_analytics.expected_date_of_next_order'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description Default: 20. Min: 1. Max: 100. */
'page[size]'?: number
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description Primary key that uniquely identifies this list. Generated by Klaviyo. */
list_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetProfileResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get List Relationships Tags
* @description Returns the tag IDs of all tags associated with the given list.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Read`
* `Tags Read`
*/
get_list_relationships_tags: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetListTagRelationshipListResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get List Relationships Profiles
* @description Get profile membership [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Read`
* `Profiles Read`
*/
get_list_relationships_profiles: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetListRelationshipsResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Add Profile To List
* @description Add a profile to a list with the given list ID.
* It is recommended that you use the [Subscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/subscribe_profiles) if you're trying to give a profile consent to receive email marketing.
* This endpoint accepts a maximum of 1000 profiles per call.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Write`
* `Profiles Write`
*/
create_list_relationships: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['ListMembersAddQuery']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Remove Profile From List
* @description Remove a profile from a list with the given list ID.
* The provided profile will no longer receive marketing from this particular list once removed.
* Removing a profile from a list will not impact the profile's consent status or subscription status in general. To update a profile's subscription status, please use the [Unsubscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/unsubscribe_profiles).
* This endpoint accepts a maximum of 1000 profiles per call.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `List Write`
* `Profiles Write`
*/
delete_list_relationships: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['ListMembersDeleteQuery']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Metrics
* @description Get all metrics in an account.
* Requests can be filtered by the following fields: integration `name`, integration `category`
* Returns a maximum of 200 results per page.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Metrics Read`
*/
get_metrics: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[metric]'?: ('name' | 'created' | 'updated' | 'integration')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`integration.name`: `equals`<br>`integration.category`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetMetricResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Metric
* @description Get a metric with the given metric ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Metrics Read`
*/
get_metric: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[metric]'?: ('name' | 'created' | 'updated' | 'integration')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description Metric ID */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetMetricResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Query Metric Aggregates
* @description Query and aggregate event data associated with a metric, including native Klaviyo metrics, integration-specific metrics, and custom events. Queries must be passed in the JSON body of your `POST` request.
*
* Results can be filtered and grouped by time, event, or profile dimensions.
*
* **Request body parameters** (nested under `attributes`):
*
* * `return_fields`: request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets)
* * `sort`: sort results by a specified field, such as `"-timestamp"`
* * `page_cursor`: results can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/reference/api_overview#pagination)
* * `page_size`: limit the number of returned results per page
* * `by`: optional attributes used to group by the aggregation function
* * When using `by` attributes, an empty `dimensions` response is expected when the counts for the events do not have the associated dimension requested by the set `by` attribute. For example, a query including `"by": ["$flow"]` will return an empty dimensions response for counts of metrics not associated with a `$flow`
* * `measurement`: the measurement key supports the following values:
* * `"sum_value"`: perform a summation of the `_Event Value_`, optionally partitioned over any dimension provided in the `by` field
* * `"count"`: counts the number of events associated to a metric, optionally partitioned over any dimension provided in the `by` field
* * `"unique"` counts the number of unique customers associated to a metric, optionally partitioned over any dimension provided in the `by` field
* * `interval`: aggregation interval, such as `"hour"`,`"day"`,`"week"`, and `"month"`
* * `metric_id`: the metric ID used in the aggregation
* * `filter`: list of filters for specific fields, must include time range using ISO 8601 format (`"YYYY-MM-DDTHH:MM:SS.mmmmmm"`)
* * The time range can be filtered by providing a `greater-or-equal` filter on the datetime field, such as `"greater-or-equal(datetime,2021-07-01T00:00:00)"` and a `less-than` filter on the same datetime field, such as `"less-than(datetime,2022-07-01T00:00:00)"`
* * The time range may span a maximum of one year. Time range dates may be set to a maximum of 5 years prior to the current date
* * Filter the list of supported aggregate dimensions using the common filter syntax, such as `"equals(URL,\"https://www.klaviyo.com/\")"`
* * `timezone`: the timezone used when processing the query. Case sensitive. This field is validated against a list of common timezones from the [IANA Time Zone Database](https://www.iana.org/time-zones)
* * While the payload accepts a timezone, the response datetimes returned will be in UTC.
*
* For a comprehensive list of native Klaviyo metrics and their associated attributes for grouping and filtering, please refer to the [metrics attributes guide](https://developers.klaviyo.com/en/docs/supported_metrics_and_attributes).<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Metrics Read`
*/
query_metric_aggregates: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Retrieve Metric Aggregations */
requestBody: {
content: {
'application/json': components['schemas']['MetricAggregateQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostMetricAggregateResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Profiles
* @description Get all profiles in an account.
* Profiles can be sorted by the following fields in ascending and descending order: `id`, `created`, `updated`, `email`<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Profiles Read`
*/
get_profiles: {
parameters: {
query: {
/** @description Request additional fields not included by default in the response. Supported values: 'predictive_analytics' */
'additional-fields[profile]'?: 'predictive_analytics'[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[profile]'?: (
| 'email'
| 'phone_number'
| 'external_id'
| 'first_name'
| 'last_name'
| 'organization'
| 'title'
| 'image'
| 'created'
| 'updated'
| 'last_event_date'
| 'location'
| 'location.address1'
| 'location.address2'
| 'location.city'
| 'location.country'
| 'location.latitude'
| 'location.longitude'
| 'location.region'
| 'location.zip'
| 'location.timezone'
| 'properties'
| 'subscriptions'
| 'subscriptions.email'
| 'subscriptions.email.marketing'
| 'subscriptions.email.marketing.consent'
| 'subscriptions.email.marketing.timestamp'
| 'subscriptions.email.marketing.method'
| 'subscriptions.email.marketing.method_detail'
| 'subscriptions.email.marketing.custom_method_detail'
| 'subscriptions.email.marketing.double_optin'
| 'subscriptions.email.marketing.suppressions'
| 'subscriptions.email.marketing.suppressions.reason'
| 'subscriptions.email.marketing.suppressions.timestamp'
| 'subscriptions.email.marketing.list_suppressions'
| 'subscriptions.email.marketing.list_suppressions.list_id'
| 'subscriptions.email.marketing.list_suppressions.reason'
| 'subscriptions.email.marketing.list_suppressions.timestamp'
| 'subscriptions.sms'
| 'subscriptions.sms.marketing'
| 'subscriptions.sms.marketing.consent'
| 'subscriptions.sms.marketing.timestamp'
| 'subscriptions.sms.marketing.method'
| 'subscriptions.sms.marketing.method_detail'
| 'predictive_analytics'
| 'predictive_analytics.historic_clv'
| 'predictive_analytics.predicted_clv'
| 'predictive_analytics.total_clv'
| 'predictive_analytics.historic_number_of_orders'
| 'predictive_analytics.predicted_number_of_orders'
| 'predictive_analytics.average_days_between_orders'
| 'predictive_analytics.average_order_value'
| 'predictive_analytics.churn_probability'
| 'predictive_analytics.expected_date_of_next_order'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description Default: 20. Min: 1. Max: 100. */
'page[size]'?: number
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'created' | '-created' | 'email' | '-email' | 'id' | '-id' | 'updated' | '-updated'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetProfileResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Profile
* @description Create a new profile.
* If you use a phone number as the profile identifier and SMS is not set up in the Klaviyo account, you'll need to include at least one other identifier attribute (`email` or `external_id`) in addition to the `phone_number` attribute for the API call to work.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Profiles Write`
*/
create_profile: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['ProfileCreateQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostProfileResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Profile
* @description Get the profile with the given profile ID.
* Include parameters can be provided to get the following related resource data: `lists` memberships, `segments` memberships"<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Profiles Read`
*/
get_profile: {
parameters: {
query: {
/** @description Request additional fields not included by default in the response. Supported values: 'predictive_analytics' */
'additional-fields[profile]'?: 'predictive_analytics'[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[list]'?: ('name' | 'created' | 'updated')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[profile]'?: (
| 'email'
| 'phone_number'
| 'external_id'
| 'first_name'
| 'last_name'
| 'organization'
| 'title'
| 'image'
| 'created'
| 'updated'
| 'last_event_date'
| 'location'
| 'location.address1'
| 'location.address2'
| 'location.city'
| 'location.country'
| 'location.latitude'
| 'location.longitude'
| 'location.region'
| 'location.zip'
| 'location.timezone'
| 'properties'
| 'subscriptions'
| 'subscriptions.email'
| 'subscriptions.email.marketing'
| 'subscriptions.email.marketing.consent'
| 'subscriptions.email.marketing.timestamp'
| 'subscriptions.email.marketing.method'
| 'subscriptions.email.marketing.method_detail'
| 'subscriptions.email.marketing.custom_method_detail'
| 'subscriptions.email.marketing.double_optin'
| 'subscriptions.email.marketing.suppressions'
| 'subscriptions.email.marketing.suppressions.reason'
| 'subscriptions.email.marketing.suppressions.timestamp'
| 'subscriptions.email.marketing.list_suppressions'
| 'subscriptions.email.marketing.list_suppressions.list_id'
| 'subscriptions.email.marketing.list_suppressions.reason'
| 'subscriptions.email.marketing.list_suppressions.timestamp'
| 'subscriptions.sms'
| 'subscriptions.sms.marketing'
| 'subscriptions.sms.marketing.consent'
| 'subscriptions.sms.marketing.timestamp'
| 'subscriptions.sms.marketing.method'
| 'subscriptions.sms.marketing.method_detail'
| 'predictive_analytics'
| 'predictive_analytics.historic_clv'
| 'predictive_analytics.predicted_clv'
| 'predictive_analytics.total_clv'
| 'predictive_analytics.historic_number_of_orders'
| 'predictive_analytics.predicted_number_of_orders'
| 'predictive_analytics.average_days_between_orders'
| 'predictive_analytics.average_order_value'
| 'predictive_analytics.churn_probability'
| 'predictive_analytics.expected_date_of_next_order'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[segment]'?: ('name' | 'created' | 'updated')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#relationships */
include?: ('lists' | 'segments')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetProfileResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Profile
* @description Update the profile with the given profile ID.
* If you use a phone number as the profile identifier and SMS is not set up in the Klaviyo account, you'll need to include at least one other identifier attribute (`email` or `external_id`) in addition to the `phone_number` attribute for the API call to work.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Profiles Write`
*/
update_profile: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description Primary key that uniquely identifies this profile. Generated by Klaviyo. */
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['ProfilePartialUpdateQuery']
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['PatchProfileResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Profile Lists
* @description Get list memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Read`
* `Profiles Read`
*/
get_profile_lists: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[list]'?: ('name' | 'created' | 'updated')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
profile_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetListResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Profile Segments
* @description Get segment memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Profiles Read`
* `Segments Read`
*/
get_profile_segments: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[segment]'?: ('name' | 'created' | 'updated')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
profile_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetSegmentResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Suppress Profiles
* @description Manually suppress one or more profiles. Such profiles will have `USER_SUPPRESSED` as their suppression reason. Manually suppressed profiles _will not_ receive email marketing. Learn more about suppressed profiles [in this document](https://help.klaviyo.com/hc/en-us/articles/115005246108-Understanding-suppressed-email-profiles#what-is-a-suppressed-profile-1).
* Not supported for SMS marketing.
* Maximum number of profile can be submitted for suppression: 100<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Profiles Write`
* `Subscriptions Write`
*/
suppress_profiles: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Suppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, one will be created and immediately suppressed. */
requestBody: {
content: {
'application/json': components['schemas']['SuppressionCreateJobCreateQuery']
}
}
responses: {
202: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Unsuppress Profiles
* @description Unsuppress one or more profiles, this will remove any Manual Suppressions (USER_SUPPRESSED) on these profiles. A profile may receive email marketing after a manual suppression is removed so long as they have not revoked consent, i.e. unsubscribed.
* Not supported for SMS marketing. Only manual suppressions (USER_SUPPRESSED) will be removed. `UNSUBSCRIBE` and `SPAM_REPORT` suppressions are removed whenever a [profile resubscribes](https://developers.klaviyo.com/en/reference/subscribe_profiles). `INVALID_EMAIL` and `HARD_BOUNCE` suppressions cannot be removed by the API.
* Maximum number of profile can be submitted for unsuppression: 100<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `Subscriptions Write`
*/
unsuppress_profiles: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken. */
requestBody: {
content: {
'application/json': components['schemas']['UnsuppressionCreateJobCreateQuery']
}
}
responses: {
202: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Subscribe Profiles
* @description Subscribe one or more profiles to email marketing, SMS marketing, or both. If the list has double opt-in enabled, profiles will receive a message requiring their confirmation before subscribing. Otherwise, profiles will be immediately subscribed without receiving a confirmation message.
* To add someone to a list without changing their subscription status, use [Add Profile to List](https://developers.klaviyo.com/en/reference/create_list_relationships).
* This API will remove any `UNSUBSCRIBE`, `SPAM_REPORT` or `USER_SUPPRESSED` suppressions from the provided profiles. Learn more about suppressed profiles in [this document](https://help.klaviyo.com/hc/en-us/articles/115005246108-Understanding-suppressed-email-profiles#what-is-a-suppressed-profile-1).
* Maximum number of profile can be submitted for subscription: 100<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `List Write`
* `Profiles Write`
* `Subscriptions Write`
*/
subscribe_profiles: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Subscribes one or more profiles to marketing. Currently, supports email and SMS only. All profiles will be added to the provided list. Either email or phone number is required. Both may be specified to subscribe to both channels. If a profile cannot be found matching the given identifier(s), a new profile will be created and then subscribed. */
requestBody: {
content: {
'application/json': components['schemas']['SubscriptionCreateJobCreateQuery']
}
}
responses: {
202: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Unsubscribe Profiles
* @description Unsubscribe one or more profiles to email marketing, SMS marketing, or both.
* To remove someone from a list without changing their subscription status, use [Remove Profile from List](https://developers.klaviyo.com/en/reference/delete_list_relationships).
* Maximum number of profile can be submitted for unsubscription: 100<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`
*
* **Scopes:**
* `List Write`
* `Profiles Write`
* `Subscriptions Write`
*/
unsubscribe_profiles: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed. */
requestBody: {
content: {
'application/json': components['schemas']['UnsubscriptionCreateJobCreateQuery']
}
}
responses: {
202: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Profile Relationships Lists
* @description Get list memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Read`
* `Profiles Read`
*/
get_profile_relationships_lists: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetProfileListRelationshipsResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Profile Relationships Segments
* @description Get segment membership relationships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Profiles Read`
* `Segments Read`
*/
get_profile_relationships_segments: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetProfileSegmentRelationshipsResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Segments
* @description Get all segments in an account.
* Filter to request a subset of all segments. Segments can be filtered by `name`, `created`, and `updated` fields.
* Returns a maximum of 10 results per page.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Segments Read`
*/
get_segments: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[segment]'?: ('name' | 'created' | 'updated')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetSegmentResponseCollectionCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Segment
* @description Get a segment with the given segment ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Segments Read`
*/
get_segment: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[segment]'?: ('name' | 'created' | 'updated')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetSegmentResponseCompoundDocument']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Segment
* @description Update the name of a segment with the given segment ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Segments Write`
*/
update_segment: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['SegmentPartialUpdateQuery']
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['PatchSegmentResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Segment Tags
* @description Return all tags associated with the given segment ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Segments Read`
* `Tags Read`
*/
get_segment_tags: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[tag]'?: 'name'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
segment_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetSegmentTagResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Segment Profiles
* @description Get all profiles within the given segment ID.
* Filter to request a subset of all profiles. Profiles can be filtered by `email`, `phone_number`, and `push_token` fields.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Profiles Read`
* `Segments Read`
*/
get_segment_profiles: {
parameters: {
query: {
/** @description Request additional fields not included by default in the response. Supported values: 'predictive_analytics' */
'additional-fields[profile]'?: 'predictive_analytics'[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[profile]'?: (
| 'email'
| 'phone_number'
| 'external_id'
| 'first_name'
| 'last_name'
| 'organization'
| 'title'
| 'image'
| 'created'
| 'updated'
| 'last_event_date'
| 'location'
| 'location.address1'
| 'location.address2'
| 'location.city'
| 'location.country'
| 'location.latitude'
| 'location.longitude'
| 'location.region'
| 'location.zip'
| 'location.timezone'
| 'properties'
| 'subscriptions'
| 'subscriptions.email'
| 'subscriptions.email.marketing'
| 'subscriptions.email.marketing.consent'
| 'subscriptions.email.marketing.timestamp'
| 'subscriptions.email.marketing.method'
| 'subscriptions.email.marketing.method_detail'
| 'subscriptions.email.marketing.custom_method_detail'
| 'subscriptions.email.marketing.double_optin'
| 'subscriptions.email.marketing.suppressions'
| 'subscriptions.email.marketing.suppressions.reason'
| 'subscriptions.email.marketing.suppressions.timestamp'
| 'subscriptions.email.marketing.list_suppressions'
| 'subscriptions.email.marketing.list_suppressions.list_id'
| 'subscriptions.email.marketing.list_suppressions.reason'
| 'subscriptions.email.marketing.list_suppressions.timestamp'
| 'subscriptions.sms'
| 'subscriptions.sms.marketing'
| 'subscriptions.sms.marketing.consent'
| 'subscriptions.sms.marketing.timestamp'
| 'subscriptions.sms.marketing.method'
| 'subscriptions.sms.marketing.method_detail'
| 'predictive_analytics'
| 'predictive_analytics.historic_clv'
| 'predictive_analytics.predicted_clv'
| 'predictive_analytics.total_clv'
| 'predictive_analytics.historic_number_of_orders'
| 'predictive_analytics.predicted_number_of_orders'
| 'predictive_analytics.average_days_between_orders'
| 'predictive_analytics.average_order_value'
| 'predictive_analytics.churn_probability'
| 'predictive_analytics.expected_date_of_next_order'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description Default: 20. Min: 1. Max: 100. */
'page[size]'?: number
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
segment_id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetProfileResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Segment Relationships Tags
* @description If `related_resource` is `tags`, returns the tag IDs of all tags associated with the given segment ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Segments Read`
* `Tags Read`
*/
get_segment_relationships_tags: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetSegmentTagRelationshipListResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Segment Relationships Profiles
* @description Get all profile membership [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for the given segment ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Profiles Read`
* `Segments Read`
*/
get_segment_relationships_profiles: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetSegmentRelationshipsResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Tags
* @description List all tags in an account.
* Tags can be filtered by `name`, and sorted by `name` or `id` in ascending or descending order.
* Returns a maximum of 50 tags per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get_tags: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[tag]'?: 'name'[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'id' | '-id' | 'name' | '-name'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTagResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Tag
* @description Create a tag. An account cannot have more than **500** unique tags.
* A tag belongs to a single tag group. If the `tag_group_id` is not specified, the tag is added to the account's default tag group.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
* `Tags Write`
*/
create_tag: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TagCreateQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostTagResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Tag
* @description Retrieve the tag with the given tag ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get_tag: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[tag]'?: 'name'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The Tag ID */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTagResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Tag
* @description Delete the tag with the given tag ID. Any associations between the tag and other resources will also be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
* `Tags Write`
*/
delete_tag: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The Tag ID */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['DeleteTagResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Tag
* @description Update the tag with the given tag ID.
* Only a tag's `name` can be changed. A tag cannot be moved from one tag group to another.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
* `Tags Write`
*/
update_tag: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The Tag ID */
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TagUpdateQuery']
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['PatchTagResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Tag Groups
* @description List all tag groups in an account. Every account has one default tag group.
* Tag groups can be filtered by `name`, `exclusive`, and `default`, and sorted by `name` or `id` in ascending or descending order.
* Returns a maximum of 25 tag groups per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get_tag_groups: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[tag-group]'?: ('name' | 'exclusive' | 'default')[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`exclusive`: `equals`<br>`default`: `equals` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'id' | '-id' | 'name' | '-name'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTagGroupResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Tag Group
* @description Create a tag group. An account cannot have more than **50** unique tag groups.
* If `exclusive` is not specified `true` or `false`, the tag group defaults to non-exclusive.
* If a tag group is non-exclusive, any given related resource (campaign, flow, etc.) can be linked to multiple tags from that tag group. If a tag group is exclusive, any given related resource can only be linked to one tag from that tag group.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
* `Tags Write`
*/
create_tag_group: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TagGroupCreateQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostTagGroupResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Tag Group
* @description Retrieve the tag group with the given tag group ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get_tag_group: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[tag-group]'?: ('name' | 'exclusive' | 'default')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The Tag Group ID */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTagGroupResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Tag Group
* @description Delete the tag group with the given tag group ID.
* Any tags inside that tag group, and any associations between those tags and other resources, will also be removed. The default tag group cannot be deleted.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
* `Tags Write`
*/
delete_tag_group: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The Tag Group ID */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['DeleteTagGroupResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Tag Group
* @description Update the tag group with the given tag group ID.
* Only a tag group's `name` can be changed. A tag group's `exclusive` or `default` value cannot be changed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
* `Tags Write`
*/
update_tag_group: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The Tag Group ID */
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TagGroupUpdateQuery']
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['PatchTagGroupResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Tag Tag Group
* @description Returns the tag group resource for a given tag ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get_tag_tag_group: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[tag-group]'?: ('name' | 'exclusive' | 'default')[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The Tag ID */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTagGroupResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Tag Group Tags
* @description Return the tags for a given tag group ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get_tag_group_tags: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[tag]'?: 'name'[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The Tag Group ID */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTagResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Tag Relationships Flows
* @description Returns the IDs of all flows associated with the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Read`
* `Tags Read`
*/
get_tag_relationships_flows: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTagFlowRelationshipsResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Tag Relationships Flows
* @description Associate a tag with one or more flows. Any flow cannot be associated with more than **100** tags.
*
* Use the request body to pass in the ID(s) of the flow(s) that will be associated with the tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Write`
* `Tags Write`
*/
create_tag_relationships_flows: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TagFlowOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Tag Relationships Flows
* @description Remove a tag's association with one or more flows.
*
* Use the request body to pass in the ID(s) of the flows(s) whose association with the tag will be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Flows Write`
* `Tags Write`
*/
delete_tag_relationships_flows: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TagFlowOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Tag Relationships Campaigns
* @description Returns the IDs of all campaigns associated with the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Campaigns Read`
* `Tags Read`
*/
get_tag_relationships_campaigns: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTagCampaignRelationshipsResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Tag Relationships Campaigns
* @description Associate a tag with one or more campaigns. Any campaign cannot be associated with more than **100** tags.
*
* Use the request body to pass in the ID(s) of the campaign(s) that will be associated with the tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Campaigns Write`
* `Tags Write`
*/
create_tag_relationships_campaigns: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TagCampaignOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Tag Relationships Campaigns
* @description Remove a tag's association with one or more campaigns.
*
* Use the request body to pass in the ID(s) of the campaign(s) whose association with the tag will be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Campaigns Write`
* `Tags Write`
*/
delete_tag_relationships_campaigns: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TagCampaignOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Tag Relationships Lists
* @description Returns the IDs of all lists associated with the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Read`
* `Tags Read`
*/
get_tag_relationships_lists: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTagListRelationshipsResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Tag Relationships Lists
* @description Associate a tag with one or more lists. Any list cannot be associated with more than **100** tags.
*
* Use the request body to pass in the ID(s) of the lists(s) that will be associated with the tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Write`
* `Tags Write`
*/
create_tag_relationships_lists: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TagListOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Tag Relationships Lists
* @description Remove a tag's association with one or more lists.
*
* Use the request body to pass in the ID(s) of the list(s) whose association with the tag will be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `List Write`
* `Tags Write`
*/
delete_tag_relationships_lists: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TagListOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Tag Relationships Segments
* @description Returns the IDs of all segments associated with the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Segments Read`
* `Tags Read`
*/
get_tag_relationships_segments: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTagSegmentRelationshipsResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Tag Relationships Segments
* @description Associate a tag with one or more segments. Any segment cannot be associated with more than **100** tags.
*
* Use the request body to pass in the ID(s) of the segments(s) that will be associated with the tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Segments Write`
* `Tags Write`
*/
create_tag_relationships_segments: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TagSegmentOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Tag Relationships Segments
* @description Remove a tag's association with one or more segments.
*
* Use the request body to pass in the ID(s) of the segments(s) whose association with the tag will be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Segments Write`
* `Tags Write`
*/
delete_tag_relationships_segments: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TagSegmentOp']
}
}
responses: {
204: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Tag Relationships Tag Group
* @description Returns the ids of all tag groups related to the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get_tag_relationships_tag_group: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTagTagGroupRelationshipsResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Tag Group Relationships Tags
* @description Returns the tag IDs of all tags inside the given tag group.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`
*
* **Scopes:**
* `Tags Read`
*/
get_tag_group_relationships_tags: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTagGroupTagRelationshipsResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Templates
* @description Get all templates in an account.
* Filter to request a subset of all templates. Templates can be sorted by the following fields, in ascending and descending order: `id`, `name`, `created`, `updated`
* Returns a maximum of 20 results per page.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Templates Read`
*/
get_templates: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[template]'?: (
| 'company_id'
| 'name'
| 'editor_type'
| 'html'
| 'text'
| 'created'
| 'updated'
)[]
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` */
filter?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination */
'page[cursor]'?: string
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting */
sort?: 'created' | '-created' | 'id' | '-id' | 'name' | '-name' | 'updated' | '-updated'
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTemplateResponseCollection']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Template
* @description Create a new custom HTML 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: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Templates Write`
*/
create_template: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TemplateCreateQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostTemplateResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Get Template
* @description Get a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Templates Read`
*/
get_template: {
parameters: {
query: {
/** @description For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets */
'fields[template]'?: (
| 'company_id'
| 'name'
| 'editor_type'
| 'html'
| 'text'
| 'created'
| 'updated'
)[]
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The ID of template */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['GetTemplateResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Delete Template
* @description Delete a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Templates Write`
*/
delete_template: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The ID of template */
id: string
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['DeleteTemplateResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Update Template
* @description Update a template with the given template ID. Does not currently update drag & drop templates.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Templates Write`
*/
update_template: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
path: {
/** @description The ID of template */
id: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TemplateUpdateQuery']
}
}
responses: {
200: {
content: {
'application/json': components['schemas']['PatchTemplateResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Template Render
* @description Render a template with the given template ID and context attribute. Returns the 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`
*/
create_template_render: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TemplateRenderQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostTemplateResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Template Clone
* @description Create a clone of a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`
*
* **Scopes:**
* `Templates Write`
*/
create_template_clone: {
parameters: {
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['TemplateCloneQuery']
}
}
responses: {
201: {
content: {
'application/json': components['schemas']['PostTemplateResponse']
}
}
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create Client Subscription
* @description Create a new subscription for the given list ID and channel:
*
* * Email `email`
* * SMS `phone_number`
*
* This endpoint is specifically designed to be called from publicly-browseable, client-side environments only. To create subscriptions from server-based applications, please use [POST /api/profile-subscription-bulk-create-jobs](https://developers.klaviyo.com/en/reference/subscribe_profiles)<br><br>*Rate limits*:<br>Burst: `100/s`<br>Steady: `100/m`
*
* **Scopes:**
* `Subscriptions Write`
*/
create_client_subscription: {
parameters: {
query: {
/** @description Your company ID. */
company_id: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Creates a subscription and consent records for Email and or SMS channels based on the provided email and phone_number attributes respectively. One of either email or phone_number must be provided. To create a subscription and consent record for only one channel but still include the other channel as a profile property the consent channel can be provided as a top level attribute and the other channel can be included in the properties object. */
requestBody: {
content: {
'application/json': components['schemas']['OnsiteSubscriptionCreateQuery']
}
}
responses: {
202: never
}
}
/**
* Create Client Event
* @description Create a new event to track a profile's activity.
* This endpoint is specifically designed to be called from publicly-browseable, client-side environments only. To create events from server-based applications, please use [POST /api/events](https://developers.klaviyo.com/en/reference/create_event)<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Events Write`
*/
create_client_event: {
parameters: {
query: {
/** @description ID of the Company to create event */
company_id: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
/** @description Event to create. */
requestBody: {
content: {
'application/json': components['schemas']['EventCreateQuery']
}
}
responses: {
202: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
/**
* Create or Update Client Profile
* @description Create and update properties about a profile without tracking an associated event.
* This endpoint is specifically designed to be called from publicly-browseable, client-side environments only. To create profiles from server applications (e.g. custom server-side scripts / applications), please use [POST /api/profiles](https://developers.klaviyo.com/en/reference/create_profile)<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`
*
* **Scopes:**
* `Profiles Write`
*/
create_client_profile: {
parameters: {
query: {
company_id: string
}
header: {
/** @description API endpoint revision (format: YYYY-MM-DD[.suffix]) */
revision: string
}
}
requestBody: {
content: {
'application/json': components['schemas']['OnsiteProfileCreateQuery']
}
}
responses: {
202: never
'4XX': components['responses']['ClientError']
'5XX': components['responses']['ServerError']
}
}
}
@ryancraigmartin
Copy link
Author

Glad it helped you! @lukebars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment