Skip to content
AnswerWell geo Documentation

Research · 6 min read · Answerwell

Event Subscriptions: Types, Sources, Payloads and Schemas

How Cloudflare event subscriptions are scoped, what each notification contains, and which events products emit for automation and observability.

This page summarises Cloudflare documentation on event subscriptions: push notifications when account resources change or long-running work reaches a milestone. Product teams publish event names, JSON shapes, and scope rules on separate reference pages; the consolidated catalog is Events & schemas. Use it when you wire a webhook, queue consumer, or audit pipeline and need to know which type values exist and what arrives in payload.

Event subscription notifications: common JSON envelope

Section titled “Event subscription notifications: common JSON envelope”

Every documented notification shares the same top-level fields: type, source, payload, and metadata. The type string identifies the event (for example cf.artifacts.repo.pushed). The source object names the emitting product and any scope (namespace, zone, worker name, model name). The payload carries event-specific data. metadata always includes accountId, eventSubscriptionId, eventSchemaVersion, and eventTimestamp in the examples across products.

Handlers should branch on type, validate eventSchemaVersion, and treat metadata.eventSubscriptionId as the delivery target identity when you run multiple subscriptions in one account.

How source scopes which resources you hear about

Section titled “How source scopes which resources you hear about”

Scope is not identical across products. For Cloudflare Artifacts, account-wide and per-repository subscriptions differ:

Account-level events — Subscribe to the artifacts source to receive events for any repository in your account.

— Cloudflare, Artifacts event subscriptions

Repository-level events — Subscribe to the artifacts.repo source with a namespace and repo_name to receive events scoped to a single repository.

— Cloudflare, Artifacts event subscriptions

Email events scope by sending context: source includes type email.sending, zoneId, and domain. Workers Builds events include workerName under workersBuilds.worker. Workers AI batch events include modelName on workersAi.model.

Event types by product: what triggers each notification

Section titled “Event types by product: what triggers each notification”

The tables below list documented type values and the plain-language trigger from Cloudflare’s reference pages. Payload details differ by row; follow the linked product page for full field lists.

Event name (suffix) type value When it fires
repo.created cf.artifacts.repo.created A repository is created
repo.deleted cf.artifacts.repo.deleted A repository is deleted
repo.forked cf.artifacts.repo.forked A repository is forked
repo.imported cf.artifacts.repo.imported A repository is imported from an external Git remote
pushed cf.artifacts.repo.pushed Commits are pushed
cloned cf.artifacts.repo.cloned A repository is cloned
fetched cf.artifacts.repo.fetched Updates are fetched
token.created cf.artifacts.repo.token.created A repo-scoped token is created
token.revoked cf.artifacts.repo.token.revoked A repo-scoped token is revoked

Source: Artifacts event subscriptions.

Push events carry rich Git metadata: ref, before, after, a commits array (with optional commitsTruncated), and totalCommitsCount. Token events expose tokenId, scope, and expiresAt on create, and tokenId on revoke.

Event name type value When it fires
message.delivered cf.email.sending.message.delivered The recipient mail server accepts the message
message.deferred cf.email.sending.message.deferred Temporary failure; retries still pending
message.bounced cf.email.sending.message.bounced Permanent bounce or retries exhausted
message.failed cf.email.sending.message.failed Internal or non-SMTP delivery error
message.rejected cf.email.sending.message.rejected Rejected before delivery (suppression, validation, spam policy)
message.complained cf.email.sending.message.complained Recipient marked mail as spam via feedback loop

Source: Email event subscriptions.

terminal on email payloads: finished vs in-flight delivery

Section titled “terminal on email payloads: finished vs in-flight delivery”

Many email payloads include terminal. Use it to decide whether more events may follow for the same message.

terminal Typical statuses Meaning
true delivered, bounced, failed, rejected, complained No further delivery events expected for this message
false deferred Retries may still produce another event

Delivered events often include SMTP detail under delivery (smtpStatusCode, smtpResponse, deliveryTimeMs, provider). Bounces add bounce.type (soft / hard) and classification. Rejections add rejection.reason (for example suppressed).

