[
{
"handle": "messages",
"meta": {
"short": "Messages",
"description": "Schedule and manage social media messages."
},
"endpoint": {
"value": "/messages",
"placeholders": []
},
"fields": [
{
"name": "id",
"type": "String",
"selector": ["id"],
"meta": {
"description": "The unique identifier of the message."
}
},
{
"name": "text",
"type": "String",
"selector": ["text"],
"meta": {
"description": "The text content of the message."
}
},
{
"name": "socialNetwork",
"type": "String",
"selector": ["socialNetwork"],
"meta": {
"description": "The social network the message corresponds to."
}
},
{
"name": "status",
"type": "String",
"selector": ["status"],
"meta": {
"description": "The current status of the message."
}
},
{
"name": "socialNetworkIds",
"type": "String",
"selector": ["socialNetworks", 0],
"multivalue": true,
"meta": {
"description": "A list of social network names targeted by this message."
}
}
],
"operations": {
"read": {
"method": "GET",
"path": {
"value": "/{{messageId}}",
"placeholders": [
{
"name": "messageId",
"type": "String",
"description": "The ID of the message to retrieve.",
"required": true
}
]
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
},
"create": {
"method": "POST",
"path": {
"value": "",
"placeholders": []
},
"headers": {
"Content-Type": "application/json"
},
"queryParams": {},
"bodyTemplate": {
"value": "{\"message\":{\"text\":\"{{text}}\",\"socialNetworks\":[{{socialNetworks}}],\"scheduledAt\":\"{{scheduledAt}}\",\"timezone\":\"{{timezone}}\"}}",
"placeholders": [
{
"name": "text",
"type": "String",
"description": "The content of the message.",
"required": true
},
{
"name": "socialNetworks",
"type": "String",
"description": "A JSON array of targeted social networks.",
"required": true
},
{
"name": "scheduledAt",
"type": "String",
"description": "The scheduled publishing time (ISO 8601).",
"required": true
},
{
"name": "timezone",
"type": "String",
"description": "The timezone for the scheduled time.",
"required": false
}
]
}
}
},
"webhooks": [
{
"event": "messages.scheduled",
"path": "/webhooks/hootsuite/messages/scheduled",
"payload": [
{ "name": "id", "type": "String", "selector": ["data", "id"], "meta": { "description": "The unique identifier of the message." } },
{ "name": "text", "type": "String", "selector": ["data", "text"], "meta": { "description": "The text content of the message." } },
{ "name": "status", "type": "String", "selector": ["data", "status"], "meta": { "description": "The current status of the message." } },
{ "name": "scheduledAt", "type": "String", "selector": ["data", "scheduledAt"], "meta": { "description": "The scheduled publishing time (ISO 8601)." } },
{ "name": "socialNetworks", "type": "String", "selector": ["data", "socialNetworks"], "meta": { "description": "A JSON array of targeted social networks." } }
]
},
{
"event": "messages.published",
"path": "/webhooks/hootsuite/messages/published",
"payload": [
{ "name": "id", "type": "String", "selector": ["data", "id"], "meta": { "description": "The unique identifier of the message." } },
{ "name": "text", "type": "String", "selector": ["data", "text"], "meta": { "description": "The text content of the message." } },
{ "name": "status", "type": "String", "selector": ["data", "status"], "meta": { "description": "The current status of the message." } },
{ "name": "publishedAt", "type": "String", "selector": ["data", "publishedAt"], "meta": { "description": "The actual publishing time." } }
]
},
{
"event": "messages.failed",
"path": "/webhooks/hootsuite/messages/failed",
"payload": [
{ "name": "id", "type": "String", "selector": ["data", "id"], "meta": { "description": "The unique identifier of the message." } },
{ "name": "text", "type": "String", "selector": ["data", "text"], "meta": { "description": "The text content of the message." } },
{ "name": "error", "type": "String", "selector": ["data", "errorMessage"], "meta": { "description": "The error message if publishing failed." } }
]
}
]
},
{
"handle": "media",
"meta": {
"short": "Media",
"description": "Manage files to attach to messages."
},
"endpoint": {
"value": "/media",
"placeholders": []
},
"fields": [
{
"name": "id",
"type": "String",
"selector": ["id"],
"meta": {
"description": "The unique ID for the media upload job."
}
},
{
"name": "status",
"type": "String",
"selector": ["status"],
"meta": {
"description": "The current status of the upload job."
}
}
],
"operations": {
"upload": {
"method": "POST",
"path": {
"value": "/upload",
"placeholders": []
},
"headers": {
"Content-Type": "application/json"
},
"queryParams": {},
"bodyTemplate": {
"value": "{\"filePath\":\"{{filePath}}\",\"socialNetwork\":\"{{socialNetwork}}\",\"scheduledTime\":\"{{scheduledTime}}\"}",
"placeholders": [
{
"name": "filePath",
"type": "String",
"description": "The path to the file on the local file system.",
"required": true
},
{
"name": "socialNetwork",
"type": "String",
"description": "The specific network targeted.",
"required": true
},
{
"name": "scheduledTime",
"type": "String",
"description": "Optional scheduled time for the post.",
"required": false
}
]
}
},
"readStatus": {
"method": "GET",
"path": {
"value": "/upload/{{jobId}}",
"placeholders": [
{
"name": "jobId",
"type": "String",
"description": "The ID of the upload job.",
"required": true
}
]
},
"headers": {},
"queryParams": {},
"bodyTemplate": null
}
},
"webhooks": [
{
"event": "media.upload.success",
"path": "/webhooks/hootsuite/media/upload/success",
"payload": [
{ "name": "id", "type": "String", "selector": ["data", "id"], "meta": { "description": "The unique ID for the media upload job." } },
{ "name": "status", "type": "String", "selector": ["data", "status"], "meta": { "description": "The current status of the upload job." } }
]
},
{
"event": "media.upload.error",
"path": "/webhooks/hootsuite/media/upload/error",
"payload": [
{ "name": "id", "type": "String", "selector": ["data", "id"], "meta": { "description": "The unique ID for the media upload job." } },
{ "name": "error", "type": "String", "selector": ["data", "error"], "meta": { "description": "The reason for the upload failure." } }
]
}
]
},
{
"handle": "suggestions",
"meta": {
"short": "Amplify Suggestions",
"description": "Retrieve content suggestions that can be amplified."
},
"endpoint": {
"value": "/v2/suggestions",
"placeholders": []
},
"fields": [
{
"name": "id",
"type": "String",
"selector": ["id"],
"meta": {
"description": "The ID of the suggestion."
}
},
{
"name": "content",
"type": "String",
"selector": ["content"],
"meta": {
"description": "The content of the suggestion."
}
}
],
"operations": {
"list": {
"method": "GET",
"path": {
"value": "",
"placeholders": []
},
"headers": {},
"queryParams": {
"socialProfileIds": "{{socialProfileIds}}",
"limit": "{{limit}}"
},
"bodyTemplate": null
}
},
"webhooks": [
{
"event": "suggestions.created",
"path": "/webhooks/hootsuite/suggestions/created",
"payload": [
{ "name": "id", "type": "String", "selector": ["data", "id"], "meta": { "description": "The ID of the suggestion." } },
{ "name": "content", "type": "String", "selector": ["data", "content"], "meta": { "description": "The content of the suggestion." } }
]
}
]
}
]