Destination type
CLI Destination Configuration
Use CLI destinations to forward provider traffic, test events, and replayed events to a service running on your machine through fasthook-cli.
When to use this destination type
Choose CLI when the receiver target is Authenticated fasthook-cli tunnel. Destinations are outbound delivery targets: they do not decide whether a source request should be accepted, and they do not own connection filters or transformations. They own where the final delivery goes and how FastHook should authenticate, pace, disable, and inspect that delivery.
A CLI destination can be reused by multiple connections when several source branches should feed this receiver. Reuse keeps its capacity, credentials, and attempt evidence attached to one destination id.
FastHook dashboard fields
In the dashboard, create a destination, set Destination Type to CLI, then fill the fields below.
CLI pathOptional local path such as /webhooks/orders. Defaults to /.
HTTP methodMethod used when the CLI forwards the delivery to localhost.
Max delivery rateOptional pacing for local delivery during debugging or replay.
API config fields
The REST API stores CLI destination behavior under config. Use PATCH for focused edits and PUT only when the request contains the full config you want to keep.
config.pathOptional path appended to the local URL supplied by the active CLI tunnel.
config.http_methodMethod FastHook asks the CLI tunnel to use for local delivery.
config.rate_limitOptional pacing limit for local tunnel deliveries.
config.rate_limit_periodRate-limit period: second, minute, or hour.
{
"name": "local-orders-api",
"type": "CLI",
"config": {
"path": "/webhooks/orders",
"http_method": "POST",
"rate_limit": 10,
"rate_limit_period": "second"
}
}curl -X POST "https://api.fasthook.io/v1/destinations" \
-H "Authorization: Bearer $FASTHOOK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "local-orders-api",
"type": "CLI",
"config": {
"path": "/webhooks/orders",
"http_method": "POST",
"rate_limit": 10,
"rate_limit_period": "second"
}
}'Authentication
CLI destination authentication is outbound. It helps this receiver trust or accept FastHook delivery and remains separate from source authentication for the original webhook producer.
- Authenticated FastHook CLI tunnel session
HTTP methods and rate limit
CLI uses the methods below for delivery attempts. Its destination rate limit is shared by every connection that targets this receiver.
Rate limit: Optional. Useful when replaying many events into a local service.
Delivery behavior
- A CLI destination does not store localhost host or port. The active CLI command supplies the local target with --to.
- FastHook delivers the event to the tunnel service, and the authenticated CLI session forwards it to the local receiver.
- The CLI sends local response status, headers, body, and errors back so FastHook can store attempt evidence.
- More than one CLI can connect to the same destination, but separate destinations are easier to reason about for separate developers.
Setup checklist
- Create a destination and choose CLI as the destination type.
- Optionally set a CLI path. Leave it blank to use /.
- Create or edit a connection so accepted source events route to the CLI destination.
- Log in with fasthook-cli and start a tunnel with fasthook tunnel --destination des_xxx --to 8080.
- Send or replay events and inspect the local receiver response in FastHook attempts.
Troubleshooting
No delivery reaches localhost.Start fasthook tunnel with the correct destination id and confirm the local --to URL is listening.
HTTP 502 Local Fetch Failed.The CLI was connected, but the local receiver did not answer successfully. Check host, port, path, and local logs.
Events go to the wrong local route.Check the destination path and the --to value. The path is stored on the destination; host and port come from the CLI session.