API Reference

Workflows API

Programmatically query, create, pause, and configure workflows within your practice space.

Endpoint Overview

MethodPathAction
GET/workflowsList active practices workflows
POST/workflowsProvision a new operational workflow
POST/workflows/:id/triggerManually execute a custom trigger instance
DELETE/workflows/:idDeactivate/delete a specific workflow

1. Create a New Workflow

Configure a custom multi-step pipeline for client intake, booking reminders, Stripe checkout, reviews, and dynamic chasers.

POST https://pos.texaswebservice.com/api/v1/workflows

Request Headless Payload

Construct the workflow mapping schema. In this ideal schema, we build a seamless 5-node practice pipeline:

{
  "name": "Intake & Service Recovery Program",
  "description": "Auto-capture website leads, AI schedules, invoices via Stripe, and requests maps review after appointment completion.",
  "status": "active",
  "trigger": {
    "type": "webhook",
    "event": "contact_form_submission",
    "config": {
      "cors_allowed_origins": ["https://texas-web-service.com"]
    }
  },
  "nodes": [
    {
      "id": "node_ai_intake_1",
      "type": "ai_agent_intake",
      "name": "AI Intake Agent",
      "config": {
        "agent_name": "Sterling AI",
        "system_instruction": "You are Sterling, the friendly patient coordinator at Houston Dermatologist. Analyze client concerns and prompt scheduling.",
        "model": "tws-clinical-llama-3",
        "temperature": 0.2,
        "input_mappings": {
          "raw_body": "{{ $initialPayload.form_message }}"
        }
      }
    },
    {
      "id": "node_appointment_booking_service_2",
      "type": "appointment_booking",
      "name": "Schedule Onboarding Calendar",
      "config": {
        "calendar_connector": "acuity",
        "calendar_id": "cal_91823abce",
        "appointment_type_id": "type_8321a",
        "allow_partial_deposit": true,
        "auto_booking_suggestion_limit": 3
      }
    },
    {
      "id": "node_stripe_payment_connect_3",
      "type": "stripe_invoice_generation",
      "name": "Stripe Connect Billing Node",
      "config": {
        "stripe_account_destination": "acct_1Hu483JHG8",
        "currency": "usd",
        "payment_method_types": ["card", "usdc"],
        "charge_on_creation": false,
        "due_date_offset_days": 3
      }
    },
    {
      "id": "node_sms_review_generation_4",
      "type": "google_reviews_sms",
      "name": "SMS Google Maps Review Request",
      "config": {
        "delay_after_appointment_hours": 2,
        "google_place_id": "ch_Ij_houston_dermatology_maps_id_9341",
        "sms_sender_id": "TXWEBSERV",
        "message_template": "Hey {{ $initialPayload.first_name }}! Thanks for visiting us. Could you support our small business by sharing your feedback here: {{ $google_review_url }} ?"
      }
    },
    {
      "id": "node_unpaid_invoice_chaser_5",
      "type": "invoice_reminder_loop",
      "name": "Stripe Connect Invoice Chaser",
      "config": {
        "chase_intervals_days": [3, 7, 10],
        "channel_priority": ["sms", "email"],
        "message_templates": {
          "sms": "Hi {{ $initialPayload.first_name }}, legal reminder from our desk. Your invoice is currently outstanding: {{ $node.node_stripe_payment_connect_3.invoice_url }}. Please resolve to keep files active.",
          "email": "Dear {{ $initialPayload.first_name }}, this is a friendly pending balance reminder. Check to settle: {{ $node.node_stripe_payment_connect_3.invoice_url }}"
        }
      }
    }
  ],
  "link_connections": [
    { "from": "trigger", "to": "node_ai_intake_1" },
    { "from": "node_ai_intake_1", "to": "node_appointment_booking_service_2" },
    { "from": "node_appointment_booking_service_2", "to": "node_stripe_payment_connect_3" },
    { "from": "node_stripe_payment_connect_3", "to": "node_sms_review_generation_4" },
    { "from": "node_sms_review_generation_4", "to": "node_unpaid_invoice_chaser_5" }
  ]
}

Response Payload (201 Created)

{
  "status": "created",
  "id": "wf_74a0c81bf3d24e5",
  "version": 1,
  "created_at": "2026-06-10T15:24:00Z",
  "webhook_target_url": "https://pos.texaswebservice.com/api/v1/webhooks/wf_74a0c81bf3d24e5",
  "nodes_integrity_check": "passed"
}