Tech docs
API Docs
Partners API

Partners API

Parse.ly's partners API provides a means for partners to programatically create and list API keys on behalf of their customers.

The root URL for all partner API requests is

https://dash.parsely.com/

#Authentication

All endpoints require an authentication query string parameter which you must contact support@parsely.com for.

Once received, all requests are authenticated by passing this token in the ?secret=(partner_secret_key) query string parameter.

#GET /(partner_name)/settings/apikeys

Returns a list of API keys associated with this partner:

Sample response:

{
  "data": [
    {
      "timezone": "America/New_York",
      "registration_date": "2016-08-29T14:52:06.914780",
      "apikey": "example.com",
      "signup_date": null,
      "track_start_date": "2016-05-06T23:50:26"
    },
    {
      "timezone": "US/Eastern",
      "registration_date": "2016-11-24T15:12:29.761830",
      "apikey": "example1.com",
      "signup_date": "2016-11-24T15:12:29.761830",
      "track_start_date": null
    }
  ]
}

#Path arguments

partner_nameYour partner name which will be provided by Parse.ly support

#POST /(partner_name)/settings/apikeys

Creates a new API key (Parse.ly account) for the specified publisher. Users will be notified via e-mail that their account is ready and will be prompted to sign in to Parse.ly to create their account.

After an account is created, it is your responsibility to ensure the required tracking code and metadata are added to your customer's site.

Sample request:

{
    "apikey": "example.com",
    "admin": "bob.smith@example.com",
    "timezone": "US/Eastern",
    "users": [
        "jill.jones@gmail.com"
    ],
    "tracker_features": ["engagedtime", "video"]
}

#Request parameters

apikeyRequired. This is Parse.ly's unique customer identifier. This should be a domain-like value such as example.com. If you are creating an account for a user that doesn't have their own domain name, use a subdomain such as username.example.com. It's fine if username.example.com does not correspond to a reachable domain.
adminRequired. E-mail address of the user who will be an admin within Parse.ly. Admin users can invite others and control settings such as billing.
timezoneRequired. ISO-8601 timezone name.
usersOptional. An array of users to invite at the time the account is created.
tracker_featuresOptional. An array of features to enable on the tracker. Allowed values are "engagedtime", "slots", and "video"

Sample response:

{
  "data": {
    "dashboard_url": "http://dash.parsely.com/example.com/",
    "apikey": "example.com",
    "javascript_tracking_code": "(function(d) {var b = d.body,e = d.createElement(\"script\");e.id = \"parsely-cfg\";e.src = \"//cdn.parsely.com/keys/example.com/p.js\";b.appendChild(e);})(document);",
    "html_tracking_code": "<script id=\"parsely-cfg\" src=\"//cdn.parsely.com/keys/example.com/p.js\"></script>"
  }
}

#Response parameters

dashboard_urlAbsolute URL to access the Parse.ly dashboard.
apikeyCreated API key (account).
html_sync_tracking_codeCode snippet to insert in HTML.
javascript_tracking_codeLegacy code snippet to insert if pure JavaScript or DOM-free implementation (tag managers for example require a DOM-free implementation).
html_tracking_codeLegacy code snippet to insert in HTML.
rocket emoji