Social Media
This API is deprecated. It will no longer receive version updates, but is otherwise functional and stable.
/broadcast/v1/channels/setting/publish/current
Get details on the channels (e.g. Twitter account, Facebook page) connected to this portal that can be published to.
A "channel" is a specific destination like a Twitter profile, Facebook Page or LinkedIn Group. An account added to HubSpot may contain several channels, such as a Facebook account having access to several Facebook Pages.
Requirements
Parameters
Response
Example URL requesting JSON:
https://api.hubapi.com/broadcast/v1/channels/setting/publish/current
Example JSON output.
The data map contains values specific to the "type"
of channel (Facebook Page, Facebook Account, etc.) that come from the associated social network.
NOTE: The data map is not supported for Twitter channels.
[
{
"channelGuid": "57883b6f-88c7-3050-91ee-c99eb0749d59",
"portalId": 62515,
"channelId": "4654321",
"accountGuid": "10056a5f-7a35-4653-bcce-13307286eca0",
"createdAt": 1558129620104,
"updatedAt": 1559643047214,
"active": true,
"shared": false,
"channelKey": "Twitter:4654321",
"hidden": false,
"settings": {},
"channelScopes": [],
"type": "Twitter",
/* NOTE: The following fields are deprecated for Twitter channels,
// and will always be set to null or {}
"name": null, //
"displayName": null, //
"dataMap": {}, //
"profileUrl": null, //
"avatarUrl": null, //
"remoteUserIdForFeed": null, */
"channelSlug": "twitter",
"accountType": "Twitter",
"accountSlug": "twitter",
"username": null
/broadcast/v1/broadcasts
For a given portal, return details on a set of broadcast messages (e.g. a tweet or Facebook post).
A "broadcast" is a specific social message posted to a single social network.
Requirements
Parameters
Only include broadcasts in matching state (success, waiting, canceled, error_fatal)
Only include broadcasts created at or more recently than given timestamp (milliseconds from epoch)
Only include broadcasts created on specific channels. To request multiple channels, include the withChannelKeys parameter multiple times
Only include specified number of results
Used to get the next set of results. Increment the offset by the number your using in the count parameter to get the next set of results.
Response
xxxxxxxxxx
Example GET URL:
https://api.hubapi.com/broadcast/v1/broadcasts?count=2&status=success&since=1357138314517
Example JSON output, returns a list of broadcast
messages that meet the specified criteria:
[
{
"broadcastGuid": "4745142",
"portalId": 62515,
"groupGuid": "9e714a24-4973-452b-8622-cfd2e072b0cf",
"campaignGuid": null,
"channelKey": "Twitter:403551555",
"channelGuid": "cd0bccfc-390d-3840-aa77-d413b253c807",
"clientTag": "SocialUI_clone",
"createdAt": 1553275615529,
"userUpdatedAt": 1554967001342,
"triggerAt": 1563386460000,
"finishedAt": null,
"status": "DRAFT",
"message": null,
"content": {
"originalLink": null,
"charCount": "22",
"originalBody": "test test a video post",
"uncompressedLinks": null,
"hashtagCount": "0",
"body": "test test a video post",
"title": "test test a video post",
"thumbUrl": "https://cdn2.hubspot.com/hubfs/62515/social-suggested-images/2019-video.mp4/thumb.jpg",
"fileId": "3385520023"
},
"foreignId": null,
"remoteContentId": null,
"remoteContentType": null,
/broadcast/v1/broadcasts/:broadcast_guid
For a given HubID, return details on a specific broadcast (e.g. a tweet or Facebook post).
A "broadcast" is a specific social message posted to a single social network.
Requirements
Parameters
Unique identifier for a specific broadcast.
Response
xxxxxxxxxx
Example URL requesting JSON:
https://api.hubapi.com/broadcast/v1/broadcasts/65cc83ae-f962-452d-8d70-20cbd3204e61?portalId=62515
Example JSON output. Note the "status" field indicates the state of the message, where it could be "WAITING" if it is scheduled to be published later, "SUCCESS" for successfully published or "ERROR_FATAL" if there was an error publishing the message.
{
"broadcastGuid": "4745142",
"portalId": 62515,
"groupGuid": "9e714a24-4973-452b-8622-cfd2e072b0cf",
"campaignGuid": null,
"channelKey": "Twitter:403551555",
"channelGuid": "cd0bccfc-390d-3840-aa77-d413b253c807",
"clientTag": "SocialUI_clone",
"createdAt": 1553275615529,
"userUpdatedAt": 1554967001342,
"triggerAt": 1563386460000,
"finishedAt": null,
"status": "DRAFT",
"message": null,
"content": {
"originalLink": null,
"charCount": "22",
"originalBody": "test test a video post",
"uncompressedLinks": null,
"hashtagCount": "0",
"body": "test test a video post",
"title": "test test a video post",
"thumbUrl": "https://cdn2.hubspot.com/hubfs/62515/social-suggested-images/2019-video.mp4/thumb.jpg",
"fileId": "3385520023"
},
"foreignId": null,
"remoteContentId": null,
/broadcast/v1/broadcasts
Create a new broadcast message (e.g. a tweet or Facebook post) to be published. It can be scheduled immediately or at a time in the future.
Requirements
Parameters
The GUID of the publishing channel that the message is for. You can get all of the channels for a portal using this endpoint.
A Unix timestamp in milliseconds of the time that the message should be published to the channel. If this is not included in the request, the message will be published immediately.
Use "status": "DRAFT"
in the request body. This creates the message as a draft, meaning that it will not be scheduled to publish and can be reviewed and scheduled from within the HubSpot Social Media Publishing app.
Note: If the draft status is set, any triggerAt value will be unset.
Response
xxxxxxxxxx
Example POST URL:
https://api.hubapi.com/broadcast/v1/broadcasts
Example request that schedules the message to be published at
December 20th, 2017 10:09:57 PM, Eastern Time:
{
"channelGuid": "7c13e300-e43f-3aa0-a842-93956cb214e9",
"triggerAt": 1513825797000,
"content": {
"body": "A simple message with a link http://blog.hubspot.com"
}
}
Example request that creates a draft message:
{
"channelGuid": "7c13e300-e43f-3aa0-a842-93956cb214e9",
"status": "DRAFT",
"content" : {
"body": "I will be saved as a draft."
}
}
Example request that creates a message with an image:
{
"channelGuid": "7c13e300-e43f-3aa0-a842-93956cb214e9",
"triggerAt": 1513825797000,
"content": {
"body": "A simple message with a link http://blog.hubspot.com",
"photoUrl": "http://cdn2.hubspot.net/hubfs/53/sprocket_web-2.png"
}
}
If successful, the HTTP status code will be a 201 Created and the
response body will include the created broadcast.
Example JSON response:
/broadcast/v1/broadcasts/:broadcast_guid
Cancel a scheduled broadcast (e.g. tweet or facebook post).
Requirements
Parameters
Unique identifier for a specific broadcast.
Response
xxxxxxxxxx
Example URL requesting JSON:
https://api.hubapi.com/broadcast/v1/broadcasts/65cc83ae-f962-452d-8d70-20cbd3204e61
Example JSON output. The modified broadcast will be return. If the broadcast was already completed, its status will not be changed.
{
"broadcastGuid": "4745142",
"portalId": 62515,
"groupGuid": "9e714a24-4973-452b-8622-cfd2e072b0cf",
"campaignGuid": null,
"channelKey": "Twitter:403551555",
"channelGuid": "cd0bccfc-390d-3840-aa77-d413b253c807",
"clientTag": "SocialUI_clone",
"createdAt": 1553275615529,
"userUpdatedAt": 1554967001342,
"triggerAt": 1563386460000,
"finishedAt": null,
"status": "DRAFT",
"message": null,
"content": {
"originalLink": null,
"charCount": "22",
"originalBody": "test test a video post",
"uncompressedLinks": null,
"hashtagCount": "0",
"body": "test test a video post",
"title": "test test a video post",
"thumbUrl": "https://cdn2.hubspot.com/hubfs/62515/social-suggested-images/2019-video.mp4/thumb.jpg",
"fileId": "3385520023"
},
"foreignId": null,
"remoteContentId": null,
"remoteContentType": null,
"clicks": 0,