{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rubiconnect/json-schema/rubiconnect-message-status-updated-event-schema.json",
  "title": "MessageStatusUpdatedEvent",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rubiconnect-webhooks-api-openapi.yml#/components/schemas/MessageStatusUpdatedEvent",
  "type": "object",
  "required": [
    "eventId",
    "event",
    "timestamp",
    "data"
  ],
  "properties": {
    "eventId": {
      "type": "string",
      "description": "Unique event identifier."
    },
    "event": {
      "type": "string",
      "enum": [
        "message.status_updated"
      ]
    },
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The ISO 8601 timestamp when the event was generated."
    },
    "data": {
      "type": "object",
      "required": [
        "messageId",
        "recipient",
        "status"
      ],
      "properties": {
        "messageId": {
          "type": "string",
          "description": "Unique message tracking identifier."
        },
        "recipient": {
          "type": "string",
          "description": "Handset phone number in E.164 format."
        },
        "status": {
          "type": "string",
          "enum": [
            "Delivered",
            "Read",
            "Failed"
          ]
        },
        "deliveredAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "readAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "error": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}