Skip to content
OpenSmartRoute
Documentation
Hosted platformREST API reference

Content

Content publishing for the workspace's own website: the feeds it follows and the briefs it sends become posts written through the router as its own metered requests; posts are reviewed, published and delivered to its destinations (a signed webhook, WordPress, Ghost) with a retried delivery log, or pulled from `GET /content/posts` and the RSS at `GET /content/feed.xml`.

Hosted platformAPI version 2.1.0

The `content_*` MCP tools do the same for agents.

get/api/v1/content

Overview

The workspace's content service at a glance: editorial profile, post and delivery counts, feeds, destinations, the writer that is active, the limits and the pull URL of the workspace RSS.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/content" \
  -H "Authorization: Bearer $OSR_API_KEY"

get/api/v1/content/deliveries

Deliveries

The delivery log: every attempt to put a post on a destination, with the site's answer.

Requires an API key

Parameters

NameInTypeDefaultDescription
post_idquerystring | null
limitqueryinteger50
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/content/deliveries?limit=50" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/content/deliveries/{delivery_id}/retry

Retry Delivery

Try a failed or waiting delivery again now.

Requires an API key

Parameters

NameInTypeDefaultDescription
delivery_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/content/deliveries/<delivery_id>/retry" \
  -H "Authorization: Bearer $OSR_API_KEY"

get/api/v1/content/destinations

Destinations

Where published posts go: signed webhooks, WordPress sites, Ghost publications and the social, chat and blog networks - never the secrets. networks describes every kind with the credential fields it needs.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/content/destinations" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/content/destinations

Add Destination

Add a destination (admins). webhook: your URL, optional secret for X-OSR-Signature; wordpress: the site URL, a user name and an application password; ghost: the site URL and an Admin API key; a social kind (linkedin, x, facebook, discord ...): its credentials (the fields GET /destinations lists under networks). auto_publish sends every post that becomes published; post_status: draft leaves the post as a draft on a CMS or blog platform; schedule (mode immediate or window, days, start, end, timezone, gap_minutes, max_per_day) decides when queued deliveries go out.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyDestinationIn

FieldTypeDefaultDescription
auto_publishbooleantrue
credentialsobject<string> | null
kind(required)string
name(required)string
post_statusstring"publish"
scheduleobject | null
secretstring | null
templatestring | null
urlstring""
usernamestring | null

Responses

201Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/content/destinations" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "kind": "string", "name": "default" }'
Bodyjson
{
  "kind": "string",
  "name": "default"
}

patch/api/v1/content/destinations/{destination_id}

Update Destination

Change a destination (admins); secret: "" removes the stored credential, credentials are merged into the stored fields (an empty value removes one), schedule and template replace theirs.

Requires an API key

Parameters

NameInTypeDefaultDescription
destination_id(required)pathstring
x-goog-api-keyheaderstring | null

Request bodyDestinationPatch

FieldTypeDefaultDescription
auto_publishboolean | null
credentialsobject<string> | null
enabledboolean | null
namestring | null
post_statusstring | null
scheduleobject | null
secretstring | null
templatestring | null
urlstring | null
usernamestring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X PATCH "$OSR_URL/api/v1/content/destinations/<destination_id>" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "auto_publish": false, "credentials": {}, "enabled": false, "name": "default", "post_status": "string", "schedule": {}, "secret": "string", "template": "string" }'
Bodyjson
{
  "auto_publish": false,
  "credentials": {},
  "enabled": false,
  "name": "default",
  "post_status": "string",
  "schedule": {},
  "secret": "string",
  "template": "string"
}

delete/api/v1/content/destinations/{destination_id}

Delete Destination

Remove a destination and its delivery log (admins).

Requires an API key

Parameters

NameInTypeDefaultDescription
destination_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

204Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/content/destinations/<destination_id>" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/content/destinations/{destination_id}/test

Test Destination

