All guides

Schedule a post

Posts go to the social accounts someone connected in cuil.si (connecting an account needs a person in the app). One post can go to several accounts at once; each account gets its own publication with its own status.
  1. 1Find the account

    GET /social/accounts lists the connected accounts with their network and name.

    curl "https://cuil.si/api/v1/social/accounts" -H "Authorization: Bearer $CUILSI_API_KEY"
    # [ { "id": "...", "network": "instagram", "name": "Sunny Beans Coffee", ... } ]
  2. 2Add a picture or video (optional)

    Upload a file to your Library, or use one you made with /generations. Uploads can be up to 500 MB.

    curl -X POST "https://cuil.si/api/v1/assets/upload" -H "Authorization: Bearer $CUILSI_API_KEY" \
      -F "[email protected]"
    # 201 Created: { "id": "ASSET_ID", "kind": "image", ... }
  3. 3Check it first (optional)

    POST /social/validate tells you what a network would refuse (text too long, the wrong picture size, a missing video) before anything is sent.

    curl -X POST "https://cuil.si/api/v1/social/validate" -H "Authorization: Bearer $CUILSI_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"text": "Our summer cold brew is back!", "media_asset_ids": ["ASSET_ID"], "account_ids": ["ACCOUNT_ID"]}'
    # Lists anything a network would refuse (too long, wrong size, missing video...) before you send it.
  4. 4Schedule it

    Give the time in UTC in scheduled_at, or leave it out to publish right away. YouTube and TikTok can't be posted to with an API key: those posts come only from people in cuil.si (and, for YouTube, the automations they set up there). A key can still save a YouTube post as a draft for a person to post.

    curl -X POST "https://cuil.si/api/v1/social/posts" -H "Authorization: Bearer $CUILSI_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "text": "Our summer cold brew is back!",
        "media_asset_ids": ["ASSET_ID"],
        "targets": [{ "account_id": "ACCOUNT_ID" }],
        "scheduled_at": "2026-11-01T09:00:00Z"
      }'
  5. 5Links on X use credits

    Posting is free, except an X post whose text has a link (https://… with a real domain, or a bare domain like cuil.si or shop.com): it uses 20 credits for each X account, because X charges for those posts. They are charged when the post goes out, and come back if it fails. If your credits don't cover it, POST /social/posts answers 402 with insufficient_credits (it also says needed and available), and nothing is saved. Each X account's capabilities.link_post_credits in GET /social/accounts says the current number.

  6. 6Follow it

    Check the post, or add a webhook for post.published and post.failed. A failed publication can be tried again.

    curl "https://cuil.si/api/v1/social/posts/POST_ID" -H "Authorization: Bearer $CUILSI_API_KEY"
    # Each account has its own publication: "scheduled", "publishing", "published" (with a link) or "failed".
    # Retry a failed one with POST https://cuil.si/api/v1/social/publications/PUBLICATION_ID/retry