Voiceflow bearer token
curl --request POST \
--url https://realtime-api.voiceflow.com/v2/stable/workflow/<workflowID>/block \
--header 'Authorization: Bearer <token>'
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"color": "<string>",
"placement": {
"afterBlockID": "<string>"
},
"from": {
"stepID": "<string>",
"port": "<string>"
},
"steps": [
{
"kind": "message",
"key": "<StableWorkflowSeedKey>",
"content": "<StableWorkflowStepMessageContentInput>",
"links": {}
}
]
}'const response = await fetch('https://realtime-api.voiceflow.com/v2/stable/workflow/<workflowID>/block?projectID=<projectID>&environmentAlias=<environmentAlias>', {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "<string>",
"color": "<string>",
"placement": {
"afterBlockID": "<string>"
},
"from": {
"stepID": "<string>",
"port": "<string>"
},
"steps": [
{
"kind": "message",
"key": "<StableWorkflowSeedKey>",
"content": "<StableWorkflowStepMessageContentInput>",
"links": {}
}
]
}),
});
const data = await response.json();import requests
response = requests.post(
'https://realtime-api.voiceflow.com/v2/stable/workflow/<workflowID>/block?projectID=<projectID>&environmentAlias=<environmentAlias>',
headers={'Authorization': 'Bearer <token>'},
json={
"name": "<string>",
"color": "<string>",
"placement": {
"afterBlockID": "<string>"
},
"from": {
"stepID": "<string>",
"port": "<string>"
},
"steps": [
{
"kind": "message",
"key": "<StableWorkflowSeedKey>",
"content": "<StableWorkflowStepMessageContentInput>",
"links": {}
}
]
},
)
data = response.json()vf workflow create-block --workflow-id <workflowID> --project-id <projectID> --environment-alias <environmentAlias> \
< body.json{
"message": "<string>",
"block": {
"id": "<string>",
"name": "<string>",
"inboundFrom": [
{
"stepID": "<string>",
"port": "<string>"
}
],
"steps": [
{
"id": "<string>",
"kind": "<StableWorkflowStepKind>",
"exitClass": "<StableWorkflowExitClass>",
"content": "<StableWorkflowStepContent>",
"fallsThroughTo": "<string>",
"suppressedPorts": [
"<string>"
],
"links": [
"<StableWorkflowLink>"
],
"reconciledPorts": "<StableWorkflowReconciledPorts>",
"warnings": [
"<StableWorkflowDiagnostic>"
]
}
]
},
"ids": {},
"unresolvedReferences": [
{
"path": "<string>",
"token": "<string>",
"reason": "unknown"
}
],
"replacedLink": {
"stepID": "<string>",
"port": "<string>",
"to": "<string>"
}
}Adds a block of 1 to 20 steps to an existing workflow, placed next to `placement.afterBlockID`. When you send `from`, the call also links that port to the new block and replaces the block that port led to. If other edits keep changing the workflow while the call saves, it returns 409 and writes nothing.
curl --request POST \
--url https://realtime-api.voiceflow.com/v2/stable/workflow/<workflowID>/block \
--header 'Authorization: Bearer <token>'
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"color": "<string>",
"placement": {
"afterBlockID": "<string>"
},
"from": {
"stepID": "<string>",
"port": "<string>"
},
"steps": [
{
"kind": "message",
"key": "<StableWorkflowSeedKey>",
"content": "<StableWorkflowStepMessageContentInput>",
"links": {}
}
]
}'const response = await fetch('https://realtime-api.voiceflow.com/v2/stable/workflow/<workflowID>/block?projectID=<projectID>&environmentAlias=<environmentAlias>', {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "<string>",
"color": "<string>",
"placement": {
"afterBlockID": "<string>"
},
"from": {
"stepID": "<string>",
"port": "<string>"
},
"steps": [
{
"kind": "message",
"key": "<StableWorkflowSeedKey>",
"content": "<StableWorkflowStepMessageContentInput>",
"links": {}
}
]
}),
});
const data = await response.json();import requests
response = requests.post(
'https://realtime-api.voiceflow.com/v2/stable/workflow/<workflowID>/block?projectID=<projectID>&environmentAlias=<environmentAlias>',
headers={'Authorization': 'Bearer <token>'},
json={
"name": "<string>",
"color": "<string>",
"placement": {
"afterBlockID": "<string>"
},
"from": {
"stepID": "<string>",
"port": "<string>"
},
"steps": [
{
"kind": "message",
"key": "<StableWorkflowSeedKey>",
"content": "<StableWorkflowStepMessageContentInput>",
"links": {}
}
]
},
)
data = response.json()vf workflow create-block --workflow-id <workflowID> --project-id <projectID> --environment-alias <environmentAlias> \
< body.json{
"message": "<string>",
"block": {
"id": "<string>",
"name": "<string>",
"inboundFrom": [
{
"stepID": "<string>",
"port": "<string>"
}
],
"steps": [
{
"id": "<string>",
"kind": "<StableWorkflowStepKind>",
"exitClass": "<StableWorkflowExitClass>",
"content": "<StableWorkflowStepContent>",
"fallsThroughTo": "<string>",
"suppressedPorts": [
"<string>"
],
"links": [
"<StableWorkflowLink>"
],
"reconciledPorts": "<StableWorkflowReconciledPorts>",
"warnings": [
"<StableWorkflowDiagnostic>"
]
}
]
},
"ids": {},
"unresolvedReferences": [
{
"path": "<string>",
"token": "<string>",
"reason": "unknown"
}
],
"replacedLink": {
"stepID": "<string>",
"port": "<string>",
"to": "<string>"
}
}Authorizations
Query Parameters
Body
Show child attributes
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Show child attributes
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Show child attributes
Show child attributes
Plain text; markdown is not interpreted. {variable_name} inserts a variable or entity, {variable_name.path} a field of a variable. Escape a literal { or \ with a backslash. A name matching neither is stored as literal text and reported in unresolvedReferences; secrets are not available here.
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Show child attributes
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Show child attributes
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Show child attributes
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Show child attributes
Call forward works only in a phone project. In a chat project, do not add it as a step or an action: tell the user it needs a phone project.
Show child attributes
Plain text; markdown is not interpreted. {variable_name} inserts a variable or entity, {variable_name.path} a field of a variable. Escape a literal { or \ with a backslash. A name matching neither is stored as literal text and reported in unresolvedReferences; secrets are not available here.
Ports to link, keyed by port: next, else, fail, no-reply, conversation-turn, or a function or playbook path ID. In create, values are block keys from this request; in add_blocks, block keys from this request or existing block IDs; everywhere else, existing block IDs. A branch you create links through its own to.
Response
201 - application/jsonReturns a message, the new block with its steps, a map from each key you sent to the ID the server created, and any unresolved references. When a link was replaced, replacedLink names the block the port led to before.
Show child attributes
The steps in the order they run.
Show child attributes
What the step does. api, function, integration and mcp are Tool steps. playbook and operator are Agent steps. goToBlock jumps to a block or a workflow start and ends the path. callForward transfers a phone call and ends the path. legacy is a step these operations show but cannot change.
message, end, set, workflow, listen, condition, buttons, card, carousel, code, api, function, integration, mcp, playbook, operator, crew, handoff, legacy, goToBlock, callForwardHow the step leaves. sequential: it continues to the step below it, or through next when it is last. branch: it leaves through one of its links, so it must be last. async-branch: a Card or Carousel, whose linked buttons run from any position. terminal: it ends the path.
sequential, branch, async-branch, terminalThe step's settings, shaped by its kind. A step these operations cannot show reads as readOnly.
Show child attributes
Show child attributes
responseType, messageID, waitForUserResponseresponseType, promptID, waitForUserResponseShow child attributes
responseType, messageID, responseEnabledresponseType, promptID, responseEnabledShow child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Plain text; markdown is not interpreted. {variable_name} inserts a variable or entity, {variable_name.path} a field of a variable. Escape a literal { or \ with a backslash. A name matching neither is stored as literal text and reported in unresolvedReferences; secrets are not available here.
Show child attributes
The port actions this exit runs, in order, before it reaches to.
Show child attributes
What the step does. api, function, integration and mcp are Tool steps. playbook and operator are Agent steps. goToBlock jumps to a block or a workflow start and ends the path. callForward transfers a phone call and ends the path. legacy is a step these operations show but cannot change.
message, end, set, workflow, listen, condition, buttons, card, carousel, code, api, function, integration, mcp, playbook, operator, crew, handoff, legacy, goToBlock, callForwardThe step's settings, shaped by its kind. A step these operations cannot show reads as readOnly.
References this write kept as literal text instead of binding, each with the reason. The write still succeeded.
Show child attributes
unknown: no variable or entity of that name. secret-not-allowed: the name is a project secret and this field does not accept one. path-on-non-variable: only a variable has fields. resource-id: a bare resource id, not a name. invalid-name: outside the ^\w{1,64}$ name grammar. dangling: the reference rendered as a bare id, because its row is gone or its name is outside the name grammar.
unknown, secret-not-allowed, path-on-non-variable, resource-id, invalid-name, danglingPresent when from already led to another block: the link this call replaced.
Was this page helpful?
Thanks for your feedback.