{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/twexapi-io/json-schema/twexapi-io-send-dm-response-schema.json",
  "title": "SendDmResponse",
  "description": "Response for sending DM",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/twexapi-io-dm-endpoints-api-openapi.yml#/components/schemas/SendDmResponse",
  "properties": {
    "code": {
      "type": "integer",
      "title": "Code",
      "description": "Response code"
    },
    "msg": {
      "type": "string",
      "title": "Msg",
      "description": "Message sent"
    },
    "data": {
      "anyOf": [
        {
          "$ref": "#/$defs/MessageModel"
        },
        {
          "type": "null"
        }
      ],
      "description": "message object"
    }
  },
  "type": "object",
  "required": [
    "code",
    "msg",
    "data"
  ],
  "$defs": {
    "MessageModel": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "Message ID"
        },
        "text": {
          "type": "string",
          "title": "Text",
          "description": "Message text"
        },
        "time": {
          "type": "string",
          "title": "Time",
          "description": "Message time"
        },
        "attachment": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Attachment",
          "description": "Message attachment"
        },
        "attachments": {
          "anyOf": [
            {
              "items": {
                "additionalProperties": true,
                "type": "object"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Attachments",
          "description": "XChat media attachments (v3)."
        },
        "sequence_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sequence Id",
          "description": "XChat sequence id. Use the oldest message's sequence_id as before for pagination."
        },
        "sender_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sender Id",
          "description": "Sender ID"
        },
        "recipient_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Recipient Id",
          "description": "Recipient ID"
        }
      },
      "type": "object",
      "required": [
        "id",
        "text",
        "time"
      ],
      "title": "MessageModel",
      "description": "Message model"
    }
  }
}