Flows
List the environment's flows (active versions)
GET /v1/flows flows:read
Responses
- 200
Flows
Fields
-
dataFlow[] requiredFields
-
namestring required -
versionstring requiredA hash of the flow definition, or the deploy id
-
environment"live" | "test" required -
definitionobject required -
createdAtstring required -
activatedAtstring requiredSince when new calls run this version
-
lastSeenAtstring requiredLast time a server reported this version
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
Register call flow versions
PUT /v1/flows flows:write
hcc.serve calls this on startup (mode: "report") and hcc.flows.deploy from CI (mode: "deploy"). The API key picks the environment (hcc_live_ or hcc_test_). Returns the environment flow endpoint, creating its signing secret on first use. With a live key, alsoTest: true registers the same versions in test too. Every bound agent must be yours (422 unknown_agent) and every bound tool declared. When a version becomes active, its bound tools are synced to agents whose platform keeps tools on the agent.
Body
-
flowsobject[] requiredFields
-
namestring required -
versionstring required -
timeoutMsinteger100 to 5000.
-
inputSchemaobject -
stateSchemaobject -
handlers"call.answered" | "call.no_answer" | "call.voicemail" | "call.hangup" | "call.gather" | "call.agent.tool" | "call.agent.ended" | "call.agent.summary" | "call.custom" | "call.transfer.failed" | "call.error"[]Default
[]. -
customEventsstring[]Default
[]. -
fallbacksobjectDefault
{}.Fields
-
call.answeredobject[] -
call.no_answerobject[] -
call.voicemailobject[] -
call.hangupobject[] -
call.gatherobject[] -
call.agent.toolobject[] -
call.agent.endedobject[] -
call.agent.summaryobject[] -
call.customobject[] -
call.transfer.failedobject[] -
call.errorobject[]
-
-
toolsobject[]Default
[].Fields
-
namestring required -
descriptionstring -
parametersobject required -
timeoutMsinteger100 to 5000.
-
afterSpeechboolean
-
-
agentsobject[]Default
[].Fields
-
aliasstring required -
agentIdstring required -
providerstring -
toolsstring[]Default
[]. -
testBranchtrue
-
-
-
mode"report" | "deploy"Default
"report". -
endpointUrlstringYour
hcc.serveURL -
alsoTestbooleanLive keys only: also register the same versions in test, with the same endpoint URL, so the simulator can run them. The test copy syncs no tools to agent platforms: test calls play the agent in the simulator. Default
false. -
toolSync"all" | "test_branches"Test keys only:
test_branchessyncs tools to test branches and leaves an agent's main alone, which is whathcc devsends on every save. Default"all".
Responses
- 200
Registered versions and the flow endpoint
Fields
-
dataFlow[] requiredFields
-
namestring required -
versionstring requiredA hash of the flow definition, or the deploy id
-
environment"live" | "test" required -
definitionobject required -
createdAtstring required -
activatedAtstring requiredSince when new calls run this version
-
lastSeenAtstring requiredLast time a server reported this version
-
-
endpointFlowEndpoint requiredFields
-
environment"live" | "test" required -
urlstring | null requiredWhere flow events are POSTed; null until set
-
secretstring requiredSigning secret:
hcc.serveverifiesHcc-Signaturewith it
-
-
warningsFlowBindingWarning[] requiredAgent binding problems that do not block the deploy, e.g. a disabled agent, or an agent bound in both environments on a platform that keeps one tool set per agent
Fields
-
code"agent_not_routable" | "tools_not_supported" | "agent_bound_in_other_environment" | "test_branch_not_supported" | "native_transfer_in_test_branch" required -
flowstring required -
aliasstring required -
agentIdstring requiredOur
agt_…id -
messagestring required
-
-
testobjectWith
alsoTest: the versions registered in test, and its endpointFields
-
dataFlow[] required -
endpointFlowEndpoint required
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
Report what a server serves, and read how it differs from what is deployed
POST /v1/flows/observe flows:read
A server built with handler() sends this once on a cold start. It activates nothing. The report is stored on the flow endpoint and the Flows page shows the same differences.
Body
-
flowsobject[] requiredFields
-
namestring required -
versionstring required -
agentsobject[] requiredFields
-
aliasstring required -
agentIdstring required
-
-
Responses
- 200
How the server differs
Fields
-
driftFlowDrift[] requiredFields
-
kind"not_deployed" | "version_differs" | "binding_differs" | "not_served" required -
flowstring required -
messagestring required
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
List the flow versions still in use
GET /v1/flows/in-use flows:read
hcc deploy --live removes frozen versions that are not in this list. With a live key, alsoTest=true includes the test environment.
Query
alsoTest"true" | "false"Live keys only: test as well
Responses
- 200
Versions in use
Fields
-
dataFlowVersionInUse[] requiredFields
-
flowstring required -
versionstring required -
environment"live" | "test" required -
reason"active" | "live_call" requiredactive: new calls run it.live_call: a call still going started on it or last ran it
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
Get the environment's flow endpoint and signing secret
GET /v1/flow-endpoint flows:read
Responses
- 200
Flow endpoint
Fields
-
dataFlowEndpoint requiredFields
-
environment"live" | "test" required -
urlstring | null requiredWhere flow events are POSTed; null until set
-
secretstring requiredSigning secret:
hcc.serveverifiesHcc-Signaturewith it
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code
Set the environment's flow endpoint URL
PUT /v1/flow-endpoint flows:write
Body
-
urlstring | null requiredYour
hcc.serveURL
Responses
- 200
Flow endpoint
Fields
-
dataFlowEndpoint requiredFields
-
environment"live" | "test" required -
urlstring | null requiredWhere flow events are POSTed; null until set
-
secretstring requiredSigning secret:
hcc.serveverifiesHcc-Signaturewith it
-
-
- 400
Invalid request
- 401
Missing or invalid API key
- 404
Not found
- 429
rate_limited, or another limit named byerror.code