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 1.8.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

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

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

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 - never the secrets.

Requires an API key

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. auto_publish sends every post that becomes published; post_status: draft leaves the post as a draft on the CMS.

Requires an API key

Request bodyDestinationIn

FieldTypeDefaultDescription
auto_publishbooleantrue
kind(required)string
name(required)string
post_statusstring"publish"
secretstring | null
url(required)string
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", "url": "string" }'
Bodyjson
{
  "kind": "string",
  "name": "default",
  "url": "string"
}

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

Update Destination

Change a destination (admins); secret: "" removes the stored credential.

Requires an API key

Parameters

NameInTypeDefaultDescription
destination_id(required)pathstring

Request bodyDestinationPatch

FieldTypeDefaultDescription
auto_publishboolean | null
enabledboolean | null
namestring | null
post_statusstring | null
secretstring | 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, "enabled": false, "name": "default", "post_status": "string", "secret": "string", "url": "string", "username": "string" }'
Bodyjson
{
  "auto_publish": false,
  "enabled": false,
  "name": "default",
  "post_status": "string",
  "secret": "string",
  "url": "string",
  "username": "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

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

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 (API key in the header).

Requires an API key

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"

get/api/v1/content/feeds

Feeds

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

Requires an API key

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: it is polled on the scheduler's next pass (entries from the last 7 days), every new entry becomes a post written for the workspace's publication.

Requires an API key

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"
}

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

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

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

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

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

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

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

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

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

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

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

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

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

Request bodyProfileIn

FieldTypeDefaultDescription
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 '{ "audience": "string", "auto_publish": false, "language": "string", "publication": "string", "site_url": "string", "tone": "string" }'
Bodyjson
{
  "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

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": []
}