INTERNAL: Fetches Microsoft 365 Message Center posts for a time period (default: yesterday) and publishes them to the Tophhie Cloud Blog.
const url = 'https://api.tophhie.cloud/m365/messagecenter/publish';const options = {method: 'POST', headers: {'x-tc-api-key': 'example'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tophhie.cloud/m365/messagecenter/publish \ --header 'x-tc-api-key: example'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Rolling window: publish messages from the last N hours (ending now). Mutually exclusive with from/to.
Rolling window: publish messages from the last N hours (ending now). Mutually exclusive with from/to.
Start of the window as an ISO 8601 datetime (inclusive). Requires no lastHours.
Start of the window as an ISO 8601 datetime (inclusive). Requires no lastHours.
End of the window as an ISO 8601 datetime (exclusive). Defaults to now; only valid alongside from.
End of the window as an ISO 8601 datetime (exclusive). Defaults to now; only valid alongside from.
Header Parameters
Section titled “Header Parameters”Internal API key for authorising this operation.
Internal API key for authorising this operation.
Responses
Section titled “Responses”Publisher completed.
object
Number of posts skipped because a Ghost post with that Message Center ID already exists.
Number of posts also cross-posted to Bluesky.
Number of Bluesky cross-posts that failed (independent of the Ghost publish).
Examplegenerated
{ "message": "example", "total": 1, "succeeded": 1, "failed": 1, "skipped": 1, "blueskySucceeded": 1, "blueskyFailed": 1}Bad request — invalid time period parameters.
object
Examplegenerated
{ "error": "example"}Forbidden — invalid or missing API key.
object
Examplegenerated
{ "error": "example"}Internal server error.
object
Examplegenerated
{ "error": "example"}
