WebhookDelivery

The `WebhookDelivery` entity.

Definition

TypeScript
interface WebhookDelivery {
  id: string;
  workspaceId: string;
  subscriptionId: string;
  sourceEventId: string | null;
  eventType: string;
  payload: Record<string, unknown>;
  status: "pending" | "failed" | "completed" | "cancelled" | "retrying";
  attemptCount: number;
  maxAttempts: number;
  nextRetryAt: string | null;
  createdAt: string;
  updatedAt: string;
}

Fields

FieldTypeNotes
idstringreadonly required
workspaceIdstringrequired — Workspace that owns the subscription.
subscriptionIdstringrequired — Subscription that this delivery is for.
sourceEventIdstring | nullrequired — Event that triggered this delivery; null if the event has been pruned.
eventTypestringrequired — Snapshot of the event type at dispatch time.
payloadRecord<string, unknown>required — Snapshot of the outbound body; preserved so retries work after event pruning.
status"pending" | "failed" | "completed" | "cancelled" | "retrying"required — Lifecycle state — see entity docs for transitions.
attemptCountnumberrequired — Number of attempts recorded so far.
maxAttemptsnumberrequired — Ceiling for automatic retries (1 initial + N auto-retries).
nextRetryAtstring | nullrequired — When the retry worker will next pick this up; null if terminal.
createdAtstringreadonly required — ISO-8601 timestamp of creation.
updatedAtstringreadonly required — ISO-8601 timestamp of the last state transition.