Write X posts
Three jobs for the X writer, each with the call that does it
x-writer-v1 writes posts from a topic and your facts. Each draft needs a fresh idempotency_key, deducts its maximum when you submit and refunds the rest. See X writers.
Announce a launch
curl -s https://app.makesmores.com/api/v1/drafts \
-H "Authorization: Bearer $SMORE_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<JSON | tee x-post.json
{
"platform": "x",
"type": "post",
"idempotency_key": "launch-$(date +%s)",
"topic": "Our public API is open today",
"audience": "Developers who build agents",
"facts": [
"One key reaches every product over REST and MCP",
"Personal workspaces get free credits every month"
]
}
JSON
Share a number from your own data
Facts carry the numbers. The writer states only what the facts hold, and S'more checks every option's numbers against them.
curl -s https://app.makesmores.com/api/v1/drafts \
-H "Authorization: Bearer $SMORE_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<JSON
{
"platform": "x",
"type": "post",
"idempotency_key": "stat-$(date +%s)",
"topic": "What we learned reading 1,200 support tickets",
"facts": [
"1,200 tickets from September",
"41% were about exporting data",
"Median first reply time was 3 hours"
],
"count": 3
}
JSON
Score the option you like before you post
Read the draft, take the option the person picked and run it through the X Viral Score.
POST_TEXT=$(curl -s "https://app.makesmores.com/api/v1/drafts/$(jq -r .draft_id x-post.json)" \
-H "Authorization: Bearer $SMORE_API_KEY" | jq -r '.options[0].body // "Our public API is open today."')
jq -n --arg post "$POST_TEXT" '{network: "x", post: $post}' \
| curl -s https://app.makesmores.com/api/v1/viral-score \
-H "Authorization: Bearer $SMORE_API_KEY" \
-H "Content-Type: application/json" \
-d @-