Skip to content

HubSpot: Update a message

HubSpot customChannels.updateCustomChannel: arguments, response, policy and SDK examples.

← Custom channels operations · Get started

Operation hubspot.custom_channels_update_custom_channel

Provider route: PATCH /conversations/custom-channels/2026-09/{channelId}/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["customChannels"]["updateCustomChannel"]>[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.updateCustomChannel(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.custom_channels.update_custom_channel(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.channelIdintegerRequired within parentFormat: int32
path.messageIdstringRequired within parent
bodyModelRequired within parentExpand Update a message — request body — body

Referenced models: Update a message — request body — body

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

FieldTypePresenceDescription and constraints
$ModelRootExpand Get a message — response body

Referenced models: Get a message — response body

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

Get a message — response body
FieldTypePresenceDescription and constraints
$objectRoot
archivedbooleanRequired within parentA boolean indicating whether the message is archived.
attachmentsarrayRequired within parentAn array of attachments included with the message, which can be files, locations, contacts, or other supported types.
attachments[]JSONEach item
attachments[] (anyOf 1)ModelAlternativeExpand Get a message — response body — attachments / item / fileUsageType: AUDIO, IMAGE, OTHER, STICKER, VOICE RECORDING, type: FILE
attachments[] (anyOf 2)ModelAlternativeExpand Get a message — response body — attachments / item / type: LOCATION
attachments[] (anyOf 3)ModelAlternativeExpand Get a message — response body — attachments / item / type: CONTACT
attachments[] (anyOf 4)ModelAlternativeExpand Get a message — response body — attachments / item / type: UNSUPPORTED CONTENT
attachments[] (anyOf 5)ModelAlternativeExpand Get a message — response body — attachments / item / type: MESSAGE HEADER
attachments[] (anyOf 6)ModelAlternativeExpand Get a message — response body — attachments / item / type: QUICK REPLIES
attachments[] (anyOf 7)ModelAlternativeExpand Get a message — response body — attachments / item / type: WHATSAPP TEMPLATE METADATA
attachments[] (anyOf 8)ModelAlternativeExpand Get a message — response body — attachments / item / type: SOCIAL MEDIA METADATA
channelAccountIdstringRequired within parentThe identifier of the channel account associated with the message.
channelIdstringRequired within parentThe identifier of the channel through which the message was sent.
clientModelRequired within parentExpand Get a message — response body — client
conversationsThreadIdstringRequired within parentThe identifier for the conversation thread to which this message belongs.
createdAtstringRequired within parentThe date and time when the message was created, in ISO 8601 format.
Format: date-time
createdBystringRequired within parentThe identifier of the user or system that created the message.
directionstringRequired within parentThe direction of the message, either 'INCOMING' or 'OUTGOING'.
Known values: INCOMING, OUTGOING
idstringRequired within parentThe unique identifier for the message.
inReplyToIdstringOptionalThe identifier of the message to which this message is a reply, if applicable.
recipientsarrayRequired within parentAn array of recipients of the message, each containing recipient details.
recipients[]ModelEach itemExpand Get a message — response body — recipients item
richTextstringOptionalThe rich text content of the message, if available.
sendersarrayRequired within parentAn array of senders associated with the message, each containing sender details.
senders[]ModelEach itemExpand Get a message — response body — senders item
statusModelOptionalExpand Get a message — response body — status
subjectstringOptionalThe subject of the message, if applicable.
textstringRequired within parentThe plain text content of the message.
truncationStatusstringRequired within parentIndicates 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
typestringRequired within parentThe type of the message, which is always 'MESSAGE'.
Known values: MESSAGE
Default: MESSAGE
updatedAtstringOptionalThe 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

Update a message — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
errorMessagestringOptionalA string containing an error message, if applicable.
statusTypestringRequired within parentValid status are SENT, FAILED, and READ
One of: FAILED, READ, SENT
Get a message — response body — 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)integerAlternativeThe unique identifier for the integration application associated with this client. It is an integer value.
Format: int32
integrationAppId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
Get a message — response body — attachments / item / type: CONTACT
FieldTypePresenceDescription and constraints
$objectRoot
contactProfileModelRequired within parentExpand Get a message — response body — attachments / item / type: CONTACT contact Profile
typestringRequired within parentA 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
FieldTypePresenceDescription and constraints
$objectRoot
fileIdstringRequired within parentA string representing the unique identifier for the file.
fileUsageTypestringRequired within parentA 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
namestringOptionalA string containing the name of the file.
typestringRequired within parentA string indicating the type of the attachment, which is always 'FILE'.
Known values: FILE
Default: FILE
urlstringOptionalA string containing the URL where the file can be accessed.
Get a message — response body — attachments / item / type: LOCATION
FieldTypePresenceDescription and constraints
$objectRoot
addressstringOptionalA string representing the address of the location.
latitudeJSONRequired within parent
latitude (anyOf 1)numberAlternativeA number representing the latitude of the location.
latitude (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
longitudeJSONRequired within parent
longitude (anyOf 1)numberAlternativeA number representing the longitude of the location.
longitude (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringOptionalA string representing the name of the location.
typestringRequired within parentA string that specifies the type of the component, which is 'LOCATION'.
Known values: LOCATION
Default: LOCATION
urlstringOptionalA string representing a URL associated with the location.
Get a message — response body — attachments / item / type: UNSUPPORTED CONTENT
FieldTypePresenceDescription and constraints
$objectRoot
typestringRequired within parentA string that specifies the type of unsupported content. The default and only valid value is 'UNSUPPORTED_CONTENT'.
Known values: UNSUPPORTED_CONTENT
Default: UNSUPPORTED_CONTENT

SDK function policy ID: hubspot.custom_channels_update_custom_channel. Catalog operation: custom_channels_update_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.write"]

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.