Skip to content
BuildBase

Webhooks and events overview

Receive real-time event notifications when users sign up, subscribe, pay, or trigger actions.

BuildBase fires webhook events for every significant action - user signups, subscription changes, payments, credit usage, workspace updates, and more. Verify the signature and handle the event in your backend.

import { parseWebhookEvent } from '@buildbase/sdk';

export async function POST(req) {
  const body = await req.text();

  const event = parseWebhookEvent({
    body,
    signature: req.headers.get('x-buildbase-signature'),
    timestamp: req.headers.get('x-buildbase-timestamp'),
    secret: process.env.BUILDBASE_WEBHOOK_SECRET ?? '',
  });

  if (!event) {
    return Response.json({ error: 'Invalid signature' }, { status: 401 });
  }

  switch (event.event) {
    case 'subscription.upgraded':
      await enablePremiumFeatures(event.data.workspaceId);
      break;
    case 'credit.low_balance':
      await notifyTeam(event.data.workspaceId);
      break;
    case 'workspace.member_added':
      await syncToExternalCRM(event.data);
      break;
  }

  return Response.json({ received: true });
}

Before you start

Create a webhook endpoint in the console: Settings in the left rail, then Webhooks, Create webhook, and copy its signing secret: the sheet shows it once, at its top. Step by step, with screenshots: add an endpoint.

Two functions

FunctionWhat it does
verifyWebhookSignature({ body, signature, timestamp, secret })Returns true if the signature is valid
parseWebhookEvent({ body, signature, timestamp, secret })Verifies and parses - returns the event object or null

Use parseWebhookEvent for most cases. Use verifyWebhookSignature if you want to parse the body yourself.

Express example

The signature covers the exact bytes BuildBase sent, so the route needs the raw body. express.json() replaces it with a parsed object, and every delivery then fails the check. Read this route's body with express.raw and register the route before any app.use(express.json()): once the JSON parser has read a request, express.raw on the route gets nothing.

import { parseWebhookEvent } from '@buildbase/sdk';
import express from 'express';

const app = express();

// Before app.use(express.json()), so this route keeps the raw body.
app.post('/webhooks', express.raw({ type: 'application/json' }), (req, res) => {
  const event = parseWebhookEvent({
    body: req.body.toString('utf8'), // a Buffer: the bytes as sent
    signature: req.header('x-buildbase-signature'),
    timestamp: req.header('x-buildbase-timestamp'),
    secret: process.env.BUILDBASE_WEBHOOK_SECRET ?? '',
  });

  if (!event) return res.status(401).json({ error: 'Invalid' });

  // Handle event.event and event.data
  res.json({ received: true });
});

app.use(express.json()); // the rest of your API

In Hono, read the body with await c.req.text(), as in the first example.

Event categories

CategoryEvents
Useruser.registered, user.logged_in, user.new_device_login, user.email_verified, user.password_changed, user.password_reset_requested, user.profile_updated, user.tag_added, user.tag_removed, user.blocked, user.unblocked, user.mfa_enrolled, user.mfa_disabled, user.mfa_reset_by_admin, user.email_changed, user.imported, user.account_linked, user.account_unlinked, user.phone_added, user.phone_verified, user.phone_removed, user.deletion_scheduled, user.deletion_cancelled, user.deleted
Authauth.login_failed, auth.signup_challenged, auth.sms_budget_exceeded, auth.method_deleted, auth.domain_added, auth.domain_verified, auth.domain_deleted, auth.client_self_registered
Organizationorganization.member_invited, organization.member_accepted, organization.member_role_changed, organization.member_removed, organization.public_write_limit_reached, organization.end_user_ceiling_reached
Entitlemententitlement.ceiling_reached
Workspaceworkspace.created, workspace.updated, workspace.deleted, workspace.settings_updated, workspace.features_updated, workspace.member_added, workspace.member_removed, workspace.member_role_changed, workspace.member_invited, workspace.invitation_accepted, workspace.invitation_declined, workspace.invitation_revoked, workspace.invitation_expired
Subscriptionsubscription.created, subscription.updated, subscription.upgraded, subscription.canceled, subscription.cancel_scheduled, subscription.resumed, subscription.suspended, subscription.trial_started, subscription.trial_will_end, subscription.trial_extended, subscription.trial_expired, subscription.paused, subscription.unpaused, subscription.retention_accepted, subscription.stripe_out_of_sync, subscription.downgraded, subscription.discount_applied, subscription.discount_removed, subscription.version_move_scheduled, subscription.version_moved, subscription.version_move_withdrawn
Paymentpayment.succeeded, payment.failed, payment.action_required, payment.refunded, payment.card_expiring, payment.stripe_events_failed
Quotaquota.limit_exceeded, quota.threshold_reached
Creditcredit.purchased, credit.consumed, credit.expired, credit.granted, credit.revoked, credit.low_balance, credit.reserved, credit.settled, credit.released, credit.threshold_crossed, credit.top_up_failed, credit.plan_grant_failed
Add-onaddon.purchased, addon.expired, addon.revoked, addon.changed
Payerpayer.subject_added, payer.subject_removed
Workflowworkflow.created, workflow.deleted, workflow.published, workflow.paused, workflow.resumed, workflow.instance_completed, workflow.instance_failed
Audienceaudience.member_created, audience.member_updated, audience.added_to_list, audience.removed_from_list, audience.attribute_changed, audience.tag_added, audience.tag_removed, audience.unsubscribed, audience.resubscribed, audience.email_invalidated, audience.blocked, audience.unblocked, audience.import_completed, audience.list_created, audience.list_updated, audience.list_deleted
Emailemail.domain_added, email.domain_verified, email.sent, email.opened, email.clicked, email.bounced, email.complained, email.unsubscribed, email.campaign_sent
Pushpush.campaign_sent
Enterpriseenterprise.created, enterprise.deleted, enterprise.domain_verified, enterprise.user_provisioned, enterprise.user_deprovisioned, enterprise.directory_synced, enterprise.certificate_expiring, enterprise.certificate_renewed, enterprise.policy_updated, enterprise.break_glass_used, enterprise.sessions_revoked, enterprise.connection_activated, enterprise.connection_deactivated, enterprise.connection_deleted, enterprise.log_stream_failing, enterprise.log_stream_recovered, enterprise.admin_added, enterprise.admin_removed, enterprise.key_created, enterprise.key_revoked, enterprise.group_created, enterprise.group_updated, enterprise.group_deleted, enterprise.group_members_changed, enterprise.role_created, enterprise.role_updated, enterprise.role_deleted, enterprise.person_joined, enterprise.join_requested, enterprise.join_request_declined, enterprise.domain_removed, enterprise.app_team_session, enterprise.workos_roles_attention, enterprise.workos_roles_recovered, enterprise.agent_issuer_updated, enterprise.agent_access, enterprise.sso_routing_updated, enterprise.workload_credential_updated, enterprise.workload_access, enterprise.workspace_policy_updated
OAuthoauth.consent_granted, oauth.consent_revoked
Tokentoken.created, token.updated, token.revoked
Group versiongroup_version.published
Version moveversion_move.completed, version_move.cancelled
Formform.submitted
Blogblog.published, blog.updated, blog.unpublished, blog.deleted
Docdoc.published, doc.updated, doc.unpublished, doc.deleted
FAQfaq.updated
FAQ collectionfaq_collection.updated
Testimonialtestimonial.updated, testimonial.deleted
Rich contentrich_content.updated, rich_content.deleted
Collectioncollection.version_published, collection.record_created, collection.record_updated, collection.record_deleted
Itemitem.created, item.updated, item.published, item.rejected, item.archived
Orderorder.created, order.paid, order.refunded, order.fulfilled, order.disputed, order.part_paid, order.part_failed, order.shipped
Shipmentshipment.updated
Returnreturn.requested, return.updated
Grantgrant.created, grant.revoked
Item subscriptionitem_subscription.created, item_subscription.renewed, item_subscription.past_due, item_subscription.recovered, item_subscription.canceled, item_subscription.resumed, item_subscription.ended, item_subscription.changed
Bookingbooking.confirmed, booking.cancelled, booking.rescheduled, booking.updated
Affiliateaffiliate.joined, affiliate.approved, affiliate.status_changed
Commissioncommission.created, commission.paid, commission.reversed
Sellerseller.status_changed
Payoutpayout.created, payout.paid, payout.failed

