Zum Hauptinhalt springen
POST
/
conversations
/
v3
/
custom-channels
/
{channelId}
/
messages
メッセージを公開
curl --request POST \
  --url https://api.hubapi.com/conversations/v3/custom-channels/{channelId}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "messageDirection": "INCOMING",
  "attachments": [
    {
      "fileUsageType": "<string>",
      "type": "FILE",
      "fileId": "<string>"
    }
  ],
  "preResolvedContacts": {
    "contacts": [
      {
        "contactVid": 123,
        "contactPropertiesLeadingToMatch": [
          "<string>"
        ]
      }
    ]
  },
  "recipients": [
    {
      "name": "<string>",
      "deliveryIdentifier": {
        "type": "<string>",
        "value": "<string>"
      }
    }
  ],
  "integrationThreadId": "<string>",
  "integrationIdempotencyId": "<string>",
  "text": "<string>",
  "richText": "<string>",
  "channelAccountId": "<string>",
  "senders": [
    {
      "name": "<string>",
      "deliveryIdentifier": {
        "type": "<string>",
        "value": "<string>"
      }
    }
  ],
  "inReplyToId": "<string>",
  "timestamp": "2023-11-07T05:31:56Z"
}'
{
  "attachments": [
    {
      "fileUsageType": "<string>",
      "name": "<string>",
      "type": "FILE",
      "url": "<string>",
      "fileId": "<string>"
    }
  ],
  "subject": "<string>",
  "conversationsThreadId": "<string>",
  "type": "MESSAGE",
  "richText": "<string>",
  "inReplyToId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "archived": true,
  "createdBy": "<string>",
  "recipients": [
    {
      "actorId": "<string>",
      "name": "<string>",
      "deliveryIdentifier": {
        "type": "<string>",
        "value": "<string>"
      },
      "recipientField": "<string>"
    }
  ],
  "truncationStatus": "NOT_TRUNCATED",
  "client": {
    "clientType": "HUBSPOT",
    "integrationAppId": 123
  },
  "id": "<string>",
  "text": "<string>",
  "channelAccountId": "<string>",
  "senders": [
    {
      "actorId": "<string>",
      "name": "<string>",
      "senderField": "<string>",
      "deliveryIdentifier": {
        "type": "<string>",
        "value": "<string>"
      }
    }
  ],
  "channelId": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z",
  "status": {
    "statusType": "SENT",
    "failureDetails": {
      "errorMessageTokens": {},
      "errorMessage": "<string>"
    }
  },
  "direction": "INCOMING"
}
次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing Hub -無料ツール
Sales HubSales Hub -Professional
Service HubService Hub -Professional
Content HubContent Hub -無料ツール
この API には、次のいずれかのスコープが必要です。
conversations.custom_channels.write

Authorizations

Authorization
string
header
required

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

Path Parameters

channelId
integer
required

メッセージの送信に使用されるチャネル

Body

application/json
messageDirection
enum<string>
required
Verfügbare Optionen:
INCOMING,
OUTGOING
attachments
(FILE · object | LOCATION · object | CONTACT · object | UNSUPPORTED_CONTENT · object | MESSAGE_HEADER · object | QUICK_REPLIES · object | SOCIAL_MEDIA_METADATA · object)[]
required
  • FILE
  • LOCATION
  • CONTACT
  • UNSUPPORTED_CONTENT
  • MESSAGE_HEADER
  • QUICK_REPLIES
  • SOCIAL_MEDIA_METADATA
recipients
object[]
required
text
string
required
channelAccountId
string
required
senders
object[]
required
timestamp
string<date-time>
required
preResolvedContacts
object
integrationThreadId
string
integrationIdempotencyId
string
richText
string
inReplyToId
string

Response

successful operation

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
  • FILE
  • LOCATION
  • CONTACT
  • UNSUPPORTED_CONTENT
  • MESSAGE_HEADER
  • QUICK_REPLIES
  • WHATSAPP_TEMPLATE_METADATA
  • SOCIAL_MEDIA_METADATA
conversationsThreadId
string
required
type
enum<string>
default:MESSAGE
required
Verfügbare Optionen:
MESSAGE
createdAt
string<date-time>
required
archived
boolean
required
createdBy
string
required
recipients
object[]
required
truncationStatus
enum<string>
required
Verfügbare Optionen:
NOT_TRUNCATED,
TRUNCATED_TO_MOST_RECENT_REPLY,
TRUNCATED
client
object
required
id
string
required
text
string
required
channelAccountId
string
required
senders
object[]
required
channelId
string
required
direction
enum<string>
required
Verfügbare Optionen:
INCOMING,
OUTGOING
subject
string
richText
string
inReplyToId
string
updatedAt
string<date-time>
status
object