Objective
When building applications that receive SMS, MMS, or WhatsApp messages using Twilio, it’s common to want a precise timestamp for when Twilio received each message. This is especially important for logging, auditing, and troubleshooting.
Currently, Twilio’s webhook payload for incoming messages does not include a timestamp field (such as DateCreated) by default. However, there are ways to obtain this information for your records.
Product
Programmable Messaging
Procedure
What’s Included in the Incoming Message Webhook?
When Twilio receives an incoming message for your phone number, it sends an HTTP request (webhook) to your application. The webhook includes several parameters, such as:
-
From: The sender’s phone number -
To: Your Twilio phone number -
Body: The content of the message -
MessageSid: The unique identifier for the message
For a full list of parameters, see Twilio’s webhook documentation.
How to Get the Timestamp (DateCreated)
Although the webhook does not include a timestamp, you can retrieve it using the MessageSid provided in the webhook. Here’s how:
- Receive the webhook from Twilio as usual.
-
Extract the
MessageSidfrom the webhook payload. -
Make a request to the Message Resource API using the
MessageSid. - The API response will include the
date_createdfield, which is the timestamp when Twilio received the message.
Example: Fetching the Timestamp
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/SMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json" \ -u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
The response will include:
{
"sid": "SMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"date_created": "Thu, 12 Feb 2026 08:50:06 +0000",
...
}Why Isn’t the Timestamp Included by Default?
Twilio’s webhook payload is designed to be lightweight and fast. While many useful fields are included, the timestamp is not currently part of the default payload. However, Twilio is always listening to customer feedback, and this feature has been requested for future consideration.
Workarounds and Best Practices
-
API Lookup: Use the
MessageSidto fetch the timestamp as described above. - Server-Side Timestamp: Record the time your server receives the webhook as an approximate timestamp (note: this may differ slightly from Twilio’s actual receipt time).
- Feature Requests: If this feature is important to your workflow, let Twilio know! Customer feedback helps shape future improvements.
Additional Information
- The incoming message webhook does not include a timestamp by default.
- You can retrieve the exact timestamp using the Message Resource API and the
MessageSid. - Twilio is considering this feature for future updates based on customer feedback.
For more details, see: