> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tetherai.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow engine webhook ingress

> Generic webhook ingress for WorkflowEngine `WebhookTrigger` nodes. Auth is JWT or User API key in the `Authorization: Bearer <token>` header. The body must include a `webhookId` string that matches one or more `WebhookTrigger.data.webhookId` values for workflows in the caller's organization; everything else in the body is forwarded verbatim as the trigger node's `payload` output. The api validates auth, evaluates matching triggers, and enqueues one BullMQ job per match (workflows themselves execute on the workflow-runner service). Returns 202 with the `matchedCount` so the caller can tell whether any workflow was actually queued.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/webhook/workflow
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/webhook/workflow:
    post:
      tags:
        - Webhooks
      summary: Workflow engine webhook ingress
      description: >-
        Generic webhook ingress for WorkflowEngine `WebhookTrigger` nodes. Auth
        is JWT or User API key in the `Authorization: Bearer <token>` header.
        The body must include a `webhookId` string that matches one or more
        `WebhookTrigger.data.webhookId` values for workflows in the caller's
        organization; everything else in the body is forwarded verbatim as the
        trigger node's `payload` output. The api validates auth, evaluates
        matching triggers, and enqueues one BullMQ job per match (workflows
        themselves execute on the workflow-runner service). Returns 202 with the
        `matchedCount` so the caller can tell whether any workflow was actually
        queued.
      operationId: post_webhook_workflow
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowWebhookIngressRequest'
      responses:
        '202':
          description: Webhook accepted and matching workflows enqueued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowWebhookIngressResponse'
        '400':
          description: Body missing `webhookId` string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookErrorResponse'
        '401':
          description: Authentication required (JWT or User API key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    WorkflowWebhookIngressRequest:
      type: object
      description: >-
        `webhookId` is required and must match a `WebhookTrigger.data.webhookId`
        on at least one workflow in the caller's org. Every other property is
        forwarded verbatim as the trigger node's `payload` output.
      properties:
        webhookId:
          type: string
          description: >-
            Identifier configured on a workflow `WebhookTrigger` node; the
            caller's org is scanned for matching triggers to enqueue.
      required:
        - webhookId
      additionalProperties: true
      example:
        webhookId: wh_64d2f9c5e8a1d4e001a0b1c3
        source: zillow
        lead:
          name: Alex Nguyen
          email: alex.nguyen@example.com
          phone: '+14155551234'
    WorkflowWebhookIngressResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        message:
          type: string
        data:
          type: object
          properties:
            webhookId:
              type: string
            matchedCount:
              type: integer
              description: Number of workflows enqueued. 0 = no trigger matched.
          required:
            - webhookId
            - matchedCount
          additionalProperties: true
      required:
        - success
        - data
      additionalProperties: true
      example:
        success: true
        message: Webhook accepted
        data:
          webhookId: wh_64d2f9c5e8a1d4e001a0b1c3
          matchedCount: 2
    WebhookErrorResponse:
      type: object
      description: >-
        Error envelope used across provider webhook routes. Most failures only
        carry `error`; a few (ElevenLabs tool errors, ingress validation) add
        `success:false`, `message`, or a `code`. Many of these endpoints respond
        200 with `success:false` for recoverable cases (especially the
        ElevenLabs server tools) — only hard failures use 4xx/5xx.
      properties:
        error:
          type: string
        message:
          type: string
        success:
          type: boolean
          enum:
            - false
        code:
          type: string
        details:
          description: Optional diagnostic detail (stack snippet, validation issues, etc.).
      additionalProperties: true
      example:
        error: Webhook processing failed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````