Generate Customer Agent Response
POSThttps://a.klaviyo.com/api/customer-agent-responses
Sends one or more messages to Customer Agent and returns every public event it emits in response, including structured data such as orders and products.
Multiple messages can be attached, if the user has sent multiple or another agent's response should be included. The response is non-streaming; the entire event list is returned at once.
Requires an open conversation, created via POST /api/customer-agent-conversations. Conversations can only be interacted with that were created via the API. A closed or unknown conversation is also rejected.
- Revision header
revision: 2026-07-15.prerequired- Scopes
agents:write- Rate limits
- Burst:
10/sSteady:150/m
Query parameters
For more information please visit API overview
Headers
API endpoint revision (format: YYYY-MM-DD[.suffix])
2026-07-15.pre
Request body
Content type: application/vnd.api+jsonrequired
Show 3 fields
Show 3 fields
Whether the response is for testing or a real shopper interaction.
previewresponses are not billed and are excluded from production conversations and metrics.liveresponses count toward billing, Customer Agent conversations, and production metrics.Channel whose response conventions the agent should use, such as SMS terseness, email greetings and sign-offs, or web-chat formatting. This does not route or send the response through that channel; the caller delivers the output. Optional; defaults to
web-chat.Conversation history for this turn. The final message must have
role: user.
Show 1 field
Show 1 field
Responses
201Success
Content type: application/vnd.api+json
Show 5 fields
Opaque identifier for this Customer Agent response.
Show 1 field
Events from this turn, in the order they were emitted. Alongside message and handoff events, can include structured data:
order-tracking,edit-order,order-return,product,subscriptions,discounts-coupons, andloyalty-card. Ignore event types you don't recognize.Option 3:
CustomerAgentResponseRequireAuthenticationEventOption 5:
CustomerAgentResponseOrderTrackingEventOrders being tracked.
Show 6 fields
Order ID.
Order name shown to the customer, e.g.
#1001.Order status, e.g.
PLACED,IN_TRANSIT,DELIVERED.Number of items in the order.
Image URL of the order's first item.
Channel the order was placed through, e.g.
web,pos.
Option 8:
CustomerAgentResponseProductEventThe recommended product.
Show 7 fields
Product ID.
Product name.
Product page URL.
Featured image URL.
Variant ID, if a variant applies.
ID of the recommendation request that returned this product.
Recommendation provider, e.g.
shopify.
Option 9:
CustomerAgentResponseSubscriptionsEventSubscriptions.
Show 5 fields
Subscription ID.
Subscription status, e.g.
active,paused,cancelled.Date of the next charge and shipment.
Billing interval:
day,week, ormonth.Products in the subscription.
Option 10:
CustomerAgentResponseDiscountsCouponsEventAvailable discount codes.
Show 12 fields
Coupon ID.
Integration that issued the coupon, e.g.
shopify.Discount code to enter at checkout.
Coupon name.
Coupon status, e.g.
active.Numeric code for
status.Coupon description.
Discount value.
Numeric discount type code.
Minimum purchase amount.
Start of the validity period.
Expiration time.
Option 11:
CustomerAgentResponseLoyaltyCardEventPoints balance and rewards.
Show 9 fields
Current points balance.
Most valuable reward the customer can redeem now.
Points cost of
best_reward_name.Least expensive reward the customer can't redeem yet.
Points cost of
next_reward_name.Points still needed for
next_reward_name.Progress toward
next_reward_name, from0.0to1.0.Rewards the customer can redeem now.
Loyalty program page URL.
Show 1 field
4XXClient Error
Content type: application/vnd.api+json
5XXServer Error
Content type: application/vnd.api+json