← Posting Calendar
API
Tokens

Run Posting Calendar from your own code

The one metered task, angles, is available over HTTP. It takes a posting calendar the page has already built - the period, the platforms, your content pillars and every dated slot with its time, platform, status, pillar, format and your own idea - and returns, for every post, a sharper topic and the opening line exactly as it would be published; for every post day you left without an idea, a new idea that fits your pillars; for every slot kept open on purpose, what that slot is best kept for; and one to three notes about the calendar as a whole.

The division of labour first: the browser builds the calendar - which days and times each platform posts, which 20-30% of slots stay open, which pillar and format each slot gets, which of your ideas sits where - and writes the .ics file, the CSV and the Markdown plan. That part is free and never calls the API. Only the angles step is metered: model alias llm-default, billed per run at the model's price plus a 10% markup. The page sends at most 60 slots a run (a longer calendar is clipped on whole weeks and says so in clipped), then checks every answer against the calendar it built before it applies anything - see How the page checks the reply.

Base URL and the response shape

Every endpoint lives under https://api.skillsafe.ai/v1/app-api, and every response has one shape:

{ "ok": true,  "data":  { ... } }
{ "ok": false, "error": { "code": "...", "message": "..." } }

The token is minted for this app (the guest call takes {"slug":"posting-calendar"}), so no slug header is needed afterwards. Send it as Authorization: Bearer …. The run body is the input object, sent bare.

StatusCodeMeaning
400validation_errorThe body is not a JSON object, or a required key (task, calendar) is missing.
401unauthorizedNo token, or a stale one. Mint a guest token or sign in again.
402insufficient_creditsThe balance is under min_credits. Price with /estimate first.
403forbiddenA guest token tried to run: the angles run is metered and needs a personal sign-in.
404not_foundUnknown job id.
429rate_limitedBack off and retry.
5xxserver_errorTransient. Retry with the same Idempotency-Key so a retry never double-bills.

The task field and the input

Every run sends task. There is one lane:

LaneWhat it returns
anglesA topic and an opening line for every planned or empty slot, a purpose for every open slot, and 1-3 notes. A missing or different task is still answered as angles, with a note saying so.

The run input (the POST body for /estimate, /run and /run-stream):

{"task": "angles", "calendar": "<JSON string>", "note": "<optional text, up to 600 characters>"}
KeyRequiredWhat it holds
taskyesAlways angles.
calendaryesThe calendar as a JSON string - a stringified object, not a nested object. Its fields are below.
notenoYour own words for the run: audience, offer, launch dates, tone. Whitespace is collapsed and it is cut at 600 characters. May be empty.

Inside calendar

FieldTypeWhat it holds
periodstringThe dates covered, such as Mon 7 Dec - Sun 13 Dec 2026.
platformsarray of stringsThe active platforms, by name: LinkedIn, Threads, X, Bluesky.
pillarsarray of stringsYour content pillars, such as Educational, Engagement, Storytelling. When it is empty the model chooses from Educational, Personal, Engagement, Storytelling and Promotional.
slotsarray, at most 60One object per slot, in date and time order - see the next table.
clippedstring, optionalPresent only when the page sent part of a long calendar, such as sent 60 of 72 slots (whole weeks).
Slot fieldFormatMeaning
idw1-li-1Week number, the platform's short code (li LinkedIn, th Threads, x X, bs Bluesky) and the slot's index in that week. The reply uses it unchanged.
dateYYYY-MM-DDThe post's date.
dayMondayThe weekday of date, in full.
timeHH:MM24-hour time, the audience's local time.
platformnameOne of the names in platforms.
statusplanned | empty | openplanned: your idea is in idea. empty: a post day with no idea yet. open: kept free on purpose (its pillar, format and idea are empty).
pillarstringThe slot's pillar (empty for empty and open slots).
formatPost | Thread | Carousel | PollThe format the page picked. Allowed per platform: LinkedIn Post, Carousel, Thread, Poll; Threads Post, Thread, Poll; X Post, Thread, Poll; Bluesky Post, Thread.
ideastringYour idea as you wrote it, without its pillar label.

The reply

The job's output text is ONE JSON object and nothing else - no prose around it, no code fence:

