Skip to content

API description

This page describes everything you need to know to create external activities in ahead.

External activities (or simply activities) are basic snippets of information that are sent to a ahead via a POST request.

The basic payload of an activity would look something like this:

{
"source": "Weather",
"title": "Weather in BCN",
"text": "Sunny with 23 degrees.",
"origin": "weather.com"
"mediaurl": "http://cdn.io/bcn.jpg",
"url": "http://weather.com/locations/bcn",
"targetAudience": "All",
"identifier": "weather-bcn",
"expires": "5d"
}
Field Name Required Example String
title yes The title of the activity
source A source that controls the icon shown on ahead. See below for possible options
text The text of the activity
origin Additional information that whe present, is displayed underneath the main text as if “origin” authored the activity (By {origin})
mediaurl An image that is shown below title and text
url A url that is navigated to when clicked on the activity
targetAudience This is relevant when using targeted activities. See our help article for more on that
identifier identifier to be used to ensure that only the newest activity with this identifier ever exists. Weather or Stock Ticker activities are nice examples where to use it
expires The number of days in which the activity will expire. Format (\d{1,2})d. Allowed values: 0 to 30.

For the Source field you can use one of

  • Ahead
  • Birthday
  • DynamicsCrm
  • Event
  • Facebook
  • HubSpot
  • HR
  • Instagram
  • Menuplan
  • MicrosoftStream
  • Pipedrive
  • PressRelease
  • Slack
  • Sport
  • Stocks
  • Travel
  • Twitter
  • Weather
  • X
  • Yammer
  • Youtube
  • Other

You can also obtain a swagger file for tools that can generate an API call from the information provided there at

https://connect.aheadintranet.com/api/ReceiveExternalActivity/swagger

Please note that you need to use an API Key also for this call.