API Reference

Executions API

Monitor trigger performance, trace node-by-node automation flows, and troubleshoot active executions in real time.

Trigger Endpoint

When an external event occurs (e.g., a contact form submission or a custom application router event), push a POST request to launch the workflow automation logic.

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

Request Body Payload

Provide metadata, contact info, and custom context fields. The system uses these to orchestrate individual actions.

{
  "contact": {
    "first_name": "Jack",
    "last_name": "Sterling",
    "email": "jack.sterling@ozonenews.net",
    "phone": "+1-832-555-0144"
  },
  "form_message": "Need to schedule an urgent consultation regarding local business structures. Our files need auditing on sales tax permits by Friday.",
  "invoice_parameters": {
    "invoice_id": "inv_9381k",
    "subtotal_cents": 35000,
    "discount_code": "TEXAS_LEGAL_10",
    "notes": "Fast-tracked corporate business tax formation retainer"
  },
  "custom_metadata": {
    "marketing_source": "google_search",
    "campaign": "texas-business-formation-llc",
    "lead_tier": "VIP"
  }
}

Response Payload (202 Accepted)

The workflow engine enqueues the request and returns a unique execution trace ID:

{
  "status": "enqueued",
  "execution_id": "exe_8c9371fde02a839",
  "workflow_id": "wf_74a0c81bf3d24e5",
  "queue_priority": "high",
  "timestamp": "2026-06-10T15:24:05Z",
  "trace_endpoints": {
    "status": "https://pos.texaswebservice.com/api/v1/executions/exe_8c9371fde02a839/status",
    "logs": "https://pos.texaswebservice.com/api/v1/executions/exe_8c9371fde02a839/logs"
  }
}

2. Get Execution Status & Logs

Query the status endpoint to monitor node transitions, AI intake output, Stripe Connect balances, and SMS delivery reports.

GET https://pos.texaswebservice.com/api/v1/executions/exe_8c9371fde02a839/status

Response Payload (200 OK)

{
  "status": "processing",
  "execution_id": "exe_8c9371fde02a839",
  "workflow_id": "wf_74a0c81bf3d24e5",
  "current_node_index": 2,
  "elapsed_ms": 1420,
  "node_execution_logs": [
    {
      "node_id": "node_ai_intake_1",
      "name": "AI Intake Agent",
      "status": "completed",
      "started_at": "2026-06-10T15:24:06Z",
      "finished_at": "2026-06-10T15:24:08Z",
      "output": {
        "intent": "corporate_business_formation",
        "urgency_level": "critical",
        "key_entities": {
          "state_compliance": "sales_tax_permit",
          "target_deadline": "2026-06-12"
        },
        "response_sentiment": "determined",
        "suggested_actions": ["quick_file_llc", "stripe_invoice_generation"]
      }
    },
    {
      "node_id": "node_appointment_booking_service_2",
      "name": "Schedule Onboarding Calendar",
      "status": "completed",
      "started_at": "2026-06-10T15:24:08Z",
      "finished_at": "2026-06-10T15:24:09Z",
      "output": {
        "calendar_type": "acuity",
        "available_time_slots": [
          { "date": "2026-06-11", "time": "09:00:00Z" },
          { "date": "2026-06-11", "time": "14:00:00Z" }
        ],
        "booking_portal_dynamic_url": "https://texas-web-service.acuityscheduling.com/schedule.php?owner=practice_68c92a95c&ref=exe_8c9371fde02a839"
      }
    },
    {
      "node_id": "node_stripe_payment_connect_3",
      "name": "Stripe Connect Billing Node",
      "status": "pending_external_action",
      "started_at": "2026-06-10T15:24:09Z",
      "waiting_metadata": {
        "payment_type": "async_stripe_connect",
        "account_id": "acct_1Hu483JHG8",
        "invoice_id": "invoice_8c9371_stripe_id",
        "invoice_url": "https://checkout.stripe.com/pay/cs_live_acct_e02a839",
        "amount_due_cents": 35000,
        "payment_status": "unpaid",
        "chase_logic": {
          "reminder_scheduled_at": "2026-06-13T15:24:00Z",
          "next_step_on_success": "node_sms_review_generation_4"
        }
      }
    }
  ]
}