{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dialogbrain-com/json-schema/dialogbrain-com-auto-reply-draft-response-schema.json",
  "title": "AutoReplyDraftResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dialogbrain-com-ai-agents-api-openapi.yml#/components/schemas/AutoReplyDraftResponse",
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "thread_id": {
      "type": "integer",
      "title": "Thread Id"
    },
    "channel_account_id": {
      "type": "integer",
      "title": "Channel Account Id"
    },
    "thread_title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Thread Title"
    },
    "channel_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Channel Type"
    },
    "channel_ref": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Channel Ref"
    },
    "trigger_message_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Trigger Message Id"
    },
    "trigger_text": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Trigger Text"
    },
    "trigger_sender_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Trigger Sender Name"
    },
    "trigger_timestamp": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Trigger Timestamp"
    },
    "response_text": {
      "type": "string",
      "title": "Response Text"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expires At"
    },
    "edited_text": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Edited Text"
    },
    "draft_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Draft Type"
    },
    "group_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Group Id"
    },
    "prompt_source": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Prompt Source"
    },
    "attachment_file_ids": {
      "items": {
        "type": "integer"
      },
      "type": "array",
      "title": "Attachment File Ids"
    },
    "attachments": {
      "items": {
        "$ref": "#/$defs/AttachmentInfo"
      },
      "type": "array",
      "title": "Attachments"
    },
    "agent_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agent Name"
    },
    "agent_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agent Id"
    },
    "trace_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Trace Id"
    },
    "model_used": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Used"
    }
  },
  "type": "object",
  "required": [
    "id",
    "thread_id",
    "channel_account_id",
    "response_text",
    "status",
    "created_at"
  ],
  "$defs": {
    "AttachmentInfo": {
      "properties": {
        "file_id": {
          "type": "integer",
          "title": "File Id"
        },
        "filename": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Filename"
        },
        "mime_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mime Type"
        },
        "byte_size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Byte Size"
        }
      },
      "type": "object",
      "required": [
        "file_id"
      ],
      "title": "AttachmentInfo"
    }
  }
}