Skip to main content
The HTTP webhook channel provides a simple REST API for sending messages to IronClaw and receiving responses.

Features

  • JSON API - Simple POST requests with JSON payloads
  • Webhook secret - HMAC-based authentication
  • Synchronous responses - Optional wait for agent reply
  • Thread support - Conversation continuity via thread_id
  • Rate limiting - 60 requests/minute
  • Fixed user ID - Single user per channel instance

Configuration

Set via environment variables or .env file:

Configuration Options

Endpoints

Health Check

Response:

Send Message (Async)

Response (202 Accepted):
The agent processes the message asynchronously. Listen for responses via SSE or WebSocket (Web Gateway channel).

Send Message (Sync)

Response (200 OK):
The request blocks (up to 60 seconds) until the agent responds.

Thread Support

Messages with the same thread_id are tracked as a single conversation. The agent loads conversation history when a matching thread is found.

Request Schema

Response Schema

Error Responses

401 Unauthorized - Invalid Secret

401 Unauthorized - Missing Secret

413 Payload Too Large

Limits:
  • Max body size: 64 KB
  • Max content length: 32 KB

429 Too Many Requests

Rate limits:
  • 60 requests per minute
  • 100 pending wait-for-response requests

503 Service Unavailable

The channel hasn’t been initialized yet. Wait for IronClaw to start.

Security

Webhook Secret

The webhook secret is required and validated using constant-time comparison to prevent timing attacks:

Fixed User ID

Each HTTP channel instance has a fixed user_id from config. The user_id field in requests is ignored:
This prevents impersonation attacks.

Rate Limiting

The channel enforces a sliding window rate limit:
  • 60 requests/minute - Resets every 60 seconds
  • 100 pending sync requests - Prevents resource exhaustion
Exceeding these returns HTTP 429.

Integration Examples

cURL

Python

JavaScript (Node.js)

Bash Script

Use Cases

CI/CD Integration

Notify the agent when builds fail:

Monitoring Alerts

Forward alerts from monitoring systems:

Slack Slash Commands

Bridge Slack slash commands to IronClaw:

Chatbot Gateway

Proxy multiple chat platforms through the HTTP channel:

Source Code

  • Implementation: ~/workspace/source/src/channels/http.rs
  • Tests: ~/workspace/source/src/channels/http.rs:359-445

Troubleshooting

401 Unauthorized

  • Verify HTTP_WEBHOOK_SECRET matches the secret in requests
  • Check for typos in the secret value
  • Ensure the secret is set before starting IronClaw

503 Service Unavailable

  • Wait for IronClaw to fully start
  • Check logs for “HTTP channel ready”
  • Verify HTTP_PORT is correct

429 Too Many Requests

  • Reduce request frequency to less than 60/minute
  • Implement exponential backoff in client
  • Close stale wait-for-response requests

Timeout on wait_for_response

  • Requests timeout after 60 seconds
  • Complex queries may exceed this; use async mode instead
  • Check agent logs for errors during processing

Empty response field

  • response field is only present when wait_for_response: true
  • For async requests, use Web Gateway SSE or WebSocket to receive responses