Skip to content
BrainyShorts Docs
Esc
navigateopen⌘Jpreview

Create, schedule, or publish an article

action defaults to draft. publish delivers inline and returns per-target results. X publishes a native X Article. LinkedIn publishes a post with an article link card.

POST/api/cli/articles
Authorization
AuthorizationBearer token (ba_sk_...) · headerrequired

API key from /dashboard/api-keys. Keys expire after 365 days.

Request body
requiredapplication/json
titlestringrequired
min length 1 · max length 300
subtitlestring
max length 300
markdownstringrequired
min length 1 · max length 400000
tagsstring[]

DEV.to uses the first 4

max items 10
canonical_urlstring<uri>
cover_image_urlstring<uri>
targetsobject[]
max items 12
Show properties
Array of object
social_account_idstring<uuid>required
platformstringrequired
Allowed:devtohashnodelinkedinxreddit
settingsobject
actionstring
default: "draft"
Allowed:draftpublishschedule
scheduled_atstring<date-time>
Responses
201

Created

object
400

Invalid article

errorstringrequired
codestring
401

Missing, invalid, expired, or revoked API key

errorstringrequired
codestring
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST "https://www.brainyshorts.com/api/cli/articles" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "string",
  "subtitle": "string",
  "markdown": "string",
  "tags": [
    "string"
  ],
  "canonical_url": "http://example.com",
  "cover_image_url": "http://example.com",
  "targets": [
    {
      "social_account_id": "f4777757-36aa-48ee-b520-6e818e68eb51",
      "platform": "devto",
      "settings": {}
    }
  ],
  "action": "draft",
  "scheduled_at": "2019-08-24T14:15:22Z"
}'
Response
{}