curl --request POST \
--url https://api.hubapi.com/conversations/v3/custom-channels/{channelId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"attachments": [
{
"fileId": "<string>",
"type": "FILE",
"fileUsageType": "AUDIO"
}
],
"channelAccountId": "<string>",
"messageDirection": "INCOMING",
"recipients": [
{
"deliveryIdentifier": {
"type": "CHANNEL_SPECIFIC_OPAQUE_ID",
"value": "<string>"
},
"name": "<string>",
"senderActorId": "<string>"
}
],
"senders": [
{
"deliveryIdentifier": {
"type": "CHANNEL_SPECIFIC_OPAQUE_ID",
"value": "<string>"
},
"name": "<string>",
"senderActorId": "<string>"
}
],
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"associateWithContactId": 123,
"inReplyToId": "<string>",
"integrationIdempotencyId": "<string>",
"integrationThreadId": "<string>",
"preResolvedContacts": {
"contacts": [
{
"contactPropertiesLeadingToMatch": [
"address"
],
"contactVid": 123
}
]
},
"richText": "<string>"
}
'{
"archived": true,
"attachments": [
{
"fileId": "<string>",
"fileUsageType": "AUDIO",
"type": "FILE",
"name": "<string>",
"url": "<string>"
}
],
"channelAccountId": "<string>",
"channelId": "<string>",
"client": {
"clientType": "HUBSPOT",
"integrationAppId": 123
},
"conversationsThreadId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"direction": "INCOMING",
"id": "<string>",
"recipients": [
{
"deliveryIdentifier": {
"type": "CHANNEL_SPECIFIC_OPAQUE_ID",
"value": "<string>"
},
"actorId": "<string>",
"name": "<string>",
"recipientField": "<string>"
}
],
"senders": [
{
"actorId": "<string>",
"deliveryIdentifier": {
"type": "CHANNEL_SPECIFIC_OPAQUE_ID",
"value": "<string>"
},
"name": "<string>",
"senderField": "<string>"
}
],
"text": "<string>",
"truncationStatus": "NOT_TRUNCATED",
"type": "MESSAGE",
"inReplyToId": "<string>",
"richText": "<string>",
"status": {
"statusType": "FAILED",
"failureDetails": {
"errorMessageTokens": {},
"errorMessage": "<string>"
}
},
"subject": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}Publish a message over your custom channel
curl --request POST \
--url https://api.hubapi.com/conversations/v3/custom-channels/{channelId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"attachments": [
{
"fileId": "<string>",
"type": "FILE",
"fileUsageType": "AUDIO"
}
],
"channelAccountId": "<string>",
"messageDirection": "INCOMING",
"recipients": [
{
"deliveryIdentifier": {
"type": "CHANNEL_SPECIFIC_OPAQUE_ID",
"value": "<string>"
},
"name": "<string>",
"senderActorId": "<string>"
}
],
"senders": [
{
"deliveryIdentifier": {
"type": "CHANNEL_SPECIFIC_OPAQUE_ID",
"value": "<string>"
},
"name": "<string>",
"senderActorId": "<string>"
}
],
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"associateWithContactId": 123,
"inReplyToId": "<string>",
"integrationIdempotencyId": "<string>",
"integrationThreadId": "<string>",
"preResolvedContacts": {
"contacts": [
{
"contactPropertiesLeadingToMatch": [
"address"
],
"contactVid": 123
}
]
},
"richText": "<string>"
}
'{
"archived": true,
"attachments": [
{
"fileId": "<string>",
"fileUsageType": "AUDIO",
"type": "FILE",
"name": "<string>",
"url": "<string>"
}
],
"channelAccountId": "<string>",
"channelId": "<string>",
"client": {
"clientType": "HUBSPOT",
"integrationAppId": 123
},
"conversationsThreadId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"direction": "INCOMING",
"id": "<string>",
"recipients": [
{
"deliveryIdentifier": {
"type": "CHANNEL_SPECIFIC_OPAQUE_ID",
"value": "<string>"
},
"actorId": "<string>",
"name": "<string>",
"recipientField": "<string>"
}
],
"senders": [
{
"actorId": "<string>",
"deliveryIdentifier": {
"type": "CHANNEL_SPECIFIC_OPAQUE_ID",
"value": "<string>"
},
"name": "<string>",
"senderField": "<string>"
}
],
"text": "<string>",
"truncationStatus": "NOT_TRUNCATED",
"type": "MESSAGE",
"inReplyToId": "<string>",
"richText": "<string>",
"status": {
"statusType": "FAILED",
"failureDetails": {
"errorMessageTokens": {},
"errorMessage": "<string>"
}
},
"subject": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}Supported products
Required Scopes
The access token received from the authorization server in the OAuth 2.0 flow.
Show child attributes
INCOMING, OUTGOING Show child attributes
Show child attributes
Show child attributes
successful operation
Show child attributes
Show child attributes
INCOMING, OUTGOING Show child attributes
Show child attributes
NOT_TRUNCATED, TRUNCATED, TRUNCATED_TO_MOST_RECENT_REPLY MESSAGE Show child attributes
Was this page helpful?