239 event types total, every one of them in the table above.

When each event fires

One line per event, from the platform's event catalog. Fields named under "Data" are the data object's; Event payload structure below has more on the ones with a longer story. Every subscription.* and payment.* event names its workspaceId or subject, every credit.* event its subject, and every content event (blog.*, doc.*, faq.*, faq_collection.*, testimonial.*, rich_content.*, collection.*) carries module, id, slug, path and tags.

EventWhen it fires
user.registeredA person created an account (a guest who signs up too, with fromGuest: true). Data: actorId, email, name.
user.logged_inA person signed in, by any method. Data: actorId, email, name.
user.new_device_loginThe first sign-in from a device the account has not used before. Data: actorId, email, name.
user.email_verifiedA person proved their email address with the verification code. Data: actorId, email, name.
user.password_changedA password was set: by a reset with an emailed code, or changed from a signed-in session. Data: actorId, email, name.
user.password_reset_requestedA person asked for a password reset code for an existing account. Data: actorId, email, name.
user.profile_updatedA user record changed: the person edited their profile or attributes, or an admin edited the user in the console. Data: actorId, changes.
user.tag_addedAn admin added a tag to a user in the console, once per tag. Data: userId, email, tagId.
user.tag_removedAn admin removed a tag from a user in the console, once per tag. Data: userId, email, tagId.
user.blockedA user was blocked from signing in. Data: actorId, userId, email, reason, source.
user.unblockedA blocked user was let back in. Data: actorId, userId, email, source.
user.mfa_enrolledA person confirmed a second sign-in step (an authenticator app or a phone). Data: actorId, userId, email, factor, factors.
user.mfa_disabledA person removed a second sign-in step. Data: actorId, userId, email, factor, factors.
user.mfa_reset_by_adminAn admin removed a user's second step from the console, for a lost device. Data: actorId, userId, email, factor, factors.
user.email_changedAn email address changed: the person proved a new inbox with a code, or their company directory or SSO sign-in changed it. Data: actorId, userId, oldEmail, newEmail.
user.importedA user was created by an import, in place of user.registered. Data: actorId, userId, email, name, externalId, source.
user.account_linkedA person connected a social account to theirs, from the SDK. Data: actorId, userId, provider, accountId.
user.account_unlinkedA person removed a connected social account, from the SDK. Data: actorId, userId, provider, accountId.
user.phone_addedA phone landed on an account: a phone sign-up, the person adding it, or an import. Data: actorId, userId, phone, verified.
user.phone_verifiedA phone on an account was proven with a code sent to it. Data: actorId, userId, phone.
user.phone_removedA person removed their phone. Data: actorId, userId, phone.
user.deletion_scheduledA person asked for their account to be deleted. Data: actorId, userId, deleteAfter.
user.deletion_cancelledA person cancelled a scheduled deletion. Data: actorId, userId.
user.deletedAn account was deleted and its personal data scrubbed: by the person, an admin, or a guest left idle. Data: actorId, userId, by.
auth.login_failedA sign-in against a known user was refused: a wrong password or a wrong second-step code. Data: actorId, email, stage, locked.
auth.signup_challengedBot protection refused a sign-up or an emailed code or link. Data: surface, reason, never the address typed.
auth.sms_budget_exceededPhone codes sent today reached the alert percentage (warning) or the daily cap refused one (stopped), once a day each. Data: level, sent, dailyCap, alertAt.
organization.member_invitedSomeone was invited to your organization's console team. Data: actorId, targetUserId, role, email.
organization.member_acceptedAn invitee accepted and joined your organization's console team. Data: actorId, targetUserId, role, email.
organization.member_role_changedA console team member's role changed, including both sides of an ownership transfer. Data: actorId, targetUserId, role, email, from, to, reason.
organization.member_removedA member left or was removed from your console team. Data: actorId, targetUserId, role, email.
organization.public_write_limit_reachedA public, signed-out write (a form submission or a beta sign-up) was refused because your organization's daily ceiling was reached, at most once an hour per kind. Data: kind, count, limit, at.
organization.end_user_ceiling_reachedA ceiling of your BuildBase plan on something your end users create (push subscribers, end users, collection records) was reached, at most once an hour per limit. Data: slug, current, limit, enforced, at.
entitlement.ceiling_reachedAn end user reached a limit you marked endUserBoundary on a workspace plan and was refused, at most once an hour per workspace and limit. Data: workspaceId, slug, limit, current, userId, at.
workspace.createdA workspace was created: from the SDK, or automatically for a new user (every user in Personal mode). Data: workspaceId, actorId, name.
workspace.updatedA workspace's name or image changed. Data: workspaceId, actorId, name, image.
workspace.deletedA workspace was deleted: by its owner, or with its owner's account. Data: workspaceId, actorId.
workspace.settings_updatedAn admin changed a workspace's settings in the console. Data: workspaceId, actorId.
workspace.features_updatedAn admin turned a workspace's features on or off in the console. Data: workspaceId, actorId.
workspace.member_addedA person became a member of a workspace: added directly, an accepted invitation, or a company group or directory. Data: workspaceId, actorId, targetUserId, role, source.
workspace.member_removedA member left or was removed from a workspace, by a person, a company role mapping or directory deprovisioning. Data: workspaceId, actorId, targetUserId, source, group.
workspace.member_role_changedA member's role inside a workspace changed. Data: workspaceId, actorId, targetUserId, role, oldRole, source.
workspace.member_invitedAn invitation to a workspace was sent to an address that may have no account yet. Data: workspaceId, actorId, invitationId, email, role.
workspace.invitation_acceptedAn invitee accepted a workspace invitation (workspace.member_added fires too). Data: workspaceId, invitationId, targetUserId, email, role.
workspace.invitation_declinedAn invitee declined a workspace invitation. Data: workspaceId, invitationId, targetUserId, email.
workspace.invitation_revokedA pending workspace invitation was withdrawn. Data: workspaceId, actorId, invitationId, email, source.
workspace.invitation_expiredThe invitation sweep found a pending workspace invitation past its expiry. Data: workspaceId, invitationId, email.
subscription.createdA subscription started: a paid checkout, a free plan or an onboarding trial.
subscription.updatedStripe reported a change to a subscription. Data: workspaceId or subject, subscriptionId.
subscription.upgradedA plan change moved a subscription up. Data: subscriptionId, planVersionId, newPlanVersionId, oldInterval, newInterval, upgradedAt, promotionCode.
subscription.canceledA subscription ended.
subscription.cancel_scheduledA subscription was set to end at the close of its period.
subscription.resumedA subscription set to end was kept: a scheduled cancellation undone, or a person's own plan resumed when the workspace sponsorship that replaced it ended. Data: workspaceId or subject, subscriptionId.
subscription.suspendedThe last failed payment attempt suspended a subscription (in place of payment.failed). Data: subscriptionId, invoiceId, dunningState.
subscription.trial_startedA trial began.
subscription.trial_will_endStripe's notice that a trial ends soon, about three days before. Data: workspaceId or subject, subscriptionId, trialEnd, daysRemaining.
subscription.trial_extendedAn operator moved a trial's end later. Data: subscriptionId, previousTrialEnd, trialEnd, daysAdded, reason.
subscription.trial_expiredA trial ended without a payment and the subscription was cancelled. Data: workspaceId or subject, subscriptionId, expiredAt.
subscription.pausedCollection on a subscription was paused.
subscription.unpausedCollection on a paused subscription resumed.
subscription.retention_acceptedA customer took the retention offer instead of cancelling.
subscription.stripe_out_of_syncThe daily reconcile or the billing operation sweep found something here and in Stripe that needs a person.
payment.succeededStripe reported a paid invoice for a subscription. Data: workspaceId or subject, subscriptionId, invoiceId, billingReason, amount, currency, paidAt, subtotal, discount, tax, hostedInvoiceUrl.
payment.failedA Stripe payment attempt failed, except the one that suspends the subscription.
payment.action_requiredA payment needs the customer to authenticate (3D Secure): a subscription invoice or an automatic credit top-up. Data: kind, subscriptionId, invoiceId, paymentIntentId, amount, currency, hostedInvoiceUrl.
payment.refundedStripe reported a refund on a charge. Data: chargeId, subscriptionId, invoiceId, checkoutSessionId, amount, amountRefunded, currency, fullyRefunded, refundedAt.
payment.card_expiringThe card a subscription is charged on expires within 30 days. Data: subscriptionId, paymentMethodId, brand, last4, expMonth, expYear, expiresAt, nextChargeAt, source.
payment.stripe_events_failedThe hourly sweep found stored Stripe events that failed to process, at most once an hour.
quota.limit_exceededMetered use passed a subscription's included amount and overage began. Data: subscriptionId, quotaSlug, consumed, included, overage.
quota.threshold_reachedUse of a quota crossed one of the percentages its spend cap asked to be told about, once per threshold per period. Data: subjectType, subjectId, workspaceId, quotaSlug, percent, used, included, resetsAt.
credit.purchasedCredits were bought: a credit package checkout, or an automatic top-up (autoTopUp: true). Data: subject, amount, packageName, packageSlug, amountPaid, currency, subtotal, discount, tax.
credit.consumedCredits were spent, directly or by settling a hold. Data: subject, amount, balanceAfter, description, holdId.
credit.expiredA credit bucket reached its expiry and its remainder left the balance. Data: subject, amount, bucketId, balanceAfter, reason.
credit.grantedCredits were added to a balance; source says how (plan_grant, credit_pack_purchase, admin_grant or refund). Data: subject, amount, source, balanceAfter, bucketId.
credit.revokedCredits were taken off a balance, capped at what is available; reason says why. Data: subject, amount, balanceAfter, reason, creditPackage.
credit.low_balanceA consume or a hold left the available balance under its low-balance threshold. Data: subject, available, threshold.
credit.reservedCredits were put on hold for work whose cost is not known yet. Data: subject, holdId, amount, available, held, expiresAt, description.
credit.settledA hold closed at the real cost (credit.consumed fires beside it). Data: subject, holdId, reserved, settled, returned, expired, extra, balanceAfter.
credit.releasedA hold was given back whole: released by the caller, or expired. Data: subject, holdId, amount, reason, returned, expired, balanceAfter.
credit.threshold_crossedThe balance fell under the auto top-up threshold and a top-up started, once per crossing. Data: subject, available, threshold.
credit.top_up_failedAn automatic top-up did not charge: a decline, no card, the monthly cap, dunning or the currency. Data: subject, reason, code, failureCount, nextAttemptAt, paused, packageName.
credit.plan_grant_failedA plan's credits were not granted when due, and whether it is retrying, resolved or needs a person.
addon.purchasedAn add-on was bought, once per purchase.
addon.expiredA time-boxed add-on's window closed.
addon.revokedAn add-on was taken back: a refund, a dispute, or a purchase past its cap.
addon.changedA recurring add-on's quantity or item changed on the subscription.
payer.subject_addedA payer started paying for a workspace, not sent when a workspace pays for itself. Data: workspaceId, subject, payer, subscriptionId, reason.
payer.subject_removedA payer stopped paying for a workspace: the subscription ended or moved to another payer. Data: workspaceId, subject, payer, subscriptionId, reason.
workflow.createdA workflow was created in the console, from scratch or from a template. Data: workflowId, name, actorId.
workflow.deletedA workflow was deleted. Data: workflowId, name, actorId.
workflow.publishedA workflow version was published. Data: workflowId, version, actorId.
workflow.pausedA workflow was paused. Data: workflowId, instancesPaused, actorId.
workflow.resumedA paused workflow was resumed. Data: workflowId, resumeMode, actorId.
workflow.instance_completedA workflow run finished. Data: workflowId, instanceId, workspaceId, completedAt.
workflow.instance_failedA workflow run stopped on an error. Data: workflowId, instanceId, workspaceId, nodeId, error, failedAt.
audience.member_createdA contact was added to the audience: in the console, through the server API, or synced from a user. Data: audienceId, email, name, source, actorId.
audience.member_updatedA contact changed: in the console, through the server API, a double opt-in confirmation or a workflow. Data: audienceId, email, name, changedFields, changedKeys, actorId.
audience.added_to_listA contact was added to a list. Data: listId, listName, audienceId, actorId.
audience.removed_from_listA contact was removed from a list. Data: listId, listName, audienceId, actorId.
audience.attribute_changedA contact's custom attributes changed, in the console or through the server API. Data: audienceId, email, changes, actorId.
audience.tag_addedA tag was added to a contact: in the console, the server API or a workflow. Data: audienceId, email, tagId, tagTitle, actorId.
audience.tag_removedA tag was removed from a contact: in the console, the server API or a workflow. Data: audienceId, email, tagId, tagTitle, actorId.
audience.unsubscribedA contact was unsubscribed: the email's unsubscribe link, the console, the server API or a workflow. Data: audienceId, email, reason, unsubscribedAt, actorId.
audience.resubscribedAn unsubscribed contact was subscribed again: the console, the server API, a double opt-in confirmation or a workflow. Data: audienceId, email, actorId.
audience.email_invalidatedA contact's address was marked invalid, in the console or by a workflow. Data: audienceId, email, invalidEmail, actorId.
audience.blockedA contact was blocked, in the console or by a workflow. Data: audienceId, email, name, reason, actorId.
audience.unblockedA blocked contact was unblocked, in the console or by a workflow. Data: audienceId, email, name, actorId.
audience.import_completedAn audience import job finished. Data: total, created, updated, skipped, errorCount.
audience.list_createdA list was created. Data: listId, listName, listType, actorId.
audience.list_updatedA list was changed. Data: listId, listName, listType, actorId.
audience.list_deletedA list was deleted. Data: listId, listName, listType, actorId.
email.domain_addedA sending domain was added in the console. Data: domain, domainId, actorId.
email.domain_verifiedA verify of a sending domain in the console succeeded. Data: domain, domainId, actorId.
email.sentA message was sent to an address that is an audience contact; mail to anyone else emits nothing. Data: trackingCode, recipientEmail, audienceId, campaignId, templateId, subject.
email.openedA message's tracking pixel loaded (some mail clients load it before anyone reads). Data: trackingCode, recipientEmail, audienceId, campaignId, emailHistoryId, subject.
email.clickedA tracked link in a message was followed. Data: trackingCode, link, recipientEmail, audienceId, campaignId, emailHistoryId.
email.bouncedThe mail provider reported a bounce for a message, and the address is suppressed. Data: kind, trackingCode, recipientEmail, emailHistoryId, audienceId, subject.
email.complainedThe mail provider reported that a recipient marked a message as spam. Same data as email.bounced.
email.unsubscribedA recipient unsubscribed: a message's unsubscribe link, or an unsubscribe the mail provider reported. Data: trackingCode, recipientEmail, audienceId, emailHistoryId, and kind when the provider reported it.
email.campaign_sentAn email campaign finished sending. Data: campaignId, campaignName, templateId, recipientCount, failedCount.
push.campaign_sentA push campaign was sent from the console. Data: campaignId, title, recipientCount.
auth.method_deletedA sign-in method was deleted in the console. Data: methodId, actorId.
auth.domain_addedA custom domain for the hosted sign-in page was added in the console. Data: domain, domainId, actorId.
auth.domain_verifiedA verify of a hosted sign-in custom domain in the console passed its checks. Data: domain, domainId, actorId.
auth.domain_deletedA hosted sign-in custom domain was removed. Data: domain, domainId, actorId.
auth.client_self_registeredAn agent or third-party app registered its own OAuth client (dynamic client registration). Data: clientId, clientName, ip, userAgent, softwareId.
enterprise.createdA company (an enterprise paired with a WorkOS Organization in your WorkOS account) was created. Data: enterpriseId, name, actorId.
enterprise.deletedA company was deleted. Data: enterpriseId, name, actorId.
enterprise.domain_verifiedWorkOS verified one of a company's email domains. Data: enterpriseId, domain, actorId, via.
enterprise.user_provisionedDirectory Sync created a person, in place of user.registered. Data: enterpriseId, userId, directoryUserId.
enterprise.user_deprovisionedDirectory Sync removed a person from the company. Data: enterpriseId, userId, reason.
enterprise.directory_syncedA pull or reconcile of a company's directory finished, one summary per directory per sync. Data: enterpriseId, directoryId, provisioned, updated, deprovisioned, skipped.
enterprise.certificate_expiringWorkOS reported that a company's SAML certificate is expiring or expired, repeated as it approaches. Data: enterpriseId, name, state, certificateType, expiresAt, daysUntilExpiry, connectionId, label.
enterprise.certificate_renewedWorkOS reported that a company's SAML certificate was renewed. Same data as enterprise.certificate_expiring.
enterprise.policy_updatedA company's access policy changed. Data: enterpriseId, name, changed, via.
enterprise.break_glass_usedA break-glass person signed in past required SSO. Data: enterpriseId, name, userId, email, door.
enterprise.sessions_revokedA company's people were signed out: by an admin, a policy change, an app no longer allowed, or an agent issuer change.
enterprise.connection_activatedThe company's IT admin activated an SSO connection. Data: enterpriseId, name, state, connectionId, connectionType, eventAt, ssoRequired, label, isDefault.
enterprise.connection_deactivatedAn SSO connection was deactivated: nobody signs in through it. Same data as enterprise.connection_activated.
enterprise.connection_deletedAn SSO connection was deleted. Same data as enterprise.connection_activated.
enterprise.log_stream_failingA log stream to a company's SIEM failed three times in a row; its backlog waits. Data: enterpriseId, name, source, and for a BuildBase stream streamId, stream, kind, failures, status, message.
enterprise.log_stream_recoveredA failing log stream delivered again. Same data as enterprise.log_stream_failing.
enterprise.admin_addedSomeone was named a company admin, by hand or by a mapping. Data: enterpriseId, name, userId, email, source, role, roleName, previousRole, previousRoleName.
enterprise.admin_removedA company admin was removed. Same data as enterprise.admin_added.
enterprise.key_createdA company API key was made. Data: enterpriseId, name, keyId, keyName, scopes, ownerType.
enterprise.key_revokedA company API key stopped working: revoked by hand, its owner no longer an admin, or its service account deleted. Data: enterpriseId, name, keyId, keyName, scopes, ownerType, reason.
enterprise.group_createdA company group was made. Data: enterpriseId, name, groupId, group.
enterprise.group_updatedA company group's name, people, workspaces or role changed. Data: enterpriseId, name, groupId, group, changed, added, removed.
enterprise.group_deletedA company group was deleted. Data: enterpriseId, name, groupId, group.
enterprise.group_members_changedThe people named in a company group changed, through any door.
enterprise.role_createdA custom company role was made. Data: enterpriseId, name, roleId, roleName.
enterprise.role_updatedA custom company role changed. Data: enterpriseId, name, roleId, roleName, changed, people, groups.
enterprise.role_deletedA custom company role was deleted. Data: enterpriseId, name, roleId, roleName.
enterprise.person_joinedSomeone became one of a company's people by their email domain: at a sign-in, an approved request, or a claim. Data: enterpriseId, name, userId, email, joinedBy, workspaces.
enterprise.join_requestedSomeone with a company email domain asked to join the company. Data: enterpriseId, name, requestId, userId, email.
enterprise.join_request_declinedA request to join a company was declined. Data: enterpriseId, name, requestId, userId, email.
enterprise.domain_removedA company's email domain stopped counting: removed by hand, or removed in WorkOS. Data: enterpriseId, name, domain, removedBy.
enterprise.app_team_sessionYour team opened a session as one of a company's people with the token exchange, or the company's policy refused it.
enterprise.workos_roles_attentionA company's roles in WorkOS started to need attention, once per change.
enterprise.workos_roles_recoveredA company's roles in WorkOS are back in sync.
enterprise.agent_issuer_updatedAny change to the identity provider a company trusts to approve agents.
enterprise.agent_accessA company's identity provider approved an agent for one of its people, or the app refused one.
enterprise.sso_routing_updatedWhich identity provider signs in each of a company's email domains changed: its default, routes or labels.
enterprise.workload_credential_updatedAny change to a workload credential on one of a company's service accounts.
enterprise.workload_accessA CI or cloud workload exchanged its token for a company API token, or the exchange was refused.
enterprise.workspace_policy_updatedA company set, changed or removed the stricter rules of one of its workspaces.
oauth.consent_grantedThe first time a person allowed an agent's OAuth client to act for them. Data: userId, clientId, actorId, scope.
oauth.consent_revokedA person's consent for an agent ended: they disconnected it, the app revoked it, or the client was deleted. Data: userId, clientId, actorId, scope, reason.
subscription.downgradedA plan change moved a subscription down. Data: subscriptionId, planVersionId, newPlanVersionId, oldInterval, newInterval, downgradedAt, promotionCode.
subscription.discount_appliedStripe added a discount to a subscription: a code at checkout, an admin, or the Stripe dashboard. Data: subscriptionId, discountId, couponId, promotionCode, name, percentOff, amountOff, currency, duration, durationInMonths, endsAt.
subscription.discount_removedStripe dropped a discount from a subscription: removed, or expired. Same data as subscription.discount_applied.
subscription.version_move_scheduledA holder was told ahead of a move to a newer plan, add-on or credit package version.
subscription.version_movedA holder's version move was applied, once per move item.
subscription.version_move_withdrawnA holder told of a version move will no longer get it.
token.createdAn API token was created in the console. Data: tokenId, name, actorId.
token.updatedAn API token was edited in the console: its name, description, active or archived state; changed lists which. Data: tokenId, name, changed, active, archived, actorId, previous.
token.revokedAn API token was deleted: by hand, or because the person who created it lost access. Data: tokenId, name, actorId.
group_version.publishedA new version of a plan group was published in the console. Data: groupId, groupName, groupVersionId, version, migrated, incompatible, totalPlans, actorId.
version_move.completedA version move is over: every holder it could move is moved, skipped or blocked, once per move.
version_move.cancelledA version move was cancelled from the console, once per move.
form.submittedA form submission was stored: a public submit, or an admin approving a held one. collection.record_created fires with it. Data: formId, recordId, data.
blog.publishedA blog post went live. Edits to a draft emit nothing.
blog.updatedA live blog post was edited.
blog.unpublishedA live blog post was taken down.
blog.deletedA blog post was deleted.
doc.publishedA doc went live. Edits to a draft emit nothing.
doc.updatedA live doc was edited.
doc.unpublishedA live doc was taken down.
doc.deletedA doc was deleted.
faq.updatedAn FAQ was created, edited or deleted.
faq_collection.updatedAn FAQ collection was created, edited, archived, or had FAQs added, removed or updated.
testimonial.updatedA testimonial was edited in the console. Creating one emits nothing.
testimonial.deletedA testimonial was archived, which takes it off every page that lists it.
rich_content.updatedA rich content entry was created or edited.
rich_content.deletedA rich content entry was deleted.
collection.version_publishedA collection version was made live, which reshapes every record an app reads.
collection.record_createdA record was added to a collection, including a stored form submission.
collection.record_updatedA collection record was edited.
collection.record_deletedA collection record was deleted.
item.createdA seller, your server or the console created an item, as a draft. Data: item, by, action.
item.updatedAn item's content changed; a status change alone emits nothing. Data: item, by, action.
item.publishedAn item went live: published, or approved from review. Data: item, by, action.
item.rejectedThe app owner rejected an item in review. Data: item, by, action.
item.archivedAn item stopped selling; buyers keep what they bought. Data: item, by, action.
order.createdA buyer started checkout: the order exists, unpaid, its stock held. Data: order.
order.paidAn order was paid, or claimed free. Data: order.
order.refundedMoney was returned to the buyer: by the seller, the app owner, your server, or in Stripe. Data: order, refund.
order.fulfilledA line of an order was marked fulfilled. Data: order, lineKey.
order.disputedThe buyer disputed the charge with their bank, or the dispute closed. Data: order.
order.part_paidA part of an order paid in parts was paid; order.paid follows the last. Data: order, partIndex.
order.part_failedThe buyer's card refused a later part of an order paid in parts. Data: order, partIndex.
order.shippedThe first shipment with a tracking number was made. Data: order, shipment.
shipment.updatedA shipment's status or tracking changed: in transit, delivered, returned. Data: shipment, order, previousStatus.
return.requestedA buyer asked to return units of an order. Data: return, order, previousStatus.
return.updatedA return was approved, rejected, shipped back, delivered or refunded. Data: return, order, previousStatus.
grant.createdA buyer was granted a benefit of what they bought. Data: grant.
grant.revokedA grant was taken back; its reason says why. Data: grant.
item_subscription.createdA seller's subscription started: the first period was paid, or a trial began. Data: subscription.
item_subscription.renewedA later period of a seller's subscription was paid. Data: subscription.
item_subscription.past_dueA renewal failed; the grants are in grace while Stripe retries. Data: subscription.
item_subscription.recoveredAn unpaid renewal was paid. Data: subscription.
item_subscription.canceledSet to end at the period end, ended now, or a cancel undone. Data: subscription.
item_subscription.resumedA seller's subscription set to end was resumed. Data: subscription.
item_subscription.endedOver: nothing renews, and the grants end. Data: subscription.
item_subscription.changedMoved to another tier of the item; the grants follow. Data: subscription, change.
booking.confirmedA booking's order was paid or claimed. Data: booking.
booking.cancelledA booking was cancelled: by the buyer, the seller, the app owner or your server, or by a full refund or a lost dispute. Data: booking, cancelledBy, refund.
booking.rescheduledA booking moved to another slot. Data: booking, previous, movedBy.
booking.updatedA booking changed in place: attendance marked, or moved onto a shared calendar. Data: booking, change, updatedBy, previousCalendarId.
affiliate.joinedA person joined an affiliate program. Data: affiliate, programName.
affiliate.approvedA waiting affiliate was approved, or a paused one resumed. Data: affiliate, programName.
affiliate.status_changedAn affiliate's status changed: approved, paused, resumed, banned, or paused when their account was deleted.
commission.createdA paid payment earned a commission, held until its hold ends. Data: commission, affiliate.
commission.paidA batch of an affiliate's commissions was paid out. Data: payout, commissionIds, affiliate.
commission.reversedA refund, a lost dispute or a ban took back part or all of a commission. Data: commission, affiliate.
seller.status_changedA seller's status changed: by the app owner, a closed account, or Stripe's review.
payout.createdA seller's payout started, on its way to their bank. Data: payout.
payout.paidThe seller's bank received a payout. Data: payout.
payout.failedThe bank refused a payout; the money is back in the seller's balance. Data: payout.

