Skip to content

API description

Parameters

Additional parameters to send (beyond Authorization):

ParameterDescriptionRequired
languageCodeThe preferred language of the news (2-letter ISO).Yes
sizeThe number of news to retrieve. The maximum is 12.No, default is 1
maxLeadTextHow many characters the lead text of each news should have. Choose a number from 300 - 800No, default is 300

For general use how to use the API from an editor’s perspective, please visit the relevant article on ahead’s help site.

Response

A typical response looks as follows:

[
{
"title": "The title of the news",
"leadText": "The lead text of the news.",
"leadImageUrl": "https://url.of/lead-image?c=x98r",
"published": "2024-03-20T14:12:18Z",
"authorDetails": {
"name": "Arthur Author",
"jobTitle": "Writing Content",
"department": "Human Resources",
"officeLocation": "PostParc",
"city": "Bern",
"companyName": "MountainGear"
},
"channels": ["HR-Infos"],
"url": "https://app.aheadintranet.com/news/4a308770-5210-4455-8f52-13616b7c2c91"
}
]
PropertyDescriptionCan be null
titleThe title of the news. Max 100 characters.No
leadTextThe first n characters of the content of the news, depending on the provided maxLeadText.Yes
leadImageUrlThe URL of the first image of the news. This is either an external URL or a URL to an image stored in ahead storage. In the latter case, the URL is valid for only 30 minutes.Yes
publishedThe date of when the news was published for the first time.No
channelsThe name of the channels the news is published in.No, but can be empty
urlThe URL of the news.No
authorDetails
.nameThe name of the author of the news, as shown in ahead.No
.jobTitleThe author’s value of the Entra ID property ‘jobTitle’.Yes
.departmentThe author’s value of the Entra ID property ‘department’.Yes
.officeLocationThe author’s value of the Entra ID property ‘officeLocation’.Yes
.cityThe author’s value of the Entra ID property ‘city’.Yes
.companyNameThe author’s value of the Entra ID property ‘companyName’.Yes