{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ringover/json-schema/ringover-conversation-message-list-schema.json",
  "title": "conversation_message_list",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ringover-messages-api-openapi.yml#/components/schemas/conversation_message_list",
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "integer",
      "format": "int64"
    },
    "is_sms_write": {
      "type": "boolean",
      "description": "Allows to send SMS"
    },
    "type": {
      "type": "string",
      "enum": [
        "INTERNAL",
        "EXTERNAL",
        "COLLABORATIVE"
      ]
    },
    "name": {
      "type": "string"
    },
    "purpose": {
      "type": "string"
    },
    "unread_messages_count": {
      "type": "integer",
      "format": "int64"
    },
    "last_id_returned_setted": {
      "type": "integer",
      "format": "int64"
    },
    "limit_count_setted": {
      "type": "integer",
      "format": "int64"
    },
    "total_messages_count": {
      "type": "integer",
      "format": "int64"
    },
    "message_list_count": {
      "type": "integer",
      "format": "int64"
    },
    "message_list": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/message"
      }
    },
    "is_archived": {
      "type": "boolean",
      "description": "Archived flag"
    },
    "creation_date": {
      "type": "string",
      "format": "date-time"
    },
    "update_date": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "contact": {
      "type": "object",
      "properties": {
        "contact_id": {
          "type": "integer",
          "format": "int64"
        },
        "is_shared": {
          "type": "boolean"
        },
        "im_owner": {
          "type": "string"
        },
        "social_service": {
          "type": [
            "string",
            "null"
          ]
        },
        "social_service_id": {
          "type": "string"
        },
        "social_profile_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "social_data": {
          "type": [
            "string",
            "null"
          ]
        },
        "firstname": {
          "type": "string"
        },
        "lastname": {
          "type": "string"
        },
        "company": {
          "type": "string"
        },
        "concat_name": {
          "type": "string"
        },
        "color": {
          "type": "string"
        },
        "initial": {
          "type": "string"
        },
        "profile_picture": {
          "type": [
            "string",
            "null"
          ]
        },
        "creation_date": {
          "type": "string",
          "format": "date-time"
        },
        "numbers": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "integer",
            "format": "uint64"
          }
        }
      }
    },
    "format_number": {
      "type": "object",
      "properties": {
        "raw": {
          "type": "integer",
          "format": "int64"
        },
        "country_code": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "e164": {
          "type": "string"
        },
        "international": {
          "type": "string"
        },
        "international_alt": {
          "type": "string"
        },
        "national": {
          "type": "string"
        },
        "national_alt": {
          "type": "string"
        },
        "rfc3966": {
          "type": "string"
        },
        "is_short_code": {
          "type": "boolean"
        }
      }
    },
    "message": {
      "type": "object",
      "properties": {
        "message_id": {
          "type": "integer",
          "format": "int64"
        },
        "mdr_uuid": {
          "type": "string",
          "description": "is displayed for external conversations"
        },
        "thread": {
          "type": "object",
          "properties": {
            "thread_uuid": {
              "type": "string"
            },
            "conversation_id_linked": {
              "type": "integer"
            },
            "conversation_sms_id_linked": {
              "type": "integer"
            },
            "nb_response": {
              "type": "integer"
            },
            "buffer_section": {
              "type": "integer"
            }
          }
        },
        "conversation_id": {
          "type": "integer"
        },
        "conversation_user_id": {
          "type": "integer"
        },
        "user": {
          "$ref": "#/$defs/user_light"
        },
        "contact": {
          "$ref": "#/$defs/contact"
        },
        "number": {
          "$ref": "#/$defs/format_number"
        },
        "buffer": {
          "type": "string",
          "description": "Content of the message"
        },
        "total_price": {
          "type": "integer",
          "description": "Is `null` if the conversation is internal"
        },
        "total_plan": {
          "type": "integer",
          "description": "Is `null` if the conversation is internal"
        },
        "is_failed": {
          "type": "boolean"
        },
        "nb_fragments": {
          "type": "integer",
          "description": "Depends on the number of characters sent"
        },
        "direction": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "IN",
            "OUT"
          ]
        },
        "is_archived": {
          "type": "boolean"
        },
        "archive_date": {
          "type": "string",
          "format": "date-time"
        },
        "creation_date": {
          "type": "string",
          "format": "date-time"
        },
        "update_date": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "user_light": {
      "type": "object",
      "properties": {
        "user_id": {
          "type": "integer",
          "format": "int64",
          "description": "The user identifier"
        },
        "team_id": {
          "type": "integer",
          "format": "int64",
          "description": "The team identifier of the user"
        },
        "initial": {
          "type": "string",
          "description": "The initials of the user"
        },
        "color": {
          "type": "string"
        },
        "firstname": {
          "type": "string",
          "description": "The firstname of the user"
        },
        "lastname": {
          "type": "string",
          "description": "The lastname of the user"
        },
        "company": {
          "type": "string",
          "description": "The company of the user"
        },
        "email": {
          "type": "string",
          "description": "The email of the user"
        },
        "picture": {
          "type": "string",
          "description": "The picture of the user"
        },
        "concat_name": {
          "type": "string"
        }
      }
    }
  }
}