Webhooks
Webhooks allow external services like Slack and GitHub to send events to your Blink agents.How Webhooks Work
- External service (Slack, GitHub) sends HTTP request to Blink Server
- Server routes the event to the appropriate agent deployment
- Agent processes the event and responds
Request Routing
Each deployment has a stablerequest_id. The server routes incoming webhooks based on this ID:
- If
wildcardAccessUrlis configured, webhooks use subdomain routing:{request_id}.your-domain - Otherwise, path routing is used:
/api/webhook/{request_id}/{path}
Webhook URL Format
Each agent has a unique webhook URL:- Slack events:
https://blink.example.com/api/agents/abc123/slack/events - GitHub webhooks:
https://blink.example.com/api/agents/abc123/github/webhook
Wildcard Subdomain Routing
For a more secure setup, you can configure wildcard subdomain routing:- A wildcard DNS record pointing
*.dev.example.comto your server - A wildcard TLS certificate for
*.dev.example.com
Webhook Sequence
Devhooks
Devhooks let you receive webhooks on your local machine during development. They create a tunnel from the Blink Server to your local agent. Devhook is a WebSocket bridge used by the CLI for local agent development. If no deployment exists for arequest_id, the server attempts to proxy the request to a devhook session instead.
How Devhooks Work
blink devestablishes a tunnel connection to the server- The devhook gets assigned a unique URL on the server to receive webhooks
- Incoming webhook requests are tunneled through the connection
- Your local agent receives the request as if it came directly