Skip to content
Vroni

DocsAPI and webhooks

Webhooks

Get a signed HTTPS request from Vroni when a run starts, finishes, or fails, and verify it on your server.

A webhook is an HTTPS request that Vroni sends to your server when an event happens, such as a run finishing. Your server can react right away, like updating a ticket, without repeatedly polling the API to check on a run.

This page covers how to set up a webhook in the app, the events you can subscribe to, and what Vroni sends in each request. You’ll also find how to check the request signature and what happens when your server doesn’t respond. The team owner, administrators, and anyone with the Owner role can set up webhooks, the same people who manage Notifications.

Setting up a webhook

In the app, go to Settings > Notifications and find the Webhooks section. Team owners, administrators, and members with the Owner role can create webhooks. Click Add webhook and fill in:

  • a Description (up to 120 characters) to help you identify the webhook later
  • the Endpoint URL where Vroni should send requests
  • the Events you want to subscribe to (at least one)

The endpoint URL can be up to 1,024 characters long, must use HTTPS, and must point to a public address. Vroni rejects URLs that contain a username or password, as well as internal or private IP addresses. It also doesn’t follow redirects.

When you save the webhook, Vroni displays the signing secret once. It starts with whsec_. Store it right away, because you won’t be able to view it again. Your server needs this secret to verify that incoming requests came from Vroni.

You can set up webhooks in the app on any plan. Managing them through the API requires the Team plan.

Events

Event When it is sent
run.queued A run was added to the queue.
run.dispatched A machine picked up an attempt of the run.
run.started The run started. Sent once per run.
run.running An attempt of the run began working.
run.completed The run finished successfully.
run.failed The run couldn’t finish.
run.timed_out The run hit its time limit.
run.cancelled Someone cancelled the run.
run.rejected A work request was refused before a run started, for example because of missing credits.

If Vroni restarts a run after an internal issue, run.dispatched and run.running can fire again for the new attempt. If you only need to know when work finishes, subscribe to run.completed, along with run.failed and run.timed_out.

If your team uses pull request approval, Vroni skips the earlier events for those runs and sends run.completed only after an approver creates the pull request. In that event, run.publication_state is published. Failed, timed-out, and cancelled runs still send their events as usual.

What Vroni sends

Each delivery is a POST request with a JSON body and these headers:

Header Content
Content-Type application/json; charset=utf-8
Vroni-Event The event name, for example run.completed.
Vroni-Event-Id The ID of the event.
Vroni-Delivery-Id The ID of this delivery. It stays the same across retries.
Vroni-Attempt-Id The ID of this attempt. Each retry gets a new one.
Vroni-Signature-Timestamp The signing time, in Unix seconds.
Vroni-Signature-Version v1.
Vroni-Signature The signature, for example sha256=eafedb4f....
User-Agent Vroni/Webhook-v1.

Here is a shortened run.completed payload:

{
  "event": "run.completed",
  "event_id": "01J00000000000000000001001",
  "delivery_id": "01J00000000000000000002001",
  "attempt_id": "01J00000000000000000003001",
  "created_at": "2026-11-25T12:00:00Z",
  "team": { "id": "1", "name": "Acme" },
  "repository": {
    "id": "01J00000000000000000000030",
    "name": "acme/shop-backend",
    "provider": "github"
  },
  "task": {
    "id": "01J00000000000000000000020",
    "title": "CSV export for orders"
  },
  "run": {
    "id": "01J00000000000000000000010",
    "status": "completed",
    "duration_seconds": 9660,
    "final_credits": 161,
    "publication_state": "delivered",
    "held_for_review": false
  },
  "links": {
    "run": "https://app.vroni.com/runs/10",
    "repository": "https://github.com/acme/shop-backend",
    "pull_request": "https://github.com/acme/shop-backend/pull/41"
  }
}

created_at is the timestamp of this delivery attempt. The payload also includes a trigger object showing what started the run, such as a GitHub issue or an API call. For run.failed and run.timed_out, run.failure_category explains why it stopped. For run.rejected, run is null and an admission object provides the reason_code. Most of these codes match what the tasks endpoint returns, though there are a few extras, so make sure your code handles unknown values.

Respond with any 2xx status code within 10 seconds. If your handler needs more time, acknowledge the request first and process the work in the background.

Checking the signature

Verify every request before trusting it:

  1. Read the raw request body exactly as it arrived, before any JSON parsing.
  2. Confirm that all Vroni- headers from the table above are present and that Vroni-Signature-Version is v1.
  3. Build the signed string: the timestamp, a dot, v1, a dot, the event ID, a dot, the delivery ID, a dot, the attempt ID, a dot, and the raw body.
  4. Compute an HMAC with SHA-256 over that string, using your full signing secret (including the whsec_ prefix) as the key.
  5. Format the result as lowercase hex prefixed with sha256= and compare it against Vroni-Signature using a constant-time comparison.
  6. Reject any request whose timestamp is more than five minutes away from your server’s clock.

In Node.js, with rawBody as a Buffer and lowercase header names:

import crypto from "node:crypto";