Product Example type values Trigger (from docs)
KV cf.kv.namespace.created, cf.kv.namespace.deleted Namespace created or deleted — KV event subscriptions
R2 cf.r2.bucket.created, cf.r2.bucket.deleted Bucket created or deleted — R2 event subscriptions
Vectorize cf.vectorize.index.created, cf.vectorize.index.deleted Index created or deleted — Vectorize event subscriptions
Cloudflare Access cf.access.application.created, cf.access.application.deleted Access application created or deleted — Access event subscriptions

Documented on the R2 event subscriptions page and in Events & schemas:

Job event type Notes
Started cf.superSlurper.job.started Includes source/destination bucket config
Paused / resumed cf.superSlurper.job.paused, cf.superSlurper.job.resumed Job id only
Completed / aborted cf.superSlurper.job.completed, cf.superSlurper.job.aborted Object counts: total, migrated, skipped, failed
Per object cf.superSlurper.job.object.migrated source.type is superSlurper.job with jobId; payload has object key
Area Events Reference
Workers AI batch cf.workersAi.model.batch.queued, .succeeded, .failed Workers AI event subscriptions — failures include message, internalCode, httpCode
Workers Builds cf.workersBuilds.worker.build.started, .failed, .canceled, .succeeded Workers Builds event subscriptions — includes buildTriggerMetadata (branch, commit, commands, repo provider)
Workflows cf.workflows.workflow.instance.queued, .started, .paused, .errored, .terminated, .completed Workflows event subscriptions — payload carries versionId and instanceId

Browser crawl events (consolidated catalog only)

Section titled “Browser crawl events (consolidated catalog only)”

Events & schemas also documents cf.browserRun.crawl.started, crawl.updated, and crawl.finished with job configuration and per-URL status. There is no separate product URL for those sections in this cluster beyond that catalog page.

Choosing subscription scope and event filters

Section titled “Choosing subscription scope and event filters”

Match subscription source to the narrowest scope you need:

  • Account-wide Artifacts — lifecycle across all repos (artifacts source); noisier but simpler operations tooling.
  • Single Artifacts repo — pushes, clones, tokens (artifacts.repo with namespace and repo name).
  • Email — tied to sending zones/domains in source; filter in your handler by domain or messageId.
  • Per-worker builds — workerName in source isolates CI/CD signals per Worker.

Subscribing too broadly increases cost, retry noise, and duplicate processing when the same logical action appears in metrics and in webhooks.

Common mistakes when handling event subscriptions

Section titled “Common mistakes when handling event subscriptions”
  • Parsing only payload and ignoring type or eventSchemaVersion, so new event versions break silently.
  • Assuming Artifacts account-level subscriptions omit repo identity — source still carries namespace and repoName on many repo events.
  • Treating message.deferred (terminal: false) as final — wait for delivered, bounced, failed, or rejected.
  • Confusing Artifacts metrics eventType with subscription type — different systems (see tip above).
  • Ignoring commitsTruncated on pushed — commit lists may be partial; use totalCommitsCount and ref SHAs for authoritative range checks.
  • Missing Super Slurper granularity — job-level completion does not list every key; use job.object.migrated when you need per-object audit trails.
  1. Open the product page for the resource you subscribe to (for example Artifacts event subscriptions or Email event subscriptions) and confirm the type strings you handle match the current tables.

  2. Cross-check the same events on Events & schemas if you consume multiple products from one handler.

  3. Trigger a controlled change in a non-production account (create/delete a test KV namespace, send a test email, or push to an Artifacts repo) and capture the raw JSON your endpoint receives.

  4. Verify metadata.eventSchemaVersion, source scope fields, and product-specific fields (for email, terminal and delivery.status; for builds, buildUuid and buildOutcome).

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page does not match the linked Cloudflare documentation, email yimasynthetic@gmail.com with the page URL and the exact statement you believe is wrong so it can be corrected.