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
Send Message (Async)
Send Message (Sync)
Thread Support
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
- Max body size: 64 KB
- Max content length: 32 KB
429 Too Many Requests
- 60 requests per minute
- 100 pending wait-for-response requests
503 Service Unavailable
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 fixeduser_id from config. The user_id field in requests is ignored:
Rate Limiting
The channel enforces a sliding window rate limit:- 60 requests/minute - Resets every 60 seconds
- 100 pending sync requests - Prevents resource exhaustion
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_SECRETmatches 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_PORTis 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
responsefield is only present whenwait_for_response: true- For async requests, use Web Gateway SSE or WebSocket to receive responses