HubSpot: Get a message
HubSpot customChannels.getCustomChannel: arguments, response, policy and SDK examples.
← Custom channels operations · Get started
Operation hubspot.custom_channels_get_custom_channel
Provider route: GET /conversations/custom-channels/2026-09/{channelId}/messages/{messageId}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”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["customChannels"]["getCustomChannel"]>[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.customChannels.getCustomChannel(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom 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.custom_channels.get_custom_channel(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.channelId | integer | Required within parent | Format: int32 |
path.messageId | string | Required within parent |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Get a message — response body |
Referenced models: Get a message — response body
Schemas
Section titled “Schemas”18 more schemas are linked from the tables above, on the schema pages.
Get a message — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
archived | boolean | Required within parent | A boolean indicating whether the message is archived. |
attachments | array | Required within parent | An array of attachments included with the message, which can be files, locations, contacts, or other supported types. |
attachments[] | JSON | Each item | |
attachments[] (anyOf 1) | Model | Alternative | Expand Get a message — response body — attachments / item / fileUsageType: AUDIO, IMAGE, OTHER, STICKER, VOICE RECORDING, type: FILE |
attachments[] (anyOf 2) | Model | Alternative | Expand Get a message — response body — attachments / item / type: LOCATION |
attachments[] (anyOf 3) | Model | Alternative | Expand Get a message — response body — attachments / item / type: CONTACT |
attachments[] (anyOf 4) | Model | Alternative | Expand Get a message — response body — attachments / item / type: UNSUPPORTED CONTENT |
attachments[] (anyOf 5) | Model | Alternative | Expand Get a message — response body — attachments / item / type: MESSAGE HEADER |
attachments[] (anyOf 6) | Model | Alternative | Expand Get a message — response body — attachments / item / type: QUICK REPLIES |
attachments[] (anyOf 7) | Model | Alternative | Expand Get a message — response body — attachments / item / type: WHATSAPP TEMPLATE METADATA |
attachments[] (anyOf 8) | Model | Alternative | Expand Get a message — response body — attachments / item / type: SOCIAL MEDIA METADATA |
channelAccountId | string | Required within parent | The identifier of the channel account associated with the message. |
channelId | string | Required within parent | The identifier of the channel through which the message was sent. |
client | Model | Required within parent | Expand Get a message — response body — client |
conversationsThreadId | string | Required within parent | The identifier for the conversation thread to which this message belongs. |
createdAt | string | Required within parent | The date and time when the message was created, in ISO 8601 format. Format: date-time |
createdBy | string | Required within parent | The identifier of the user or system that created the message. |
direction | string | Required within parent | The direction of the message, either 'INCOMING' or 'OUTGOING'. Known values: INCOMING, OUTGOING |
id | string | Required within parent | The unique identifier for the message. |
inReplyToId | string | Optional | The identifier of the message to which this message is a reply, if applicable. |
recipients | array | Required within parent | An array of recipients of the message, each containing recipient details. |
recipients[] | Model | Each item | Expand Get a message — response body — recipients item |
richText | string | Optional | The rich text content of the message, if available. |
senders | array | Required within parent | An array of senders associated with the message, each containing sender details. |
senders[] | Model | Each item | Expand Get a message — response body — senders item |
status | Model | Optional | Expand Get a message — response body — status |
subject | string | Optional | The subject of the message, if applicable. |
text | string | Required within parent | The plain text content of the message. |
truncationStatus | string | Required within parent | Indicates whether the message content is truncated. Valid values are 'NOT_TRUNCATED', 'TRUNCATED_TO_MOST_RECENT_REPLY', and 'TRUNCATED'. Known values: NOT_TRUNCATED, TRUNCATED, TRUNCATED_TO_MOST_RECENT_REPLY |
type | string | Required within parent | The type of the message, which is always 'MESSAGE'. Known values: MESSAGE Default: MESSAGE |
updatedAt | string | Optional | The date and time when the message was last updated, in ISO 8601 format. Format: date-time |
Referenced models: Get a message — response body — client, Get a message — response body — attachments / item / type: CONTACT, Get a message — response body — attachments / item / fileUsageType: AUDIO, IMAGE, OTHER, STICKER, VOICE RECORDING, type: FILE, Get a message — response body — attachments / item / type: LOCATION, Get a message — response body — attachments / item / type: MESSAGE HEADER, Get a message — response body — status, Get a message — response body — attachments / item / type: QUICK REPLIES, Get a message — response body — recipients item, Get a message — response body — senders item, Get a message — response body — attachments / item / type: SOCIAL MEDIA METADATA, Get a message — response body — attachments / item / type: UNSUPPORTED CONTENT, Get a message — response body — attachments / item / type: WHATSAPP TEMPLATE METADATA
Get a message — response body — client
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
clientType | string | Required within parent | The type of client interacting with the API. Valid values include 'HUBSPOT', 'SYSTEM', 'INTEGRATION', and 'UNKNOWN'. Known values: HUBSPOT, INTEGRATION, SYSTEM, UNKNOWN |
integrationAppId | JSON | Optional | |
integrationAppId (anyOf 1) | integer | Alternative | The unique identifier for the integration application associated with this client. It is an integer value. Format: int32 |
integrationAppId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Get a message — response body — attachments / item / type: CONTACT
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
contactProfile | Model | Required within parent | Expand Get a message — response body — attachments / item / type: CONTACT contact Profile |
type | string | Required within parent | A string indicating the type of the component, which is 'CONTACT' by default. Known values: CONTACT Default: CONTACT |
Referenced models: Get a message — response body — attachments / item / type: CONTACT contact Profile
Get a message — response body — attachments / item / fileUsageType: AUDIO, IMAGE, OTHER, STICKER, VOICE RECORDING, type: FILE
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
fileId | string | Required within parent | A string representing the unique identifier for the file. |
fileUsageType | string | Required within parent | A string specifying the usage type of the file, which can be 'STICKER', 'VOICE_RECORDING', 'IMAGE', 'AUDIO', or 'OTHER'. Known values: AUDIO, IMAGE, OTHER, STICKER, VOICE_RECORDING |
name | string | Optional | A string containing the name of the file. |
type | string | Required within parent | A string indicating the type of the attachment, which is always 'FILE'. Known values: FILE Default: FILE |
url | string | Optional | A string containing the URL where the file can be accessed. |
Get a message — response body — attachments / item / type: LOCATION
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
address | string | Optional | A string representing the address of the location. |
latitude | JSON | Required within parent | |
latitude (anyOf 1) | number | Alternative | A number representing the latitude of the location. |
latitude (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
longitude | JSON | Required within parent | |
longitude (anyOf 1) | number | Alternative | A number representing the longitude of the location. |
longitude (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
name | string | Optional | A string representing the name of the location. |
type | string | Required within parent | A string that specifies the type of the component, which is 'LOCATION'. Known values: LOCATION Default: LOCATION |
url | string | Optional | A string representing a URL associated with the location. |
Get a message — response body — attachments / item / type: MESSAGE HEADER
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
fileId | JSON | Optional | |
fileId (anyOf 1) | integer | Alternative | An integer representing the ID of an associated file, formatted as an int64. Format: int64 |
fileId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
text | string | Optional | A string containing the text content of the message header. |
type | string | Required within parent | A string indicating the type of message header. The default and only valid value is 'MESSAGE_HEADER'. Known values: MESSAGE_HEADER Default: MESSAGE_HEADER |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: hubspot.custom_channels_get_custom_channel. Catalog operation: custom_channels_get_custom_channel. 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.custom_channels.read"]