HubSpot · JSON Structure

Hubspot Conversations Message Collection Structure

Paginated collection of messages

Type: object Properties: 2 Required: 1
AnalyticsCommerceContentCRMCustomer ServiceEmail MarketingMarketingMarketing AutomationOperationsSales

MessageCollection is a JSON Structure definition published by HubSpot, describing 2 properties, of which 1 is required. It conforms to the https://json-structure.org/draft/2020-12/schema meta-schema.

Properties

results paging

Meta-schema: https://json-structure.org/draft/2020-12/schema

JSON Structure

Raw ↑
{
  "type": "object",
  "description": "Paginated collection of messages",
  "name": "MessageCollection",
  "properties": {
    "results": {
      "type": "array",
      "description": "Array of message records",
      "items": {
        "type": "object",
        "description": "Represents a message within a conversation thread.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the message"
          },
          "type": {
            "type": "string",
            "description": "Type of message",
            "enum": [
              "MESSAGE",
              "COMMENT",
              "WELCOME_MESSAGE"
            ]
          },
          "text": {
            "type": "string",
            "description": "Plain text content of the message"
          },
          "richText": {
            "type": "string",
            "description": "Rich text (HTML) content of the message"
          },
          "direction": {
            "type": "string",
            "description": "Direction of the message (incoming or outgoing)",
            "enum": [
              "INCOMING",
              "OUTGOING"
            ]
          },
          "channelId": {
            "type": "string",
            "description": "ID of the communication channel"
          },
          "channelAccountId": {
            "type": "string",
            "description": "ID of the channel account"
          },
          "senders": {
            "type": "array",
            "description": "List of message senders",
            "items": {
              "type": "object",
              "description": "Represents a participant in a conversation (visitor, agent, or bot).",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier for the actor"
                },
                "actorId": {
                  "type": "string",
                  "description": "Actor ID reference"
                },
                "name": {
                  "type": "string",
                  "description": "Display name of the actor"
                },
                "email": {
                  "type": "email",
                  "description": "Email address of the actor"
                },
                "type": {
                  "type": "string",
                  "description": "Type of actor (e.g., VISITOR, AGENT, BOT)"
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "recipients": {
            "type": "array",
            "description": "List of message recipients",
            "items": {
              "type": "object",
              "description": "Represents a participant in a conversation (visitor, agent, or bot).",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier for the actor"
                },
                "actorId": {
                  "type": "string",
                  "description": "Actor ID reference"
                },
                "name": {
                  "type": "string",
                  "description": "Display name of the actor"
                },
                "email": {
                  "type": "email",
                  "description": "Email address of the actor"
                },
                "type": {
                  "type": "string",
                  "description": "Type of actor (e.g., VISITOR, AGENT, BOT)"
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "status": {
            "type": "object",
            "description": "Delivery status information for a message",
            "properties": {
              "statusType": {
                "type": "string",
                "description": "Current delivery status type",
                "enum": [
                  "SENT",
                  "DELIVERED",
                  "READ",
                  "FAILED"
                ]
              }
            }
          },
          "createdAt": {
            "type": "datetime",
            "description": "ISO 8601 timestamp when the message was created"
          },
          "truncationStatus": {
            "type": "string",
            "description": "Whether the message was truncated"
          },
          "attachments": {
            "type": "array",
            "description": "Message attachments",
            "items": {
              "type": "object",
              "description": "Represents a file attachment on a message.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier for the attachment"
                },
                "type": {
                  "type": "string",
                  "description": "MIME type of the attachment"
                },
                "url": {
                  "type": "uri",
                  "description": "URL to access the attachment"
                },
                "filename": {
                  "type": "string",
                  "description": "Original filename"
                },
                "size": {
                  "type": "integer",
                  "description": "File size in bytes"
                }
              }
            }
          }
        },
        "required": [
          "id",
          "type",
          "createdAt"
        ]
      }
    },
    "paging": {
      "type": "object",
      "description": "Pagination information for list responses.",
      "properties": {
        "next": {
          "type": "object",
          "description": "Pagination cursor information for retrieving the next page.",
          "properties": {
            "after": {
              "type": "string",
              "description": "Cursor token for the next page"
            },
            "link": {
              "type": "string",
              "description": "API link to the next page"
            }
          }
        }
      }
    }
  },
  "required": [
    "results"
  ],
  "$schema": "https://json-structure.org/draft/2020-12/schema"
}