Skip to main content
This guide builds a phone agent for a restaurant that answers menu questions, takes an order, checks that the delivery address is in your zone, and posts the confirmed order to your kitchen. Every step is one API call against https://builder.flowyte.com/api/v1.
Authenticate every request with a secret API key: Authorization: Bearer flowyte_sk_…. See Authentication to mint one.
1

Create the agent

Capture data.id as your AGENT_ID.
curl -X POST https://builder.flowyte.com/api/v1/agents \
  -H "Authorization: Bearer $FLOWYTE_API_KEY" -H "Content-Type: application/json" \
  -d '{ "name": "Tony's Pizza", "primaryLanguage": "en" }'
2

Load the menu as knowledge

Add your menu so the agent answers “what’s on the supreme?” and “how much is a large?” from the real thing. Ingestion is asynchronous — poll the source until status is indexed.
curl -X POST https://builder.flowyte.com/api/v1/agents/$AGENT_ID/knowledge/sources \
  -H "Authorization: Bearer $FLOWYTE_API_KEY" -H "Content-Type: application/json" \
  -d '{ "kind": "url", "label": "Menu", "url": "https://tonyspizza.com/menu" }'
3

Add a delivery-area check

A free geo skill with the check_service_area action. Set your shop address as the origin and your delivery radius. The agent asks for the address and confirms coverage before taking a delivery order — and offers pickup if it’s out of range.
curl -X POST https://builder.flowyte.com/api/v1/agents/$AGENT_ID/skills \
  -H "Authorization: Bearer $FLOWYTE_API_KEY" -H "Content-Type: application/json" \
  -d '{
        "name": "Check delivery area",
        "description": "Check whether the caller's delivery address is within our delivery zone before taking a delivery order.",
        "skillType": "geo",
        "executionConfig": {
          "action": "check_service_area",
          "originAddress": "120 Main St, Boulder, CO",
          "radiusMiles": 5
        }
      }'
4

Send the order to the kitchen

An http_webhook skill posts the confirmed order to your kitchen display or POS. The agent fills in the parameters it collected on the call.
curl -X POST https://builder.flowyte.com/api/v1/agents/$AGENT_ID/skills \
  -H "Authorization: Bearer $FLOWYTE_API_KEY" -H "Content-Type: application/json" \
  -d '{
        "name": "Submit order",
        "description": "Send the confirmed order to the kitchen. Use after the caller confirms items and (for delivery) the address is in range.",
        "skillType": "http_webhook",
        "executionConfig": {
          "method": "POST",
          "url": "https://tonyspizza.com/api/orders",
          "parameters": [
            { "name": "items", "description": "The ordered items with size and quantity" },
            { "name": "fulfillment", "description": "delivery or pickup" },
            { "name": "address", "description": "Delivery address, if delivery" },
            { "name": "phone", "description": "Callback number" }
          ]
        }
      }'
5

Publish and test

Publish, then simulate an order. simulate streams over SSE — read it with fetch() streaming and stop on event: done.
curl -X POST https://builder.flowyte.com/api/v1/agents/$AGENT_ID/publish \
  -H "Authorization: Bearer $FLOWYTE_API_KEY"

curl -N -X POST https://builder.flowyte.com/api/v1/agents/$AGENT_ID/simulate \
  -H "Authorization: Bearer $FLOWYTE_API_KEY" -H "Content-Type: application/json" \
  -d '{ "message": "Can I get a large supreme delivered to 200 Pearl St?", "draftMode": false }'
6

Put it on a number

Buy a number and point it at the agent — see Buy a number & go live.
The agent only spends on a geocode when it has to look up a caller’s address; the in/out-of-zone math itself is free.