The event names, from the package

Since @buildbase/sdk 0.0.79 the catalog ships with the SDK, so a handler can be checked against it instead of against this page:

import {
  isWebhookEvent,
  WEBHOOK_EVENTS,
  type WebhookEventName,
} from '@buildbase/sdk';

WEBHOOK_EVENTS.length; // every name this SDK version knows
isWebhookEvent('payment.failed'); // true
isWebhookEvent('invoice.payment_failed'); // false, that is Stripe's name

isWebhookEvent narrows a string to WebhookEventName, so a switch over a parsed event's name is checked at compile time. WEBHOOK_EVENTS_BY_CATEGORY gives the same names grouped as the table above groups them.

The catalog is the list as it stood when that SDK version was released, so it can trail the platform. Versions 0.0.79 to 0.0.89 hold 112 names (113 in 0.0.89, which adds email.complained), without the sixteen sign-in events in the User and Auth rows above: two-step sign-in (user.mfa_enrolled, user.mfa_disabled, user.mfa_reset_by_admin, auth.login_failed), changing an email, bot protection, imports, connected accounts, phone numbers, the SMS budget and deleting accounts (user.deletion_scheduled, user.deletion_cancelled, user.deleted). The platform sends them to every version, but on one whose catalog lacks a name isWebhookEvent answers false, so a handler that drops unknown names drops it as well. @buildbase/sdk 0.0.90 holds all of them. Check WEBHOOK_EVENTS.length on the version you run. A catalog with all of them also types the deletion payload as UserDeletionWebhookData, and user.registered as UserRegisteredWebhookData.

