What Message Webhooks Do
Message webhooks keep your own systems in sync with what you see in Tuco. When you enable them, Tuco can send a short notification to a URL you control whenever certain message events occur, such as:- A message is marked as sent or delivered.
- A message cannot be sent and is marked with a clear final state.
- A recipient replies, where supported.
Information You Receive
Each webhook call includes enough information for you to:- Identify which message in your system the event relates to.
- See the latest visible status of that message, including when it has failed or reached a fallback‑style outcome.
- Link the event back to the related lead or workspace, where applicable.
How It Feels to Use
Once configured, message webhooks behave like a stream of simple status updates from Tuco to your own backend. From your point of view:- Tuco sends concise notifications whenever something important happens.
- Your systems can update their own records or dashboards using this information.
- No ongoing manual intervention is required; the system automatically handles the underlying delivery.
Event Types & Payloads
Tuco currently sends message webhooks for:message.delivered– a message was confirmed delivered (where the channel supports it).message.fallback– the primary channel (for example, iMessage) cannot be used and you should decide what to do next.
POST requests from Tuco to your configured endpoint.
message.delivered
Sent when a message has been delivered to the recipient (for channels where delivery receipts are available).
event– always"message.delivered"for this event type.messageId– ID of the message in Tuco (matches/api/messages).status–"delivered".message– body text that was sent.messageType–"imessage","sms", or"email".recipientEmail/recipientPhone/recipientName– where the message went.leadId– lead involved, when known.workspaceId/createdByUserId– help you scope the event.sentAt– when the send was initiated.timestamp– when delivery was confirmed.
messageId plus event to keep updates idempotent.
message.fallback
Sent when Tuco determines that the primary channel (for example, iMessage) cannot be used for this recipient. This is not a technical failure; it’s an availability/business outcome.
event–"message.fallback".status–"fallback".reason– human‑readable explanation you can log or surface.checkedAddresses– addresses Tuco checked when deciding availability (for debugging/auditing).
- Automatically trigger an SMS or email when you receive a
message.fallbackfor an iMessage attempt. - Flag the lead as “no iMessage” in your CRM so future campaigns pick more appropriate channels.
Consuming Webhooks Safely
When building your webhook consumer:- Treat
messageIdas the stable ID andeventas the type. - Make updates idempotent:
- If you’ve already processed a
(messageId, event), ignore duplicates. - Only move your local status forward (e.g.
"queued"→"sent"→"delivered"), never backwards.
- If you’ve already processed a
- Log or store
workspaceIdandleadIdso you can trace events back to the right tenant and contact.