Developer API · v1

    AutoTill API documentation — add an AI agent to any website

    AutoTill is an AI sales agent that completes purchases and captures leads in a conversation. This API puts that agent on any website, WordPress or not. One call connects the website and AutoTill reads it straight away — pages, services, contact details, delivery and returns, and whether it is a shop, a service business, or both — so the agent answers well from the first visitor. One script tag makes it live.

    Quickstart

    Five steps, start to finish.

    1. Create an AutoTill account and, in the dashboard, go to Account → API keys.
    2. Create a key. The secret (at_sk_…) is shown once — keep it server-side. The publishable key (at_pk_…) is for the browser.
    3. Call POST /connect with your website address. AutoTill registers it and starts reading it.
    4. Paste the returned script tag before the closing </body> tag.
    5. Optionally push your catalogue with POST /products so prices and stock are exact.
    cURL — connect and go live
    curl -X POST https://fslswfrutcitukxzkhib.supabase.co/functions/v1/api-v1/v1/connect \
      -H "Authorization: Bearer at_sk_your_secret_key" \
      -H "Content-Type: application/json" \
      -d '{"website_url":"https://example.com","name":"Example Ltd","currency":"GBP"}'
    
    # → { "website_id": "…", "embed_snippet": "<script src=\"https://autotill.com/widget.js\" …></script>" }

    API keys and scopes

    Keys are created in the AutoTill dashboard and belong to one account. A key is scoped either to a single website, or to the whole account — in which case every request carries website_id.

    • read — conversations, leads, support requests, orders, statistics
    • ingest — connect a website, push products, services, pages, policies and orders
    • chat — run conversations and baskets headlessly
    • memory — add notes Tyson follows, customer context and product notes
    • webhooks — manage outgoing signed events and inbound URLs
    • full — everything above

    Secret keys are stored hashed; we cannot show a key again after it is created. Revoke a key at any time and it stops working immediately.

    Authentication

    Send the secret key as a bearer token. X-API-Key is accepted as an alternative. The base URL is https://fslswfrutcitukxzkhib.supabase.co/functions/v1/api-v1/v1.

    Headers
    Authorization: Bearer at_sk_your_secret_key
    Content-Type: application/json
    GET/me

    Confirms the key works and lists the websites it covers, with business model, product count and reading status.

    Node
    const res = await fetch("https://fslswfrutcitukxzkhib.supabase.co/functions/v1/api-v1/v1/me", {
      headers: { Authorization: `Bearer ${process.env.AUTOTILL_API_KEY}` },
    });
    const { key, websites } = await res.json();

    Connect a website

    POST/connect

    Registers the website and immediately reads it: pages, services, contact details, delivery and returns wording, and whether it sells products, takes enquiries, or both. A website already connected to another account is refused.

    Request
    {
      "website_url": "https://example.com",
      "name": "Example Ltd",
      "platform": "custom",
      "currency": "GBP"
    }
    Response
    {
      "website_id": "9f2c…",
      "domain": "example.com",
      "reading_website": true,
      "status": "connected",
      "embed_snippet": "<script src=\"https://autotill.com/widget.js\" async data-api-key=\"at_pk_…\" data-mode=\"floating\"></script>",
      "next_steps": ["Paste the embed snippet before the closing body tag.", "…"]
    }

    Reading the website runs in the background and usually finishes within a couple of minutes. Poll GET /me and watch understanding_status.

    Embed the agent

    One tag, using the publishable key. Nothing else on the page changes.

    HTML — floating bubble
    <script src="https://autotill.com/widget.js" async
      data-api-key="at_pk_your_publishable_key"
      data-mode="floating"></script>
    HTML — embedded in a section
    <div id="autotill-agent" style="min-height:620px"></div>
    <script src="https://autotill.com/widget.js" async
      data-api-key="at_pk_your_publishable_key"
      data-mode="embedded"></script>

    Modes: floating (bubble in the corner), embedded (fills your container), storefront (full-page buying experience). Appearance, agent name, avatar and colours are set in the dashboard and applied without changing the tag.

    Push your catalogue

    POST/products

    Idempotent upsert keyed on your own product id. Up to 500 products a request. Safe to run on a schedule or from a webhook when a product changes.

    Request
    {
      "products": [
        {
          "id": "SKU-1001",
          "name": "Merino base layer",
          "description": "Lightweight 200gsm merino wool base layer.",
          "price": 79.00,
          "sale_price": 64.00,
          "currency": "GBP",
          "sku": "SKU-1001",
          "stock_status": "instock",
          "stock_quantity": 24,
          "image_url": "https://example.com/images/base-layer.jpg",
          "categories": ["Base layers", "Merino"],
          "url": "https://example.com/products/merino-base-layer"
        }
      ]
    }
    GET/products?limit=50

    Lists what AutoTill currently holds, so you can reconcile against your own system.

    DELETE/products

    Removes products by your own ids: { "ids": ["SKU-1001"] }.

    Prices are always re-validated server-side at checkout, so a stale price in a conversation can never become a wrong charge.

    Services and pages

    For a service business, services are what the agent sells and quotes against. Pages are anything else the agent should know — about pages, FAQs, guarantees, opening hours.

    POST/services

    Upserts services by name. Anything edited by hand in the dashboard is left untouched.

    Request
    {
      "services": [
        { "name": "Boiler service", "summary": "Annual service for gas boilers.", "price_signal": "From £89", "url": "https://example.com/boiler-service", "image_url": "https://example.com/icons/boiler.png" }
      ]
    }
    POST/pages

    Upserts page content by slug.

    Request
    {
      "pages": [
        { "title": "Opening hours", "content": "Monday to Friday 8am–6pm, Saturday 9am–1pm.", "tags": ["hours"] }
      ]
    }

    Delivery and returns

    The agent only states delivery and returns terms it has been given. Push them and it answers precisely; leave them and it says it cannot confirm.

    POST/policies

    Upserts delivery options and returns rules by name.

    Request
    {
      "delivery": [
        { "name": "Standard UK", "cost_cents": 395, "free_over_cents": 5000, "dispatch_days_min": 1, "dispatch_days_max": 2, "areas": "UK mainland" }
      ],
      "returns": [
        { "name": "Standard returns", "window_days": 30, "who_pays_return_postage": "customer", "refund_method": "original payment method" }
      ]
    }

    Orders and attribution

    Send your orders and AutoTill shows which of them the agent influenced, and which were paid. Include session_id when the order came from a conversation.

    POST/orders

    Upserts orders by your own order id.

    Request
    {
      "orders": [
        {
          "id": "10432",
          "order_number": "#10432",
          "status": "paid",
          "total_cents": 12800,
          "currency": "GBP",
          "customer_name": "A. Shopper",
          "customer_email": "shopper@example.com",
          "session_id": "sess_8f2a…"
        }
      ]
    }
    GET/orders?limit=50

    Reads attributed orders back, including whether the agent was involved.

    Shopify without the app: add a webhook in Shopify admin under Settings → Notifications → Webhooks for Order creation, pointing at a small relay (or your own server) that maps the order to the shape above and calls POST /orders with your secret key. Product changes need no relay at all — add Product update and Product delete webhooks straight to the webhook URL shown on your AutoTill Deploy page.

    Bookings (custom booking and scheduling systems)

    For websites where customers pick services and a collection, delivery or visit time, then pay on your own booking system. Set the website type to Bookings and work through Booking setup in the dashboard. Each level works on its own. Want to hand it all to your AI coding assistant? Download the one-file bookings developer guide.

    1. Website snippet (required) — paste the snippet from Install into every page, or via your tag manager. No API key needed.
    2. Booking link (required, no key) — Tyson sends customers to your booking page. Optionally accept {postcode}, {services}, {collection}, {delivery} and {ref} in its address. Keep the ref (or autotill_ref) with the booking.
    3. Services and prices (optional, needs an API key) — push them with the Services endpoint above, including an image_url so Tyson can show each service's picture. Set the minimum order and service charge in Booking setup.
    4. Postcodes and slots (optional, needs your own developer key) — give AutoTill two read-only addresses. Your own postcode service is used directly; AutoPostcode or a typed-in list of areas also work. AutoTill calls them from its servers only, with your developer key as a Bearer token, and gives up after 4 seconds.
    5. Booking paid (optional, needs the signing secret) — send a signed message so paid bookings are credited to Tyson.
    GEThttps://your-api.example.com/coverage?postcode=E1%206AN

    Your postcode service. Return whether you cover the postcode.

    Response
    { "covered": true }
    GEThttps://your-api.example.com/slots?postcode=E1%206AN

    Your free-slots service. Return the next free slots; Tyson offers up to three.

    Response
    { "slots": [
      { "label": "Wed 21 Oct, 6pm–9pm collection" },
      { "label": "Thu 22 Oct, 7am–10am collection" }
    ] }
    POSThttps://autotill.com/api/public/bookings/webhook

    Tell AutoTill a booking was paid or cancelled. Sign the raw body with HMAC-SHA256 using the signing secret from Booking setup.

    Headers
    x-autotill-store: <website ID from Booking setup>
    x-autotill-signature: <hex HMAC-SHA256 of the raw body>
    Content-Type: application/json
    Body
    {
      "booking_id": "L2L-104233",
      "status": "paid",
      "value": 34.50,
      "currency": "GBP",
      "ref": "<the ref AutoTill put in your booking link>",
      "postcode": "E1 6AN",
      "services": ["Ironing", "Alterations"],
      "collection_slot": "Wed 21 Oct, 6pm–9pm",
      "delivery_slot": "Sun 25 Oct, 7am–10am"
    }

    Tyson never takes payment and never confirms a booking — your booking page always does that.

    Headless chat

    Build your own interface, a native app, or a voice channel. Keep the same session_id for the whole conversation and AutoTill holds the memory, basket and context.

    POST/chat

    One conversation turn. Returns the reply, recommended products, the basket and the checkout handoff.

    Python
    import requests
    
    res = requests.post(
        "https://fslswfrutcitukxzkhib.supabase.co/functions/v1/api-v1/v1/chat",
        headers={"Authorization": f"Bearer {AUTOTILL_API_KEY}"},
        json={"session_id": "sess_8f2a", "message": "I need a warm base layer for winter running"},
    )
    print(res.json()["message"])
    POST/basket

    Add, update or remove basket items and get the checkout link: { "action": "add", "session_id": "…", "product_id": "…", "quantity": 1 }.

    Read your data back

    GET/conversations?limit=25

    Recent conversations with their captured contact details.

    GET/conversation?id=…

    One conversation with its full transcript.

    GET/leads?limit=50

    Leads the agent captured — name, email, phone, postcode, message and status.

    GET/support?limit=50

    Support requests: order chasing, faults, returns and refunds.

    GET/stats?days=30

    Conversations, leads, support requests, orders influenced, orders paid and paid value.

    POST/resync

    Asks AutoTill to re-read the website — pages, services, contact details, delivery and returns.

    GET/summary

    Start here. Lists every endpoint this key can use, plus counts and the latest conversations, leads, support requests and orders.

    GET/orders?limit=50

    Orders the agent influenced, with value, status, items and the linked conversation.

    Lists accept since, updated_since, limit (max 200) and cursor. Keep the returned next_cursor to sync everything into your CRM without gaps.

    Update Tyson from your CRM

    Tyson treats these notes as facts from you. They never override live prices or stock from your catalogue.

    POST/memory/notes

    Add a fact or instruction: { "title": "Bank holiday", "text": "We are closed on 25 August." }.

    GET/memory/notes

    Notes Tyson currently follows.

    PATCH/memory/notes?id=…

    Edit or switch off a note ({ "enabled": false }).

    DELETE/memory/notes?id=…

    Remove a note added through the API.

    PUT/memory/customers

    Customer context by email, so Tyson greets returning customers properly: { "email": "…", "preferences": { "tier": "trade" } }.

    PATCH/products/notes

    Agent notes for a product by sku or external_id.

    PATCH/categories/notes

    Agent notes for a category.

    Webhooks

    Outgoing. Add an endpoint in the dashboard or with POST /webhooks. AutoTill posts conversation.started, lead.created, support.created, order.created and order.paid within about five minutes, retrying for up to a day.

    Verify the signature (Node)
    // Header: AutoTill-Signature: t=<unix>,v1=<hex>
    const [t, v1] = header.split(',').map(p => p.split('=')[1]);
    const expected = crypto.createHmac('sha256', WHSEC).update(`${t}.${rawBody}`).digest('hex');
    const ok = crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected))
      && Math.abs(Date.now() / 1000 - Number(t)) < 300;

    Inbound. Create an inbound URL in the dashboard or with POST /webhooks/inbound. Tools like Zapier, Make or HubSpot can post to it with no key. Keep it private; revoke it if it leaks.

    Inbound body
    POST https://fslswfrutcitukxzkhib.supabase.co/functions/v1/api-v1/v1/inbound/<token>
    [
      { "type": "memory.note", "title": "Promo", "text": "10% off bathrooms until Friday." },
      { "type": "customer.update", "email": "jo@example.com", "preferences": { "tier": "trade" } },
      { "type": "product.note", "sku": "TAP-01", "text": "Ships in 3 days." }
    ]

    Let your AI pull your data

    Already live? Give your own AI assistant this link and a key with read (and memory if it should update Tyson).

    Prompt
    You can access our AutoTill agent's data.
    Docs: https://autotill.com/llms.txt  ·  Base URL: https://fslswfrutcitukxzkhib.supabase.co/functions/v1/api-v1/v1
    Auth: Authorization: Bearer <AUTOTILL_SECRET_KEY>
    
    1. Call GET /summary and tell me what data is available and the headline numbers.
    2. When asked, page through /conversations, /leads, /support and /orders using next_cursor.
    3. If I ask you to teach Tyson something, POST /memory/notes. Confirm with me first.

    Errors and rate limits

    Errors are JSON with a stable code. The HTTP status tells you whether to retry.

    Error shape
    { "error": { "code": "invalid_api_key", "message": "That API key is not valid or has been revoked.", "docs": "https://autotill.com/api-documentation" } }
    StatusCodeWhat to do
    400website_id_requiredSend website_id — this key covers the whole account.
    401missing_api_keyAdd the Authorization header.
    401invalid_api_keyThe key is wrong or revoked. Create a new one.
    403scope_requiredThe key lacks the permission for that endpoint.
    403website_out_of_scopeThat website is not covered by this key.
    409website_already_connectedThe domain belongs to another AutoTill account.
    429rate_limitedSlow down — 120 requests a minute for each key.
    404unknown_endpointCheck the path against this page.
    500server_errorRetry with backoff; contact us if it persists.

    Give this page to your AI

    If you use an AI coding assistant, you do not need to read any of the above. Paste the prompt below, give it your secret key as a server-side secret, and it has everything it needs.

    Prompt
    Integrate AutoTill's AI sales agent into this website.
    
    Read https://autotill.com/llms.txt and https://autotill.com/openapi.json first.
    
    Base URL: https://fslswfrutcitukxzkhib.supabase.co/functions/v1/api-v1/v1
    Auth: Authorization: Bearer <AUTOTILL_SECRET_KEY>  (server-side only, never in browser code)
    
    Do this:
    1. POST /connect with our website address. Store the returned website_id.
    2. Add the returned embed snippet before </body>. It uses the publishable key, not the secret.
    3. If we sell products, POST /products with our catalogue (id, name, description, price, sale_price,
       currency, sku, stock_status, stock_quantity, image_url, categories, url) in batches of 500,
       and re-push whenever a product changes.
    4. If we sell services, POST /services instead, and POST /pages with any policy or FAQ content.
    5. POST /policies with our delivery options and returns rules.
    6. POST /orders on every order, including session_id when the order came from an agent conversation.
    7. Confirm with GET /me and GET /stats.
    
    Constraints: the secret key must stay server-side; upserts are idempotent so retries are safe;
    respect 120 requests a minute; surface the error.code from any non-2xx response.

    Machine-readable sources: /openapi.json and /llms.txt.

    Questions

    Do I need WordPress to use AutoTill?
    No. The WordPress plugin is one way in. The Developer API puts the same agent on any website — Shopify, Magento, Laravel, Next.js, Webflow, a bespoke build, or a native app.
    How long does an integration take?
    One call to connect the website, one script tag on the page. Most integrations are live in under ten minutes, and an AI coding assistant can do the whole thing from this page.
    Do I have to send you my products?
    No. AutoTill reads your website when you connect it, so the agent can answer immediately. Pushing your catalogue through the API makes prices and stock exact and live, which is what we recommend for a shop.
    What happens to edits made in the AutoTill dashboard?
    They are kept. If someone has edited a service, a delivery option or a returns rule by hand, an API upsert leaves it alone.
    Is a secret key safe in the browser?
    Never put a secret key in browser code. The browser only uses the publishable key, which can do nothing except identify which website the agent belongs to.
    Can one key reach another customer’s data?
    No. Every key resolves to one account, and a website-scoped key to one website. Anything outside that scope is refused.
    What are the rate limits?
    120 requests a minute for each key. Catalogue upserts take up to 500 products a request, so a large catalogue syncs in a handful of calls.
    Can I build my own chat interface?
    Yes. POST /chat runs the conversation headlessly and returns the reply, the recommended products, the basket and the checkout handoff, so you can render it however you like.
    How do I know the agent is producing results?
    GET /stats returns conversations, leads, support requests and orders influenced and paid for any window, and the dashboard shows the same numbers with the conversations behind them.
    What does it cost?
    The API is included in every AutoTill plan at no extra charge — see the pricing page for plan limits.

    Next step

    Create your account, generate a key, and connect your first website. On WordPress or WooCommerce, the official plugin is quicker — everything else starts here.