Skip to Content
Aperture

Outbound webhooks

Get signed HTTP notifications when executions finish, deploys complete, and more.

Outbound webhooks send an HTTP POST to your URL when something happens in a team. Each endpoint subscribes to a list of events and can be limited to some projects.

Create endpoints in the dashboard (Webhooks), with the CLI, or through the API. Any team member can manage them. The signing secret is shown once when it's generated.

Events

EventSent when
execution.scheduledA run is created (manual, cron, trigger or one-off schedule).
execution.runningA run starts.
execution.succeededA run finishes with exit code 0.
execution.failedA run fails, including missing_secrets, quota_exceeded and orphaned failures.
execution.cancelledA scheduled run is cancelled.
execution.missedA cron run couldn't start on time.
job.deployment_queuedA deploy was accepted.
job.deployment_succeededA deploy's files were unpacked and are live.
job.deployment_failedA deploy's files couldn't be unpacked.
project.created, project.updated, project.deletedProject changes.
secret.created, secret.updated, secret.deletedSecret changes.
team.updatedThe team's details changed.
invite.created, invite.accepted, invite.deletedInvitation changes.
cron.tickThe endpoint's own cron schedule fired. See Scheduled deliveries.

job.updated and job.deleted exist in the event list but aren't sent yet.

Project filter

An endpoint with no projects selected receives events from the whole team. An endpoint limited to some projects receives events from those projects only, and doesn't receive team-level events (team.*, invite.*, cron.tick).

Request format

POST /your/endpoint HTTP/1.1
Content-Type: application/json
User-Agent: Aperture-Webhooks
Aperture-Signature: t=1763899200,v1=5b2c…
{
  "id": "0b8c6a6e-5f0e-4c3a-9a63-2f7f1d3c9b11",
  "object": "event",
  "api_version": "2025-05-01",
  "created": 1763899200,
  "type": "execution.succeeded",
  "livemode": true,
  "data": {
    "object": {
      "job_id": "…",
      "job_name": "nightly-report",
      "job_project_id": "…",
      "execution_id": "…",
      "log_url": "https://…",
      "duration": 5234123
    }
  }
}
  • id is the same for every endpoint that receives the event; use it to deduplicate.
  • created is a Unix timestamp in seconds.

Payloads

Eventdata.object fields
execution.scheduledteam_id, job_id, project_id, name, execution_id, scheduled_time
execution.runningjob_id, job_name, job_project_id, execution_id
execution.succeededjob_id, job_name, job_project_id, execution_id, log_url, duration (µs)
execution.failedas succeeded, plus error when there's an error code: {"code": "missing_secrets", "secrets": [...]}, {"code": "quota_exceeded"} or {"code": "orphaned"}
execution.cancelledteam_id, job_id, project_id, name, execution_id
execution.missedteam_id, job_id, project_id, name, execution_id, scheduled_time, next_scheduled_time
job.deployment_queued, job.deployment_succeededjob_id, job_name, job_project_id
job.deployment_failedas above, plus error: {"code": "extract_failed" | "filesystem_error"}
project.*team_id, project_id, name
secret.created, secret.updatedteam_id, project_id, secret_id, key (never the value)
secret.deletedteam_id, project_id, secret_id
team.updatedteam_id
invite.*team_id, invite_id
cron.tickteam_id, project_ids, webhook_endpoint_id, scheduled_at

Field names differ between events (name vs job_name, project_id vs job_project_id), so read the table for each event you handle.

Verifying signatures

The Aperture-Signature header has a timestamp t and one or more v1 signatures. Each v1 is a hex HMAC-SHA256 of "<t>.<raw body>".

The HMAC key is derived from your secret: for secrets that start with whsec_ (all secrets the dashboard and CLI generate), it's the base64-decoded bytes after whsec_. Accept the request if any v1 matches.

In Node, use buildApertureWebhook. In other languages:

import base64, hashlib, hmac

def verify(secret: str, header: str, raw_body: bytes) -> bool:
    parts = [p.split("=", 1) for p in header.split(",")]
    t = next(v for k, v in parts if k == "t")
    sigs = [v for k, v in parts if k == "v1"]
    key = base64.b64decode(secret[len("whsec_"):]) if secret.startswith("whsec_") else secret.encode()
    expected = hmac.new(key, f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return any(hmac.compare_digest(expected, s) for s in sigs)

Aperture doesn't enforce a time window. Reject old t values yourself if you need replay protection.

Delivery and retries

  • Respond with any 2xx status to acknowledge.
  • 408, 425, 429, 5xx and network errors are retried, up to 8 attempts over about 6 minutes.
  • Other 4xx responses aren't retried.
  • On the hosted service, endpoint URLs must use https://.
  • Every attempt is recorded and shown with the endpoint in the dashboard (status and HTTP code).
  • Successful deliveries count toward the team's webhook quota. Over the quota, events are dropped. See Billing.

Scheduled deliveries

An endpoint subscribed to cron.tick with a schedule (cron, UTC) receives a cron.tick event on that schedule. Use it to drive your own periodic work. The endpoint must be enabled, and schedule and cron.tick must be set together.

Testing an endpoint

The repository includes a script that sends a correctly signed request:

./run webhook:test https://example.com/hooks whsec_… --event execution.succeeded --payload '{"job_name":"demo"}'

Add --dry-run to print the request without sending it.

On this page