# Bulk import API (CSV)

> Schedule up to 200 posts per request from a CSV file or JSON rows: columns, formats, dry runs and per-row results.

URL: https://heyorbitapp.vercel.app/docs/developers/bulk-import-api
Last updated: 2026-11-19

Developers · [Documentation](https://heyorbitapp.vercel.app/docs)

POST /api/posts/bulk schedules many posts in one request from a CSV file or JSON rows. It's meant for scripts and migrations from another tool; in the dashboard, use media-first [bulk scheduling](https://heyorbitapp.vercel.app/docs/publishing/bulk-scheduling).

Authenticate with an API key that has the write scope ([API keys](https://heyorbitapp.vercel.app/docs/developers/api-keys)) and the Editor role or above in the workspace. Note the path: this endpoint lives at /api/posts/bulk, not under /api/v1.

## Request

Either:

- **multipart/form-data** with a CSV in the **file** field (UTF-8 with a header row), plus optional **timezone** and **dryRun** fields, or
- **application/json**: { "rows": [ { "date": "…", "time": "…", … } ], "timezone": "…", "dryRun": true, "approverIds": ["…"] }

Up to **200 rows** per request.

## Columns

Column names are case-insensitive, in any order.

| Column | Required | Format | Notes |
|---|---|---|---|
| date | Yes | YYYY-MM-DD (also MM/DD/YYYY or DD.MM.YYYY) | |
| time | Yes | HH:mm in 24-hour time, or 9am / 9:30 pm | In the request's timezone |
| caption | Yes, unless media_url is set | Text | Quoted cells can span lines |
| accounts | Yes | Handles separated by ; , or \| | @handle, platform:handle (instagram:northwindroast), display name or account id |
| media_url | No | One public URL | Downloaded into the media library; the same URL is imported once per request |
| labels | No | Label names separated by ; , or \| | Must already exist; unknown names are skipped with a warning |
| first_comment | No | Text | Posted as the first comment or reply where the platform supports it |

The **timezone** field (an IANA name such as America/Chicago) applies to every row; without it, the workspace timezone is used.

## Rules

- Times must be in the future.
- Every account must be connected in the workspace and active.
- Captions are checked against each platform's limit; platforms that need media (Instagram, TikTok, Pinterest, YouTube) need a media_url ([limits](https://heyorbitapp.vercel.app/docs/publishing/platform-settings-and-limits)).
- Each row is handled on its own: valid rows are scheduled even if others fail.
- Approval rules apply: posts that need approval are created as Pending approval, and approverIds (JSON only) picks the approvers.

## Dry run

Send dryRun true (or the form field dryRun=1) to check every row without creating anything. Use it to fix a sheet before the real import.

## Example

~~~csv
date,time,caption,accounts,media_url,labels,first_comment
2026-10-14,08:10,"New single-origin from Huila. Plum, cocoa, long finish.",instagram:northwindroast;facebook:Northwind Coffee,https://cdn.example.com/huila-bag.jpg,Product,Tasting notes in the comments
2026-10-14,12:30,"Why we moved to a lighter roast for Huila (and what changed in the cup).",linkedin:Northwind Coffee,,Education,
2026-10-15,19:05,"POV: the first pour of a new origin.",instagram:northwindroast;tiktok:northwindroast,https://cdn.example.com/huila-pour.mp4,,
~~~

~~~bash
curl -X POST https://app.heyorbit.tech/api/posts/bulk \
  -H "Authorization: Bearer orb_xxx" -H "x-workspace: ws_123" \
  -F "file=@october.csv" -F "timezone=America/New_York" -F "dryRun=1"
~~~

## Response

~~~json
{
  "ok": true,
  "data": {
    "dryRun": false,
    "total": 3,
    "created": 2,
    "failed": 1,
    "timezone": "America/New_York",
    "results": [
      { "row": 1, "ok": true, "postId": "pst_…", "scheduledAt": "2026-10-14T12:10:00.000Z", "warnings": [] },
      { "row": 3, "ok": false, "error": "Unknown account \"tiktok:northwindroast\"." }
    ]
  }
}
~~~

Imported posts appear on the calendar straight away with the source **Bulk**.
