kite~/kite/docs/Event Payloads
v0.2.1
Reference

Event Payload Reference

All Kite events are delivered as CloudEvents v1.0. The original webhook payload is in data — unmodified.

Kite delivers all webhook events as CloudEvents v1.0. The original webhook payload is preserved in the data field without mutation.

// 01CloudEvent envelope

Every event delivered by Kite has this shape:

json
{
  "specversion": "1.0",
  "id": "01HXYZ...",
  "source": "https://github.com/owner/repo",
  "type": "com.github.push",
  "time": "2024-01-15T12:00:00Z",
  "datacontenttype": "application/json",
  "kitesummary": "alice pushed 2 commits to main in owner/repo",
  "data": { "...original webhook payload..." }
}

Envelope fields

FieldTypeDescription
specversionstringAlways "1.0"
idstringKite-assigned UUIDv7 — unique per accepted ingress event
sourcestringURI of the originating resource (repo URL, API base, etc.)
typestringReverse-DNS event type: com.{source}.{event}
timestringISO 8601 timestamp of when the event was received
datacontenttypestringAlways "application/json"
kitesummarystringHuman-readable one-line summary generated by Kite
dataobjectOriginal webhook payload — passed through without modification

// 02Event types by source

GitHub (source: github)

Event type format: com.github.{X-GitHub-Event header}

CloudEvent typeTrigger
com.github.pushBranch or tag push
com.github.pull_requestPR opened, closed, synchronized, labeled, etc.
com.github.pull_request_reviewPR review submitted
com.github.pull_request_review_commentComment on PR diff
com.github.issuesIssue opened, closed, labeled, assigned, etc.
com.github.issue_commentComment on issue or PR
com.github.createBranch or tag created
com.github.deleteBranch or tag deleted
com.github.releaseRelease published, created, edited
com.github.workflow_runGitHub Actions workflow run started or completed
com.github.check_runCheck run created or completed
com.github.pingSent when a webhook is first configured — typically dropped

The source URI is the repository's html_url (e.g. https://github.com/owner/repo).

Example — push event:

json
{
  "specversion": "1.0",
  "id": "01HXYZ...",
  "source": "https://github.com/acme/api",
  "type": "com.github.push",
  "time": "2024-01-15T12:00:00Z",
  "datacontenttype": "application/json",
  "kitesummary": "alice pushed 1 commit(s) to main on acme/api",
  "data": {
    "ref": "refs/heads/main",
    "pusher": { "name": "alice" },
    "commits": [{ "id": "abc123", "message": "fix: typo in README" }],
    "repository": { "full_name": "acme/api", "html_url": "https://github.com/acme/api" }
  }
}

Stripe (source: stripe)

Event type format: com.stripe.{event.type field}

CloudEvent typeTrigger
com.stripe.payment_intent.succeededPayment completed
com.stripe.payment_intent.payment_failedPayment failed
com.stripe.customer.subscription.createdSubscription started
com.stripe.customer.subscription.updatedSubscription changed
com.stripe.customer.subscription.deletedSubscription cancelled
com.stripe.invoice.payment_succeededInvoice paid
com.stripe.invoice.payment_failedInvoice payment failed
com.stripe.checkout.session.completedCheckout session completed

The source URI is always https://api.stripe.com.

Example — payment succeeded:

json
{
  "specversion": "1.0",
  "id": "01HXYZ...",
  "source": "https://api.stripe.com",
  "type": "com.stripe.payment_intent.succeeded",
  "time": "2024-01-15T12:00:00Z",
  "datacontenttype": "application/json",
  "kitesummary": "stripe event received",
  "data": {
    "id": "evt_abc123",
    "type": "payment_intent.succeeded",
    "data": { "object": { "amount": 2000, "currency": "usd" } }
  }
}

Paperclip (source: paperclip)

Event type format: com.paperclip.{x-paperclip-event header or event field}

CloudEvent typeTrigger
com.paperclip.heartbeatAgent heartbeat triggered
com.paperclip.issue.assignedIssue assigned to agent
com.paperclip.issue.commentedComment added to issue
com.paperclip.issue.status_changedIssue status changed

The source URI is https://paperclip.ing/company/{companyId}.

Other sources

For sources not listed above, the event type is com.{source}.event and the source URI is https://{source}.

// 03Reading events in CLI output modes

bash
# Summary line per event (default)
kite stream

# One-liner compact summaries
kite stream --compact

# Full CloudEvent JSON (one object per line)
kite stream --json

# Filter to a specific source
kite stream --source github --json

# Filter to a specific event type
kite stream --event-type com.github.push --json

// 04Reading events in kite.json

When using kite run, the CloudEvent JSON object is passed as stdin to the configured sink:

bash
# exec sink — event JSON available on stdin
echo '$EVENT_JSON' | ./handle-event.sh

# proxy sink — event JSON POSTed to target URL
# Headers forwarded: x-kite-source, x-kite-event-id, x-kite-event-type, x-kite-team-id

// 05Importance levels

Kite assigns an importance level to each event via scoring rules or defaults. Use --importance or sink.importance to filter delivery:

LevelValueUse case
low1Informational events, pings
normal2Standard webhook events (default)
high3Events matching critical paths or triggers
critical4Security events, payment failures

Set a minimum level in kite.json:

json
{ "type": "exec", "command": "./handle.sh", "importance": "high" }

Or on the CLI:

bash
kite stream --importance high