export function isFromVroni(headers, rawBody, secret) {
  const timestamp = headers["vroni-signature-timestamp"] ?? "";
  const version = headers["vroni-signature-version"] ?? "";
  const eventId = headers["vroni-event-id"] ?? "";
  const deliveryId = headers["vroni-delivery-id"] ?? "";
  const attemptId = headers["vroni-attempt-id"] ?? "";
  const received = headers["vroni-signature"] ?? "";

  if (version !== "v1" || !eventId || !deliveryId || !attemptId) return false;
  if (!/^\d+$/.test(timestamp)) return false;
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
  if (!/^sha256=[0-9a-f]{64}$/.test(received)) return false;

  const prefix = `${timestamp}.v1.${eventId}.${deliveryId}.${attemptId}.`;
  const expected =
    "sha256=" +
    crypto
      .createHmac("sha256", secret)
      .update(prefix)
      .update(rawBody)
      .digest("hex");

  return crypto.timingSafeEqual(Buffer.from(received), Buffer.from(expected));
}

In PHP, with $server = $_SERVER and $rawBody = file_get_contents('php://input'):

function isFromVroni(array $server, string $rawBody, string $secret): bool
{
    $timestamp = $server['HTTP_VRONI_SIGNATURE_TIMESTAMP'] ?? '';
    $version = $server['HTTP_VRONI_SIGNATURE_VERSION'] ?? '';
    $eventId = $server['HTTP_VRONI_EVENT_ID'] ?? '';
    $deliveryId = $server['HTTP_VRONI_DELIVERY_ID'] ?? '';
    $attemptId = $server['HTTP_VRONI_ATTEMPT_ID'] ?? '';
    $received = $server['HTTP_VRONI_SIGNATURE'] ?? '';

    if ($version !== 'v1' || $eventId === '' || $deliveryId === '' || $attemptId === '') {
        return false;
    }
    if (! ctype_digit($timestamp) || abs(time() - (int) $timestamp) > 300) {
        return false;
    }
    if (! preg_match('/^sha256=[0-9a-f]{64}$/', $received)) {
        return false;
    }

    $signed = "{$timestamp}.v1.{$eventId}.{$deliveryId}.{$attemptId}.{$rawBody}";
    $expected = 'sha256='.hash_hmac('sha256', $signed, $secret);

    return hash_equals($expected, $received);
}

Because Vroni retries failed deliveries, your server may receive the same event more than once. Track Vroni-Event-Id to skip events you have already processed.

Retries

Vroni retries deliveries after network errors, timeouts, and 408, 429, or 5xx responses, making up to six attempts in total. It waits 1 minute, 5 minutes, 30 minutes, 2 hours, and 12 hours between attempts. Redirects and any other 4xx responses count as permanent failures and won’t be retried.

The delivery log

In the app, the Delivery log in the webhooks section shows deliveries from the last 30 days. For each delivery, you can see its status (queued, accepted, retrying, failed, or skipped), every attempt with the HTTP status your server returned, and the reason for any failure. The log doesn’t store the request body or your server’s response.

When the log shows a Replay button for a failed delivery, you can send it again. Replaying works for real events as long as the subscription is still active and still subscribed to that event, while test deliveries can’t be replayed. A replayed delivery keeps the original event and delivery IDs, gets a new attempt ID, and goes to the subscription’s current URL.

Testing, rotating secrets, and disabling

  • Send test sends a single webhook.test event without retries to an enabled subscription. You can send up to five tests per subscription every ten minutes.
  • Rotate secret creates a new signing secret and displays it once. Every attempt prepared after rotation, including retries, uses the new secret, so update your server right away.
  • Disable pauses new deliveries and skips any that are still waiting. You can enable the subscription again later.
  • Delete removes the endpoint URL and signing secret while keeping the delivery history visible.

Changing a subscription’s URL or selected events also skips any deliveries that were still waiting under the old settings.

Managing webhooks through the API

All of these actions are available under /api/v1. Reading requires Read webhooks, making changes requires Manage webhooks, and deleting requires Delete webhooks.

Method and path What it does
GET /webhook-subscriptions Lists subscriptions in data.subscriptions.
POST /webhook-subscriptions Creates a subscription and returns 201. Body: description, endpoint_url, selected_events, and optional enabled. The secret is returned once in meta.signing_secret.plaintext.
GET /webhook-subscriptions/{id} Returns one subscription in data.subscription. The full URL and secret are never returned, only a hint such as the host name.
PATCH /webhook-subscriptions/{id} Updates the description, URL, events, or enabled.
POST /webhook-subscriptions/{id}/test Sends a test event and returns 202. Too many tests return 429 test_rate_limited.
POST /webhook-subscriptions/{id}/rotate-secret Generates a new secret, returned once in meta.signing_secret.plaintext.
POST /webhook-subscriptions/{id}/disable Stops deliveries for the subscription.
DELETE /webhook-subscriptions/{id} Deletes the subscription.
GET /webhook-deliveries Lists deliveries. Filters: subscription_id, event_type, status, test, replayable, plus page and per_page (default 25, up to 100).
GET /webhook-deliveries/{id} Returns a delivery along with all of its attempts.
POST /webhook-deliveries/{id}/replay Replays a failed delivery and returns 202. If the delivery can’t be replayed, it returns 422 replay_not_allowed with the reason.

The delivery list is structured slightly differently from other list endpoints: the deliveries sit in data.deliveries.data, with pagination details alongside them in data.deliveries. Passing replayable=true narrows the results to likely candidates, though the replay endpoint makes the final decision.

Last updated November 25, 2026. Something missing or unclear? Write to [email protected].

Try Vroni on your own repository

Vroni is in early access, and new accounts are approved by hand.

Get early access