chat.created webhooks
# support
b
I'm trying to receive chat.created and session.created webhook events when a customer texts one of our Twilio phone numbers (imported into Vapi, smsEnabled: true). What I've configured: - Phone number has a server URL set - Assistant d0b95202-1b84-496f-8fff-e7df7db74d92 has serverMessages explicitly set to include chat.created, chat.deleted, session.created, session.updated, session.deleted What I observe: - Texting the number works — the assistant replies correctly via SMS - Our server receives status-update and end-of-call-report events for phone calls on the same assistant/phone number - No chat.created or session.created events arrive when the number is texted Questions: For inbound SMS on a number with smsEnabled: true, are chat.created and session.created events sent?
j
From what you’re describing, this usually happens because SMS flows don’t always trigger the same session lifecycle events as voice calls in Vapi. So even though the assistant replies fine, chat.created and session.created may simply not be emitted for inbound SMS threads depending on how Twilio is wired in. Most people only see the SMS side surface through message/status events instead. Are you seeing any kind of conversation or message-level event at all when the text comes in? @brian.rabern
b
no webhook realted to the text message seems to fire at all
wait. somehow a webhook just fired when i tested it now?
still no session.created, though
c
Can you please help us with any relevant call/chat id?
b
chatid: 0e4350ea-4272-41db-b466-ba792feebf2d sessionId: 72b30c9b-f1d9-43c0-a03c-11f75a762ef5
c
Thank you for sharing, I am looking into it
Hi, coming to your question - Yes,
chat.created
and
session.created
events should be sent for inbound SMS on numbers with
smsEnabled: true
. The fact that you're not receiving them appears to be a configuration issue, and I am looking into it.
sending an sms to an assistant does not natively trigger
chat.created
or
session.created
those events fire when a chat or session is created through the api (
POST /chat
,
POST /session
) — the text-channel of the chat/sessions api is api-driven, not telephony-driven what the sms surface actually is:
CreateSmsToolDTO
is the only sms primitive - it's an outbound tool the assistant can invoke to send an sms mid-conversation • there's no inbound-sms transport on chat or session, no
sms.received
event, and no sms transport field in the chat/session schemas so if a real carrier sms lands on your number, vapi doesn't automatically spin up a chat/session and run the assistant against it -nothing fires on its own to wire up "text my assistant over sms", you build the bridge: 1. inbound sms hits your provider (twilio/telnyx), which posts to your webhook (not vapi's) 2. your server calls
POST /chat
(stateless) or
POST /session
+ chat (stateful, keeps history across texts) with the message body as input 3. that api call is what fires
chat.created
/
session.created
to your vapi server url 4. you take the assistant's output and send it back via twilio/telnyx (or the assistant's sms tool) bottom line: enabling those events just means you'll see them when chats/sessions get created — the sms-to-chat wiring is yours to build, it's not automatic
b
That doesn't seem right. If i sms the number vapi creates a session and a chat and the ai forms a response.
c
Hi, Could you please make sure your Twilio SMS webhook is configured to:https://api.vapi.ai/twilio/sms Once this is configured correctly, incoming SMS messages should generate the appropriate webhook events, including: •
chat.created
session.created
Please update the webhook configuration and test again. If you're still not seeing the events, let us know and share any relevant logs or IDs so we can investigate further.
b
this url is not going anywhere: https://api.vapi.ai/twilio/sms
c
it doesnt go anywhere because you have to POST to the endpoint. you cannot perform GET on the endpoint