{
  "posts": [ { "id": "w1-li-1", "pillar": "Educational", "format": "Carousel", "topic": "...", "hook": "..." } ],
  "open":  [ { "id": "w1-th-3", "purpose": "..." } ],
  "notes": [ "..." ]
}
KeyRule
postsExactly one entry for every slot whose status is planned or empty, with its id unchanged; none for an open slot and none for an id not in the input.
posts[].topicAt most 120 characters. For a planned slot, a sharper angle on the same idea that reuses its key words - never a different subject. For an empty slot, a new specific idea that fits the pillars, the other ideas and the note.
posts[].hookAt most 160 characters: the first line exactly as it would be published, in the platform's voice, with no hashtags, emoji or surrounding quote marks. A Poll's hook is the poll question.
posts[].pillarCopied from a planned slot; chosen from pillars for an empty one, keeping any pillar under 40% of all posts.
posts[].formatThe slot's format unless it clearly does not suit the angle; any change must be allowed on that platform, Poll only for Engagement, and never two Threads or Carousels on one date across all platforms.
openOne entry for every open slot: purpose, at most 100 characters - a reactive post on news in your niche, an overflow slot for a post that slips, or a format experiment, tied to that platform and day.
notes1 to 3 short sentences about the calendar as a whole, naming slots by day and platform, never by id.

The model uses only facts in the input: no invented statistics, client names, results, prices, dates or quotes, never a change to a slot's date, time or platform, and never a full post body - topic and hook only.

How the page checks the reply

The page never applies a reply blindly. It reads the JSON (a reply cut short keeps every complete entry that did arrive) and holds each answer to the calendar it built. These are flagged in plain words and not applied:

Everything else is applied: topics and hooks join the calendar, the Markdown plan and the event descriptions in the .ics file and the CSV, and each open slot shows its purpose.

Worked example - a recruiter's week on LinkedIn and Threads

Three ideas, one week, LinkedIn and Threads three times each, a third of the slots kept open. The page builds six slots: three planned with your recruiting ideas, one empty post day (Wednesday on Threads) and two open slots (Friday on LinkedIn, Saturday on Threads). Note: Recruiter for startup engineering teams; salary guide launches 2026-12-10.

The request body, exactly as sent (calendar is a string):

{
  "task": "angles",
  "calendar": "{\"period\":\"Mon 7 Dec - Sun 13 Dec 2026\",\"platforms\":[\"LinkedIn\",\"Threads\"],\"pillars\":[\"Educational\",\"Engagement\",\"Storytelling\"],\"slots\":[{\"id\":\"w1-th-1\",\"date\":\"2026-12-07\",\"day\":\"Monday\",\"time\":\"07:30\",\"platform\":\"Threads\",\"status\":\"planned\",\"pillar\":\"Educational\",\"format\":\"Thread\",\"idea\":\"3 hiring mistakes that cost you senior candidates\"},{\"id\":\"w1-li-1\",\"date\":\"2026-12-07\",\"day\":\"Monday\",\"time\":\"08:30\",\"platform\":\"LinkedIn\",\"status\":\"planned\",\"pillar\":\"Engagement\",\"format\":\"Poll\",\"idea\":\"Take-home task or live coding - which is fairer?\"},{\"id\":\"w1-li-2\",\"date\":\"2026-12-09\",\"day\":\"Wednesday\",\"time\":\"12:15\",\"platform\":\"LinkedIn\",\"status\":\"planned\",\"pillar\":\"Storytelling\",\"format\":\"Post\",\"idea\":\"The candidate who turned down a 30% raise, and why\"},{\"id\":\"w1-th-2\",\"date\":\"2026-12-09\",\"day\":\"Wednesday\",\"time\":\"19:30\",\"platform\":\"Threads\",\"status\":\"empty\",\"pillar\":\"\",\"format\":\"Post\",\"idea\":\"\"},{\"id\":\"w1-li-3\",\"date\":\"2026-12-11\",\"day\":\"Friday\",\"time\":\"08:30\",\"platform\":\"LinkedIn\",\"status\":\"open\",\"pillar\":\"\",\"format\":\"\",\"idea\":\"\"},{\"id\":\"w1-th-3\",\"date\":\"2026-12-12\",\"day\":\"Saturday\",\"time\":\"07:30\",\"platform\":\"Threads\",\"status\":\"open\",\"pillar\":\"\",\"format\":\"\",\"idea\":\"\"}]}",
  "note": "Recruiter for startup engineering teams; salary guide launches 2026-12-10."
}

The same calendar string, parsed, for reading:

