{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/twilio/main/json-schema/twilio-message-list-schema.json", "title": "MessageList", "x-generated": "2026-10-08", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/twilio-messages-api-openapi.yml#/components/schemas/MessageList", "type": "object", "properties": { "messages": { "type": "array", "items": { "$ref": "#/$defs/Message" } }, "first_page_uri": { "type": "string" }, "next_page_uri": { "type": "string" }, "previous_page_uri": { "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "uri": { "type": "string" } }, "$defs": { "Message": { "type": "object", "properties": { "sid": { "type": "string", "pattern": "^(SM|MM)[0-9a-fA-F]{32}$", "description": "Unique identifier for the message" }, "account_sid": { "type": "string", "pattern": "^AC[0-9a-fA-F]{32}$", "description": "Account SID that created the message" }, "messaging_service_sid": { "type": "string", "pattern": "^MG[0-9a-fA-F]{32}$", "description": "SID of the messaging service used" }, "to": { "type": "string", "description": "Recipient phone number in E.164 format" }, "from": { "type": "string", "description": "Sender phone number, alphanumeric sender ID, or short code" }, "body": { "type": "string", "description": "The text body of the message (up to 1600 characters)", "maxLength": 1600 }, "status": { "type": "string", "enum": [ "queued", "sending", "sent", "delivered", "undelivered", "failed", "receiving", "received", "accepted", "scheduled", "read", "partially_delivered", "canceled" ], "description": "Current status of the message" }, "direction": { "type": "string", "enum": [ "inbound", "outbound-api", "outbound-call", "outbound-reply" ], "description": "Direction of the message" }, "price": { "type": "string", "description": "Price of the message in the currency specified" }, "price_unit": { "type": "string", "description": "Currency unit for the price (e.g., USD)" }, "num_segments": { "type": "string", "description": "Number of segments the message was split into" }, "num_media": { "type": "string", "description": "Number of media files associated with the message" }, "error_code": { "type": "integer", "description": "Error code if the message failed" }, "error_message": { "type": "string", "description": "Human-readable error message" }, "date_created": { "type": "string", "format": "date-time", "description": "When the message was created" }, "date_updated": { "type": "string", "format": "date-time", "description": "When the message was last updated" }, "date_sent": { "type": "string", "format": "date-time", "description": "When the message was sent" }, "uri": { "type": "string", "description": "Relative URI for this message resource" }, "api_version": { "type": "string", "description": "API version used to process the message" }, "subresource_uris": { "type": "object", "description": "URIs of related subresources", "properties": { "media": { "type": "string" } } } } } } }