-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Context
The sms-registration project receives incoming SMS messages via Entrance Group webhooks. Currently, only the message and number fields are parsed from the webhook payload. The full payload contains much richer data that could be leveraged.
Entrance Group Webhook Payload
Here is the actual payload received from an Entrance Group webhook (POST to /ingest/entrance-group):
{
"eventType": "newMessage",
"channel_id": 31002629,
"ts": "Sun, 01 Feb 2026 23:23:32 GMT",
"message": "hi",
"workspace_id": "2181",
"assigned_to": 4540,
"number": "17325342893",
"from": "17325079711",
"campaign_id": "919501",
"stop_filter": false,
"stop": false,
"payload": {
"webhook_record_sent_at": "2026-02-01T23:23:32.072Z",
"id": 90218076,
"channel_id": 31002629,
"ts": "Sun, 01 Feb 2026 23:23:32 GMT",
"message": "hi",
"workspace_id": "2181",
"assigned_to": 4540,
"number": "17325342893",
"from": "17325079711",
"campaign_id": "919501",
"stop_filter": false,
"stop": false,
"contact": {
"id": 294002507,
"guide": "2181-17325342893",
"number": "17325342893",
"stop": false,
"routable": false,
"meta": {
"message": "..."
}
},
"uuid": "f1022265-8aba-48c7-a6a1-7f1d8cbe89bc",
"webhook_url": "https://app-280358789919.us-east4.run.app/ingest/entrance-group"
}
}Key fields
channel_id— The conversation channel. This is what should be used to send replies, rather than creating a new campaign per message (which is what we currently do).number— The sender's phone number (no+prefix, e.g.,"17325342893"not"+17325342893")from— The Entrance Group number (the "from" number on their side)message— The SMS text contentstop/stop_filter— Opt-out status, could be used for handling STOP messagescontact— Contact metadata including aguideidentifier andmetadata
Proposal
Add support for parsing and modeling the Entrance Group incoming webhook payload in zio-messaging. This would include:
- A data model (case class) for the full webhook payload
- A data model for the nested
contactandpayloadobjects - Parsing/deserialization support (the payload is JSON, sent as POST body with
Content-Type: application/jsonfromaxios/0.21.4)
This is a prerequisite for sending replies via channel_id instead of creating new campaigns (see related issue about channel-based messaging).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels