Clone a flow
Copies the current saved flow into a new flow in the same team at resource revision 1. Copies the graph, start agent, description, and after-call configuration. Member agents and shared after-call resources retain their IDs. The clone starts without phone assignments or call history. Requires flows:create and flows:read.
bearerAuthAuthorizationBearer <token>Use a Voice API key or connected-app OAuth access token. Authentication.
id*stringSource flow UUID.
uuidIdempotency-Key*stringRequired. Reuse the same key to retry this write safely. Retries and idempotency.
^[A-Za-z0-9!#$%&'*+.^_`|~-]+$1 <= length <= 255If-Match?stringOptional strong ETag (or *) from a prior response. A stale tag returns 412 without changing the resource.
application/json- body
name*stringDisplay name for the copy.
1 <= length <= 200slug?stringUnique routing identifier for the copy. Derived from the name when omitted.
^[a-z0-9]+(?:-[a-z0-9]+)*$2 <= length <= 64The new flow.
application/json- response
A named graph of existing agents joined by agent-to-agent handoffs. The same representation is returned for a single flow and for each element of a list page. A flow owns the graph, the start agent and an after-call override; prompt, model and voice configuration stays on each member agent's own version. Flows are not versioned — resource_version feeds the strong ETag that PATCH's If-Match is checked against.
id*stringuuidorg_id*stringuuidslug*string^[a-z0-9]+(?:-[a-z0-9]+)*$2 <= length <= 64name*string1 <= length <= 200description?stringAbsent when no description is set.
length <= 2000start_agent_id?stringThe agent that ANSWERS a call routed at this flow; the graph's edges take over from there. Must be one of the agents on the canvas. Absent when the flow has no start agent yet, in which case the flow cannot be targeted by a number, a job or a call.
uuidgraph*The flow canvas — the agents on it and the handoffs between them.
agent_count*integerDerived count of graph.nodes, so a list page can show each flow's shape.
0 <= valuehandoff_count*integerDerived count of graph.edges.
0 <= valuesummary_enabled*booleanAfter-call override. These four fields REPLACE every member agent's own after-call configuration for calls that run inside the flow.
summary_prompt?stringAbsent when no override prompt is set.
length <= 50000extraction_object_ids*array<>items <= 100webhook_config_ids*array<>items <= 100resource_version*integerMonotonic row version maintained by the database, never by the handler. It is the value behind the strong ETag.
int640 <= valuearchived_at?stringAbsent unless the flow has been archived.
date-timecreated_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api.kejue.co/v1/flows/497f6eca-6276-4993-bfeb-53cbbbba6f08/clone' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "name": "Billing_clone", "slug": "billing-clone"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "slug": "string", "name": "string", "description": "string", "start_agent_id": "867cfc4d-88ad-4208-a6ae-feca15061904", "graph": { "nodes": [ { "id": "string", "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978", "x": 0, "y": 0, "agent_slug": "string", "agent_name": "string" } ], "edges": [ { "id": "string", "source": "string", "target": "string", "label": "string", "condition": "string" } ] }, "agent_count": 0, "handoff_count": 0, "summary_enabled": true, "summary_prompt": "string", "extraction_object_ids": [ "cd42e880-fa3c-4a25-8b4c-6cf3646646b0" ], "webhook_config_ids": [ "b40731a3-5fdb-4318-998b-c6770a21278f" ], "resource_version": 0, "archived_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}