{ "openapi": "3.0.2", "info": { "title": "Klaviyo API", "version": "2026-07-15", "description": "The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.", "contact": { "name": "Klaviyo Developer Experience Team", "email": "developers@klaviyo.com", "url": "https://developers.klaviyo.com" }, "termsOfService": "https://www.klaviyo.com/legal/api-terms", "license": { "name": "License", "url": "https://www.klaviyo.com/legal" } }, "servers": [ { "url": "https://a.klaviyo.com", "description": "Production" } ], "security": [ { "Klaviyo-API-Key": [] } ], "paths": { "/api/segments": { "get": { "operationId": "get_segments", "summary": "Get Segments", "description": "Get all segments in an account.\n\nFilter to request a subset of all segments. Segments can be filtered by `name`, `created`, and `updated` fields.\n\nReturns a maximum of 10 results per page.

*Rate limits*:
Burst: `75/s`
Steady: `750/m`\n\n**Scopes:**\n`segments:read`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_segments.json)", "parameters": [ { "name": "fields[flow]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "archived", "created", "id", "name", "status", "trigger_type", "updated" ] } }, "explode": false }, { "name": "fields[segment]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "created", "definition", "definition.condition_groups", "id", "is_active", "is_processing", "is_starred", "name", "updated" ] } }, "explode": false }, { "name": "fields[tag]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "id", "name" ] } }, "explode": false }, { "name": "filter", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#filtering
Allowed field(s)/operator(s):
`name`: `any`, `equals` (string)
`id`: `any`, `equals` (string)
`created`: `greater-than` (date-time)
`updated`: `greater-than` (date-time)
`is_active`: `any`, `equals` (boolean)
`is_starred`: `equals` (boolean)", "schema": { "type": "string", "example": "equals(name,['example'])" } }, { "name": "include", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#relationships", "schema": { "type": "array", "items": { "type": "string", "enum": [ "flow-triggers", "tags" ] } }, "explode": false }, { "name": "page[cursor]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#pagination", "required": false, "schema": { "type": "string" } }, { "name": "page[size]", "in": "query", "description": "Default: 10. Min: 1. Max: 10.", "required": false, "schema": { "type": "integer", "default": 10, "maximum": 10, "minimum": 1 } }, { "name": "sort", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sorting", "schema": { "type": "string", "enum": [ "created", "-created", "id", "-id", "name", "-name", "updated", "-updated" ] } }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15" } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/GetSegmentListResponseCollectionCompoundDocument" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Segments" ], "x-klaviyo-filters": { "name": { "operators": { "list": [ "any", "equals" ] }, "value": { "type": "string" } }, "id": { "operators": { "list": [ "any", "equals" ], "single": [ "equals" ] }, "value": { "type": "string" } }, "created": { "operators": { "single": [ "greater-than" ] }, "value": { "type": "string", "format": "date-time" } }, "updated": { "operators": { "single": [ "greater-than" ] }, "value": { "type": "string", "format": "date-time" } }, "is_active": { "operators": { "list": [ "any", "equals" ], "single": [ "equals" ] }, "value": { "type": "boolean" } }, "is_starred": { "operators": { "single": [ "equals" ] }, "value": { "type": "boolean" } } }, "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "75/s", "steady": "750/m" }, "x-klaviyo-scopes": [ "segments:read" ] }, "post": { "operationId": "create_segment", "summary": "Create Segment", "description": "Create a segment.

*Rate limits*:
Burst: `1/s`
Steady: `15/m`
Daily: `100/d`\n\n**Scopes:**\n`segments:write`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/create_segment.json)", "parameters": [ { "name": "fields[segment]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "created", "definition", "definition.condition_groups", "id", "is_active", "is_processing", "is_starred", "name", "updated" ] } }, "explode": false }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15" } } ], "requestBody": { "required": true, "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/SegmentCreateQuery" } } } }, "responses": { "201": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/PostSegmentCreateResponse" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Segments" ], "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "1/s", "steady": "15/m", "daily": "100/d" }, "x-klaviyo-scopes": [ "segments:write" ] } }, "/api/segments/{id}": { "get": { "operationId": "get_segment", "summary": "Get Segment", "description": "Get a segment with the given segment ID.

*Rate limits*:
Burst: `75/s`
Steady: `750/m`

Rate limits when using the `additional-fields[segment]=profile_count` parameter in your API request:
Burst: `1/s`
Steady: `15/m`

To learn more about how the `additional-fields` parameter impacts rate limits, check out our [Rate limits, status codes, and errors](https://developers.klaviyo.com/en/v2026-07-15/docs/rate_limits_and_error_handling) guide.\n\n**Scopes:**\n`segments:read`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_segment.json)", "parameters": [ { "name": "id", "in": "path", "description": "", "required": true, "schema": { "type": "string" } }, { "name": "additional-fields[segment]", "in": "query", "description": "Request additional fields not included by default in the response. Supported values: 'profile_count'", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "profile_count" ] } }, "explode": false }, { "name": "fields[flow]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "archived", "created", "id", "name", "status", "trigger_type", "updated" ] } }, "explode": false }, { "name": "fields[segment]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "created", "definition", "definition.condition_groups", "id", "is_active", "is_processing", "is_starred", "name", "profile_count", "updated" ] } }, "explode": false }, { "name": "fields[tag]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "id", "name" ] } }, "explode": false }, { "name": "include", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#relationships", "schema": { "type": "array", "items": { "type": "string", "enum": [ "flow-triggers", "tags" ] } }, "explode": false }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15" } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/GetSegmentRetrieveResponseCompoundDocument" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Segments" ], "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "75/s", "steady": "750/m" }, "x-klaviyo-scopes": [ "segments:read" ] }, "patch": { "operationId": "update_segment", "summary": "Update Segment", "description": "Update a segment with the given segment ID.

*Rate limits*:
Burst: `1/s`
Steady: `15/m`
Daily: `100/d`\n\n**Scopes:**\n`segments:write`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/update_segment.json)", "parameters": [ { "name": "id", "in": "path", "description": "", "required": true, "schema": { "type": "string" } }, { "name": "fields[segment]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "created", "definition", "definition.condition_groups", "id", "is_active", "is_processing", "is_starred", "name", "updated" ] } }, "explode": false }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15" } } ], "requestBody": { "required": true, "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/SegmentPartialUpdateQuery" } } } }, "responses": { "200": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/PatchSegmentPartialUpdateResponse" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Segments" ], "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "1/s", "steady": "15/m", "daily": "100/d" }, "x-klaviyo-scopes": [ "segments:write" ] }, "delete": { "operationId": "delete_segment", "summary": "Delete Segment", "description": "Delete a segment with the given segment ID.

*Rate limits*:
Burst: `3/s`
Steady: `60/m`\n\n**Scopes:**\n`segments:write`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/delete_segment.json)", "parameters": [ { "name": "id", "in": "path", "description": "", "required": true, "schema": { "type": "string" } }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15" } } ], "responses": { "204": { "description": "Success" }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Segments" ], "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "3/s", "steady": "60/m" }, "x-klaviyo-scopes": [ "segments:write" ] } }, "/api/segments/{id}/tags": { "get": { "operationId": "get_tags_for_segment", "summary": "Get Tags for Segment", "description": "Return all tags associated with the given segment ID.

*Rate limits*:
Burst: `3/s`
Steady: `60/m`\n\n**Scopes:**\n`segments:read`\n`tags:read`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_tags_for_segment.json)", "parameters": [ { "name": "id", "in": "path", "description": "", "required": true, "schema": { "type": "string" } }, { "name": "fields[tag]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "id", "name" ] } }, "explode": false }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15" } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/GetTagResponseCollection" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Segments" ], "x-klaviyo-operation-aliases": [ "get_segment_tags" ], "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "3/s", "steady": "60/m" }, "x-klaviyo-scopes": [ "segments:read", "tags:read" ] } }, "/api/segments/{id}/relationships/tags": { "get": { "operationId": "get_tag_ids_for_segment", "summary": "Get Tag IDs for Segment", "description": "If `related_resource` is `tags`, returns the tag IDs of all tags associated with the given segment ID.

*Rate limits*:
Burst: `3/s`
Steady: `60/m`\n\n**Scopes:**\n`segments:read`\n`tags:read`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_tag_ids_for_segment.json)", "parameters": [ { "name": "id", "in": "path", "description": "", "required": true, "schema": { "type": "string" } }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15" } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/GetSegmentTagsRelationshipsResponseCollection" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Segments" ], "x-klaviyo-operation-aliases": [ "get_segment_relationships_tags" ], "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "3/s", "steady": "60/m" }, "x-klaviyo-scopes": [ "segments:read", "tags:read" ] } }, "/api/segments/{id}/profiles": { "get": { "operationId": "get_profiles_for_segment", "summary": "Get Profiles for Segment", "description": "Get all profiles within a segment with the given segment ID.\n\nFilter to request a subset of all profiles. Profiles can be filtered by `email`, `phone_number`, `push_token`, and `joined_group_at` fields. Profiles can be sorted by the following fields, in ascending and descending order: `joined_group_at`

