Fetch a single published post by slug.
Fetch a single published post by slug.
GET
https://app.softsolz.uk/api/v1/services/blogs/posts/published/{slug}Recent Requests
Log in to see full request historyTimeStatusUser Agent
Make a request to see history.
Path Params
slugstringrequiredHeaders
AuthorizationstringrequiredBearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.
Response
Response Body
slugstringURL-safe post slug.titlestringPost title.subtitlestring | nullOptional subtitle.excerptstring | nullShort excerpt.cover_image_urlstring | nullCover image URL.cover_image_altstring | nullCover image alt text.og_image_urlstring | nullOpen Graph image URL.seo_titlestring | nullSEO title override.seo_descriptionstring | nullSEO description override.categorystring | nullCategory label.tagsarray of stringsTags.authorstring | nullDisplay author/byline name.author_image_urlstring | nullByline avatar image URL.reading_time_minutesintegerEstimated reading time.featuredbooleanWhether the post is featured.no_indexbooleanExcluded from search engines.comments_enabledbooleanWhether comments are open on this post.show_tocbooleanWhether a table of contents is shown on this post.show_sharebooleanWhether reader share buttons are shown.show_datebooleanWhether the publish date is shown.show_reading_timebooleanWhether the reading time is shown.published_atstringWhen the post was published.body_htmlstringPost body as sanitized HTML.cta_labelstring | nullOptional call-to-action label.cta_urlstring | nullOptional call-to-action URL.share_channelsarray of stringsNetworks shown in the reader share bar.canonical_urlstring | nullPublic URL of the post, when a blog public URL is configured.Request
import { SoftSolz } from '@softsolz/sdk';
const client = new SoftSolz({ apiKey: process.env.SOFTSOLZ_API_KEY });
const result = await client.blogs.getPublishedPostBySlug('<slug>');console.log(result);Credentials
Sent as a Bearer token. Stored only in your browser.
Response · 200
{ "data": { "slug": "string", "title": "string", "subtitle": "string", "excerpt": "string", "cover_image_url": "string", "cover_image_alt": "string", "og_image_url": "string", "seo_title": "string", "seo_description": "string", "category": "string", "tags": [], "author": "string", "author_image_url": "string", "reading_time_minutes": 0, "featured": true, "no_index": true, "comments_enabled": true, "show_toc": true, "show_share": true, "show_date": true, "show_reading_time": true, "published_at": "string", "body_html": "string", "cta_label": "string", "cta_url": "string", "share_channels": [], "canonical_url": "string" }}