Skip to main content

Use a pathway instead of a prompt

A pathway is a stored, versioned conversation flow built in the app. List the ones live for your organization, then send pathway_id instead of task (exactly one of the two — never both):

curl https://api.adamcalling.com/v1/pathways -H "Authorization: $ADAM_API_KEY"
# [{"id": "07a1…", "name": "Lead qualification PL", "language": "pl", "active_version_number": 3}]

curl -X POST https://api.adamcalling.com/v1/calls \
-H "Authorization: $ADAM_API_KEY" -H "Content-Type: application/json" \
-d '{"phone_number": "+48512345678", "pathway_id": "07a1…"}'

Only pathways with an active (published) version are listed and callable; a draft-only pathway gets a 400 with an explicit message.

Authoring pathways over the API

Pathways aren't read-only: the public API also carries the full authoring surface — create a pathway, import a flow, validate and simulate it, test its webhooks, manage versions and post-call config, and activate a version. That's how adam-cli works with pathways. The Pathways reference documents every endpoint.