*Rate limits*:
Burst: `75/s`
Steady: `750/m`\n\n**Scopes:**\n`profiles:read`\n`segments:read`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_profiles_for_segment.json)", "parameters": [ { "name": "id", "in": "path", "description": "Primary key that uniquely identifies this segment. Generated by Klaviyo.", "required": true, "schema": { "description": "Primary key that uniquely identifies this segment. Generated by Klaviyo.", "type": "string", "example": "Y6nRLr" } }, { "name": "additional-fields[profile]", "in": "query", "description": "Request additional fields not included by default in the response. Supported values: 'subscriptions', 'predictive_analytics'", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "subscriptions", "predictive_analytics" ] } }, "explode": false }, { "name": "fields[profile]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "created", "email", "external_id", "first_name", "id", "image", "joined_group_at", "last_event_date", "last_name", "locale", "location", "location.address1", "location.address2", "location.city", "location.country", "location.ip", "location.latitude", "location.longitude", "location.region", "location.timezone", "location.zip", "organization", "phone_number", "predictive_analytics", "predictive_analytics.average_days_between_orders", "predictive_analytics.average_order_value", "predictive_analytics.churn_probability", "predictive_analytics.expected_date_of_next_order", "predictive_analytics.historic_clv", "predictive_analytics.historic_number_of_orders", "predictive_analytics.predicted_clv", "predictive_analytics.predicted_number_of_orders", "predictive_analytics.ranked_channel_affinity", "predictive_analytics.total_clv", "properties", "subscriptions", "subscriptions.email", "subscriptions.email.click_tracking", "subscriptions.email.click_tracking.can_receive", "subscriptions.email.click_tracking.consent", "subscriptions.email.click_tracking.consent_timestamp", "subscriptions.email.click_tracking.created_timestamp", "subscriptions.email.click_tracking.last_updated", "subscriptions.email.click_tracking.metadata", "subscriptions.email.click_tracking.valid_until", "subscriptions.email.marketing", "subscriptions.email.marketing.can_receive_email_marketing", "subscriptions.email.marketing.consent", "subscriptions.email.marketing.consent_timestamp", "subscriptions.email.marketing.custom_method_detail", "subscriptions.email.marketing.double_optin", "subscriptions.email.marketing.last_updated", "subscriptions.email.marketing.list_suppressions", "subscriptions.email.marketing.method", "subscriptions.email.marketing.method_detail", "subscriptions.email.marketing.suppression", "subscriptions.email.open_tracking", "subscriptions.email.open_tracking.can_receive", "subscriptions.email.open_tracking.consent", "subscriptions.email.open_tracking.consent_timestamp", "subscriptions.email.open_tracking.created_timestamp", "subscriptions.email.open_tracking.last_updated", "subscriptions.email.open_tracking.metadata", "subscriptions.email.open_tracking.valid_until", "subscriptions.mobile_push", "subscriptions.mobile_push.marketing", "subscriptions.mobile_push.marketing.can_receive_push_marketing", "subscriptions.mobile_push.marketing.consent", "subscriptions.mobile_push.marketing.consent_timestamp", "subscriptions.sms", "subscriptions.sms.marketing", "subscriptions.sms.marketing.can_receive_sms_marketing", "subscriptions.sms.marketing.consent", "subscriptions.sms.marketing.consent_timestamp", "subscriptions.sms.marketing.last_updated", "subscriptions.sms.marketing.method", "subscriptions.sms.marketing.method_detail", "subscriptions.sms.transactional", "subscriptions.sms.transactional.can_receive_sms_transactional", "subscriptions.sms.transactional.consent", "subscriptions.sms.transactional.consent_timestamp", "subscriptions.sms.transactional.last_updated", "subscriptions.sms.transactional.method", "subscriptions.sms.transactional.method_detail", "subscriptions.whatsapp", "subscriptions.whatsapp.conversational", "subscriptions.whatsapp.conversational.can_receive", "subscriptions.whatsapp.conversational.consent", "subscriptions.whatsapp.conversational.consent_timestamp", "subscriptions.whatsapp.conversational.created_timestamp", "subscriptions.whatsapp.conversational.last_updated", "subscriptions.whatsapp.conversational.metadata", "subscriptions.whatsapp.conversational.phone_number", "subscriptions.whatsapp.conversational.valid_until", "subscriptions.whatsapp.marketing", "subscriptions.whatsapp.marketing.can_receive", "subscriptions.whatsapp.marketing.consent", "subscriptions.whatsapp.marketing.consent_timestamp", "subscriptions.whatsapp.marketing.created_timestamp", "subscriptions.whatsapp.marketing.last_updated", "subscriptions.whatsapp.marketing.metadata", "subscriptions.whatsapp.marketing.phone_number", "subscriptions.whatsapp.marketing.valid_until", "subscriptions.whatsapp.transactional", "subscriptions.whatsapp.transactional.can_receive", "subscriptions.whatsapp.transactional.consent", "subscriptions.whatsapp.transactional.consent_timestamp", "subscriptions.whatsapp.transactional.created_timestamp", "subscriptions.whatsapp.transactional.last_updated", "subscriptions.whatsapp.transactional.metadata", "subscriptions.whatsapp.transactional.phone_number", "subscriptions.whatsapp.transactional.valid_until", "title", "updated" ] } }, "explode": false }, { "name": "filter", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#filtering
Allowed field(s)/operator(s):
`profile_id`: `any`, `equals` (string)
`email`: `any`, `equals` (string)
`phone_number`: `any`, `equals` (string)
`push_token`: `any`, `equals` (string)
`_kx`: `equals` (string)
`joined_group_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (date-time)", "schema": { "type": "string", "example": "equals(profile_id,['example'])" } }, { "name": "page[cursor]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#pagination", "required": false, "schema": { "type": "string" } }, { "name": "page[size]", "in": "query", "description": "Default: 20. Min: 1. Max: 100.", "required": false, "schema": { "type": "integer", "default": 20, "maximum": 100, "minimum": 1 } }, { "name": "sort", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sorting", "schema": { "type": "string", "enum": [ "joined_group_at", "-joined_group_at" ] } }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15" } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/GetSegmentMemberResponseCollection" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Segments" ], "x-klaviyo-filters": { "profile_id": { "operators": { "list": [ "any", "equals" ] }, "value": { "type": "string" } }, "email": { "operators": { "list": [ "any", "equals" ] }, "value": { "type": "string" } }, "phone_number": { "operators": { "list": [ "any", "equals" ] }, "value": { "type": "string" } }, "push_token": { "operators": { "list": [ "any", "equals" ] }, "value": { "type": "string" } }, "_kx": { "operators": { "single": [ "equals" ] }, "value": { "type": "string" } }, "joined_group_at": { "operators": { "single": [ "greater-or-equal", "greater-than", "less-or-equal", "less-than" ] }, "value": { "type": "string", "format": "date-time" } } }, "x-klaviyo-operation-aliases": [ "get_segment_profiles" ], "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "75/s", "steady": "750/m" }, "x-klaviyo-scopes": [ "profiles:read", "segments:read" ] } }, "/api/segments/{id}/relationships/profiles": { "get": { "operationId": "get_profile_ids_for_segment", "summary": "Get Profile IDs for Segment", "description": "Get all profile membership [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for the given segment ID.

*Rate limits*:
Burst: `75/s`
Steady: `750/m`\n\n**Scopes:**\n`profiles:read`\n`segments:read`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_profile_ids_for_segment.json)", "parameters": [ { "name": "id", "in": "path", "description": "Primary key that uniquely identifies this segment. Generated by Klaviyo.", "required": true, "schema": { "description": "Primary key that uniquely identifies this segment. Generated by Klaviyo.", "type": "string", "example": "Y6nRLr" } }, { "name": "filter", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#filtering
Allowed field(s)/operator(s):
`profile_id`: `any`, `equals` (string)
`email`: `any`, `equals` (string)
`phone_number`: `any`, `equals` (string)
`push_token`: `any`, `equals` (string)
`_kx`: `equals` (string)
`joined_group_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (date-time)", "schema": { "type": "string", "example": "equals(profile_id,['example'])" } }, { "name": "page[cursor]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#pagination", "required": false, "schema": { "type": "string" } }, { "name": "page[size]", "in": "query", "description": "Default: 20. Min: 1. Max: 100.", "required": false, "schema": { "type": "integer", "default": 20, "maximum": 100, "minimum": 1 } }, { "name": "sort", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sorting", "schema": { "type": "string", "enum": [ "joined_group_at", "-joined_group_at" ] } }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15" } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/GetSegmentProfilesRelationshipsResponseCollection" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Segments" ], "x-klaviyo-filters": { "profile_id": { "operators": { "list": [ "any", "equals" ] }, "value": { "type": "string" } }, "email": { "operators": { "list": [ "any", "equals" ] }, "value": { "type": "string" } }, "phone_number": { "operators": { "list": [ "any", "equals" ] }, "value": { "type": "string" } }, "push_token": { "operators": { "list": [ "any", "equals" ] }, "value": { "type": "string" } }, "_kx": { "operators": { "single": [ "equals" ] }, "value": { "type": "string" } }, "joined_group_at": { "operators": { "single": [ "greater-or-equal", "greater-than", "less-or-equal", "less-than" ] }, "value": { "type": "string", "format": "date-time" } } }, "x-klaviyo-operation-aliases": [ "get_segment_relationships_profiles" ], "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "75/s", "steady": "750/m" }, "x-klaviyo-scopes": [ "profiles:read", "segments:read" ] } }, "/api/segments/{id}/flow-triggers": { "get": { "operationId": "get_flows_triggered_by_segment", "summary": "Get Flows Triggered by Segment", "description": "Get all flows where the given segment ID is being used as the trigger.

*Rate limits*:
Burst: `3/s`
Steady: `60/m`\n\n**Scopes:**\n`flows:read`\n`segments:read`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_flows_triggered_by_segment.json)", "parameters": [ { "name": "id", "in": "path", "description": "Primary key that uniquely identifies this segment. Generated by Klaviyo.", "required": true, "schema": { "description": "Primary key that uniquely identifies this segment. Generated by Klaviyo.", "type": "string", "example": "Y6nRLr" } }, { "name": "fields[flow]", "in": "query", "description": "For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#sparse-fieldsets", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "archived", "created", "id", "name", "status", "trigger_type", "updated" ] } }, "explode": false }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15" } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/GetFlowResponseCollection" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Segments" ], "x-klaviyo-operation-aliases": [ "get_flow_triggers_for_segment", "get_segment_flow_triggers" ], "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "3/s", "steady": "60/m" }, "x-klaviyo-scopes": [ "flows:read", "segments:read" ] } }, "/api/segments/{id}/relationships/flow-triggers": { "get": { "operationId": "get_ids_for_flows_triggered_by_segment", "summary": "Get IDs for Flows Triggered by Segment", "description": "Get the IDs of all flows where the given segment is being used as the trigger.

