Skip to main content

Declared webhook events

  • sms.otp Successful OTP send. Uses the message payload shape plus data.otp.
  • message.sent SMS accepted by the provider after dispatch.
  • message.batch Batch summary emitted when no batch messages remain pending and at least one stored message row reached SENT.
  • message.queued Immediate SMS persisted in queue before provider dispatch.
  • message.failed SMS or OTP send failed. Includes data.error.
  • message.canceled Cancelable future-delivery SMS was canceled.
  • message.delivered Provider confirmed the final delivery of the message.
  • message.received Inbound message received and normalized by Rewrite.
  • message.scheduled Message accepted with a future scheduledAt.

Shared envelope

Every webhook event uses:
  • id: webhook event snowflake
  • createdAt: event creation timestamp
  • sandbox: whether the event originated from a sandbox project
  • type: event name
  • data: event-specific payload
For message-like payloads, Rewrite also includes data.contact, data.contactId, and data.sandbox. These fields vary with the original send context.