Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.streampixel.io/llms.txt

Use this file to discover all available pages before exploring further.

Webhooks push HTTP notifications to your endpoint whenever a build event happens — uploaded, approved, rejected, distributed. Use them to trigger deploys, post alerts, kick off tests, or mirror pipeline state into your monitoring stack.

Set up a webhook

1

Open project settings

From the dashboard, navigate to your project and open Project Settings.
2

Enter your webhook URL

Provide a publicly accessible HTTPS endpoint in the Webhook URL field.
3

Choose events

Tick the checkboxes for the build events you want to receive. At least one event must be selected while a webhook URL is set.
4

Save and test

Click Save. Once saved, click Test Webhook to send a sample payload to your endpoint. (Save first — the Test button won’t fire on unsaved changes.)
Your endpoint must be reachable from the internet and able to accept HTTP POST requests with a JSON body.

Events

Streampixel emits a webhook at each stage of the build pipeline.
EventDescription
build.uploadedA new build file has been uploaded to the project.
build.downloadingThe build file is being downloaded for processing.
build.extractingThe build file is being extracted and scanned.
build.savingThe build is being saved to the repository.
build.distributingThe build is being distributed to streaming servers.
build.approvedThe build has been reviewed and approved.
build.rejectedThe build has been reviewed and rejected.
Events fire in roughly the order listed, following the natural progression of the pipeline. Not every build triggers every event — for example, a rejected build never fires build.distributing.

Payload

Every webhook is an HTTP POST request with Content-Type: application/json.
event
string
The event type (e.g., build.approved). See the events table above.
projectId
string
The Streampixel project ID.
uploadId
string | null
The unique identifier of the uploaded build.
fileUrl
string | null
The URL of the build file, when available.
status
string
Raw pipeline status (e.g., Approved, Reject, Distribute).
objection
string | null
The reason for rejection. Only populated when event is build.rejected.
timestamp
string
ISO 8601 timestamp of when the event occurred.

Examples

{
  "event": "build.approved",
  "projectId": "664f1a2b3c4d5e6f7a8b9c0d",
  "uploadId": "665a2b3c4d5e6f7a8b9c0e1f",
  "fileUrl": "https://cdn.streampixel.io/builds/my-build.zip",
  "status": "Approved",
  "objection": null,
  "timestamp": "2026-03-29T14:30:00.000Z"
}

Testing your endpoint

Save a webhook URL in Project Settings, then click the Test Webhook button to send a webhook.test payload to that URL. The dashboard reports the result:
  • Success“Webhook delivered successfully.” Your endpoint responded with a 2xx status.
  • Failure — An error toast. Verify the URL is correct, publicly accessible over HTTPS, and returns a 2xx response.
The webhook.test event is only sent when you click the Test Webhook button. It is never fired during normal build operations.

Filtering events

Choose exactly the events you care about with the checkboxes in Project Settings. At least one event must be selected while a webhook URL is set — there is no “all” default, so a new webhook receives nothing until you tick the events you want:
  • Only care about final outcomes? Select just build.approved and build.rejected.
  • Want full pipeline visibility? Tick all seven events.
  • Monitoring distribution? Select build.distributing and build.approved.
If an event occurs that you have not subscribed to, no request is sent.

Best practices

Streampixel does not retry failed webhook deliveries. If your endpoint is unreachable or returns a non-2xx status, the event is lost. Make sure your endpoint has high availability.
  • Respond quickly — return 200 OK as fast as possible. Streampixel waits up to 10 seconds before timing out. Move heavy processing to a background job.
  • Use HTTPS — always use an HTTPS URL so payloads are encrypted in transit.
  • Be idempotent — in rare cases the same event may arrive more than once. Use uploadId + event as an idempotency key.
  • Log everything — log all incoming payloads. Logs are invaluable for debugging integration issues.
  • Validate the project — confirm projectId matches the project you expect.
  • Monitor uptime — there are no retries, so any downtime means missed events. Set up uptime monitoring for your endpoint.

Receiving webhooks

const express = require('express');
const app = express();

app.use(express.json());

app.post('/webhooks/streampixel', (req, res) => {
  const { event, projectId, uploadId, objection } = req.body;

  console.log(`Received event: ${event} for project: ${projectId}`);

  switch (event) {
    case 'build.approved':
      console.log(`Build ${uploadId} approved. Triggering deployment...`);
      // Start your deployment pipeline
      break;

    case 'build.rejected':
      console.log(`Build ${uploadId} rejected. Reason: ${objection}`);
      // Notify your team
      break;

    case 'webhook.test':
      console.log('Test webhook received successfully!');
      break;

    default:
      console.log(`Event: ${event}`);
  }

  // Always respond with 200 quickly
  res.status(200).json({ received: true });
});

app.listen(3000, () => {
  console.log('Webhook server running on port 3000');
});

Troubleshooting

ProblemSolution
Test webhook failsEnsure your URL is publicly accessible (not localhost). For local development, use a tool like ngrok.
Not receiving webhooksVerify the correct events are checked in Project Settings and that your webhook URL is saved.
Receiving timeoutsYour endpoint must respond within 10 seconds. Move heavy work to a background job.
Missing eventsStreampixel does not retry failed deliveries. If your server was down when the event fired, the notification is lost. Check your server logs.
Unexpected payload formatEnsure your server parses the Content-Type: application/json body correctly.
Duplicate eventsUse uploadId + event as an idempotency key to skip duplicates.

Quick reference

DetailValue
HTTP methodPOST
Content typeapplication/json
Timeout10 seconds
RetriesNone
Events available7 build pipeline events + 1 test event

Next steps

Distribute a build

Combine build.approved events with the Distribute API for a controlled CI/CD flow.

Upload File API

The endpoint that triggers the build pipeline events documented above.