Skip to main content
Glama

update_flow_status

Change the status of a Klaviyo marketing automation flow to draft, manual, or live to control campaign execution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the flow to update
statusYesNew status for the flow

Implementation Reference

  • Handler function that updates the flow status by sending a PATCH request to Klaviyo API with the new status.
    async (params) => { try { const payload = { data: { type: "flow", id: params.id, attributes: { status: params.status } } }; const result = await klaviyoClient.patch(`/flows/${params.id}/`, payload); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error updating flow status: ${error.message}` }], isError: true }; }
  • Zod schema defining input parameters: flow ID and status (draft, manual, live).
    { id: z.string().describe("ID of the flow to update"), status: z.enum(["draft", "manual", "live"]).describe("New status for the flow") },
  • Registration of the 'update_flow_status' tool using server.tool, including schema, handler, and description.
    server.tool( "update_flow_status", { id: z.string().describe("ID of the flow to update"), status: z.enum(["draft", "manual", "live"]).describe("New status for the flow") }, async (params) => { try { const payload = { data: { type: "flow", id: params.id, attributes: { status: params.status } } }; const result = await klaviyoClient.patch(`/flows/${params.id}/`, payload); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error updating flow status: ${error.message}` }], isError: true }; } }, { description: "Update the status of a flow in Klaviyo" } );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ivan-rivera-projects/Klaviyo-MCP-Server-Enhanced'

If you have feedback or need assistance with the MCP directory API, please join our Discord server