Skip to main content
POST
Publish a message

Supported products

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

FlowAuthorization Code
Authorization URL
https://app.hubspot.com/oauth/authorize
Token URL
https://api.hubapi.com/oauth/v1/token
Scopes1
conversations.custom_channels.write

Path Parameters

channelId
integer<int32>
required

The unique identifier of the custom channel where the message will be created.

Body

application/json
attachments
(FILE · object | LOCATION · object | CONTACT · object | UNSUPPORTED_CONTENT · object | MESSAGE_HEADER · object | QUICK_REPLIES · object | SOCIAL_MEDIA_METADATA · object)[]
required

An array of attachments included with the message, which can be files, locations, contacts, or other supported types.

channelAccountId
string
required

The ID of the channel account through which the message is sent.

messageDirection
enum<string>
required

The direction of the message, indicating whether it is 'INCOMING' or 'OUTGOING'.

Available options:
INCOMING,
OUTGOING
recipients
object[]
required

An array of participants representing the recipients of the message.

senders
object[]
required

An array of participants representing the senders of the message.

text
string
required

The plain text content of the message.

timestamp
string<date-time>
required

The date and time when the message was created, in ISO 8601 format.

associateWithContactId
integer<int64>

The ID of the contact with which this message should be associated.

inReplyToId
string

The ID of the message this message is replying to.

integrationIdempotencyId
string

A unique identifier to ensure idempotency of the message within the integration.

integrationThreadId
string

A unique identifier for the thread within the integration.

preResolvedContacts
object
richText
string

The rich text content of the message, allowing for formatting.

Response

successful operation

archived
boolean
required

A boolean indicating whether the message is archived.

attachments
(FILE · object | LOCATION · object | CONTACT · object | UNSUPPORTED_CONTENT · object | MESSAGE_HEADER · object | QUICK_REPLIES · object | WHATSAPP_TEMPLATE_METADATA · object | SOCIAL_MEDIA_METADATA · object)[]
required

An array of attachments included with the message, which can be files, locations, contacts, or other supported types.

channelAccountId
string
required

The identifier of the channel account associated with the message.

channelId
string
required

The identifier of the channel through which the message was sent.

client
object
required
conversationsThreadId
string
required

The identifier for the conversation thread to which this message belongs.

createdAt
string<date-time>
required

The date and time when the message was created, in ISO 8601 format.

createdBy
string
required

The identifier of the user or system that created the message.

direction
enum<string>
required

The direction of the message, either 'INCOMING' or 'OUTGOING'.

Available options:
INCOMING,
OUTGOING
id
string
required

The unique identifier for the message.

recipients
object[]
required

An array of recipients of the message, each containing recipient details.

senders
object[]
required

An array of senders associated with the message, each containing sender details.

text
string
required

The plain text content of the message.

truncationStatus
enum<string>
required

Indicates whether the message content is truncated. Valid values are 'NOT_TRUNCATED', 'TRUNCATED_TO_MOST_RECENT_REPLY', and 'TRUNCATED'.

Available options:
NOT_TRUNCATED,
TRUNCATED,
TRUNCATED_TO_MOST_RECENT_REPLY
type
enum<string>
default:MESSAGE
required

The type of the message, which is always 'MESSAGE'.

Available options:
MESSAGE
inReplyToId
string

The identifier of the message to which this message is a reply, if applicable.

richText
string

The rich text content of the message, if available.

status
object
subject
string

The subject of the message, if applicable.

updatedAt
string<date-time>

The date and time when the message was last updated, in ISO 8601 format.

Last modified on September 9, 2026