Webhooks

Trigger workflow executions via HTTP webhooks and retrieve results programmatically.

Webhooks let you trigger workflow executions from external systems — no API key required. Each workflow can have a unique webhook URL that accepts POST requests.

Webhook URL

POST https://www.wireflow.ai/api/v1/workflow/{webhookId}/trigger

The webhookId is assigned when you enable webhooks on a workflow. You can also use the workflow's regular id as the webhookId for convenience.

Note: The webhook endpoint uses singular /workflow/ (not /workflows/). This is intentional — webhook triggers are a separate resource path from the workflow management endpoints under /workflows/.

Setting Up Webhooks

  1. Open your workflow in the Wireflow editor
  2. Go to Settings > Webhook
  3. Toggle Enable Webhook
  4. Copy the generated webhook URL

Triggering a Workflow

Send a POST request with your trigger data as JSON:

curl -X POST https://www.wireflow.ai/api/v1/workflow/whk_xyz789/trigger \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cat wearing a top hat",
    "style": "photorealistic"
  }'

Response 202 Accepted

{
  "executionId": "exec_456",
  "status": "queued",
  "message": "Workflow execution queued successfully"
}

The execution runs asynchronously. Use the executionId to poll for results.

Checking Webhook Status

Verify a webhook is configured and active with a GET request:

curl https://www.wireflow.ai/api/v1/workflow/whk_xyz789/trigger

Response 200 OK

{
  "workflowId": "cm1abc123",
  "name": "My Workflow",
  "isActive": true,
  "message": "Webhook is configured. Use POST to trigger execution."
}

Polling for Results

After triggering a webhook, poll the execution status:

curl https://www.wireflow.ai/api/v1/workflows/executions/exec_456/poll \
  -H "Authorization: Bearer sk-your-api-key"

See Executions for full polling details.

Polling Requires Authentication

The webhook trigger endpoint does not require an API key, but the poll endpoint does. If you trigger a workflow via webhook without auth, you still need an API key to poll for results.

Recommended pattern:

# 1. Trigger the webhook (no auth needed)
curl -X POST https://www.wireflow.ai/api/v1/workflow/whk_xyz789/trigger \
  -H "Content-Type: application/json" \
  -d '{ "prompt": "A cat wearing a top hat" }'

# 2. Use the returned executionId with an authenticated poll request
curl https://www.wireflow.ai/api/v1/workflows/executions/exec_456/poll \
  -H "Authorization: Bearer sk-your-api-key"

Viewing Execution History

Retrieve recent executions triggered by a webhook:

curl https://www.wireflow.ai/api/v1/workflow/whk_xyz789/executions

Response 200 OK

{
  "executions": [
    {
      "id": "exec_456",
      "status": "COMPLETED",
      "startedAt": "2025-03-20T12:01:00.000Z",
      "completedAt": "2025-03-20T12:01:15.000Z",
      "triggerData": { "prompt": "A cat wearing a top hat" },
      "output": null,
      "error": null
    }
  ]
}

CORS

The webhook trigger endpoint supports CORS with Access-Control-Allow-Origin: *, so you can call it directly from browser-side JavaScript.

Errors

Status Meaning
400 Workflow is not active
404 Webhook ID not found
500 Internal error triggering execution

Use Cases

  • Zapier/Make integrations — trigger Wireflow workflows from any app
  • Form submissions — run AI generation when a user submits a form
  • CI/CD pipelines — generate assets as part of a build process
  • Slack bots — trigger workflows from Slack commands
  • Cron jobs — schedule periodic workflow runs

© 2026 Wireflow. All rights reserved.

Webhooks | Wireflow Docs