← All guides
Webhooks when a clip is opened
Pass webhook_url when you push a clip (web UI or API). When someone pulls the content for the first time, FastPaste POSTs a single clip.opened event to your URL — then forgets the webhook. No secret content is included in the payload.
Payload
{
"event": "clip.opened",
"code": "482193",
"type": "text",
"opened_at": "2026-06-24T12:00:00.000Z"
}API push example
curl -X POST https://fastpaste.dev/api/v1/clip \
-H "Authorization: Bearer $FASTPASTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "deploy-token-here",
"webhook_url": "https://hooks.example.com/fastpaste"
}'Slack incoming webhook
Point webhook_url at a Slack incoming webhook URL. Slack expects a JSON body with a text field — FastPaste sends the raw event above, so use a small relay (Zapier, n8n, or your own endpoint) to transform it:
// Example relay (Node) — deploy anywhere you trust
app.post("/hooks/fastpaste", (req, res) => {
const { event, code, type, opened_at } = req.body;
if (event !== "clip.opened") return res.sendStatus(400);
fetch(process.env.SLACK_WEBHOOK_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
text: `FastPaste clip ${code} (${type}) was opened at ${opened_at}`,
}),
}).catch(() => {});
res.sendStatus(200);
});CI / automation
A deploy job can push a token with webhook_url pointing at your orchestrator. When the downstream job pulls the clip, your system gets notified to continue the pipeline — without polling.
See also: CI pipeline pattern, API webhooks reference.
Notes
- Webhook URL must be
http://orhttps://. - Delivery is fire-and-forget (10s timeout). Failures do not block the pull.
- Web pushes can also set
webhook_urlonPOST /api/clip. - Requires API Pro for high-volume automation; see plan limits in the API docs.