📥 Bulk Automations

Submit a bulk post file

Changed on

Uploads a CSV of posts and queues it for processing. Returns 202 immediately — the rows are built in the background, so this never blocks. Poll GET .../automations/bulk/{csv_id} every poll_after_seconds until state is ready (or failed), then review the rows and approve them. There is no confirm-the-batch step: parsing creates the rows, so they exist by the time you can read them. The file must be csv or txt, at most 10 MB and at most 500 data rows; a file over either limit is refused before any processing starts. Download GET .../automations/bulk/sample-file for a valid file with the exact columns.

post/api/v1/workspaces/{workspace_id}/automations/bulk

Request

  • Base URL
    https://api.contentstudio.io
  • URL
    https://api.contentstudio.io/api/v1/workspaces/{workspace_id}/automations/bulk
  • Auth
    API key in header X-API-Key

Path parameters

workspace_idstring required
Example:610a1e660cb41530ca40d372

Request body multipart/form-data

inputFilestring binary required

The CSV file of posts; max 10 MB, max 500 data rows

accountstring required

JSON-encoded object of platform => account ids to post to. Ids are the id GET /accounts returns (the platform identifier); an unknown id is refused with 422 INVALID_ACCOUNT_ID before the file is processed.

namestring required
dateSettingType'Custom' | 'Recurring' | 'content_category' | 'Queue' required

Where each post's time comes from. Custom reads column 1 of the file and requires format. Recurring spaces posts out and requires recurring. content_category uses a category's slots and requires content_category_id. Queue uses each account's queue times — and is the only mode where the post count is multiplied by the number of selected accounts.

format'd/m/Y H:i' | 'm/d/Y H:i'

Required when dateSettingType is Custom: how column 1 is written.

content_category_idstring nullable

Required when dateSettingType is content_category.

first_comment_accountsstring[]

Account ids (as in account) that should post column 5 as a first comment. Each must be one of the ids in account and on a platform with first comments (facebook, instagram, linkedin, youtube, telegram); anything else is refused with 422 — INVALID_ACCOUNT_ID for an unknown id, VALIDATION_ERROR otherwise.

Example request

{
  "account": "{\"facebook\":[\"1329910333529595\"],\"instagram\":[\"17841453340834745\"]}",
  "name": "March promo batch",
  "dateSettingType": "Custom",
  "format": "d/m/Y H:i",
  "recurring": {
    "value": 6
  },
  "first_comment_accounts": [
    "1329910333529595"
  ]
}

Response

File accepted and queued. Not yet processed — poll the status endpoint.

statusboolean
messagestring
csv_idstring

Use this to poll status and list rows

totalinteger

Posts the file will produce — rows × selected accounts when dateSettingType is Queue, otherwise rows

poll_after_secondsinteger

Example response

{
  "status": true,
  "csv_id": "csv_8f2a1c",
  "total": 120,
  "poll_after_seconds": 5
}

Changes