Send a clearly marked test post to the destination now and return the site's answer.

Requires an API key

Parameters

NameInTypeDefaultDescription
destination_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/content/destinations/<destination_id>/test" \
  -H "Authorization: Bearer $OSR_API_KEY"

get/api/v1/content/feed.xml

Feed Xml

RSS 2.0 of the workspace's published posts, for its own site or a feed reader: with the API key in the header, or with the workspace's feed token as ?token= (the pull URL on the Content page) - a feed reader cannot send headers.

Requires an API key

Parameters

NameInTypeDefaultDescription
tokenquerystring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/content/feed.xml" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/content/feed/token

Rotate Feed Token

Replace the feed token (admins): the pull URL a feed reader or a site build was given stops working at once and the answer carries the new one.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/content/feed/token" \
  -H "Authorization: Bearer $OSR_API_KEY"

get/api/v1/content/feeds

Feeds

The RSS/Atom feeds the workspace follows, with their last fetch.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/content/feeds" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/content/feeds

Add Feed

Follow a feed - or a page that advertises one, the feed is found - after one look at it: the feed's title names it unless name is given, its site is remembered, a reachable URL that is no feed is refused (400), an unreachable one is followed with the error on its row. It is polled on the scheduler's next pass (entries from the last 7 days) and every new entry becomes a post written for the workspace's publication. The answer is the feed with what the look found under probe.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyWorkspaceFeedIn

FieldTypeDefaultDescription
categorystring | null
namestring | null
url(required)string

Responses

201Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/content/feeds" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "string" }'
Bodyjson
{
  "url": "string"
}

post/api/v1/content/feeds/preview

Preview Feed

Look at a URL before following it: the feed's title, site and newest entries - or, for a page, the feed it advertises in its <head> (or at /feed, /rss.xml ...); nothing is stored.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyFeedPreviewIn

FieldTypeDefaultDescription
url(required)string

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/content/feeds/preview" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "string" }'
Bodyjson
{
  "url": "string"
}

patch/api/v1/content/feeds/{feed_id}

Update Feed

Rename, recategorise or pause a feed.

Requires an API key

Parameters

NameInTypeDefaultDescription
feed_id(required)pathstring
x-goog-api-keyheaderstring | null

Request bodyWorkspaceFeedPatch

FieldTypeDefaultDescription
categorystring | null
enabledboolean | null
namestring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X PATCH "$OSR_URL/api/v1/content/feeds/<feed_id>" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "category": "string", "enabled": false, "name": "default" }'
Bodyjson
{
  "category": "string",
  "enabled": false,
  "name": "default"
}

delete/api/v1/content/feeds/{feed_id}

Delete Feed

Stop following a feed (its posts stay).

Requires an API key

Parameters

NameInTypeDefaultDescription
feed_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

204Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/content/feeds/<feed_id>" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/content/feeds/{feed_id}/fetch

Fetch Feed

Poll one feed now and write posts for its new entries (a metered request per post).

Requires an API key

Parameters

NameInTypeDefaultDescription
feed_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/content/feeds/<feed_id>/fetch" \
  -H "Authorization: Bearer $OSR_API_KEY"

get/api/v1/content/posts

Posts

The workspace's posts, newest first (status filters; q searches title, summary and tags). Bodies are left out; GET /posts/{id} has them.

Requires an API key

Parameters

NameInTypeDefaultDescription
statusquerystring | null
qquerystring | null
limitqueryinteger50
offsetqueryinteger0
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/content/posts?limit=50&offset=0" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/content/posts

Create Post

Store a post written elsewhere (Markdown body). status: published delivers it to the destinations set to publish automatically.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyPostIn

FieldTypeDefaultDescription
body(required)string
categorystring | null
image_urlstring | null
source_urlstring | null
statusstring"draft"
summarystring""
tagsstring[][]
title(required)string

Responses

201Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/content/posts" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "body": "string", "title": "string" }'
Bodyjson
{
  "body": "string",
  "title": "string"
}

post/api/v1/content/posts/write

Write Post

Write a post from a brief: the topic, the editor's notes and optionally a page it is about. The writer routes through the platform as the workspace's own metered request; routing on the post says which model wrote it. Without an executable model (or when the request is refused) the post is the brief.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyWriteIn

FieldTypeDefaultDescription
notesstring""
statusstring"draft"
topic(required)string
urlstring | null

Responses

201Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/content/posts/write" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "topic": "string" }'
Bodyjson
{
  "topic": "string"
}

get/api/v1/content/posts/{post_id}

Post

One post with its Markdown body, an HTML rendering and its deliveries.

Requires an API key

Parameters

NameInTypeDefaultDescription
post_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/content/posts/<post_id>" \
  -H "Authorization: Bearer $OSR_API_KEY"

patch/api/v1/content/posts/{post_id}

Update Post

Edit a post; moving it to published delivers it to the automatic destinations.

Requires an API key

Parameters

NameInTypeDefaultDescription
post_id(required)pathstring
x-goog-api-keyheaderstring | null

Request bodyWorkspacePostPatch

FieldTypeDefaultDescription
bodystring | null
image_urlstring | null
statusstring | null
summarystring | null
tagsstring[] | null
titlestring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X PATCH "$OSR_URL/api/v1/content/posts/<post_id>" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "body": "string", "image_url": "string", "status": "string", "summary": "string", "tags": [], "title": "string" }'
Bodyjson
{
  "body": "string",
  "image_url": "string",
  "status": "string",
  "summary": "string",
  "tags": [],
  "title": "string"
}

delete/api/v1/content/posts/{post_id}

Delete Post

Delete a post and its delivery log (what a site already received stays there).

Requires an API key

Parameters

NameInTypeDefaultDescription
post_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

204Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/content/posts/<post_id>" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/content/posts/{post_id}/publish

Publish Post

Publish a post and deliver it now to every enabled destination (or destination_ids), waiting for the sites' answers; the deliveries come back with their status.

Requires an API key

Parameters

NameInTypeDefaultDescription
post_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/content/posts/<post_id>/publish" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "destination_ids": [] }'
Bodyjson
{
  "destination_ids": []
}

post/api/v1/content/posts/{post_id}/regenerate

Regenerate Post

Rewrite a post from its feed entry with the current writer (status and slug are kept).

Requires an API key

Parameters

NameInTypeDefaultDescription
post_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/content/posts/<post_id>/regenerate" \
  -H "Authorization: Bearer $OSR_API_KEY"

get/api/v1/content/profile

Profile

The editorial profile the writer is told: publication, audience, tone, language, site, auto-publish.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/content/profile" \
  -H "Authorization: Bearer $OSR_API_KEY"

put/api/v1/content/profile

Set Profile

Update the editorial profile (members). auto_publish publishes posts written from feeds at once - and delivers them to the destinations set to publish automatically - instead of keeping them as drafts.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyProfileIn

FieldTypeDefaultDescription
article_wordsinteger | null
audiencestring | null
auto_publishboolean | null
languagestring | null
publicationstring | null
site_urlstring | null
tonestring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X PUT "$OSR_URL/api/v1/content/profile" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "article_words": 1, "audience": "string", "auto_publish": false, "language": "string", "publication": "string", "site_url": "string", "tone": "string" }'
Bodyjson
{
  "article_words": 1,
  "audience": "string",
  "auto_publish": false,
  "language": "string",
  "publication": "string",
  "site_url": "string",
  "tone": "string"
}

post/api/v1/content/refresh

Refresh

Poll every enabled feed (or feed_ids) now and write the posts.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/content/refresh" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "feed_ids": [] }'
Bodyjson
{
  "feed_ids": []
}

Something wrong or out of date on this page? Tell us - the page is named for you, so a one-line note is enough.