The names below follow the same rule. The platform sends them, but @buildbase/sdk 0.0.90 and earlier do not list them; they arrive in the catalog in @buildbase/sdk 1.0.0:

  • Subscription: subscription.trial_extended, subscription.paused, subscription.unpaused, subscription.retention_accepted, subscription.discount_applied, subscription.discount_removed, subscription.stripe_out_of_sync, subscription.version_move_scheduled, subscription.version_moved, subscription.version_move_withdrawn
  • Version move: version_move.completed, version_move.cancelled
  • Payment: payment.card_expiring, payment.stripe_events_failed
  • Quota and entitlement: quota.threshold_reached, entitlement.ceiling_reached
  • Credit: credit.reserved, credit.settled, credit.released, credit.threshold_crossed, credit.top_up_failed, credit.plan_grant_failed
  • Add-on: addon.purchased, addon.changed, addon.expired, addon.revoked
  • Payer: payer.subject_added, payer.subject_removed
  • OAuth: oauth.consent_granted, oauth.consent_revoked
  • Enterprise: every enterprise.* name in the Enterprise row above

The commerce names are in the catalog from @buildbase/sdk 1.2.0:

  • Item: item.created, item.updated, item.published, item.rejected, item.archived
  • Order: order.created, order.paid, order.refunded, order.fulfilled, order.disputed, order.part_paid, order.part_failed, order.shipped
  • Shipment: shipment.updated
  • Return: return.requested, return.updated
  • Grant: grant.created, grant.revoked
  • Item subscription: item_subscription.created, item_subscription.renewed, item_subscription.past_due, item_subscription.recovered, item_subscription.canceled, item_subscription.resumed, item_subscription.ended, item_subscription.changed
  • Booking: booking.confirmed, booking.cancelled, booking.rescheduled, booking.updated
  • Payout: payout.created, payout.paid, payout.failed
  • Affiliate: affiliate.joined, affiliate.approved, affiliate.status_changed
  • Seller: seller.status_changed
  • Commission: commission.created, commission.paid, commission.reversed

