What you will have at the end
A key that your developer or another system uses to send content. Everything it sends arrives as a draft for your team to check and publish.
Words used in this article
- Smart Hub and community. The Smart Hub is the run.events application on which members and visitors read content, meet and connect. A community is one site of the Smart Hub, with its own address and members; you run it in its admin area: sign in on the community, then choose Me → Admin.
- API key. A secret code that lets another system talk to your community. Whoever has it can send drafts.
- Draft. An article or a video that nobody but the editors sees until it is published.
- Flyout. A panel that slides in from the side of the page.
Step 1: Create the key
- Choose Me → Admin, and in the sidebar group Menu Management, API Keys. Without keys, the page reads "No API keys yet" and "Create an API key to let external systems publish articles to this community."
- Choose New API Key. Enter a Description, for example "Newsroom tool".
- Under Permissions, Publish Articles is already ticked; leave it ticked. A new key is active from the start.
- Choose Save.
Step 2: Copy it once
The dialog API Key Created shows the key: "Copy this key now and store it securely. For security reasons it will not be shown again. If you lose it, you will need to generate a new one." Choose Copy, and give the key to the person who sets up the other system, through a safe channel.
Step 3: What the other system does
It sends the key with each request, as Authorization: Bearer followed by the key:
POST api/v1/articles/publishwith the title, the body in Markdown, the subtitle, the header, the author (a member's id) and an optional date. The answer is201 Created, with a link to the article in the admin area.POST api/v1/videos/publishfor a YouTube video, with the same key.
Step 4: Publish what arrived
Choose Me → Admin → Content → Articles or Videos. Open each draft, check it, add labels and a picture, set Status to Published, and choose Save.
Stop a key
Choose Revoke API key. The dialog Revoke API Key warns that applications using it lose access at once. The switch Active in the flyout Edit API Key switches a key on again.
Good to know
- The date sent with an article is recorded but does not publish it.
- An author sent as
authorUserId(the user's ID) who is not a member yet is added to the community; an author sent asauthor(the member's GUID) must already be an active member. A video always takesauthorUserId. - A key belongs to one community. The list shows only the first characters of each key.
What run.events does not do here
A lost key cannot be shown again. Create a new one and revoke the old one.
Related articles