Compatibility APIs

The compatibility APIs provide a (mostly) backwards-compatible view of Mindful data

These APIs are designed as a stop-gap solution to ease transition onto the Mindful platform, and will eventually be shut down. New implementations should use the Analytics or Query APIs directly, and existing implementations should be updated as soon as possible.

BaseCMS / Content API

The BaseCMS compatibility API provides the same shape as the current BaseCMS GraphQL API. It will be available soon

NativeX / EmailX (AdX) API

The AdX compatibility APIs provide a limited subset of previous API functionality for both legacy items (entered within AdX) and current items (entered in Mindful).

Delivery

The delivery APIs are JSON APIs that can be used to fetch creatives for email banner and native ads.

In most cases, the workspace key in the URLs below will be default.

For more information, see the tenancy section of the Mindful API overview.

Email Banner

Old: https://<org-key>.serve.email-x.parameter1.com/data/<ad-unit-id>?date=...

New: https://delivery.mindfulcms.com/<org-key>/<workspace-key>/compat/email-banner/data/<ad-unit-id>?date=...

Email Native

Old: https://<org-key>.native-x.parameter1.com/email-placement/<ad-unit-id>.json

New: https://delivery.mindfulcms.com/<org-key>/<workspace-key>/compat/native-email/email-placement/<ad-unit-id>.json

Metrics / Reporting

The NativeX reporting queries are preserved in the Mindful Compatibility API. To use the compatibility API, update your implementation to use the new URI following the pattern below:

Old URL: https://<org-key>.native-x.parameter1.com/graphql

New URL: https://delivery.mindfulcms.com/<org-key>/<workspace-key>/compat/native-website/graph

Backwards-compatibility changes

Topics no longer exist in the Mindful ecosystem. The Topic, Template, and Ad Unit models from the NativeX architecture have been combined into a single model in Mindful (targeting an Email or Website Channel, depending on the variant form). For most use cases, this will be a Website Channel (aka section).

For implementations using Topics, read the topic information from the placement name field. It follows the pattern <topic name> - <template name>.

Expand the queries below to see the supported fields from the legacy APIs.

All Campaigns

This query returns all campaigns, from newest to oldest, and supports/requires pagination.

query AllCampaigns(
  $pagination: PaginationInput,
  $sort: CampaignSortInput
) {
  allCampaigns(pagination: $pagination, sort: $sort) {
    totalCount
    pageInfo { endCursor hasNextPage }
    edges {
      cursor
      node {
        criteria {
          end
          id
          start
          placements {
            name
            # Topics are no longer supported. For BC, returns placement data.
            topic {
              name
              id
              createdAt
              externalId
              publisher { id name }
            }
            publisher {
              name
              id
              createdAt
              updatedAt
            }
            id
            createdAt
          }
        }
        description
        name
        advertiser { name id }
        id
        creatives {
          id
          title
          teaser
          active
        }
        hash
        url
        status
      }
    }
  }
}
Campaign Metrics

This query returns metrics for a single campaign. Note that the start/end dates are supported, but are not used.

query MyQuery($input: CampaignHashInput! , $startDate: Date!, $endDate: Date!){
  campaignHash(input: $input) {
    id
    name
    hash
    reports {
      byDay(startDate: $startDate, endDate: $endDate) {
        date: day(format: "YYYYMMDD")
        metrics {
          clicks
          views
          ctr
        }
      }
    }
    creatives {
      id
      title
    }
  }
}
Creative Metrics

This query returns metrics for a single creative. Note that the start/end dates are supported, but are not used.

query CampaignCreativeReportByDay($input: CampaignCreativeInput!, $startDate: Date!, $endDate: Date!) {
  campaignCreative(input: $input) {
    reports {
      byDay(startDate: $startDate, endDate: $endDate) {
        date: day(format: "YYYYMMDD")
        metrics {
          views
          clicks
          ctr
        }
      }
    }
  }
}

Last updated