Skip to content

HubSpot: Retrieve message

HubSpot conversations.getMessage: arguments, response, policy and SDK examples.

← Conversations operations · Get started

Operation hubspot.conversations_get_message

Provider route: GET /conversations/conversations/2026-09/threads/{threadId}/messages/{messageId}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/hubspot with npm, or alter-sdk-hubspot with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { HubSpotIntegration } from "@alter-ai/hubspot";
async function execute(input: Parameters<HubSpotIntegration["conversations"]["getMessage"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new HubSpotIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.conversations.getMessage(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_hubspot import HubSpotIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = HubSpotIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.conversations.get_message(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.messageIdstringRequired within parent
path.threadIdintegerRequired within parentFormat: int64
queryobjectOptionalAdditional keys: not allowed
query.propertystringOptional

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create message — response body

Referenced models: Create message — response body

26 more schemas are linked from the tables above, on the schema pages.

Create message — response body
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Create message — response body — direction: INCOMING, OUTGOING, truncation Status: NOT TRUNCATED, TRUNCATED, TRUNCATED TO MOST RECENT REPLY, type: MESSAGE
$ (anyOf 2)ModelAlternativeExpand Create message — response body — type: COMMENT
$ (anyOf 3)ModelAlternativeExpand Create message — response body — type: WELCOME MESSAGE
$ (anyOf 4)ModelAlternativeExpand Create message — response body — type: ASSIGNMENT
$ (anyOf 5)ModelAlternativeExpand Create message — response body — newStatus: CLOSED, OPEN, type: THREAD STATUS CHANGE
$ (anyOf 6)ModelAlternativeExpand Create message — response body — type: THREAD INBOX CHANGE

Referenced models: Create message — response body — direction: INCOMING, OUTGOING, truncation Status: NOT TRUNCATED, TRUNCATED, TRUNCATED TO MOST RECENT REPLY, type: MESSAGE, Create message — response body — type: ASSIGNMENT, Create message — response body — type: COMMENT, Create message — response body — type: THREAD INBOX CHANGE, Create message — response body — newStatus: CLOSED, OPEN, type: THREAD STATUS CHANGE, Create message — response body — type: WELCOME MESSAGE

Create message — response body — direction: INCOMING, OUTGOING, truncation Status: NOT TRUNCATED, TRUNCATED, TRUNCATED TO MOST RECENT REPLY, type: MESSAGE
FieldTypePresenceDescription and constraints
$objectRoot
archivedbooleanRequired within parentA boolean indicating whether this message is archived.
attachmentsarrayRequired within parentAn array of attachments included with this message, which can be of various types such as files, locations, or social media metadata.
attachments[]JSONEach item
attachments[] (anyOf 1)ModelAlternativeExpand Create message — response body — type: COMMENT attachments item file Usage Type: AUDIO, IMAGE, OTHER, STICKER, VOICE RECORDING, type: FILE
attachments[] (anyOf 2)ModelAlternativeExpand Create message — response body — type: COMMENT attachments item type: LOCATION
attachments[] (anyOf 3)ModelAlternativeExpand Create message — response body — type: COMMENT attachments item type: CONTACT
attachments[] (anyOf 4)ModelAlternativeExpand Create message — response body — type: COMMENT attachments item type: UNSUPPORTED CONTENT
attachments[] (anyOf 5)ModelAlternativeExpand Create message — response body — type: COMMENT attachments item type: MESSAGE HEADER
attachments[] (anyOf 6)ModelAlternativeExpand Create message — response body — type: COMMENT attachments item type: QUICK REPLIES
attachments[] (anyOf 7)ModelAlternativeExpand Create message — response body — type: COMMENT attachments item type: WHATSAPP TEMPLATE METADATA
attachments[] (anyOf 8)ModelAlternativeExpand Create message — response body — type: COMMENT attachments item type: SOCIAL MEDIA METADATA
channelAccountIdstringRequired within parentThe identifier of the channel account associated with this message.
channelIdstringRequired within parentThe identifier of the channel through which this message was sent.
clientModelRequired within parentExpand Create message — response body — type: COMMENT client
conversationsThreadIdstringRequired within parentThe identifier of the conversation thread to which this message belongs.
createdAtstringRequired within parentThe date and time when this message was created, in ISO 8601 format.
Format: date-time
createdBystringRequired within parentThe identifier of the actor who created this message.
directionstringRequired within parentThe direction of the message, indicating whether it is 'INCOMING' or 'OUTGOING'.
Known values: INCOMING, OUTGOING
idstringRequired within parentThe unique identifier for this message.
inReplyToIdstringOptionalThe identifier of the message to which this message is a reply, if applicable.
recipientsarrayRequired within parentAn array of recipients of this message, each represented as a PublicRecipient object.
recipients[]ModelEach itemExpand Create message — response body — type: COMMENT recipients item
richTextstringOptionalThe rich text content of the message, which may include formatting.
sendersarrayRequired within parentAn array of senders involved in this message, each represented as a PublicSender object.
senders[]ModelEach itemExpand Create message — response body — type: COMMENT senders item
statusModelOptionalExpand Create message — response body — direction: INCOMING, OUTGOING, truncation Status: NOT TRUNCATED, TRUNCATED, TRUNCATED TO MOST RECENT REPLY, type: MESSAGE status
subjectstringOptionalThe subject of the message, if applicable.
textstringRequired within parentThe plain text content of the message.
truncationStatusstringRequired within parentIndicates the truncation status of the message content, with possible values being 'NOT_TRUNCATED', 'TRUNCATED_TO_MOST_RECENT_REPLY', or 'TRUNCATED'.
Known values: NOT_TRUNCATED, TRUNCATED, TRUNCATED_TO_MOST_RECENT_REPLY
typestringRequired within parentThe type of the message, which is always 'MESSAGE'.
Known values: MESSAGE
Default: MESSAGE
updatedAtstringOptionalThe date and time when this message was last updated, in ISO 8601 format.
Format: date-time

Referenced models: Create message — response body — type: COMMENT client, Create message — response body — type: COMMENT attachments item type: CONTACT, Create message — response body — type: COMMENT attachments item file Usage Type: AUDIO, IMAGE, OTHER, STICKER, VOICE RECORDING, type: FILE, Create message — response body — type: COMMENT attachments item type: LOCATION, Create message — response body — type: COMMENT attachments item type: MESSAGE HEADER, Create message — response body — direction: INCOMING, OUTGOING, truncation Status: NOT TRUNCATED, TRUNCATED, TRUNCATED TO MOST RECENT REPLY, type: MESSAGE status, Create message — response body — type: COMMENT attachments item type: QUICK REPLIES, Create message — response body — type: COMMENT recipients item, Create message — response body — type: COMMENT senders item, Create message — response body — type: COMMENT attachments item type: SOCIAL MEDIA METADATA, Create message — response body — type: COMMENT attachments item type: UNSUPPORTED CONTENT, Create message — response body — type: COMMENT attachments item type: WHATSAPP TEMPLATE METADATA

Create message — response body — type: COMMENT client
FieldTypePresenceDescription and constraints
$objectRoot
clientTypestringRequired within parentThe type of client interacting with the API. Valid values include 'HUBSPOT', 'SYSTEM', 'INTEGRATION', and 'UNKNOWN'.
Known values: HUBSPOT, INTEGRATION, SYSTEM, UNKNOWN
integrationAppIdJSONOptional
integrationAppId (anyOf 1)integerAlternativeAn optional identifier for the integration application associated with the client. It is an integer value.
Format: int32
integrationAppId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
Create message — response body — type: COMMENT attachments item type: CONTACT
FieldTypePresenceDescription and constraints
$objectRoot
contactProfileModelRequired within parentExpand Create message — response body — type: COMMENT attachments item type: CONTACT contact Profile
typestringRequired within parentA string indicating the type of the object, which is 'CONTACT' by default.
Known values: CONTACT
Default: CONTACT

Referenced models: Create message — response body — type: COMMENT attachments item type: CONTACT contact Profile

SDK function policy ID: hubspot.conversations_get_message. Catalog operation: conversations_get_message. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["conversations.read"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.