Docs

Create Analytics Publication

Send a page on a schedule. Pick a channel, its recipients or destination, and a schedule. It starts paused; send isActive: true to schedule it right away. externalRecipients get the page by email from outside your organization, so add them only when that is meant.

POST

Path

Path parameters
stringrequired

The page id, from List Analytics Pages.

Headers

Optional headers
string

Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. Here a key acts in another organization only as one of its members: with "Use this key across all of your organizations" on, in an organization its creator belongs to with a role. Child organizations and MindCloud staff access do not reach this endpoint. Every response's X-Company-Id header names the organization it acted in. See Organizations.

Body

Arguments
string

What it is called.

What it is called, such as "Weekly revenue".

string

Where it sends: email, slack or teams. Defaults to email on create.

Where it sends. Changing it clears the connection and destination; the recipients stay.

  • emailEmail to the recipients, from MindCloud or from a Gmail or Outlook connection.
  • slackA message in a Slack channel, sent with a Slack connection.
  • teamsA message in a Microsoft Teams channel, sent with a Microsoft Teams connection.
string

fixed, interval, monthly or once.

How the schedule is set.

  • fixedOn the weekdays in days, at each time in runTimes.
  • intervalEvery intervalMinutes, starting at the first time in runTimes.
  • monthlyOn the days of the month in monthDays, at each time in runTimes.
  • onceOnce, on the date in runDates, at the time in runTimes.
number

For interval: minutes between sends, 360 to 43200.

For interval: minutes between sends, 360 (six hours) to 43200 (thirty days).

array of number

For fixed: weekdays, 0 (Sunday) to 6 (Saturday).

array of number

For monthly: days of the month, 1 to 30, or -1 for the last day.

array of string

For once: the date, as YYYY-MM-DD.

array of string

Times of day, as HH:MM in timeZone.

Times of day, zero-padded HH:MM in timeZone, like 09:00. Activating needs at least one.

string

An IANA time zone, or null to follow the organization's.

An IANA time zone, such as America/New_York, or null to follow the organization's time zone (the default).

array of string

Member recipients by user id, from List Members. Replaces the list.

Member recipients by user id, from List Members. Replaces the list. At most 50.

array of string

Addresses outside your organization. Each gets the page by email. Replaces the list.

Email addresses outside the organization. Each one gets the page by email, from outside your organization. Replaces the list. At most 50.

string

The email subject. Defaults to the page's name.

The email subject. Leave it out to use the page's name.

string

The connection to send through, from List Connections. Email: Gmail or Outlook, or null for MindCloud's sender. Slack and teams: one of that app.

The connection to send through, from List Connections, or null. Email: a Gmail or Outlook connection, or null for MindCloud's own sender. Slack and teams need one of that app. Its owner must let the key's creator use it.

object

For slack and teams: where it posts, with ids from Resolve Universal Lookup.

For slack and teams: where it posts. Find the ids with Resolve Universal Lookup on the app. Replaces the stored destination.

  • channelIdstring

    Slack and Teams: the channel id to post in.

  • channelLabelstring

    Slack and Teams: the channel name, shown in the app.

  • teamIdstring

    Teams: the team id.

  • teamLabelstring

    Teams: the team name, shown in the app.

object

Its own filter values, by page variable name (from Get Analytics Page). Replaces the stored map; {} goes back to the page's defaults.

Its own filter values, by page variable name (see Get Analytics Page), each as the page's link carries it. Replaces the stored map; {} goes back to the page's defaults.

boolean

true schedules it, false pauses it.

true schedules it, false pauses it. Activating needs a complete schedule and, for slack and teams, a connection and destination.

Response fields

idstring

The publication's id.

pageIdstring

The page it sends, from List Analytics Pages.

namestring

Its name. Null until one is given.

isActiveboolean

True when it sends on its schedule. A new publication starts paused.

channelstring

Where it sends.

  • emailEmail to the recipients, from MindCloud or from a Gmail or Outlook connection.
  • slackA message in a Slack channel, sent with a Slack connection.
  • teamsA message in a Microsoft Teams channel, sent with a Microsoft Teams connection.
scheduleTypestring

How its schedule is set.

  • fixedOn the weekdays in days, at each time in runTimes.
  • intervalEvery intervalMinutes, starting at the first time in runTimes.
  • monthlyOn the days of the month in monthDays, at each time in runTimes.
  • onceOnce, on the date in runDates, at the time in runTimes.
intervalMinutesnumber

For interval: minutes between sends, 360 (six hours) to 43200 (thirty days).

daysarray of number

For fixed: the weekdays it sends on, 0 (Sunday) to 6 (Saturday).

monthDaysarray of number

For monthly: the days of the month it sends on, 1 to 30, or -1 for the last day.

runDatesarray of string

For once: the date it sends on, as YYYY-MM-DD.

runTimesarray of string

The times of day it sends at, as HH:MM in timeZone.

timeZonestring

The IANA time zone its times are in, such as America/New_York.

isOrganizationTimeZoneboolean

True when timeZone is the organization's time zone and changes with it; false when one was set for this publication.

nextRunOndate

When it sends next. Null while it is paused or has nothing left to send.

autoPausedOndate

When MindCloud paused it after failed sends. Null when it was not.

autoPauseReasonstring

Why MindCloud paused it. Null when it was not.

recipientUserIdsarray of string

Member recipients, by user id (from List Members).

externalRecipientsarray of string

Recipients outside the organization, by email address.

unsubscribedRecipientUserIdsarray of string

Members who unsubscribed with the link in its email, by user id. They get nothing until resubscribed.

unsubscribedExternalRecipientsarray of string

Outside addresses that unsubscribed with the link in its email.

subjectstring

The email subject. Null uses the page's name.

connectionIdstring

The connection it sends through, from List Connections. Null for email from MindCloud's own sender.

destinationobject

For slack and teams: where it posts. Null for email.

  • channelIdstring

    Slack and Teams: the channel id it posts in. Null for email.

  • channelLabelstring

    Slack and Teams: the channel name, as picked. Null for email.

  • teamIdstring

    Teams: the team id. Null otherwise.

  • teamLabelstring

    Teams: the team name, as picked. Null otherwise.

variablesobject

Its own filter values, by page variable name, as the page's link carries them. Empty uses the page's defaults.

createdOndate

When it was created.

updatedOndate

When it last changed.