Explore News API use case scenarios for your organization.
The News API gives you a lot of flexibility in how you create and manage your news content. Be that for integrating news content between the Staffbase platform and external platforms or improving efficiencies. All News API specifications are listed here.
In this article, let’s look at the everyday business use cases for the News API in your organization. The following is not an exhaustive list of use cases for the News API.
With the Staffbase News API, you can import all the news content created in any platform you use to your Staffbase platform. Import the content to a specific news channel in the Staffbase platform and publish it immediately or schedule it to be published later.
Importing news content from an external platform to the Staffbase platform can be helpful in many cases.
For example:
For syncing content, you need to create additional middleware between the two platforms.
POST
request to endpoint /channels/{channelID}/posts
to add a news post to the channel you want.You can set up an automation to import the news content on a regular basis.
When importing news content from an external platform to the Staffbase platform using the POST
request to the News API, you need to provide the URL of the video or image displayed along with the teaser. If the image or video file in the content does not have a URL, you can upload the file first using the Media API.
POST
request to the endpoint /media
to upload the file.
Learn more about it here.Once you have uploaded the image or video file using the Media API, you will get the URL to the uploaded file in the response sample. Use the URL when importing the news content from an external platform to the Staffbase Platform.
You want to resend the notification to HR-related posts published in the previous month to all the employees who have not read the post.
GET
request to the endpoint /posts
to list all posts in the channel by providing the channelID
. Learn more about it here.POST
request to the endpoint /posts/{postID}/notifications
to resend notifications to all employees who have not read the post. In the request body schema, set the recipients
parameter to unread
.To resend the notifications to all users instead of users who have not yet read the post, set the recipients parameter to all.
You can manage your Campaigns with greater ease with the Staffbase APIs. Let’s look at how to assign news posts to a campaign.
GET
request to the endpoint /campaigns
to list all campaigns. Learn more about it here.campaignID
for which you want to assign a post.PUT
request to the endpoint /posts/{postID}
and in the request body schema, provide the value for the parameter campaignID
. Learn more about it here.