{
  "period": "Mon 7 Dec - Sun 13 Dec 2026",
  "platforms": ["LinkedIn", "Threads"],
  "pillars": ["Educational", "Engagement", "Storytelling"],
  "slots": [
    {"id": "w1-th-1", "date": "2026-12-07", "day": "Monday", "time": "07:30", "platform": "Threads", "status": "planned", "pillar": "Educational", "format": "Thread", "idea": "3 hiring mistakes that cost you senior candidates"},
    {"id": "w1-li-1", "date": "2026-12-07", "day": "Monday", "time": "08:30", "platform": "LinkedIn", "status": "planned", "pillar": "Engagement", "format": "Poll", "idea": "Take-home task or live coding - which is fairer?"},
    {"id": "w1-li-2", "date": "2026-12-09", "day": "Wednesday", "time": "12:15", "platform": "LinkedIn", "status": "planned", "pillar": "Storytelling", "format": "Post", "idea": "The candidate who turned down a 30% raise, and why"},
    {"id": "w1-th-2", "date": "2026-12-09", "day": "Wednesday", "time": "19:30", "platform": "Threads", "status": "empty", "pillar": "", "format": "Post", "idea": ""},
    {"id": "w1-li-3", "date": "2026-12-11", "day": "Friday", "time": "08:30", "platform": "LinkedIn", "status": "open", "pillar": "", "format": "", "idea": ""},
    {"id": "w1-th-3", "date": "2026-12-12", "day": "Saturday", "time": "07:30", "platform": "Threads", "status": "open", "pillar": "", "format": "", "idea": ""}
  ]
}

