Gå til hovedindholdet
KungoraKungora

How Kungora works

API, webhooks and widgets

Read and publish content from your own systems, get signed webhooks when stories change, and show your news on your own website.

Vil du have hjælp fra en AI-assistent?

Send dette link til din chatbot (for eksempel ChatGPT, Claude eller Gemini), så kan den forklare, hvordan Kungora fungerer, og besvare dine spørgsmål.

https://kungora.com/guide.md

The open API

The public API v1 serves published content as JSON over HTTPS. The API reference lists every endpoint, field and webhook with examples (in English), and the OpenAPI 3.1 document is for code generators and API clients. The API for developers page on the public site summarises it.

What you can do without a key: read newsrooms, their stories, search and search suggestions, stories by organisation number and the taxonomies (subjects, regions, industries, release types). The answers use cursor paging and weak ETags for conditional requests, and CORS allows every origin. Without a key you may make 60 requests a minute per network.

With an API key you can also write, if the key has the write permission: create and change drafts, publish, upload media and sign up followers with double opt-in. Publishing through the API follows the same checks and email rules as the dashboard, including the first-release review (Publishing).

API keys

Admins and the owner create keys under API keys in the organisation's Settings; other members can read the list. For each key you give a name, choose what it may do (Read published content, and Create drafts, publish, upload media and add followers) and when it expires (30 days, 90 days, one year or never).

  • The key is shown once, when you create it. Copy it at once and keep it among your system's secret settings.
  • Send it with every request as the header Authorization: Bearer followed by the key, from your servers only. Never put it in a web page or an app that others can download.
  • A key raises the limit to 600 requests a minute.
  • A key acts for the whole organisation, in the name of the person who created it. If that person leaves the organisation, the key can no longer write.
  • You see when each key was last used, and you can revoke it with the button that reads, for example, Revoke the key Website. Systems that use it stop working at once.

Terms for content you fetch

What you fetch stays the publisher's. When you republish a story, name the newsroom and Kungora as the source, link to the story and follow each image's licence and credit. Press contacts' names and work details are there for press enquiries about the story only: never use them for marketing, mailing lists or profiling, and never build a register of them. When a story answers 410 or 404, delete your copy and the personal data in it. The terms of use apply.

Webhooks

Webhooks tell your own systems when a story is published, updated, unpublished or deleted. Admins and the owner add endpoints under Webhooks, up to 10 per organisation, each with its own signing secret.

  • An endpoint is an https address on the standard port that answers on the public internet. Choose which events it gets: story published, updated, unpublished or deleted. Imported stories are left out unless you choose them, so that an import does not send hundreds of messages.
  • We send a signed JSON message. The format follows Standard Webhooks, so its libraries can check it: the headers webhook-id (the same on every attempt, so use it to ignore repeats), webhook-timestamp and webhook-signature, which is v1 followed by the Base64 HMAC-SHA256 of the id, the timestamp and the body, keyed with the secret. The body has the type, a timestamp and data with only ids and published facts, among them a link to the story's page while it is public and its api_url.
  • Answer with a 2xx status within 10 seconds; anything else, redirects included, counts as a failure. A failed delivery is retried for about three days, and an endpoint where every delivery fails for days in a row is turned off. Refuse messages whose timestamp is more than five minutes off.
  • The secret is shown once. Make a new secret signs from then on, while the old one keeps signing for 24 hours so that you can switch without losing messages.
  • You can choose Pause the endpoint (events from while it is paused are not sent later), Send a test message, and read the delivery log of the last 30 days, with the outcome of each attempt, and send a message again.

Widgets for your website

Under Widgets in the newsroom's settings you build a widget, check the preview and copy the code. There are three:

  • News feed: the latest press releases, news, blog posts and events with links to the newsroom. You choose the types, the number of items, a list or cards with images, whether links open in the same tab, a new tab or a window on your page, the language (English or Swedish), the heading level and, if you like, one of the newsroom's categories. The feed follows your page's font and colours, which you can adjust with CSS custom properties.
  • Follow form: readers follow the newsroom by email, with double opt-in.
  • Alerts form: readers get new releases that match a selection (this newsroom or every newsroom, types, a subject, a region, an industry) by email, with double opt-in.

The code comes in the forms that fit your website: a Web component (recommended) ( add the script once per page and the element where the widget should appear; the integrity hash makes the browser run only our unchanged file), an iframe, HTML from the server for sites without JavaScript, a JSON Feed and a Plain link. The page also lists the sources to allow if your site has a Content Security Policy.

Feeds

Every newsroom has feeds in RSS 2.0, Atom 1.0 and JSON Feed 1.1, at https://kungora.com/feeds/your-newsroom.rss and, with the endings .atom and .json, in the other two formats. The portal has https://kungora.com/feeds/news.rss and https://kungora.com/feeds/news.json, which accept the same filters as the portal's stream. A newsroom on its own domain has its feeds there, at /rss and /feed.json.

For AI assistants, llms.txt lists the portal and the newsrooms, and this guide is available as one Markdown document at https://kungora.com/guide.md.