Retrieve a flow's draft
import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const flowDraft = await mv.flows.retrieveDraft("flow_7Hk2Lm9Qp");console.log(flowDraft);from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
flow_draft = client.flows.retrieve_draft("flow_7Hk2Lm9Qp")print(flow_draft)curl https://api.morevoice.ai/v1/flows/flow_7Hk2Lm9Qp/draft \ -H "Authorization: Bearer $MOREVOICE_API_KEY"The editable graph and its revision (rev: send it back as base_rev).
Try it in the API playground with a test-mode key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A flow ID (flow_…).
Header Parameters
Section titled “Header Parameters”The API version to use for this request. Defaults to the version the API key is pinned to.
Example
2026-11-01Responses
Section titled “Responses”OK
A flow’s editable draft.
object
A flow ID (prefix flow_).
A flow’s graph: nodes (v1 node schema) wired by their transitions’ next, variables and settings.
object
A flow node (v1 node schema): type and its settings under the property of the same name.
object
Type ai_agent: A free conversation step with a goal: the AI talks until a transition matches.
object
The assistant’s tools usable in this step (by name).
Variables the AI gathers in this step.
object
Answer from these knowledge-base documents.
object
Type api: Call an HTTP API during the call; map the response to variables.
object
How the request authenticates. Reference credentials as {{secrets.NAME}} rather than in clear.
object
Api_key / hmac (required): the header name.
Basic (required).
Hmac (required): the signing secret.
Bearer (required).
Basic (required).
Api_key (required).
The body template ({{templates}} JSON-escaped when body_type is json).
object
object
Response fields → variables.
object
E.g. data.items[0].name
The URL ({{templates}} allowed).
Said while waiting.
Type decision: Branch by rules on variables (no AI).
object
Type dtmf_menu: A keypad menu.
object
Callers may say the option instead of pressing it.
A audio asset ID (prefix aud_).
object
Also the spoken choice.
Type end: End the call.
object
Makes the node reachable from anywhere in the call when its condition matches.
object
Return: back to where the caller was; stay: continue here; goto: follow this node’s transitions.
Intent, keyword or dtmf.
object
No_response (required): seconds of silence.
Intent (required): what the caller means.
Dtmf (required): keypad digits — 1, *, # or a range 1-3.
Intent: example phrasings.
Intent: the AI decides what the caller means · keyword · variable rules (no AI) · dtmf keys · always (right after the node) · no_response · outcome of an action · else (the fallback, last).
Keyword: any (default) or all of the phrases.
Variable (required): all or any of the rules.
Outcome (required): the result of an action or collect node.
Keyword (required): phrases the caller says; a trailing * matches a prefix.
No_response: in a row (default 1).
Higher wins when several global nodes match.
Where in the call the trigger listens.
object
Only / except: the nodes it applies to (or not).
Type hours: Branch on opening hours: open, closed or holiday.
object
Extra closed days, YYYY-MM-DD.
Closed on Israeli holidays (the holiday outcome).
Exceptional open days, YYYY-MM-DD.
Closed on Shabbat (Israel).
IANA time zone (default: the flow’s).
object
0 = Sunday … 6 = Saturday.
HH:MM
HH:MM
Type integration: Run a connected CRM or calendar action during the call (look the caller up, add a note, create a task): success, not found or error.
object
The action, e.g. crm.lookup_contact, crm.add_note, crm.create_task.
The action’s arguments by name ({{templates}} allowed).
object
The connected integration account (Settings › Integrations). Integration connections have no API object (and no public ID prefix) yet: the id is the dashboard’s.
Result fields → variables (e.g. contacts[0].name → customer_name).
object
E.g. data.items[0].name
Said while the action runs.
Type internal: a node of a type outside the v1 schema (SMS, e-mail, voicemail, callbacks, agent-script steps…). Read-only: when you write the draft, the stored node is kept; only its transitions’ next may change.
object
The node as stored. Read-only: send it back unchanged.
object
The internal node type (not part of the v1 schema).
Type kb_answer: Answer from the knowledge base.
object
Empty: the whole knowledge base.
The node’s key: your stable identifier, unique in the graph.
The node’s place on the editor canvas.
object
Type post_api: Call an HTTP API after the call.
object
How the request authenticates. Reference credentials as {{secrets.NAME}} rather than in clear.
object
Api_key / hmac (required): the header name.
Basic (required).
Hmac (required): the signing secret.
Bearer (required).
Basic (required).
Api_key (required).
The body template ({{templates}} JSON-escaped when body_type is json).
object
object
Response fields → variables.
object
E.g. data.items[0].name
The URL ({{templates}} allowed).
Said while waiting.
Type post_integration: Run a connected CRM action after the call (add a note, create a follow-up task).
object
The action, e.g. crm.lookup_contact, crm.add_note, crm.create_task.
The action’s arguments by name ({{templates}} allowed).
object
The connected integration account (Settings › Integrations). Integration connections have no API object (and no public ID prefix) yet: the id is the dashboard’s.
Result fields → variables (e.g. contacts[0].name → customer_name).
object
E.g. data.items[0].name
Type question: Ask for one detail, validate it and store it in a variable.
object
A audio asset ID (prefix aud_).
Read the answer back for confirmation.
Accept the answer on the keypad too.
object
object
The variable the answer is stored in.
Type say: Say an exact line, or one the AI rephrases.
object
An uploaded prompt played instead of speech.
Type set_variable: Set variables.
object
object
A literal or a {{template}}.
Type start: Where every call begins: the greeting.
object
Type transfer: Transfer the call to a queue, a number, another flow or a SIP address.
object
A assistant ID (prefix asst_).
A phone number, or a SIP URI for mode sip.
A flow ID (prefix flow_).
A queue ID (prefix q_).
Warm transfer: whisper an AI summary to the receiving side first.
A node output: when its condition matches, the call moves to next.
object
When a transition is taken: kind and that kind’s fields.
object
No_response (required): seconds of silence.
Intent (required): what the caller means.
Dtmf (required): keypad digits — 1, *, # or a range 1-3.
Intent: example phrasings.
Intent: the AI decides what the caller means · keyword · variable rules (no AI) · dtmf keys · always (right after the node) · no_response · outcome of an action · else (the fallback, last).
Keyword: any (default) or all of the phrases.
Variable (required): all or any of the rules.
Outcome (required): the result of an action or collect node.
Keyword (required): phrases the caller says; a trailing * matches a prefix.
No_response: in a row (default 1).
The transition’s key (an output port), unique in the node.
The node type. Its settings are under the property of the same name (type: "say" → say: {…}).
The node schema version (1).
object
Persona and global instructions, combined with the assistant’s prompt.
object
Off: keypad only; keywords: spoken choices matched to the options; smart: keywords, then an AI routing check.
object
Inline: the reply decides the transition; classifier: a separate fast check.
object
A sample value for simulations and tests.
Redacted in logs, metrics and analytics.
Where its value comes from: the contact, a pre-call API, collected in the call, an API, set by a node, the system, or extracted after the call.
true in live mode, false in test mode.
Send as base_rev on the next write.
An ISO-8601 timestamp in UTC.
Example
{ "flow_id": "flow_7Kp1Ns4Vy6Ab9Dg2Hj5Lm8", "graph": { "kind": "voice", "nodes": [ { "disabled": false, "global": null, "key": "start", "position": { "x": 0, "y": 0 }, "start": { "first_message_mode": "speak", "greeting": "Hello, you've reached Acme.", "interruptible": true }, "title": "Start", "transitions": [ { "condition": { "kind": "always" }, "key": "t_next", "label": "Next", "next": "ask_id" } ], "type": "start" }, { "disabled": false, "global": null, "key": "ask_id", "position": { "x": 320, "y": 0 }, "question": { "confirm": true, "max_retries": 2, "prompt": "What is your ID number?", "reask_prompts": [], "var": "customer_id" }, "title": "Ask for the ID", "transitions": [ { "condition": { "kind": "outcome", "outcome": "collected" }, "key": "t_ok", "label": "Collected", "next": "bye" }, { "condition": { "kind": "outcome", "outcome": "max_retries" }, "key": "t_fail", "label": "Couldn't collect", "next": "bye" } ], "type": "question" }, { "disabled": false, "end": { "message": "Thank you, goodbye." }, "global": null, "key": "bye", "position": { "x": 640, "y": 0 }, "title": "Goodbye", "transitions": [], "type": "end" } ], "schema_version": 1, "settings": { "classifier_model": null, "fallback_node_key": null, "global_prompt": "You are Acme's friendly receptionist.", "ivr": null, "language": "en", "max_chain_steps": 25, "max_transitions": 200, "max_turns_per_node": 8, "max_visits_per_node": 5, "on_pre_call_fail": "continue", "pre_call_timeout_ms": 2500, "style_field": "auto", "transition_model": "inline" }, "variables": [ { "key": "customer_id", "label": "Customer ID", "source": "collected", "type": "text" } ] }, "livemode": true, "object": "flow_draft", "rev": 17, "updated": "2026-11-03T09:14:22.000Z"}The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "parameter_missing", "doc_url": "https://docs.morevoice.ai/api/errors#parameter-missing", "message": "Missing required parameter: to.", "param": "to", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "invalid_request_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
No valid API key was sent.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "invalid_api_key", "doc_url": "https://docs.morevoice.ai/api/errors#invalid-api-key", "message": "Invalid API key.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "authentication_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
The key may not do this (a missing scope, a plan limit, or a compliance block).
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "missing_scope", "doc_url": "https://docs.morevoice.ai/api/errors#missing-scope", "message": "This API key lacks the calls:write scope.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "permission_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
No object with this ID exists in this organisation and mode.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "resource_missing", "doc_url": "https://docs.morevoice.ai/api/errors#resource-missing", "message": "No such object: 'call_4Gk2'.", "param": "id", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "not_found" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
Too many requests, or no call capacity right now. Retry after the Retry-After delay.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "rate_limited", "doc_url": "https://docs.morevoice.ai/api/errors#rate-limited", "message": "Too many requests. Retry after 1 second.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "rate_limit_error" }}Headers
Section titled “Headers”Seconds to wait before retrying.
The request’s ID (req_…). Quote it when you contact support.
Something went wrong on MoreVoice’s side. Retry with the same Idempotency-Key.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "internal_error", "doc_url": "https://docs.morevoice.ai/api/errors#internal-error", "message": "Something went wrong on MoreVoice's side.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "api_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.