Pages in API reference

Posts

Import posts from CSV

POST/api/posts/bulk

Create many posts from a CSV file: one post per row, each checked like posts_create.

  • Columns: text, platforms (space-separated, with an optional platformSetId) or accountIds, scheduledFor or useQueue (neither: a draft), linkUrl, media (space-separated public URLs; .mp4, .m4v, .mov and .webm are videos, the rest images) and text_<platform> for per-platform text.
  • The dashboard's CSV export has the same columns, so an exported file imports again (its read-only columns are skipped).
  • Send dryRun: true first: it checks every row without creating anything.
  • A bad row does not stop the others; rows[] gives each row's status (valid, created or error) and errors with the column.
  • Unknown columns are skipped with a warning.
  • Plans import at most 50 (Free), 1,000 (Pro), 2,500 (Max) or 5,000 (Scale) rows per request.
  • An import and a dry run each take one token per row from the hourly importPosts limit (two runs of the plan's largest file an hour, e.g. a dry run and its import); a file with more rows than are left fails with 429 RATE_LIMITED and creates nothing.
  • Send an idempotency key with the import: a retry with the same key and file returns the first result and creates nothing new.
  • REST also accepts multipart with the file in a part named file.
Key scope
posts:write
MCP tool
posts_import_csv
Retries
Safe with an Idempotency-Key

Headers

  • Authorizationstringrequired

    Bearer <API key>. Create a key in the dashboard under API keys.

  • Idempotency-Keystring

    A unique value per logical request, so a retry never creates a second post. See Idempotency.

Form data

  • filefilerequired

    The CSV file (UTF-8)

  • dryRunstring

    true checks the rows without creating posts. Default false.

Over MCP

Run with dryRun: true first and show the user the rows with errors. Then import with dryRun: false and a new idempotencyKey; a retry with the same key creates nothing new.

Errors return { error: { code, message } }; every code is in Error codes.