Event payload structure

Every webhook POST body has this shape - four fields, nothing else:

{
  "id": "evt_3f1c9a0b7d2e4c6f8a1b2c3d4e5f6a7b",
  "event": "subscription.upgraded",
  "timestamp": 1719000000,
  "data": {
    "workspaceId": "ws_xyz789",
    "userId": "usr_def456",
    "planId": "plan_starter",
    "planVersionId": "pv_v2",
    "billingInterval": "monthly",
    "previousPlanId": "plan_free"
  }
}

A workspace's name in a payload is plain text, as the person typed it, not HTML-escaped (a behaviour change in this release, see workspace names): escape it before you put it into HTML, Markdown or a chat message.

id names the event: it is the same on every retry, and for every endpoint the event goes to. timestamp is Unix seconds, set when the event fires, and is also the same on every retry. Each delivery also carries the four BuildBase headers below, and the three Standard Webhooks headers (webhook-id, webhook-timestamp, webhook-signature) for checking it with any Standard Webhooks library:

HeaderContents
x-buildbase-signaturesha256=<hex> - HMAC-SHA256 of {timestamp}.{body} with your signing secret
x-buildbase-timestampUnix seconds when this attempt was signed (the body's is when the event fired)
x-buildbase-eventThe event name (e.g. subscription.upgraded)
x-buildbase-event-idThe same id as the body

The data object varies by event type. Some common patterns:

EventKey data fields
user.registeredactorId, email, name, and fromGuest for a guest
user.importedactorId, userId, email, name, externalId, source
user.account_linked, user.account_unlinkedactorId, userId, provider, accountId
user.phone_addedactorId, userId, phone, verified
user.phone_verified, user.phone_removedactorId, userId, phone
user.deletion_scheduledactorId, userId, deleteAfter
user.deletion_cancelledactorId, userId
user.deletedactorId, userId, by
seller.status_changedsellerId, previousStatus, status (as the console shows it: pending, onboarding, in_review, active, restricted, paused, rejected, unsupported, disconnected, closed, action_needed, awaiting_approval), reason (approved, paused, resumed, closed, account_deleted, stripe_account_updated). No name or email
affiliate.status_changedaffiliateId, programId, previousStatus, status (pending, active, paused, banned), reason (approved, paused, resumed, banned, account_deleted; a deleted account's affiliate is paused for good and is still paid what it earned). No name or email
auth.sms_budget_exceededlevel, sent, dailyCap, alertAt
subscription.createdworkspaceId for a workspace's plan or subject ({ type: 'user', id }, no workspaceId) for a person's, subscriptionId, planVersionId, createdAt; a paid checkout adds checkoutSessionId, amount, currency, subtotal, discount, tax. A free plan sends it too, chosen or written at a person's first read
subscription.trial_startedworkspaceId, subscriptionId, planVersionId, trialEnd
subscription.cancel_scheduledworkspaceId, subscriptionId, feedback, comment, retentionOutcome, source
subscription.canceledworkspaceId, subscriptionId, reason, feedback, comment
subscription.pausedworkspaceId, subscriptionId, accessUntil, resumesAt
subscription.unpausedworkspaceId, subscriptionId
subscription.retention_acceptedworkspaceId, subscriptionId, offerId, kind, feedback
subscription.stripe_out_of_syncreason (missing_in_stripe, key_refused, drift or operation_needs_operator), count, subscriptionIds (the first 10), checked, drift (when the check found any: at most 10, each with subscriptionId, type, local, stripe, severity, and item and why where they apply), and with operation_needs_operator operations (the first 10)
subscription.version_move_scheduled, subscription.version_movedworkspaceId, subject, subscriptionId (null on a free plan), moveId, moveItemId, kind, planId, fromVersionId, toVersionId, class (gain, loss or mixed), effectiveAt, changes, price (currency, interval, from, to), coupons, email, and noticeSentAt or appliedAt
subscription.version_move_withdrawnthe fields of subscription.version_move_scheduled, with effectiveAt the date the change was due, then reason (why it is off: move_cancelled, exempt, not_on_from_version, ended, version_pin, ...) and email for the email saying so
version_move.completedmoveId, kind (plan, offer_generation, offer_version, package_version, grant or future_versions), planId, planName, fromVersionId, toVersionId, offerId, offerName, fromOfferVersionId and toOfferVersionId, creditPackageId, creditPackageName, fromPackageVersionId and toPackageVersionId, generations, grant or futureVersions (below), mode, startedAt, completedAt, holders, counts (items per state: applied, skipped, blocked, ...)
version_move.cancelledthe fields of version_move.completed but completedAt, then cancelledAt, cancelledBy (the user id), holders, counts (items per state as the move stood), withdrawn (holders already noticed whose change it takes back) and settling (items a step had started on, still being finished)
payment.failedsee below
payment.card_expiringworkspaceId, subscriptionId, paymentMethodId, brand, last4, expMonth, expYear, expiresAt, nextChargeAt, source
payment.stripe_events_failedreplaying, gaveUp, events (at most 10, each with eventId, type, receivedAt, replays, gaveUp)
credit.consumedworkspaceId, amount, description, remaining
credit.plan_grant_failedworkspaceId, subject, outcome (retrying, resolved or needs_person), grant (plan, upgrade, plan_change or monthly), planVersionId, attempts, nextAttemptAt, and on resolved granted, amount or reason
addon.purchasedsubject, offerSlug, shape, quantity, purchaseId, grantIds, amountPaid, currency, promotionCode, expiresAt, cause (purchase or upgrade), upgrade
addon.changedsubject, offerSlug, grantIds, previousQuantity, quantity, cause
addon.expiredsubject, offerSlug, itemSlug, grantIds, expiredAt
addon.revokedsubject, offerSlug, grantIds, reason, unitsTakenBack, restoredGrantIds, restoredPurchaseId
oauth.consent_granteduserId, clientId, actorId, scope
oauth.consent_revokeduserId, clientId, reason, and actorId when the person disconnected it
entitlement.ceiling_reachedworkspaceId, slug, limit, current, userId, at
workspace.member_addedworkspaceId, userId, role, source (see below)
enterprise.sessions_revokedenterpriseId, name, scope (person, everyone, session for one session of one person, outside_methods for the sessions that began a way the company's sign-in methods do not allow, or agents for the agent sessions a company's identity provider approved), userId, people, sessions (1 for session), via
enterprise.app_team_sessionenterpriseId, name, userId, appKeyName, workspaceId (or null), expiresIn (seconds, null when refused), outcome (issued or refused)
enterprise.workos_roles_attentionenterpriseId, name, state (needs_attention or unreachable), issues (each code, item, since, sentence; empty when unreachable), readAt, lastGoodReadAt
enterprise.workos_roles_recoveredenterpriseId, name, state: "in_sync", attentionSince, readAt
enterprise.agent_issuer_updatedenterpriseId, name, issuer, tenant, change (added, proven, approved, enabled, disabled, token_minutes, jwks_uri or removed), status (pending, active, disabled, or null once removed), sessionsEnded (null when none ended)
enterprise.agent_accessenterpriseId, name, userId (or null), clientId, app, outcome (granted or refused), reason (null when granted), scopes
enterprise.workload_credential_updatedenterpriseId, name, serviceAccountId, serviceAccount, credentialId, credential, preset, issuer, change (created, updated, enabled, disabled or deleted), status (active, disabled, or null once deleted), tokensRevoked (null when none ended)
enterprise.workload_accessenterpriseId, name, serviceAccountId, credentialId, credential, outcome (issued or refused), reason (null when issued), subject (the workload's, once its signature held), scopes
enterprise.workspace_policy_updatedenterpriseId, name, workspaceId, workspace, change (set, updated or removed), reason (unbound when the rules went with the workspace's binding, else null), changed (the rules that changed), via (console, app or api)
Content events (blog.*, doc.*, faq.updated, rich_content.*, collection.*, ...)module, id, slug, path (null for now), tags

enterprise.app_team_session fires each time your team opens a session as one of a company's people with the token exchange (outcome: "issued"), or the company's access policy refuses it (outcome: "refused"): one event with an outcome, for a workflow that tells your own team, or the customer, each time. appKeyName is the name of the API key that asked; see your team signing in as the company's people.

enterprise.workos_roles_attention fires when a company's roles in WorkOS start to need attention, and enterprise.workos_roles_recovered when they are back in sync: once per change, never for the first state after role assignment is turned on, and with "can't reach WorkOS" counted only after 24 hours without a good read. See when the roles need attention.

enterprise.workload_credential_updated fires on every change to a workload credential on one of a company's service accounts, with the live workload tokens it ended (tokensRevoked), and enterprise.workload_access when a CI job or cloud workload exchanged its token (at most once an hour per credential and subject) or was refused (at most once an hour per credential and reason). See workload identity.

enterprise.agent_issuer_updated fires on every change to the identity provider a company trusts to approve the agents that act for its people, and enterprise.agent_access when such an agent gets a token for one of its people (at most once a day per issuer, person, agent and how the person was found, and every time for a match by email) or is refused (at most once an hour per issuer and reason, and per subject and agent once the signature holds). See agents through a company's identity provider.

enterprise.workspace_policy_updated fires when a company sets, changes or removes the stricter rules of one of its workspaces, from your console, its admins in your app or one of its keys, and when the rules go with the workspace's binding (reason: "unbound"). enterprise.policy_updated does not fire for them, and a request one of them refuses has no event.

feedback is one of Stripe's eight cancellation reasons (too_expensive, missing_features, switched_service, unused, customer_service, too_complex, low_quality, other) or null when the customer gave none, and comment is their free text. retentionOutcome is declined when the cancel dialog showed an offer and the customer turned it down, else not_offered; a taken offer fires subscription.retention_accepted instead, with kind coupon or pause. subscription.paused fires when a pause is put on, whoever did it, and subscription.unpaused when it ends, early or at resumesAt. See Cancel, pause and resume. oauth.consent_granted fires the first time a person allows an agent's OAuth client to act for them; widening the scopes of a consent they already hold is not a new one. oauth.consent_revoked gives reason as user_disconnected (the person, from the SDK's connected agents screen), consent_revoked (your app, through the consent revoke endpoint) or client_deleted. entitlement.ceiling_reached tells you an end user hit a workspace limit you marked as an end-user boundary, at most once an hour per workspace and slug. Every subscription.* and payment.* event carries subject: { "type": "workspace", "id": "<workspaceId>" } beside workspaceId for a workspace's plan, or { "type": "user", "id": "<userId>" } and no workspaceId for a person's own plan or credit wallet. Read subject and one handler serves both. See Plans for users and workspaces. Two are about your organization's Stripe account rather than one plan, and carry no subject or workspaceId: payment.stripe_events_failed and subscription.stripe_out_of_sync, below. The workspace membership events carry source when the change did not come from someone in your app: directory_sync (the company directory, which emails nobody), sso (single sign-on joining one of an enterprise's people to the workspaces it binds) or console (your team in the console). With no source, a person did it in the app.

actorId on user.registered is the new user's id, and fromGuest: true marks a guest who created their account. by on user.deleted is self, admin or guest_expired; see Deleting accounts.

payment.failed fires on every failed Stripe payment attempt except the one that suspends the subscription, which fires subscription.suspended instead. Its data is:

FieldContents
workspaceIdThe workspace whose subscription failed to bill
subscriptionIdThe subscription
invoiceIdThe Stripe invoice
dunningStatenotified, warning or final, by how many attempts have failed so far
amountAmount due, in the currency's smallest unit (cents for USD, yen for JPY)
currencyLowercase ISO currency code, as Stripe sends it
failedAtISO 8601 timestamp
nextRetryAtISO 8601 timestamp of Stripe's next attempt, or null

payment.stripe_events_failed fires at most once an hour, when the hourly sweep of the Stripe events stored for your organization found some that failed to process: replaying were replayed again, and gaveUp used their last replay, after which a person resends them from the Stripe dashboard. receivedAt is when BuildBase stored the event, not Stripe's created. subscription.stripe_out_of_sync fires at most once a day, when the daily check of live subscriptions against Stripe could not put some right: missing_in_stripe for subscriptions Stripe does not have, left alone because the check found none of your other subscriptions in that mode (test or live), or key_refused when Stripe refused your secret key and the check stopped, count then being the subscriptions it did not check. The check also compares each subscription's base price, plan version, billing interval, seat item, overage items and add-on items with Stripe. A difference the regular Stripe update settles, it puts right by running that update, and does not report. One it cannot settle on its own (a price no plan version names, an add-on item with no grant, a seat count nothing on the subscription explains) is left as it is and reported as drift, count then being those subscriptions: each drift entry holds what BuildBase has (local) and what Stripe bills (stripe), and why names the reason, such as price_names_no_version or no_grant. A run that also held subscriptions or stopped on a refused key sends that reason, with drift beside it. It also fires, at most once every 15 minutes, with operation_needs_operator when billing operations that change Stripe and then BuildBase (a plan change, a checkout, a plan version's publish, a refund) were left part way and could be neither finished from Stripe nor shown to have changed nothing: count is those operations, checked the ones the sweep looked at, subscriptionIds the plan changes' subscriptions, and operations the first 10, each with its id, op, startedAt, the stripeIds it made when known and why it needs a person. Nothing is reversed, and nothing is sent to Stripe again blind: a person checks each one in the Stripe dashboard.

credit.plan_grant_failed tells you that a plan's credits were not granted when they were due (at a checkout, a free plan's start, an upgrade, a downgrade taking effect or the monthly reset) and where that stands. BuildBase keeps the grant and runs it again by itself, first after 15 minutes and then with longer waits for about two days. Each grant sends retrying once when it is kept, then resolved when a run settles it: granted with the amount, or nothing owed, with the reason (the grant had gone through after all, or the plan moved on). needs_person means it still failed after its last run, or could not be kept to run again: grant the plan's credits to the workspace by hand. Running a grant again never grants it twice.

The version move events follow a plan's holders as they move from one of its versions to the next. subscription.version_move_scheduled fires once per holder when a change that takes something away (or mixes losses and gains) is noticed: it reaches them at effectiveAt, their renewal at least the move's notice period after noticeSentAt. subscription.version_moved fires once per holder when the move is applied: a gain at once, and a loss in the last days before effectiveAt, when Stripe starts billing the new version from that renewal and the old version's features stay until then. changes lists what changes for that holder, losses first, each with its kind (feature, limit, quota, price, seats, credits, grant, members, add_on or other), effect (gain or loss), code, the item's slug and name, and from and to when they are numbers (-1 is unlimited, money is in the currency's smallest unit). email says what became of the holder's email: queued, no_address or not_sent (told by this event and in your app only), or none for a loss being applied, whose notice went before. version_move.completed fires once per move, when every holder it could move has moved and been told. A holder on a downgrade of their own to the version being moved from, keeping the plan they paid for until their period ends, keeps it: the move waits for them, one whose downgrade was made while the move ran too, and takes them when that period ends, a gain at once and a loss after its notice.

A holder told of a change that will no longer reach them gets subscription.version_move_withdrawn, once: the move was cancelled, a person left them where they are, their own plan change or the end of their subscription took them off the version, or the move ended with them still held back (a version pin). It carries the fields of their subscription.version_move_scheduled, effectiveAt being the date the change was due, with reason and email. They are emailed that the change is off (email: "queued") when their notice was emailed, except after a change of their own or the end of their subscription (email: "none"): drop whatever you stored from the notice, such as a banner or a price change of your own. A cancelled move also sends version_move.cancelled once, about the move: how many holders it had moved, how many already noticed are told it is off (withdrawn), and whether items it had started on are still being finished (settling); each of those ends moved or with its own subscription.version_move_withdrawn. A holder never noticed hears nothing.

The same events follow a recurring add-on's holders as they move to its current price (kind: "offer_generation"): one whose price goes up is told ahead, with subscription.version_move_scheduled, and moves at the renewal at least the notice period away; one whose price goes down moves at once, from the next bill. planId, fromVersionId and toVersionId are then null, and offerId, offerName, fromGeneration, toGeneration and quantity (the units held) say what moved; price is per unit, and changes holds the one price line. An add-on bought outright (one-time, lifetime, a pack) is never moved. A grant to every holder of a plan version or an add-on (kind: "grant") sends no event per holder: its rows show in each holder's entitlement, and version_move.completed names what was given (grant: holdersOf and items) and to how many. A lifetime add-on's new version given to every licence sold with "includes future versions" (kind: "future_versions") sends no event per holder either: toVersionId is the version given, and futureVersions names it (offerVersionId, version) and what one unit of it grants (items), which each licence took merged into its own terms, gains only. See Add-ons. On a plan's own move every field naming an add-on is absent; on an add-on's, generations lists the price each currency moved to.

The same events follow a recurring add-on's holders as they move to a newer version of it (kind: "offer_version"), what each unit grants as well as its price: fromOfferVersionId and toOfferVersionId name the versions (with their numbers, fromOfferVersion and toOfferVersion), beside offerId, offerName, fromGeneration, toGeneration and quantity, and changes lists every item and term the new version changes. A gain moves at once. A loss is told ahead and Stripe bills the new price from the renewal at least the notice period away; what the rows grant changes at that renewal too, never before. A seat class moves its item and keeps its seats. A holder whose currency or interval the new version does not sell stays where they are. version_move.completed names the offer and both versions (fromOfferVersionId is null for a move of every older version's holders). Either kind of add-on move, once told, shows on the holder's subscription read until it takes effect, as scheduledAddOnChanges (see Add-ons).

A credit package's version moves (kind: "package_version") follow the enabled automatic top-ups that buy an older version of the package; credits already bought or granted keep their terms. creditPackageId, creditPackageName, fromPackageVersionId, toPackageVersionId, fromPackageVersion, toPackageVersion and credits (from, to: credits per top-up) say what moves; subscriptionId is null, and price is per top-up (interval is one_time). A gain (more credits for the same money or less, the same for less, or credits that last longer) moves the setting at once and sends subscription.version_moved; the next top-up charges the new terms. Anything else is never applied without the payer: subscription.version_move_scheduled fires once with agreementRequired: true and effectiveAt null, the payer is emailed, and the setting keeps buying the version it agreed to until the payer agrees to the new one (the auto top-up setting's versionOnSale, then acceptVersion). A plan version's credit grant names the package version it grants, and moves only with the plan's own move.

Deliveries are enriched with workspace and subscription objects where the server has them. There is no failureReason field; read it from the Stripe invoice if you need it. The lifecycle email for a failed payment is a console notification (billing:payment_failed) or a workflow on this trigger; your handler is for your own side effects.

Every addon.* event names its subject, with workspaceId too for a workspace. addon.purchased with cause: "upgrade" is a holder's upgrade to a newer version of a one-time or lifetime add-on, and upgrade names the purchase and rows it replaced, both versions, the full price, the credit and the amount charged. addon.changed fires when a recurring add-on's quantity moves, cause being purchase or subscription_item; reason on addon.revoked is why the grants ended (refunded, item_removed, payment_not_completed, included_in_plan and outside_applies_to_plans after a plan change, ...). See Add-ons.

Content events carry ready-made cache tags so a site can clear exactly what changed; see Delivering content.

Delivery guarantees

Delivery is best effort. BuildBase retries a failed delivery for a few minutes and then gives up; it does not keep events to send again later.

  • 5 attempts over about 2.5 minutes - a response other than 2xx, a network error, or no answer within 15 seconds is a failed attempt. It is retried 4 more times with exponential backoff, at roughly 10s, 20s, 40s and 80s, so the last attempt lands about 2.5 minutes after the first. A destination that is refused by our outbound safety checks is not retried at all; the delivery log says blocked. Every other status is retried the same way, including 410 Gone: answering 410 does not stop the retries or turn the endpoint off. To stop deliveries to an endpoint, turn it off or remove it in the console. Deleting an endpoint or turning it off stops its pending retries: a delivery waiting for its next attempt is dropped, not sent.
  • Each attempt is signed when it is sent - every attempt, the first and each retry, is signed with the time of that attempt (x-buildbase-timestamp, webhook-timestamp) and the endpoint's secret as it is at that moment, and goes to the endpoint's URL as it is at that moment. So every attempt lands inside the 5-minute window your receiver should enforce, and a retry after you rotate the signing secret or change the URL uses the new one. The event's id and the body's timestamp stay the same on every attempt.
  • No resend - a delivery that fails all 5 attempts is not sent again, and there is no resend or replay. Each attempt stays in the endpoint's delivery log.
  • Events can be lost without a trace - an event is lost, with no row in the delivery log, if it cannot be queued for delivery (for example while our queue store is unavailable), if looking up your endpoints fails at that moment, if the server stops between saving the change and dispatching its event, or if queued deliveries are lost along with the queue store. If missing a change would hurt, reconcile against your data from time to time (see the Server SDK) rather than relying on webhooks alone.
  • Duplicates are possible - a retry can repeat an event your receiver already processed, for example one it answered after our 15-second timeout. Every attempt carries the same id, so record the ids you have processed and skip one you have seen. A retry normally resends the first attempt's exact body, but when that copy cannot be read the body is built again and its data can differ, so deduplicate on the id, not on a hash of the body.
  • No ordering guarantee - events may arrive out of order. Use event.timestamp if ordering matters.
  • Signature expiry - signatures are valid for 5 minutes by default. Reject older payloads to prevent replay attacks.

Rotating the signing secret

Rotate an endpoint's secret from its row in the console: Settings, then Webhooks, Rotate secret (step by step), or with POST /api/organizations/webhooks/:id/rotate-secret. The new secret is shown once, in the New signing secret dialog (the API returns it once as secret); copy it before you press Done.

  • New events use the new secret at once. Every event dispatched after the rotation is signed with it. There is no overlap in which new events carry both.
  • Retries use the new secret too. Each attempt is signed when it is sent, so a delivery that failed before the rotation and is waiting for its next attempt is signed with the new secret. Only an attempt already sent before you rotated carries the old one.
  • Put the new secret on your server promptly. Until your receiver has it, it rejects the deliveries signed with it, and each of them is retried for about 2.5 minutes. An event whose last attempt is still rejected is dropped, so a receiver updated within that time loses nothing.

Changing an endpoint's URL works the same way: the next attempt of a delivery already retrying goes to the new address.

Limits

Webhooks fan out: one event reaching ten endpoints is ten calls to your servers, and some events fire per recipient rather than per action. These bounds keep one busy hour from becoming a queue nobody can drain.

LimitValueWhat happens at the limit
Endpoints per organizationSet by your plan and shown beside Create webhook, and at most 100 on any plan. Archived endpoints do not countCreating one more is refused, with 402 PLAN_LIMIT_REACHED at your plan's number. Remove webhook archives an endpoint and frees its place: it keeps its record and delivery history, and cannot be turned back on
Events per endpointSet by your plan, if it sets one. All Events counts as oneCreating or saving an endpoint that lists more is refused with 402 PLAN_LIMIT_REACHED
Deliveries per minute240 per organizationFurther deliveries that minute are not sent, and appear in the delivery log as throttled
Deliveries in flight at once3 per organizationThe next delivery waits a few seconds and is then sent. Nothing is dropped and no retry is spent
Failed deliveries in a row50 per endpoint, failing for at least 1 hourThe endpoint is turned off, shows Auto-disabled in the console, and your owner and admins are emailed

A throttled delivery never left BuildBase, so it is not a failure of your receiver and is not retried. email.sent fires once per recipient, so a large campaign is the usual way to meet the per-minute limit; subscribe an endpoint to the specific events you need rather than to * if that matters to you.

The in-flight limit is different in kind: it is a queue, not a refusal. Three of your deliveries run at a time and the rest wait their turn, so a receiver of yours that answers slowly slows down your own events and nobody else's. Because it defers rather than drops, it costs you no retry attempts and shows up as nothing in the delivery log except later timestamps. A delivery is signed after it gets its slot, so waiting for one cannot turn into a signature rejection. If your receiver answers quickly you will never notice it: three concurrent requests at, say, 200ms each is well above the per-minute limit above.

A delivery counts toward the failed-deliveries limit once, when all 5 of its attempts have failed; a failed attempt that is still going to be retried does not count. An endpoint is turned off only when both hold: 50 failed deliveries with no success between them, and the first of them failed at least an hour ago. Any 2xx resets both, so a short outage at your receiver never turns an endpoint off, however many events it sees. The first delivery fails for good about two and a half minutes into an outage, so a busy endpoint is turned off about an hour and three minutes in, and a quiet one only once it has also failed 50 deliveries.

While an endpoint is disabled, whether we turned it off or you did, nothing is sent to it. When we turned it off, each event it would have received appears in its delivery log as Skipped, so you can see what it missed; one you turned off yourself logs nothing. Turning the endpoint back on does not send those events. Re-enabling an auto-disabled endpoint from the console clears its failure count, and turning one off yourself makes it yours: it shows as Disabled and stops logging skipped events.

In development and staging

Each development or staging environment has its own webhook endpoints and signing secrets. An endpoint added in Development never receives production's events, and production's secret never verifies one of its deliveries.

Outside production, an endpoint may be an http:// address or a tunnel (a public address that forwards to your computer, from a tool such as ngrok). So a receiver on your machine works while you build. Production takes https only. Promotion never copies endpoints or secrets, so add them in each environment.

Next Steps

  • Server SDK - Backend setup and all server methods.
  • Billing - Subscription events and payment handling.