A matching reply (the job's output.output):

{
  "posts": [
    {"id": "w1-th-1", "pillar": "Educational", "format": "Thread", "topic": "The 3 hiring mistakes that lose senior candidates before the first interview even starts", "hook": "Senior candidates rarely turn you down in the interview. They drop out before it. Here are 3 hiring mistakes that cause it."},
    {"id": "w1-li-1", "pillar": "Engagement", "format": "Poll", "topic": "Take-home task or live coding: which is fairer to experienced engineers with little spare time?", "hook": "Take-home task or live coding: which one gives a senior engineer the fairer shot?"},
    {"id": "w1-li-2", "pillar": "Storytelling", "format": "Post", "topic": "Why a candidate turned down a 30% raise, and what it taught me about what engineers weigh first", "hook": "I watched a candidate turn down a 30% raise. The reason had nothing to do with the money, and everything to do with the team."},
    {"id": "w1-th-2", "pillar": "Educational", "format": "Post", "topic": "What to check in a salary benchmark before you send a startup engineer an offer", "hook": "Before you send that offer, check which companies your salary benchmark actually compares you with."}
  ],
  "open": [
    {"id": "w1-li-3", "purpose": "React to the salary guide launch the day before, or to news in startup hiring"},
    {"id": "w1-th-3", "purpose": "Overflow for a Threads post that slips this week, or a quick take on weekend hiring news"}
  ],
  "notes": [
    "The salary guide launches on Thursday, a day with no post; the open Friday LinkedIn slot is the natural place to announce it.",
    "Monday already carries a Thread on Threads, so keeping the LinkedIn poll that morning light is the right call."
  ]
}

What the page does with it: all four posts answered, both open slots given a purpose, no flags. Each planned topic keeps its idea's key words (hiring mistakes, take-home or live coding, the 30% raise); the empty Wednesday Threads slot gets an Educational idea; Monday has one Thread and one Poll, so no date carries two heavy formats; the Poll stays on the Engagement idea.

Step 1 — a tiny client helper

One function that sends JSON and unwraps the response. Paste a personal token from /tokens.html, or leave it empty and mint a guest token in step 2.

BASE="https://api.skillsafe.ai/v1/app-api"
TOKEN="YOUR_TOKEN"   # from https://posting-calendar.skillsafe.ai/tokens.html
api() { # api METHOD PATH [JSON-BODY]
  curl -s -X "$1" "$BASE$2" -H "Content-Type: application/json" \
    ${TOKEN:+-H "Authorization: Bearer $TOKEN"} ${3:+--data "$3"}
}

Step 2 — a token

A guest token is enough for /me and /estimate. A run is metered, so it needs a personal token: sign in on /tokens.html and copy it from there.

# a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
TOKEN=$(curl -s -X POST "$BASE/guest" -H "Content-Type: application/json" -d '{"slug":"posting-calendar"}' | jq -r '.data.token')

Step 3 — GET /me

Who the token is (subject_type: user or guest) and the credit balance.

api GET /me | jq '.data | {subject_type, credits}'

Step 4 — POST /estimate

Free. The body is the run input itself, the bare object (never wrapped in {"input": ...}). hold_credits is a reservation, not the price; min_credits is what the balance must cover; model_alias reads llm-default and markup_bps reads 1000 (10%). Save the worked example's request body as input.json.

# input.json: the run input object - {"task": "angles", "calendar": "{\"period\":\"Mon 7 Dec - Sun 13 Dec 2026\",\"platforms\":[\"LinkedIn\",\"Threads\"],\"pillars\":[\"Educational\",\"Engagement\",\"Storytelling\"],\"slots\":[{\"id\":\"w1-th-1\",\"date\":\"2026-12-07\",\"day\":\"Monday\",\"time\":\"07:30\",\"platform\":\"Threads\",\"status\":\"planned\",\"pillar\":\"Educational\",\"format\":\"Thread\",\"idea\":\"3 hiring mistakes that cost you senior candidates\"},{\"id\":\"w1-li-1\",\"date\":\"2026-12-07\",\"day\":\"Monday\",\"time\":\"08:30\",\"platform\":\"LinkedIn\",\"status\":\"planned\",\"pillar\":\"Engagement\",\"format\":\"Poll\",\"idea\":\"Take-home task or live coding - which is fairer?\"},{\"id\":\"w1-li-2\",\"date\":\"2026-12-09\",\"day\":\"Wednesday\",\"time\":\"12:15\",\"platform\":\"LinkedIn\",\"status\":\"planned\",\"pillar\":\"Storytelling\",\"format\":\"Post\",\"idea\":\"The candidate who turned down a 30% raise, and why\"},{\"id\":\"w1-th-2\",\"date\":\"2026-12-09\",\"day\":\"Wednesday\",\"time\":\"19:30\",\"platform\":\"Threads\",\"status\":\"empty\",\"pillar\":\"\",\"format\":\"Post\",\"idea\":\"\"},{\"id\":\"w1-li-3\",\"date\":\"2026-12-11\",\"day\":\"Friday\",\"time\":\"08:30\",\"platform\":\"LinkedIn\",\"status\":\"open\",\"pillar\":\"\",\"format\":\"\",\"idea\":\"\"},{\"id\":\"w1-th-3\",\"date\":\"2026-12-12\",\"day\":\"Saturday\",\"time\":\"07:30\",\"platform\":\"Threads\",\"status\":\"open\",\"pillar\":\"\",\"format\":\"\",\"idea\":\"\"}]}", "note": "Recruiter for startup engineering teams; salary guide launches 2026-12-10."}
api POST /estimate "$(cat input.json)" | jq '.data | {hold_credits, min_credits, model, model_alias, markup_bps, warnings}'

Step 5 — POST /run, then poll the job

Send an Idempotency-Key built from the lane and the input: a retry with the same key never bills twice. The page uses posting-calendar:<task>:<inputHash>:a<attempt> (the one task is angles). The job's output.output is the reply text - one JSON object; truncated: true means the balance cut it short, and the complete entries that did arrive are still usable.

KEY="posting-calendar:angles:$(shasum -a 256 input.json | cut -c1-16):a1"
JOB=$(curl -s -X POST "$BASE/run" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: $KEY" --data @input.json | jq -r '.data.job_id')
while :; do
  J=$(api GET "/jobs/$JOB"); S=$(echo "$J" | jq -r '.data.status')
  case "$S" in succeeded|failed|cancelled) break;; esac; sleep 2
done
echo "$J" | jq -r '.data.output.output' > reply.json   # one JSON object, the reply contract
echo "$J" | jq '.data | {charged_credits, truncated}'
jq -r '.posts[]? | "\(.id) [\(.format)] \(.topic)\n   \(.hook)"' reply.json   # one per planned or empty slot
jq -r '.open[]? | "\(.id) open: \(.purpose)"' reply.json
jq -r '.notes[]?' reply.json

Step 6 — POST /run-stream

The same run as Server-Sent Events, with the same input.json. Browsers receive progress ticks rather than text deltas; the final done event carries the job, whose output.output is the reply.

# Server-Sent Events: tick/delta events while the job runs, then a final event with the job
curl -N -s -X POST "$BASE/run-stream" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: posting-calendar:angles:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json