*Rate limits*:
Burst: `3/s`
Steady: `60/m`\n\n**Scopes:**\n`flows:read`\n`segments:read`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/get_ids_for_flows_triggered_by_segment.json)", "parameters": [ { "name": "id", "in": "path", "description": "Primary key that uniquely identifies this segment. Generated by Klaviyo.", "required": true, "schema": { "description": "Primary key that uniquely identifies this segment. Generated by Klaviyo.", "type": "string", "example": "Y6nRLr" } }, { "name": "revision", "in": "header", "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])", "required": true, "schema": { "type": "string", "default": "2026-07-15" } } ], "responses": { "200": { "description": "Success", "content": { "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/GetSegmentFlowTriggersRelationshipsResponseCollection" } } } }, "4XX": { "$ref": "#/components/responses/ClientError" }, "5XX": { "$ref": "#/components/responses/ServerError" } }, "tags": [ "Segments" ], "x-klaviyo-operation-aliases": [ "get_flow_trigger_ids_for_segment", "get_segment_relationships_flow_triggers" ], "x-klaviyo-pre-release": "None", "x-klaviyo-ratelimit": { "burst": "3/s", "steady": "60/m" }, "x-klaviyo-scopes": [ "flows:read", "segments:read" ] } } }, "components": { "responses": { "ClientError": { "description": "Client Error", "content": { "application/vnd.api+json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "required": [ "id", "code", "title", "detail" ], "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" } } } } } } }, "required": [ "errors" ] } } } }, "ServerError": { "description": "Server Error", "content": { "application/vnd.api+json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "required": [ "id", "code", "title", "detail" ], "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" } } } } } } }, "required": [ "errors" ] } } } } }, "schemas": { "APIMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "api" ] }, "filter": { "description": "Optional filter on a specific list of API keys (using last 4 digits of the key)", "$ref": "#/components/schemas/InStringArrayFilter", "nullable": true } }, "required": [ "field", "method" ] }, "AgentHints": { "description": "Optional hints emitted by the API for agent callers", "type": "object", "properties": { "next_steps": { "description": "Suggested follow-up actions for agents to take after this response", "type": "array", "items": { "type": "string" } } } }, "AlltimeDateFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "date" ] }, "operator": { "description": "Operators for alltime date filters.", "type": "string", "enum": [ "alltime" ] } }, "required": [ "type", "operator" ] }, "AnniversaryDateFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "date" ] }, "operator": { "description": "Operators for anniversary date filters.", "type": "string", "enum": [ "anniversary", "anniversary-month" ] } }, "required": [ "type", "operator" ] }, "BackInStockMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "back_in_stock" ] } }, "required": [ "field", "method" ] }, "BooleanFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "boolean" ] }, "operator": { "description": "Operators for boolean filters.", "type": "string", "enum": [ "equals" ] }, "value": { "type": "boolean" } }, "required": [ "type", "operator", "value" ] }, "BounceDateFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "bounce_date" ] }, "filter": { "oneOf": [ { "$ref": "#/components/schemas/StaticDateFilter" }, { "$ref": "#/components/schemas/StaticDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateOperatorBaseRelativeDateFilter" }, { "$ref": "#/components/schemas/RelativeAnniversaryDateFilter" }, { "$ref": "#/components/schemas/RelativeDateRangeFilter" }, { "$ref": "#/components/schemas/CalendarDateFilter" }, { "$ref": "#/components/schemas/AnniversaryDateFilter" }, { "$ref": "#/components/schemas/IsSetExistenceFilter" } ] } }, "required": [ "field", "filter" ] }, "BulkRemoveMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "bulk_remove" ] } }, "required": [ "field", "method" ] }, "CalendarDateFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "date" ] }, "operator": { "description": "Operators for calendar date filters.", "type": "string", "enum": [ "calendar-month" ] }, "value": { "type": "integer" } }, "required": [ "type", "operator", "value" ] }, "CampaignEnum": { "type": "string", "enum": [ "campaign" ] }, "CarrierDeactivationMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "carrier_deactivation" ] } }, "required": [ "field", "method" ] }, "CheckoutMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "checkout" ] } }, "required": [ "field", "method" ] }, "ClickTrackingConsent": { "type": "object", "properties": { "consent": { "description": "The consent status for the channel.", "type": "string", "example": "SUBSCRIBED" }, "consent_timestamp": { "description": "The timestamp when consent was recorded or updated for the channel, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "last_updated": { "description": "The timestamp when the channel was last modified, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "created_timestamp": { "description": "The timestamp when the channel was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "metadata": { "description": "Channel-specific metadata containing additional information about the permission.", "type": "object", "nullable": true }, "can_receive": { "description": "Whether the profile can receive messages on this channel.", "type": "boolean" }, "valid_until": { "description": "Optional expiration date for the permission, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2024-02-21T20:07:38+00:00", "nullable": true } }, "required": [ "consent", "can_receive" ] }, "CollectionLinks": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" }, "prev": { "type": "string", "format": "uri" }, "next": { "type": "string", "format": "uri" } }, "required": [ "self" ] }, "ConditionGroup": { "type": "object", "properties": { "conditions": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/ProfileHasGroupMembershipCondition" }, { "$ref": "#/components/schemas/ProfileNoGroupMembershipCondition" }, { "$ref": "#/components/schemas/SegmentsProfileMetricCondition" }, { "$ref": "#/components/schemas/ProfileMarketingConsentCondition" }, { "$ref": "#/components/schemas/ProfilePostalCodeDistanceCondition" }, { "$ref": "#/components/schemas/ProfilePropertyCondition" }, { "$ref": "#/components/schemas/ProfileRegionCondition" }, { "$ref": "#/components/schemas/ProfilePredictiveAnalyticsDateCondition" }, { "$ref": "#/components/schemas/ProfilePredictiveAnalyticsNumericCondition" }, { "$ref": "#/components/schemas/ProfilePredictiveAnalyticsStringCondition" }, { "$ref": "#/components/schemas/ProfilePredictiveAnalyticsChannelAffinityPriorityCondition" }, { "$ref": "#/components/schemas/ProfilePredictiveAnalyticsChannelAffinityRankCondition" }, { "$ref": "#/components/schemas/ProfileHasCustomObjectCondition" }, { "$ref": "#/components/schemas/ProfilePermissionsCondition" }, { "$ref": "#/components/schemas/SegmentsProfileMetricFunnelCondition" } ] } } }, "required": [ "conditions" ] }, "ConstantContactIntegrationFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string" ] }, "operator": { "type": "string", "enum": [ "in" ] }, "value": { "type": "array", "items": { "enum": [ "constant_contact" ], "type": "string" } } }, "required": [ "type", "operator", "value" ] }, "ConstantContactIntegrationMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "integration" ] }, "filter": { "$ref": "#/components/schemas/ConstantContactIntegrationFilter" } }, "required": [ "field", "method", "filter" ] }, "CustomSourceFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "custom_source" ] }, "filter": { "$ref": "#/components/schemas/EqualsStringFilter" } }, "required": [ "field", "filter" ] }, "DataWarehouseImportMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "data_warehouse_import" ] } }, "required": [ "field", "method" ] }, "DoubleOptinFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "is_double_opt_in" ] }, "filter": { "$ref": "#/components/schemas/BooleanFilter" } }, "required": [ "field", "filter" ] }, "EffectiveDateFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "effective_date" ] }, "filter": { "oneOf": [ { "$ref": "#/components/schemas/StaticDateFilter" }, { "$ref": "#/components/schemas/StaticDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateOperatorBaseRelativeDateFilter" }, { "$ref": "#/components/schemas/RelativeAnniversaryDateFilter" }, { "$ref": "#/components/schemas/RelativeDateRangeFilter" }, { "$ref": "#/components/schemas/CalendarDateFilter" }, { "$ref": "#/components/schemas/AnniversaryDateFilter" } ] } }, "required": [ "field", "filter" ] }, "EmailChannel": { "type": "object", "properties": { "marketing": { "description": "The email marketing subscription.", "$ref": "#/components/schemas/EmailMarketing", "nullable": true }, "open_tracking": { "description": "The email open tracking consent.", "$ref": "#/components/schemas/OpenTrackingConsent", "nullable": true }, "click_tracking": { "description": "The email click tracking consent.", "$ref": "#/components/schemas/ClickTrackingConsent", "nullable": true } } }, "EmailMarketing": { "type": "object", "properties": { "can_receive_email_marketing": { "description": "Whether or not this profile has implicit consent to receive email marketing. True if it does profile does not have any global suppressions.", "type": "boolean" }, "consent": { "description": "The consent status for email marketing.", "type": "string", "example": "SUBSCRIBED" }, "consent_timestamp": { "description": "The timestamp when consent was recorded or updated for email marketing, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "last_updated": { "description": "The timestamp when a field on the email marketing object was last modified.", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "method": { "description": "The method by which the profile was subscribed to email marketing.", "type": "string", "example": "PREFERENCE_PAGE", "nullable": true }, "method_detail": { "description": "Additional details about the method by which the profile was subscribed to email marketing. This may be empty if no details were provided.", "type": "string", "example": "mydomain.com/signup", "default": "", "nullable": true }, "custom_method_detail": { "description": "Additional detail provided by the caller when the profile was subscribed. This may be empty if no details were provided.", "type": "string", "example": "marketing drive", "nullable": true }, "double_optin": { "description": "Whether the profile was subscribed to email marketing using a double opt-in.", "type": "boolean", "example": true, "nullable": true }, "suppression": { "description": "The global email marketing suppression for this profile.", "type": "array", "items": { "$ref": "#/components/schemas/EmailMarketingSuppression" }, "nullable": true }, "list_suppressions": { "description": "The list suppressions for this profile.", "type": "array", "items": { "$ref": "#/components/schemas/EmailMarketingListSuppression" }, "nullable": true } }, "required": [ "can_receive_email_marketing", "consent" ] }, "EmailMarketingListSuppression": { "type": "object", "properties": { "list_id": { "description": "The ID of list to which the suppression applies.", "type": "string", "example": "Y6nRLr" }, "reason": { "description": "The reason the profile was suppressed from the list.", "type": "string", "example": "USER_SUPPRESSED" }, "timestamp": { "description": "The timestamp when the profile was suppressed from the list, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00" } }, "required": [ "list_id", "reason", "timestamp" ] }, "EmailMarketingSuppression": { "type": "object", "properties": { "reason": { "description": "The reason the profile was suppressed.", "type": "string", "example": "HARD_BOUNCE", "enum": [ "HARD_BOUNCE", "INVALID_EMAIL", "SPAM_COMPLAINT", "UNSUBSCRIBE", "USER_SUPPRESSED" ] }, "timestamp": { "description": "The timestamp when the profile was suppressed, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00" } }, "required": [ "reason", "timestamp" ] }, "EqualsStringFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string" ] }, "operator": { "type": "string", "enum": [ "equals" ] }, "value": { "type": "string", "nullable": true } }, "required": [ "type", "operator", "value" ] }, "ExistenceOperatorExistenceFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "existence" ] }, "operator": { "description": "Operators for existence filters.", "type": "string", "enum": [ "is-set", "not-set" ] } }, "required": [ "type", "operator" ] }, "ExplicitlyReachable": { "type": "object", "properties": { "reachable_status": { "type": "string", "enum": [ "explicitly_reachable" ] }, "filters": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/EffectiveDateFilter" }, { "$ref": "#/components/schemas/RecordedDateFilter" }, { "$ref": "#/components/schemas/MethodFilter" }, { "$ref": "#/components/schemas/FormSubscribeFilter" } ] } } }, "required": [ "reachable_status", "filters" ] }, "ExplicitlyUnreachable": { "type": "object", "properties": { "reachable_status": { "type": "string", "enum": [ "explicitly_unreachable" ] }, "filters": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/EffectiveDateFilter" }, { "$ref": "#/components/schemas/RecordedDateFilter" }, { "$ref": "#/components/schemas/MethodFilter" }, { "$ref": "#/components/schemas/FormSubscribeFilter" } ] } } }, "required": [ "reachable_status", "filters" ] }, "FailedAgeGateMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "failed_age_gate" ] } }, "required": [ "field", "method" ] }, "FlowActionEnum": { "type": "string", "enum": [ "flow-action" ] }, "FlowEnum": { "type": "string", "enum": [ "flow" ] }, "FlowResponseObjectResource": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/FlowEnum" }, "id": { "type": "string" }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "nullable": true }, "status": { "type": "string", "nullable": true }, "archived": { "type": "boolean", "nullable": true }, "created": { "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "updated": { "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "trigger_type": { "description": "Corresponds to the object which triggered the flow.", "type": "string", "enum": [ "Added to List", "Date Based", "Low Inventory", "Metric", "Price Drop", "Unconfigured" ], "nullable": true } } }, "relationships": { "type": "object", "properties": { "flow-actions": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/FlowActionEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "tags": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/TagEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } } } }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "type", "id", "attributes", "links" ] }, "FormMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "form" ] }, "filter": { "description": "Optional filter on a specific list of form ids", "$ref": "#/components/schemas/InStringArrayFilter", "nullable": true } }, "required": [ "field", "method" ] }, "FormSubscribeFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "subscribe_method" ] }, "method": { "type": "string", "enum": [ "form" ] }, "filter": { "description": "Optional filter on a specific list of form IDs", "$ref": "#/components/schemas/InStringArrayFilter", "nullable": true } }, "required": [ "field", "method" ] }, "GetFlowResponseCollection": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/FlowResponseObjectResource" } }, "links": { "$ref": "#/components/schemas/CollectionLinks" }, "meta": { "$ref": "#/components/schemas/ResponseMeta" } }, "required": [ "data" ] }, "GetSegmentFlowTriggersRelationshipsResponseCollection": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/FlowEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/CollectionLinks" }, "meta": { "$ref": "#/components/schemas/ResponseMeta" } }, "required": [ "data" ] }, "GetSegmentListResponseCollectionCompoundDocument": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/SegmentListResponseObjectResource" } }, "links": { "$ref": "#/components/schemas/CollectionLinks" }, "meta": { "$ref": "#/components/schemas/ResponseMeta" }, "included": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/TagResponseObjectResource" }, { "$ref": "#/components/schemas/FlowResponseObjectResource" } ] } } }, "required": [ "data" ] }, "GetSegmentMemberResponseCollection": { "type": "object", "properties": { "data": { "type": "array", "items": { "allOf": [ { "properties": { "type": { "$ref": "#/components/schemas/ProfileEnum" }, "attributes": { "properties": { "subscriptions": { "$ref": "#/components/schemas/Subscriptions", "nullable": true }, "predictive_analytics": { "$ref": "#/components/schemas/PredictiveAnalytics", "nullable": true } } } } }, { "$ref": "#/components/schemas/SegmentMemberResponseObjectResource" } ] } }, "links": { "$ref": "#/components/schemas/CollectionLinks" }, "meta": { "$ref": "#/components/schemas/ResponseMeta" } }, "required": [ "data" ] }, "GetSegmentProfilesRelationshipsResponseCollection": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/ProfileEnum" }, "id": { "description": "Primary key that uniquely identifies this profile. Generated by Klaviyo.", "type": "string", "example": "01GDDKASAP8TKDDA2GRZDSVP4H" } } } }, "links": { "$ref": "#/components/schemas/CollectionLinks" }, "meta": { "$ref": "#/components/schemas/ResponseMeta" } }, "required": [ "data" ] }, "GetSegmentRetrieveResponseCompoundDocument": { "type": "object", "properties": { "data": { "allOf": [ { "properties": { "type": { "$ref": "#/components/schemas/SegmentEnum" }, "attributes": { "properties": { "profile_count": { "type": "integer", "nullable": true } } } } }, { "$ref": "#/components/schemas/SegmentRetrieveResponseObjectResource" } ] }, "included": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/TagResponseObjectResource" }, { "$ref": "#/components/schemas/FlowResponseObjectResource" } ] } }, "links": { "$ref": "#/components/schemas/ObjectLinks" }, "meta": { "$ref": "#/components/schemas/ResponseMeta" } }, "required": [ "data" ] }, "GetSegmentTagsRelationshipsResponseCollection": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/TagEnum" }, "id": { "description": "The Tag ID", "type": "string", "example": "abcd1234-ef56-gh78-ij90-abcdef123456" } } } }, "links": { "$ref": "#/components/schemas/CollectionLinks" }, "meta": { "$ref": "#/components/schemas/ResponseMeta" } }, "required": [ "data" ] }, "GetTagResponseCollection": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/TagResponseObjectResource" } }, "links": { "$ref": "#/components/schemas/CollectionLinks" }, "meta": { "$ref": "#/components/schemas/ResponseMeta" } }, "required": [ "data" ] }, "GreaterThanPositiveNumericFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "numeric" ] }, "operator": { "type": "string", "enum": [ "greater-than" ] }, "value": { "oneOf": [ { "type": "integer" }, { "type": "number" } ] } }, "required": [ "type", "operator", "value" ] }, "HasEmailMarketing": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "any" ] }, "filters": { "nullable": true } }, "required": [ "subscription" ] }, "HasEmailMarketingConsent": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "email" ] }, "can_receive_marketing": { "type": "boolean", "enum": [ true ] }, "consent_status": { "oneOf": [ { "$ref": "#/components/schemas/HasEmailMarketing" }, { "$ref": "#/components/schemas/HasEmailMarketingSubscribed" }, { "$ref": "#/components/schemas/HasEmailMarketingNeverSubscribed" } ] } }, "required": [ "channel", "can_receive_marketing", "consent_status" ] }, "HasEmailMarketingNeverSubscribed": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "never_subscribed" ] }, "filters": { "nullable": true } }, "required": [ "subscription" ] }, "HasEmailMarketingSubscribed": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "subscribed" ] }, "filters": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/DoubleOptinFilter" }, { "$ref": "#/components/schemas/StatusDateFilter" }, { "$ref": "#/components/schemas/CustomSourceFilter" }, { "$ref": "#/components/schemas/FormMethodFilter" }, { "$ref": "#/components/schemas/PreferencePageFilter" }, { "$ref": "#/components/schemas/APIMethodFilter" }, { "$ref": "#/components/schemas/InboundMessageMethodFilter" }, { "$ref": "#/components/schemas/BackInStockMethodFilter" }, { "$ref": "#/components/schemas/SftpMethodFilter" }, { "$ref": "#/components/schemas/ManualImportManualMethodFilter" }, { "$ref": "#/components/schemas/ManualAddManualMethodFilter" }, { "$ref": "#/components/schemas/ShopifyIntegrationMethodFilter" } ] }, "nullable": true } }, "required": [ "subscription" ] }, "HasPushMarketing": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "any" ] }, "filters": { "type": "array", "items": { "$ref": "#/components/schemas/StatusDateFilter" }, "nullable": true } }, "required": [ "subscription" ] }, "HasPushMarketingConsent": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "push" ] }, "can_receive_marketing": { "type": "boolean", "enum": [ true ] }, "consent_status": { "$ref": "#/components/schemas/HasPushMarketing" } }, "required": [ "channel", "can_receive_marketing", "consent_status" ] }, "HasSMSMarketingConsent": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "sms" ] }, "can_receive_marketing": { "type": "boolean", "enum": [ true ] }, "consent_status": { "$ref": "#/components/schemas/HasSMSMarketingSubscribed" } }, "required": [ "channel", "can_receive_marketing", "consent_status" ] }, "HasSMSMarketingSubscribed": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "subscribed" ] }, "filters": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/StatusDateFilter" }, { "$ref": "#/components/schemas/FormMethodFilter" }, { "$ref": "#/components/schemas/ManualImportManualMethodFilter" }, { "$ref": "#/components/schemas/ManualAddManualMethodFilter" }, { "$ref": "#/components/schemas/CheckoutMethodFilter" }, { "$ref": "#/components/schemas/InboundMessageMethodFilter" }, { "$ref": "#/components/schemas/PreferencePageMethodFilter" }, { "$ref": "#/components/schemas/SftpMethodFilter" }, { "$ref": "#/components/schemas/ShopifyIntegrationMethodFilter" }, { "$ref": "#/components/schemas/SubscribedSMSIsRcsCapableFilter" } ] }, "nullable": true } }, "required": [ "subscription" ] }, "ImplicitlyOrExplicitlyReachable": { "type": "object", "properties": { "reachable_status": { "type": "string", "enum": [ "implicitly_or_explicitly_reachable" ] } }, "required": [ "reachable_status" ] }, "ImplicitlyOrExplicitlyUnreachable": { "type": "object", "properties": { "reachable_status": { "type": "string", "enum": [ "implicitly_or_explicitly_unreachable" ] } }, "required": [ "reachable_status" ] }, "ImplicitlyReachable": { "type": "object", "properties": { "reachable_status": { "type": "string", "enum": [ "implicitly_reachable" ] } }, "required": [ "reachable_status" ] }, "ImplicitlyUnreachable": { "type": "object", "properties": { "reachable_status": { "type": "string", "enum": [ "implicitly_unreachable" ] } }, "required": [ "reachable_status" ] }, "InStringArrayFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string" ] }, "operator": { "type": "string", "enum": [ "in" ] }, "value": { "type": "array", "items": { "type": "string" } } }, "required": [ "type", "operator", "value" ] }, "InboundMessageMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "inbound_message" ] } }, "required": [ "field", "method" ] }, "IntegerFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "numeric" ] }, "operator": { "description": "Operators for numeric filters.", "type": "string", "enum": [ "equals", "greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal", "not-equals" ] }, "value": { "type": "integer" } }, "required": [ "type", "operator", "value" ] }, "InvalidEmailDateFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "invalid_email_date" ] }, "filter": { "oneOf": [ { "$ref": "#/components/schemas/StaticDateFilter" }, { "$ref": "#/components/schemas/StaticDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateOperatorBaseRelativeDateFilter" }, { "$ref": "#/components/schemas/RelativeAnniversaryDateFilter" }, { "$ref": "#/components/schemas/RelativeDateRangeFilter" }, { "$ref": "#/components/schemas/CalendarDateFilter" }, { "$ref": "#/components/schemas/AnniversaryDateFilter" }, { "$ref": "#/components/schemas/IsSetExistenceFilter" } ] } }, "required": [ "field", "filter" ] }, "IsSetExistenceFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "existence" ] }, "operator": { "type": "string", "enum": [ "is-set" ] } }, "required": [ "type", "operator" ] }, "LessThanPositiveNumericFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "numeric" ] }, "operator": { "type": "string", "enum": [ "less-than" ] }, "value": { "oneOf": [ { "type": "integer" }, { "type": "number" } ] } }, "required": [ "type", "operator", "value" ] }, "ListContainsOperatorListContainsFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "list" ] }, "operator": { "description": "Operators for list contains filters.", "type": "string", "enum": [ "contains", "not-contains" ] }, "value": { "nullable": true, "oneOf": [ { "type": "integer" }, { "type": "string" } ] } }, "required": [ "type", "operator", "value" ] }, "ListEnum": { "type": "string", "enum": [ "list" ] }, "ListLengthFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "list" ] }, "operator": { "description": "Operators for list length filters.", "type": "string", "enum": [ "length-equals", "length-greater-than", "length-greater-than-or-equal", "length-less-than", "length-less-than-or-equal" ] }, "value": { "type": "integer" } }, "required": [ "type", "operator", "value" ] }, "ListSetFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "list" ] }, "operator": { "description": "Operators for list contains set filters.", "type": "string", "enum": [ "contains-all", "contains-any", "not-contains-all", "not-contains-any" ] }, "value": { "type": "array", "items": { "type": "string" } } }, "required": [ "type", "operator", "value" ] }, "ListSubstringFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "list" ] }, "operator": { "description": "Operators for list substring filters.", "type": "string", "enum": [ "contains-substring", "not-contains-substring" ] }, "value": { "type": "string", "nullable": true } }, "required": [ "type", "operator", "value" ] }, "MailboxProviderMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "mailbox_provider" ] } }, "required": [ "field", "method" ] }, "ManualAddManualMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "manual_add" ] }, "filter": { "description": "Optional filter on a specific list of user email addresses who initiated the manual action", "$ref": "#/components/schemas/InStringArrayFilter", "nullable": true } }, "required": [ "field", "method" ] }, "ManualImportManualMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "manual_import" ] }, "filter": { "description": "Optional filter on a specific list of user email addresses who initiated the manual action", "$ref": "#/components/schemas/InStringArrayFilter", "nullable": true } }, "required": [ "field", "method" ] }, "ManualImportMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "manual_import" ] } }, "required": [ "field", "method" ] }, "ManualRemoveMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "manual_remove" ] } }, "required": [ "field", "method" ] }, "ManualSuppressionDateFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "manual_suppression_date" ] }, "filter": { "oneOf": [ { "$ref": "#/components/schemas/StaticDateFilter" }, { "$ref": "#/components/schemas/StaticDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateOperatorBaseRelativeDateFilter" }, { "$ref": "#/components/schemas/RelativeAnniversaryDateFilter" }, { "$ref": "#/components/schemas/RelativeDateRangeFilter" }, { "$ref": "#/components/schemas/CalendarDateFilter" }, { "$ref": "#/components/schemas/AnniversaryDateFilter" }, { "$ref": "#/components/schemas/IsSetExistenceFilter" } ] } }, "required": [ "field", "filter" ] }, "MessageBlockedMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "message_blocked" ] } }, "required": [ "field", "method" ] }, "MethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "subscribe_method" ] }, "method": { "description": "Method for subscribing / unsubscribing.", "type": "string", "enum": [ "api", "back_in_stock", "bigcommerce", "bulk_remove", "campaign_monitor", "carrier_deactivation", "checkout", "constant_contact", "exact_target", "facebook", "failed_age_gate", "inbound_message", "integration", "mad_mimi", "magento_two", "mailbox_provider", "manual_add", "manual_import", "manual_remove", "message_blocked", "netsuite", "preference_page", "provided_landline", "provided_no_age", "sftp", "shopify", "social_instagram_message", "spam_complaint", "square", "wix", "woocommerce" ] } }, "required": [ "field", "method" ] }, "NoEmailMarketing": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "any" ] }, "filters": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/BounceDateFilter" }, { "$ref": "#/components/schemas/ManualSuppressionDateFilter" }, { "$ref": "#/components/schemas/InvalidEmailDateFilter" } ] }, "nullable": true } }, "required": [ "subscription" ] }, "NoEmailMarketingConsent": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "email" ] }, "can_receive_marketing": { "type": "boolean", "enum": [ false ] }, "consent_status": { "oneOf": [ { "$ref": "#/components/schemas/NoEmailMarketing" }, { "$ref": "#/components/schemas/NoEmailMarketingUnsubscribed" }, { "$ref": "#/components/schemas/NoEmailMarketingNeverSubscribed" }, { "$ref": "#/components/schemas/NoEmailMarketingSubscribed" } ] } }, "required": [ "channel", "can_receive_marketing", "consent_status" ] }, "NoEmailMarketingNeverSubscribed": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "never_subscribed" ] }, "filters": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/BounceDateFilter" }, { "$ref": "#/components/schemas/ManualSuppressionDateFilter" }, { "$ref": "#/components/schemas/InvalidEmailDateFilter" } ] } } }, "required": [ "subscription", "filters" ] }, "NoEmailMarketingSubscribed": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "subscribed" ] }, "filters": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/BounceDateFilter" }, { "$ref": "#/components/schemas/ManualSuppressionDateFilter" }, { "$ref": "#/components/schemas/InvalidEmailDateFilter" } ] } } }, "required": [ "subscription", "filters" ] }, "NoEmailMarketingUnsubscribed": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "unsubscribed" ] }, "filters": { "nullable": true, "oneOf": [ { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/StatusDateFilter" }, { "$ref": "#/components/schemas/APIMethodFilter" }, { "$ref": "#/components/schemas/InboundMessageMethodFilter" }, { "$ref": "#/components/schemas/PreferencePageMethodFilter" }, { "$ref": "#/components/schemas/ManualRemoveMethodFilter" }, { "$ref": "#/components/schemas/SpamComplaintMethodFilter" }, { "$ref": "#/components/schemas/MailboxProviderMethodFilter" }, { "$ref": "#/components/schemas/OneClickUnsubscribeMethodFilter" }, { "$ref": "#/components/schemas/ManualImportMethodFilter" }, { "$ref": "#/components/schemas/SftpMethodFilter" }, { "$ref": "#/components/schemas/DataWarehouseImportMethodFilter" }, { "$ref": "#/components/schemas/ProfileModificationMethodFilter" }, { "$ref": "#/components/schemas/ConstantContactIntegrationMethodFilter" } ] } }, { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/BounceDateFilter" }, { "$ref": "#/components/schemas/ManualSuppressionDateFilter" }, { "$ref": "#/components/schemas/InvalidEmailDateFilter" } ] } } ] } }, "required": [ "subscription" ] }, "NoPushMarketing": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "any" ] } }, "required": [ "subscription" ] }, "NoPushMarketingConsent": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "push" ] }, "can_receive_marketing": { "type": "boolean", "enum": [ false ] }, "consent_status": { "$ref": "#/components/schemas/NoPushMarketing" } }, "required": [ "channel", "can_receive_marketing", "consent_status" ] }, "NoSMSMarketing": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "any" ] } }, "required": [ "subscription" ] }, "NoSMSMarketingConsent": { "type": "object", "properties": { "channel": { "type": "string", "enum": [ "sms" ] }, "can_receive_marketing": { "type": "boolean", "enum": [ false ] }, "consent_status": { "oneOf": [ { "$ref": "#/components/schemas/NoSMSMarketing" }, { "$ref": "#/components/schemas/NoSMSMarketingUnsubscribed" }, { "$ref": "#/components/schemas/NoSMSMarketingNeverSubscribed" } ] } }, "required": [ "channel", "can_receive_marketing", "consent_status" ] }, "NoSMSMarketingNeverSubscribed": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "never_subscribed" ] } }, "required": [ "subscription" ] }, "NoSMSMarketingUnsubscribed": { "type": "object", "properties": { "subscription": { "type": "string", "enum": [ "unsubscribed" ] }, "filters": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/StatusDateFilter" }, { "$ref": "#/components/schemas/FormMethodFilter" }, { "$ref": "#/components/schemas/ManualImportManualMethodFilter" }, { "$ref": "#/components/schemas/ManualAddManualMethodFilter" }, { "$ref": "#/components/schemas/ManualRemoveMethodFilter" }, { "$ref": "#/components/schemas/BulkRemoveMethodFilter" }, { "$ref": "#/components/schemas/CheckoutMethodFilter" }, { "$ref": "#/components/schemas/InboundMessageMethodFilter" }, { "$ref": "#/components/schemas/PreferencePageMethodFilter" }, { "$ref": "#/components/schemas/SftpMethodFilter" }, { "$ref": "#/components/schemas/CarrierDeactivationMethodFilter" }, { "$ref": "#/components/schemas/ProvidedLandlineMethodFilter" }, { "$ref": "#/components/schemas/MessageBlockedMethodFilter" }, { "$ref": "#/components/schemas/ProvidedNoAgeMethodFilter" }, { "$ref": "#/components/schemas/FailedAgeGateMethodFilter" }, { "$ref": "#/components/schemas/ShopifyIntegrationMethodFilter" } ] }, "nullable": true } }, "required": [ "subscription" ] }, "NumericOperatorNumericFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "numeric" ] }, "operator": { "description": "Operators for numeric filters.", "type": "string", "enum": [ "equals", "greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal", "not-equals" ] }, "value": { "oneOf": [ { "type": "integer" }, { "type": "number" } ] } }, "required": [ "type", "operator", "value" ] }, "NumericRangeFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "numeric" ] }, "operator": { "description": "Operators for numeric range filters.", "type": "string", "enum": [ "between" ] }, "start": { "oneOf": [ { "type": "integer" }, { "type": "number" } ] }, "end": { "oneOf": [ { "type": "integer" }, { "type": "number" } ] } }, "required": [ "type", "operator", "start", "end" ] }, "ObjectLinks": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" } }, "required": [ "self" ] }, "OneClickUnsubscribeMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "one_click_unsubscribe" ] } }, "required": [ "field", "method" ] }, "OpenTrackingConsent": { "type": "object", "properties": { "consent": { "description": "The consent status for the channel.", "type": "string", "example": "SUBSCRIBED" }, "consent_timestamp": { "description": "The timestamp when consent was recorded or updated for the channel, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "last_updated": { "description": "The timestamp when the channel was last modified, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "created_timestamp": { "description": "The timestamp when the channel was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "metadata": { "description": "Channel-specific metadata containing additional information about the permission.", "type": "object", "nullable": true }, "can_receive": { "description": "Whether the profile can receive messages on this channel.", "type": "boolean" }, "valid_until": { "description": "Optional expiration date for the permission, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2024-02-21T20:07:38+00:00", "nullable": true } }, "required": [ "consent", "can_receive" ] }, "PatchSegmentPartialUpdateResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/SegmentEnum" }, "id": { "type": "string" }, "attributes": { "type": "object", "properties": { "name": { "description": "A helpful name to label the segment", "type": "string", "example": "Repeat Purchasers", "nullable": true }, "definition": { "$ref": "#/components/schemas/SegmentDefinition", "nullable": true }, "created": { "description": "Date and time when the segment was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "updated": { "description": "Date and time when the segment was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "is_active": { "description": "Whether the segment is active. Inactive segments are not processed and their membership does not update.", "type": "boolean" }, "is_processing": { "type": "boolean" }, "is_starred": { "type": "boolean" } }, "required": [ "is_active", "is_processing", "is_starred" ] }, "relationships": { "type": "object", "properties": { "profiles": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/ProfileEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "tags": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/TagEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "flow-triggers": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/FlowEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } } } }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "type", "id", "attributes", "links" ] }, "links": { "$ref": "#/components/schemas/ObjectLinks" }, "meta": { "$ref": "#/components/schemas/ResponseMeta" } }, "required": [ "data" ] }, "PostSegmentCreateResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/SegmentEnum" }, "id": { "type": "string" }, "attributes": { "type": "object", "properties": { "name": { "description": "A helpful name to label the segment", "type": "string", "example": "Repeat Purchasers", "nullable": true }, "definition": { "$ref": "#/components/schemas/SegmentDefinition", "nullable": true }, "created": { "description": "Date and time when the segment was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "updated": { "description": "Date and time when the segment was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "is_active": { "description": "Whether the segment is active. Inactive segments are not processed and their membership does not update.", "type": "boolean" }, "is_processing": { "type": "boolean" }, "is_starred": { "type": "boolean" } }, "required": [ "is_active", "is_processing", "is_starred" ] }, "relationships": { "type": "object", "properties": { "profiles": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/ProfileEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "tags": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/TagEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "flow-triggers": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/FlowEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } } } }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "type", "id", "attributes", "links" ] }, "links": { "$ref": "#/components/schemas/ObjectLinks" }, "meta": { "$ref": "#/components/schemas/ResponseMeta" } }, "required": [ "data" ] }, "PredictiveAnalytics": { "type": "object", "properties": { "historic_clv": { "description": "Total value of all historically placed orders", "type": "number", "example": 93.87, "nullable": true }, "predicted_clv": { "description": "Predicted value of all placed orders in the next 365 days", "type": "number", "example": 27.24, "nullable": true }, "total_clv": { "description": "Sum of historic and predicted CLV", "type": "number", "example": 121.11, "nullable": true }, "historic_number_of_orders": { "description": "Number of already placed orders", "type": "number", "example": 2, "nullable": true }, "predicted_number_of_orders": { "description": "Predicted number of placed orders in the next 365 days", "type": "number", "example": 0.54, "nullable": true }, "average_days_between_orders": { "description": "Average number of days between orders (None if only one order has been placed)", "type": "number", "example": 189, "nullable": true }, "average_order_value": { "description": "Average value of placed orders", "type": "number", "example": 46.94, "nullable": true }, "churn_probability": { "description": "Probability the customer has churned", "type": "number", "example": 0.89, "nullable": true }, "expected_date_of_next_order": { "description": "Expected date of next order, as calculated at the time of their most recent order", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "ranked_channel_affinity": { "description": "List of channels ranked by their predicted effectiveness for this profile, with the best channel being listed first at index 0", "type": "array", "items": { "type": "string", "enum": [ "email", "push", "sms", "whatsapp" ], "description": "Enum for channel name return values used in the V3 API for channel affinity for the field `ranked_channel_affinity`." }, "example": [ "sms", "email", "push" ], "nullable": true } } }, "PreferencePageFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "preference_page" ] }, "filter": { "description": "Optional filter on a specific subscribe page url", "$ref": "#/components/schemas/EqualsStringFilter", "nullable": true } }, "required": [ "field", "method" ] }, "PreferencePageMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "preference_page" ] } }, "required": [ "field", "method" ] }, "ProfileEnum": { "type": "string", "enum": [ "profile" ] }, "ProfileHasCustomObjectCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-has-custom-object" ] }, "object_type_id": { "type": "string" }, "object_type_relationship_id": { "type": "string" }, "filter": { "$ref": "#/components/schemas/IntegerFilter" }, "filters": { "type": "array", "items": { "$ref": "#/components/schemas/ProfileHasCustomObjectFilter" } } }, "required": [ "type", "object_type_id", "object_type_relationship_id", "filter", "filters" ] }, "ProfileHasCustomObjectFilter": { "type": "object", "properties": { "property_id": { "type": "integer" }, "filter": { "oneOf": [ { "$ref": "#/components/schemas/StringOperatorStringFilter" }, { "$ref": "#/components/schemas/StringArrayOperatorStringArrayFilter" }, { "$ref": "#/components/schemas/NumericOperatorNumericFilter" }, { "$ref": "#/components/schemas/NumericRangeFilter" }, { "$ref": "#/components/schemas/BooleanFilter" }, { "$ref": "#/components/schemas/StaticDateFilter" }, { "$ref": "#/components/schemas/StaticDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateOperatorBaseRelativeDateFilter" }, { "$ref": "#/components/schemas/RelativeAnniversaryDateFilter" }, { "$ref": "#/components/schemas/RelativeDateRangeFilter" }, { "$ref": "#/components/schemas/ListContainsOperatorListContainsFilter" }, { "$ref": "#/components/schemas/ListLengthFilter" }, { "$ref": "#/components/schemas/ExistenceOperatorExistenceFilter" } ] } }, "required": [ "property_id", "filter" ] }, "ProfileHasGroupMembershipCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-group-membership" ] }, "is_member": { "type": "boolean", "enum": [ true ] }, "group_ids": { "type": "array", "items": { "type": "string" } }, "timeframe_filter": { "nullable": true, "oneOf": [ { "$ref": "#/components/schemas/StaticDateFilter" }, { "$ref": "#/components/schemas/StaticDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateOperatorBaseRelativeDateFilter" }, { "$ref": "#/components/schemas/RelativeDateRangeFilter" } ] } }, "required": [ "type", "is_member", "group_ids" ] }, "ProfileLocation": { "type": "object", "properties": { "address1": { "description": "First line of street address", "type": "string", "example": "89 E 42nd St", "nullable": true }, "address2": { "description": "Second line of street address", "type": "string", "example": "1st floor", "nullable": true }, "city": { "description": "City name", "type": "string", "example": "New York", "nullable": true }, "country": { "description": "Country name", "type": "string", "example": "United States", "nullable": true }, "latitude": { "description": "Latitude coordinate. We recommend providing a precision of four decimal places.", "example": "40.7128", "nullable": true, "oneOf": [ { "type": "string" }, { "type": "number" } ] }, "longitude": { "description": "Longitude coordinate. We recommend providing a precision of four decimal places.", "example": "74.0060", "nullable": true, "oneOf": [ { "type": "string" }, { "type": "number" } ] }, "region": { "description": "Region within a country, such as state or province", "type": "string", "example": "NY", "nullable": true }, "zip": { "description": "Zip code", "type": "string", "example": "10017", "nullable": true }, "timezone": { "description": "Time zone name. We recommend using time zones from the IANA Time Zone Database.", "type": "string", "example": "America/New_York", "nullable": true }, "ip": { "description": "IP Address", "type": "string", "example": "127.0.0.1", "nullable": true } } }, "ProfileMarketingConsentCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-marketing-consent" ] }, "consent": { "oneOf": [ { "$ref": "#/components/schemas/HasEmailMarketingConsent" }, { "$ref": "#/components/schemas/NoEmailMarketingConsent" }, { "$ref": "#/components/schemas/HasSMSMarketingConsent" }, { "$ref": "#/components/schemas/NoSMSMarketingConsent" }, { "$ref": "#/components/schemas/HasPushMarketingConsent" }, { "$ref": "#/components/schemas/NoPushMarketingConsent" } ] } }, "required": [ "type", "consent" ] }, "ProfileMetricFunnelSteps": { "type": "object", "properties": { "metric_exists": { "type": "boolean" }, "metric_id": { "type": "string" }, "metric_filters": { "type": "array", "items": { "$ref": "#/components/schemas/ProfileMetricPropertyFilter" }, "nullable": true } }, "required": [ "metric_exists", "metric_id" ] }, "ProfileMetricPropertyFilter": { "type": "object", "properties": { "property": { "type": "string" }, "filter": { "oneOf": [ { "$ref": "#/components/schemas/StringOperatorStringFilter" }, { "$ref": "#/components/schemas/StringArrayOperatorStringArrayFilter" }, { "$ref": "#/components/schemas/ExistenceOperatorExistenceFilter" }, { "$ref": "#/components/schemas/ListSetFilter" }, { "$ref": "#/components/schemas/ListLengthFilter" }, { "$ref": "#/components/schemas/ListSubstringFilter" }, { "$ref": "#/components/schemas/BooleanFilter" }, { "$ref": "#/components/schemas/NumericOperatorNumericFilter" } ] } }, "required": [ "property", "filter" ] }, "ProfileModificationMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "profile_modification" ] } }, "required": [ "field", "method" ] }, "ProfileNoGroupMembershipCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-group-membership" ] }, "is_member": { "type": "boolean", "enum": [ false ] }, "group_ids": { "type": "array", "items": { "type": "string" } } }, "required": [ "type", "is_member", "group_ids" ] }, "ProfilePermissionsCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-permissions" ] }, "permission": { "oneOf": [ { "$ref": "#/components/schemas/ExplicitlyReachable" }, { "$ref": "#/components/schemas/ImplicitlyReachable" }, { "$ref": "#/components/schemas/ImplicitlyOrExplicitlyReachable" }, { "$ref": "#/components/schemas/ExplicitlyUnreachable" }, { "$ref": "#/components/schemas/ImplicitlyUnreachable" }, { "$ref": "#/components/schemas/ImplicitlyOrExplicitlyUnreachable" } ] }, "channel": { "description": "Possible channels for profile permissions criterion.", "type": "string", "enum": [ "email_click_tracking", "email_open_tracking", "whatsapp_marketing", "whatsapp_transactional" ] } }, "required": [ "type", "permission", "channel" ] }, "ProfilePostalCodeDistanceCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-postal-code-distance" ] }, "country_code": { "type": "string" }, "postal_code": { "type": "string" }, "unit": { "description": "Units for profile postal code distance conditions.", "type": "string", "enum": [ "kilometers", "miles" ] }, "filter": { "oneOf": [ { "$ref": "#/components/schemas/GreaterThanPositiveNumericFilter" }, { "$ref": "#/components/schemas/LessThanPositiveNumericFilter" } ] } }, "required": [ "type", "country_code", "postal_code", "unit", "filter" ] }, "ProfilePredictiveAnalyticsChannelAffinityPriorityCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-predictive-analytics" ] }, "dimension": { "description": "Possible dimension for channel affinity criterion.", "type": "string", "enum": [ "channel_affinity" ] }, "measurement": { "type": "string", "enum": [ "priority" ] }, "predicted_channel": { "description": "Possible channels in a channel affinity definition.", "type": "string", "enum": [ "email", "push", "sms", "whatsapp" ] }, "filter": { "$ref": "#/components/schemas/ProfilePredictiveAnalyticsChannelAffinityPriorityFilter" } }, "required": [ "type", "dimension", "measurement", "predicted_channel", "filter" ] }, "ProfilePredictiveAnalyticsChannelAffinityPriorityFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "numeric" ] }, "operator": { "type": "string", "enum": [ "equals" ] }, "value": { "type": "integer" } }, "required": [ "type", "operator", "value" ] }, "ProfilePredictiveAnalyticsChannelAffinityRankCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-predictive-analytics" ] }, "dimension": { "description": "Possible dimension for channel affinity criterion.", "type": "string", "enum": [ "channel_affinity" ] }, "measurement": { "type": "string", "enum": [ "rank" ] }, "predicted_channel": { "description": "Possible channels in a channel affinity definition.", "type": "string", "enum": [ "email", "push", "sms", "whatsapp" ] }, "filter": { "$ref": "#/components/schemas/ProfilePredictiveAnalyticsChannelAffinityRankFilter" } }, "required": [ "type", "dimension", "measurement", "predicted_channel", "filter" ] }, "ProfilePredictiveAnalyticsChannelAffinityRankFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string" ] }, "operator": { "oneOf": [ { "enum": [ "equals" ], "type": "string" }, { "enum": [ "not-equals" ], "type": "string" } ] }, "value": { "description": "Possible rank values in a channel affinity definition.", "type": "string", "enum": [ "high", "low", "medium" ] } }, "required": [ "type", "operator", "value" ] }, "ProfilePredictiveAnalyticsDateCondition": { "type": "object", "properties": { "dimension": { "description": "Dimension for date profile predictive analytics conditions.", "type": "string", "enum": [ "expected_date_of_next_purchase" ] }, "filter": { "oneOf": [ { "$ref": "#/components/schemas/StaticDateFilter" }, { "$ref": "#/components/schemas/StaticDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateOperatorBaseRelativeDateFilter" }, { "$ref": "#/components/schemas/RelativeAnniversaryDateFilter" }, { "$ref": "#/components/schemas/RelativeDateRangeFilter" }, { "$ref": "#/components/schemas/CalendarDateFilter" }, { "$ref": "#/components/schemas/AnniversaryDateFilter" } ] }, "type": { "type": "string", "enum": [ "profile-predictive-analytics" ] } }, "required": [ "dimension", "filter", "type" ] }, "ProfilePredictiveAnalyticsNumericCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-predictive-analytics" ] }, "dimension": { "description": "Dimensions for numeric profile predictive analytics conditions.", "type": "string", "enum": [ "average_days_between_orders", "average_order_value", "churn_probability", "historic_clv", "historic_number_of_orders", "predicted_clv", "predicted_number_of_orders", "total_clv" ] }, "filter": { "$ref": "#/components/schemas/NumericOperatorNumericFilter" } }, "required": [ "type", "dimension", "filter" ] }, "ProfilePredictiveAnalyticsStringCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-predictive-analytics" ] }, "dimension": { "description": "Dimension for string profile predictive analytics conditions.", "type": "string", "enum": [ "predicted_gender" ] }, "filter": { "$ref": "#/components/schemas/ProfilePredictiveAnalyticsStringFilter" } }, "required": [ "type", "dimension", "filter" ] }, "ProfilePredictiveAnalyticsStringFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string" ] }, "operator": { "oneOf": [ { "enum": [ "equals" ], "type": "string" }, { "enum": [ "not-equals" ], "type": "string" } ] }, "value": { "description": "Values for profile predictive analytics gender conditions.", "type": "string", "enum": [ "likely_female", "likely_male", "uncertain" ] } }, "required": [ "type", "operator", "value" ] }, "ProfilePropertyCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-property" ] }, "property": { "description": "The profile property to check. Use one of the well-known property names (e.g. `email`, `first_name`) or, for custom profile properties, the form `properties['property name']`.", "type": "string", "example": "properties['Favorite Color']" }, "filter": { "oneOf": [ { "$ref": "#/components/schemas/StringOperatorStringFilter" }, { "$ref": "#/components/schemas/StringArrayOperatorStringArrayFilter" }, { "$ref": "#/components/schemas/StringPhoneOperatorStringArrayFilter" }, { "$ref": "#/components/schemas/NumericOperatorNumericFilter" }, { "$ref": "#/components/schemas/BooleanFilter" }, { "$ref": "#/components/schemas/StaticDateFilter" }, { "$ref": "#/components/schemas/StaticDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateOperatorBaseRelativeDateFilter" }, { "$ref": "#/components/schemas/RelativeAnniversaryDateFilter" }, { "$ref": "#/components/schemas/RelativeDateRangeFilter" }, { "$ref": "#/components/schemas/CalendarDateFilter" }, { "$ref": "#/components/schemas/AnniversaryDateFilter" }, { "$ref": "#/components/schemas/ListContainsOperatorListContainsFilter" }, { "$ref": "#/components/schemas/ListLengthFilter" }, { "$ref": "#/components/schemas/ExistenceOperatorExistenceFilter" } ] } }, "required": [ "type", "property", "filter" ] }, "ProfileRegionCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-region" ] }, "in_region": { "type": "boolean" }, "region": { "description": "Regions for profile region conditions.", "type": "string", "enum": [ "european_union", "united_states" ] } }, "required": [ "type", "in_region", "region" ] }, "ProvidedLandlineMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "provided_landline" ] } }, "required": [ "field", "method" ] }, "ProvidedNoAgeMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "provided_no_age" ] } }, "required": [ "field", "method" ] }, "PushChannel": { "type": "object", "properties": { "marketing": { "description": "The mobile push marketing subscription.", "$ref": "#/components/schemas/PushMarketing", "nullable": true } } }, "PushMarketing": { "type": "object", "properties": { "can_receive_push_marketing": { "description": "Whether or not this profile is subscribed to receive mobile push.", "type": "boolean" }, "consent": { "description": "The consent status for mobile push marketing.", "type": "string", "example": "SUBSCRIBED" }, "consent_timestamp": { "description": "The timestamp when the consent was last changed, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true } }, "required": [ "can_receive_push_marketing", "consent" ] }, "PushTokenEnum": { "type": "string", "enum": [ "push-token" ] }, "RecordedDateFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "recorded_date" ] }, "filter": { "oneOf": [ { "$ref": "#/components/schemas/StaticDateFilter" }, { "$ref": "#/components/schemas/StaticDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateOperatorBaseRelativeDateFilter" }, { "$ref": "#/components/schemas/RelativeAnniversaryDateFilter" }, { "$ref": "#/components/schemas/RelativeDateRangeFilter" }, { "$ref": "#/components/schemas/CalendarDateFilter" }, { "$ref": "#/components/schemas/AnniversaryDateFilter" } ] } }, "required": [ "field", "filter" ] }, "RelationshipLinks": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" }, "related": { "type": "string", "format": "uri" } }, "required": [ "self", "related" ] }, "RelativeAnniversaryDateFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "date" ] }, "operator": { "description": "Operators for relative date filters.\n\ne.g. \"anniversary in the last 10 days\"", "type": "string", "enum": [ "anniversary-last", "anniversary-next" ] }, "unit": { "description": "Units for relative date filters.", "type": "string", "enum": [ "day", "hour", "week" ] }, "quantity": { "type": "integer" } }, "required": [ "type", "operator", "unit", "quantity" ] }, "RelativeDateOperatorBaseRelativeDateFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "date" ] }, "operator": { "description": "Operators for relative date filters.\n\ne.g. \"in the last 10 days\"", "type": "string", "enum": [ "at-least", "in-the-last", "in-the-next" ] }, "unit": { "description": "Units for relative date filters.", "type": "string", "enum": [ "day", "hour", "week" ] }, "quantity": { "type": "integer" } }, "required": [ "type", "operator", "unit", "quantity" ] }, "RelativeDateRangeFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "date" ] }, "operator": { "description": "Operators for relative date range filters.\n\ne.g. \"between 10 and 20 days ago\"", "type": "string", "enum": [ "between" ] }, "start": { "type": "integer" }, "end": { "type": "integer" }, "unit": { "description": "Units for relative date filters.", "type": "string", "enum": [ "day", "hour", "week" ] } }, "required": [ "type", "operator", "start", "end", "unit" ] }, "ResponseMeta": { "description": "Response-level metadata", "type": "object", "properties": { "agent_hints": { "$ref": "#/components/schemas/AgentHints" } } }, "SMSChannel": { "type": "object", "properties": { "marketing": { "description": "The SMS marketing subscription.", "$ref": "#/components/schemas/SMSMarketing", "nullable": true }, "transactional": { "description": "The SMS transactional subscription.", "$ref": "#/components/schemas/SMSTransactional", "nullable": true } } }, "SMSMarketing": { "type": "object", "properties": { "can_receive_sms_marketing": { "description": "Whether or not this profile is subscribed to receive SMS marketing.", "type": "boolean" }, "consent": { "description": "The consent status for SMS marketing.", "type": "string", "example": "SUBSCRIBED" }, "consent_timestamp": { "description": "The timestamp when consent was recorded or updated for SMS marketing, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "method": { "description": "The method by which the profile was subscribed to SMS marketing.", "type": "string", "example": "TEXT", "nullable": true }, "method_detail": { "description": "Additional details about the method which the profile was subscribed to SMS marketing. This may be empty if no details were provided.", "type": "string", "example": "JOIN", "default": "", "nullable": true }, "last_updated": { "description": "The timestamp when the SMS consent record was last modified, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true } }, "required": [ "can_receive_sms_marketing", "consent" ] }, "SMSTransactional": { "type": "object", "properties": { "can_receive_sms_transactional": { "description": "Whether or not this profile is subscribed to receive transactional SMS.", "type": "boolean" }, "consent": { "description": "The consent status for SMS Transactional.", "type": "string", "example": "SUBSCRIBED" }, "consent_timestamp": { "description": "The timestamp when consent was recorded or updated for Transactional SMS messaging , in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "method": { "description": "The method by which the profile was subscribed to Transactional SMS messaging .", "type": "string", "example": "TEXT", "nullable": true }, "method_detail": { "description": "Additional details about the method which the profile was subscribed to Transactional SMS messaging. This may be empty if no details were provided.", "type": "string", "example": "JOIN", "default": "", "nullable": true }, "last_updated": { "description": "The timestamp when the SMS consent record was last modified, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true } }, "required": [ "can_receive_sms_transactional", "consent" ] }, "SegmentCreateQuery": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/SegmentCreateQueryResourceObject" } }, "required": [ "data" ] }, "SegmentCreateQueryResourceObject": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/SegmentEnum" }, "attributes": { "type": "object", "properties": { "name": { "type": "string" }, "definition": { "$ref": "#/components/schemas/SegmentDefinition" }, "is_starred": { "type": "boolean", "default": false, "nullable": true } }, "required": [ "name", "definition" ] } }, "required": [ "type", "attributes" ] }, "SegmentDefinition": { "type": "object", "properties": { "condition_groups": { "type": "array", "items": { "$ref": "#/components/schemas/ConditionGroup" } } }, "required": [ "condition_groups" ] }, "SegmentEnum": { "type": "string", "enum": [ "segment" ] }, "SegmentListResponseObjectResource": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/SegmentEnum" }, "id": { "type": "string" }, "attributes": { "type": "object", "properties": { "name": { "description": "A helpful name to label the segment", "type": "string", "example": "Repeat Purchasers", "nullable": true }, "definition": { "$ref": "#/components/schemas/SegmentDefinition", "nullable": true }, "created": { "description": "Date and time when the segment was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "updated": { "description": "Date and time when the segment was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "is_active": { "description": "Whether the segment is active. Inactive segments are not processed and their membership does not update.", "type": "boolean" }, "is_processing": { "type": "boolean" }, "is_starred": { "type": "boolean" } }, "required": [ "is_active", "is_processing", "is_starred" ] }, "relationships": { "type": "object", "properties": { "profiles": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/ProfileEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "tags": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/TagEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "flow-triggers": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/FlowEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } } } }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "type", "id", "attributes", "links" ] }, "SegmentMemberResponseObjectResource": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/ProfileEnum" }, "id": { "description": "Primary key that uniquely identifies this profile. Generated by Klaviyo.", "type": "string", "example": "01GDDKASAP8TKDDA2GRZDSVP4H", "nullable": true }, "attributes": { "type": "object", "properties": { "email": { "description": "Individual's email address", "type": "string", "example": "sarah.mason@klaviyo-demo.com", "nullable": true }, "phone_number": { "description": "Individual's phone number in E.164 format", "type": "string", "example": "+15005550006", "nullable": true }, "external_id": { "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.", "type": "string", "nullable": true }, "first_name": { "description": "Individual's first name", "type": "string", "example": "Sarah", "nullable": true }, "last_name": { "description": "Individual's last name", "type": "string", "example": "Mason", "nullable": true }, "organization": { "description": "Name of the company or organization within the company for whom the individual works", "type": "string", "example": "Example Corporation", "nullable": true }, "locale": { "description": "The locale of the profile, in the IETF BCP 47 language tag format like (ISO 639-1/2)-(ISO 3166 alpha-2)", "type": "string", "example": "en-US", "nullable": true }, "title": { "description": "Individual's job title", "type": "string", "example": "Regional Manager", "nullable": true }, "image": { "description": "URL pointing to the location of a profile image", "type": "string", "example": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg", "nullable": true }, "created": { "description": "Date and time when the profile was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "updated": { "description": "Date and time when the profile was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "last_event_date": { "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)", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "location": { "$ref": "#/components/schemas/ProfileLocation", "nullable": true }, "properties": { "description": "An object containing key/value pairs for any custom properties assigned to this profile", "type": "object", "example": { "pseudonym": "Dr. Octopus" }, "nullable": true }, "joined_group_at": { "description": "The datetime when this profile most recently joined the segment.", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00" } }, "required": [ "joined_group_at" ] }, "relationships": { "type": "object", "properties": { "lists": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/ListEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "segments": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/SegmentEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "push-tokens": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/PushTokenEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } } } }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "type", "attributes", "links" ] }, "SegmentPartialUpdateQuery": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/SegmentPartialUpdateQueryResourceObject" } }, "required": [ "data" ] }, "SegmentPartialUpdateQueryResourceObject": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/SegmentEnum" }, "id": { "type": "string" }, "attributes": { "type": "object", "properties": { "definition": { "$ref": "#/components/schemas/SegmentDefinition", "nullable": true }, "name": { "type": "string", "nullable": true }, "is_starred": { "type": "boolean", "nullable": true }, "is_active": { "description": "Set to false to deactivate the segment. When deactivating, this must be the only attribute in the request body. Deactivation cannot be combined with other updates. Marking a segment inactive will impact campaigns, flows, ad syncs, forms, helpdesk routing, and other features that reference this segment. Set to true to reactivate a deactivated segment.", "type": "boolean", "nullable": true } } } }, "required": [ "type", "id", "attributes" ] }, "SegmentRetrieveResponseObjectResource": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/SegmentEnum" }, "id": { "type": "string" }, "attributes": { "type": "object", "properties": { "name": { "description": "A helpful name to label the segment", "type": "string", "example": "Repeat Purchasers", "nullable": true }, "definition": { "$ref": "#/components/schemas/SegmentDefinition", "nullable": true }, "created": { "description": "Date and time when the segment was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "updated": { "description": "Date and time when the segment was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00", "nullable": true }, "is_active": { "description": "Whether the segment is active. Inactive segments are not processed and their membership does not update.", "type": "boolean" }, "is_processing": { "type": "boolean" }, "is_starred": { "type": "boolean" } }, "required": [ "is_active", "is_processing", "is_starred" ] }, "relationships": { "type": "object", "properties": { "profiles": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/ProfileEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "tags": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/TagEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "flow-triggers": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/FlowEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } } } }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "type", "id", "attributes", "links" ] }, "SegmentsProfileMetricCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-metric" ] }, "metric_id": { "type": "string" }, "measurement": { "description": "Measurements for profile metrics.", "type": "string", "enum": [ "count", "sum" ] }, "measurement_filter": { "$ref": "#/components/schemas/NumericOperatorNumericFilter" }, "timeframe_filter": { "oneOf": [ { "$ref": "#/components/schemas/StaticDateFilter" }, { "$ref": "#/components/schemas/StaticDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateOperatorBaseRelativeDateFilter" }, { "$ref": "#/components/schemas/RelativeAnniversaryDateFilter" }, { "$ref": "#/components/schemas/RelativeDateRangeFilter" }, { "$ref": "#/components/schemas/AlltimeDateFilter" } ] }, "metric_filters": { "type": "array", "items": { "$ref": "#/components/schemas/ProfileMetricPropertyFilter" }, "nullable": true } }, "required": [ "type", "metric_id", "measurement", "measurement_filter", "timeframe_filter" ] }, "SegmentsProfileMetricFunnelCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "profile-metric-funnel" ] }, "timeframe_filter": { "oneOf": [ { "$ref": "#/components/schemas/StaticDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateOperatorBaseRelativeDateFilter" } ] }, "completion_window_seconds": { "description": "Allowed completion window durations for funnel conditions (in\n seconds).", "type": "string", "enum": [ "DAYS_1", "DAYS_180", "DAYS_3", "DAYS_30", "DAYS_5", "DAYS_90", "HOURS_1", "WEEKS_1", "YEARS_1" ], "nullable": true }, "steps": { "type": "array", "items": { "$ref": "#/components/schemas/ProfileMetricFunnelSteps" } } }, "required": [ "type", "timeframe_filter", "steps" ] }, "SftpMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "sftp" ] } }, "required": [ "field", "method" ] }, "ShopifyIntegrationFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string" ] }, "operator": { "type": "string", "enum": [ "in" ] }, "value": { "type": "array", "items": { "enum": [ "shopify" ], "type": "string" } } }, "required": [ "type", "operator", "value" ] }, "ShopifyIntegrationMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "integration" ] }, "filter": { "$ref": "#/components/schemas/ShopifyIntegrationFilter" } }, "required": [ "field", "method", "filter" ] }, "SpamComplaintMethodFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "method" ] }, "method": { "type": "string", "enum": [ "spam_complaint" ] } }, "required": [ "field", "method" ] }, "StaticDateFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "date" ] }, "operator": { "description": "Operators for static date filters.\n\nE.g. \"before 2023-01-01\"", "type": "string", "enum": [ "after", "before" ] }, "date": { "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00" } }, "required": [ "type", "operator", "date" ] }, "StaticDateRangeFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "date" ] }, "operator": { "description": "Operators for static date range filters.\n\nE.g. \"between 2023-01-01 and 2023-02-01\"", "type": "string", "enum": [ "between-static" ] }, "start": { "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00" }, "end": { "type": "string", "format": "date-time", "example": "2022-11-08T00:00:00+00:00" } }, "required": [ "type", "operator", "start", "end" ] }, "StatusDateFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "status_date" ] }, "filter": { "oneOf": [ { "$ref": "#/components/schemas/StaticDateFilter" }, { "$ref": "#/components/schemas/StaticDateRangeFilter" }, { "$ref": "#/components/schemas/RelativeDateOperatorBaseRelativeDateFilter" }, { "$ref": "#/components/schemas/RelativeAnniversaryDateFilter" }, { "$ref": "#/components/schemas/RelativeDateRangeFilter" }, { "$ref": "#/components/schemas/CalendarDateFilter" }, { "$ref": "#/components/schemas/AnniversaryDateFilter" } ] } }, "required": [ "field", "filter" ] }, "StringArrayOperatorStringArrayFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string" ] }, "operator": { "description": "Operators for string-in-array filters.", "type": "string", "enum": [ "in", "not-in" ] }, "value": { "type": "array", "items": { "type": "string" } } }, "required": [ "type", "operator", "value" ] }, "StringOperatorStringFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string" ] }, "operator": { "description": "Operators for string filters.", "type": "string", "enum": [ "contains", "ends-with", "equals", "not-contains", "not-ends-with", "not-equals", "not-starts-with", "nregex", "regex", "starts-with" ] }, "value": { "type": "string", "nullable": true } }, "required": [ "type", "operator", "value" ] }, "StringPhoneOperatorStringArrayFilter": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "string" ] }, "operator": { "description": "Operators for phone string array filters.\n\nExample condition using this filter:\n {\n \"type\": \"profile-property\",\n \"field\": \"phone\",\n \"filter\": {\n \"type\": \"string\",\n \"operator\": \"phone-country-code-in\",\n \"value\": [\"US\", \"GB\"]\n }\n }", "type": "string", "enum": [ "phone-country-code-in", "phone-country-code-not-in" ] }, "value": { "type": "array", "items": { "type": "string" } } }, "required": [ "type", "operator", "value" ] }, "SubscribedSMSIsRcsCapableFilter": { "type": "object", "properties": { "field": { "type": "string", "enum": [ "is_rcs_capable" ] }, "filter": { "$ref": "#/components/schemas/BooleanFilter" } }, "required": [ "field", "filter" ] }, "Subscriptions": { "type": "object", "properties": { "email": { "description": "The email channel subscription.", "$ref": "#/components/schemas/EmailChannel", "nullable": true }, "sms": { "description": "The SMS channel subscription.", "$ref": "#/components/schemas/SMSChannel", "nullable": true }, "mobile_push": { "description": "The mobile push channel subscription.", "$ref": "#/components/schemas/PushChannel", "nullable": true }, "whatsapp": { "description": "The whatsapp channel subscription.", "$ref": "#/components/schemas/WhatsappChannel", "nullable": true } } }, "TagEnum": { "type": "string", "enum": [ "tag" ] }, "TagGroupEnum": { "type": "string", "enum": [ "tag-group" ] }, "TagResponseObjectResource": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/TagEnum" }, "id": { "description": "The Tag ID", "type": "string", "example": "abcd1234-ef56-gh78-ij90-abcdef123456" }, "attributes": { "type": "object", "properties": { "name": { "description": "The Tag name", "type": "string", "example": "My Tag" } }, "required": [ "name" ] }, "relationships": { "type": "object", "properties": { "tag-group": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/TagGroupEnum" }, "id": { "type": "string" } }, "required": [ "type", "id" ] }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "lists": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/ListEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "segments": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/SegmentEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "campaigns": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/CampaignEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } }, "flows": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "$ref": "#/components/schemas/FlowEnum" }, "id": { "type": "string" } } } }, "links": { "$ref": "#/components/schemas/RelationshipLinks" } } } } }, "links": { "$ref": "#/components/schemas/ObjectLinks" } }, "required": [ "type", "id", "attributes", "links" ] }, "WhatsappChannel": { "type": "object", "properties": { "marketing": { "description": "The Whatsapp marketing subscription.", "$ref": "#/components/schemas/WhatsappMarketingChannel", "nullable": true }, "transactional": { "description": "The Whatsapp transactional subscription.", "$ref": "#/components/schemas/WhatsappTransactionalChannel", "nullable": true }, "conversational": { "description": "The Whatsapp conversational subscription.", "$ref": "#/components/schemas/WhatsappConversationalChannel", "nullable": true } } }, "WhatsappConversationalChannel": { "type": "object", "properties": { "consent": { "description": "The consent status for the channel.", "type": "string", "example": "SUBSCRIBED" }, "consent_timestamp": { "description": "The timestamp when consent was recorded or updated for the channel, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "last_updated": { "description": "The timestamp when the channel was last modified, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "created_timestamp": { "description": "The timestamp when the channel was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "metadata": { "description": "Channel-specific metadata containing additional information about the permission.", "type": "object", "nullable": true }, "can_receive": { "description": "Whether the profile can receive messages on this channel.", "type": "boolean" }, "valid_until": { "description": "Optional expiration date for the permission, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2024-02-21T20:07:38+00:00", "nullable": true }, "phone_number": { "description": "Phone number to which the consent was granted for.", "type": "string", "nullable": true } }, "required": [ "consent", "can_receive" ] }, "WhatsappMarketingChannel": { "type": "object", "properties": { "consent": { "description": "The consent status for the channel.", "type": "string", "example": "SUBSCRIBED" }, "consent_timestamp": { "description": "The timestamp when consent was recorded or updated for the channel, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "last_updated": { "description": "The timestamp when the channel was last modified, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "created_timestamp": { "description": "The timestamp when the channel was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "metadata": { "description": "Channel-specific metadata containing additional information about the permission.", "type": "object", "nullable": true }, "can_receive": { "description": "Whether the profile can receive messages on this channel.", "type": "boolean" }, "valid_until": { "description": "Optional expiration date for the permission, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2024-02-21T20:07:38+00:00", "nullable": true }, "phone_number": { "description": "Phone number to which the consent was granted for.", "type": "string", "nullable": true } }, "required": [ "consent", "can_receive" ] }, "WhatsappTransactionalChannel": { "type": "object", "properties": { "consent": { "description": "The consent status for the channel.", "type": "string", "example": "SUBSCRIBED" }, "consent_timestamp": { "description": "The timestamp when consent was recorded or updated for the channel, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "last_updated": { "description": "The timestamp when the channel was last modified, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "created_timestamp": { "description": "The timestamp when the channel was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2023-02-21T20:07:38+00:00", "nullable": true }, "metadata": { "description": "Channel-specific metadata containing additional information about the permission.", "type": "object", "nullable": true }, "can_receive": { "description": "Whether the profile can receive messages on this channel.", "type": "boolean" }, "valid_until": { "description": "Optional expiration date for the permission, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).", "type": "string", "format": "date-time", "example": "2024-02-21T20:07:38+00:00", "nullable": true }, "phone_number": { "description": "Phone number to which the consent was granted for.", "type": "string", "nullable": true } }, "required": [ "consent", "can_receive" ] } }, "securitySchemes": { "Klaviyo-API-Key": { "type": "apiKey", "in": "header", "name": "Authorization", "description": "Private key authentication for /api/ endpoints is performed by setting the `Authorization` header to `Klaviyo-API-Key your-private-api-key`
For more information please visit https://developers.klaviyo.com/en/v2026-07-15/reference/api-overview#authentication", "x-default": "Klaviyo-API-Key your-private-api-key" } } }, "tags": [ { "name": "Segments", "description": "segments" } ] }