Messages

Schedule messages

Schedules a message to send on one or more social profiles (except Pinterest). Returns an array of uniquely identifiable messages (one per social profile requested).<br/><br/>Scheduling a message to Pinterest can not be bundled with any other social profiles.

post/v1/messages

Request

  • Base URL
    https://platform.hootsuite.com
  • URL
    https://platform.hootsuite.com/v1/messages
  • Auth
    OAuth 2
    Authorization code: https://platform.hootsuite.com/oauth2/auth
    Token URL: https://platform.hootsuite.com/oauth2/token

Headers

Authorizationstring required

A bearer token string used for authentication

Request body

textstring

The message text to publish.

socialProfileIdsstring[]

The social profiles that the message will be posted to.

scheduledSendTimestring

The time the message is scheduled to be sent in UTC time, ISO-8601 format. Missing or different timezones will not be accepted, to ensure there is no ambiguity about scheduled time. Dates must end with 'Z' to be accepted.

webhookUrlsstring[]

The webhook URL(s) to call to when the message’s state changes.

tagsstring[]

The Hootsuite message tags to apply to the message. To set tags the social profile must belong to an organization. Tags are case sensitive. Limited permission members can only use the existing tags for organization and cannot create new ones. See more about message tags at the Hootsuite Help Center.<br/>Not supported by Pinterest.

emailNotificationboolean

A flag to determine whether email notifications are sent when the message is published.

Example request

{
  "text": "5 trends that will change how we use social media this year http://owl.li/YuNr2",
  "socialProfileIds": [
    "115185509"
  ],
  "scheduledSendTime": "2020-01-01T14:00:00.000Z",
  "webhookUrls": [
    "https://myserver.com/inbound"
  ],
  "tags": [
    "test_tag"
  ],
  "targeting": {
    "facebookPage": {
      "ageMin": 45,
      "education": [
        "collegeGrad"
      ],
      "interestedIn": [
        "female"
      ],
      "relationshipStatus": [
        "single"
      ],
      "countries": [
        {
          "k": "Canada",
          "v": "CA"
        }
      ],
      "regions": [
        {
          "k": "British Columbia",
          "v": "2"
        }
      ],
      "cities": [
        {
          "k": "Burnaby, BC",
          "v": "292466"
        }
      ],
      "zips": [
        {
          "k": "K1S",
          "v": "CA:K1S"
        }
      ]
    },
    "linkedInCompany": {
      "companySize": [
        "51-200"
      ],
      "geography": [
        "as.jp"
      ],
      "industry": [
        "41"
      ],
      "jobFunction": [
        "qa"
      ],
      "seniority": [
        "en"
      ]
    },
    "linkedInV2Company": {
      "locations": [
        "urn:li:geo:103644278",
        "urn:li:geo:102095887"
      ],
      "staffCountRanges": [
        "SIZE_1",
        "SIZE_51_TO_200",
        "SIZE_10001_OR_MORE"
      ],
      "seniorities": [
        "urn:li:seniority:1",
        "urn:li:seniority:2"
      ],
      "industries": [
        "urn:li:industry:1",
        "urn:li:industry:2"
      ],
      "interfaceLocales": [
        {
          "country": "US",
          "language": "en"
        },
        {
          "country": "ES",
          "language": "es"
        }
      ]
    }
  },
  "privacy": {
    "facebook": {
      "visibility": [
        "everyone"
      ]
    },
    "linkedIn": {
      "visibility": [
        "anyone"
      ]
    }
  },
  "location": {
    "latitude": 57.64911,
    "longitude": 10.40744
  },
  "emailNotification": true,
  "mediaUrls": [
    {
      "url": "http://static.ow.ly/photos/normal/cS5.jpg"
    }
  ],
  "media": [
    {
      "id": "aHR0cDovL2V4YW1wbGUub3Jn",
      "videoOptions": {
        "facebook": {
          "title": "My Video",
          "category": "ENTERTAINMENT"
        }
      }
    }
  ],
  "extendedInfo": [
    {
      "socialProfileType": "PINTEREST",
      "socialProfileId": "123456789",
      "data": {
        "boardId": "123456789012345678",
        "destinationUrl": "https://www.hootsuite.com"
      }
    }
  ]
}

Response

Success

Example response

{
  "data": [
    {
      "id": "4138476039",
      "state": "SCHEDULED",
      "text": "5 trends that will change how we use social media this year http://owl.li/YuNr2",
      "socialProfile": {
        "id": "115185509",
        "externalURL": "https://www.linkedin.com/in/l-lhs-8654321"
      },
      "scheduledSendTime": "2018-10-25T10:35:00.000Z",
      "webhookUrls": [
        "https://myserver.com/inbound"
      ],
      "tags": [
        "test_tag"
      ],
      "targeting": {
        "facebookPage": {
          "ageMin": 45,
          "education": [
            "collegeGrad"
          ],
          "interestedIn": [
            "female"
          ],
          "relationshipStatus": [
            "single"
          ],
          "countries": [
            {
              "k": "Canada",
              "v": "CA"
            }
          ],
          "regions": [
            {
              "k": "British Columbia",
              "v": "2"
            }
          ],
          "cities": [
            {
              "k": "Burnaby, BC",
              "v": "292466"
            }
          ],
          "zips": [
            {
              "k": "K1S",
              "v": "CA:K1S"
            }
          ]
        },
        "linkedInCompany": {
          "companySize": [
            "51-200"
          ],
          "geography": [
            "as.jp"
          ],
          "industry": [
            "41"
          ],
          "jobFunction": [
            "qa"
          ],
          "seniority": [
            "en"
          ]
        }
      },
      "privacy": {
        "facebook": {
          "visibility": [
            "everyone"
          ]
        },
        "linkedIn": {
          "visibility": [
            "anyone"
          ]
        }
      },
      "location": {
        "latitude": 57.64911,
        "longitude": 10.40744
      },
      "emailNotification": true,
      "mediaUrls": [
        {
          "thumbnailUrl": "http://static.ow.ly/photos/thumb/cS5.jpg",
          "url": "http://static.ow.ly/photos/normal/cS5.jpg"
        }
      ],
      "media": [
        {
          "id": "aHR0cDovL2V4YW1wbGUub3Jn",
          "thumbnailId": "aHR0cDovL2V4YW1wbGUtMDAwMS5vcmc=",
          "videoOptions": {
            "facebook": {
              "title": "My Video",
              "category": "ENTERTAINMENT"
            }
          }
        }
      ],
      "extendedInfo": [
        {
          "socialProfileType": "PINTEREST",
          "socialProfileId": "123456789",
          "data": {
            "boardId": "123456789012345678",
            "destinationUrl": "https://www.hootsuite.com"
          }
        }
      ],
      "postId": "705207140236001282",
      "postUrl": "https://www.facebook.com/177463958820/posts/10155617296368821",
      "createdByMember": {
        "id": "1389211223"
      },
      "lastUpdatedByMember": {
        "id": "1389211222"
      },
      "sequenceNumber": 3,
      "reviewers": [
        {
          "type": "MESSAGE_LEVEL"
        }
      ]
    }
  ],
  "metadata": {
    "cursor": {
      "next": "1577887200000:4138476039:0",
      "previous": "1577887200000:4138476039:1"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.