Imports

An import backfills historical posts from a connected account. You queue an import job against a social account; we fetch its past posts in the background and make them available alongside the ones you publish through PostFuze. Imports run asynchronously, so creating one returns immediately with a queued job you can poll.

These routes are mounted under a specific account, so every path begins with /social-accounts/{accountId}.

The import job object

FieldTypeDescription
idstringUnique identifier for the import job.
social_account_idstringThe account being imported from.
statusenumpending, running, completed, or failed.
from_date / to_datestring | nullThe date window the import covers.
imported_countnumber | nullHow many posts have been imported so far.
error_messagestring | nullFailure detail when the job did not complete.
started_at / finished_attimestamp | nullWhen processing began and ended.
created_attimestampWhen the job was queued.

Start an import

POST /social-accounts/{accountId}/imports

Queues an import job for the account and returns it with status pending and HTTP 202 Accepted. All body fields are optional; omitting the date window imports the account’s most recent posts up to the limit. Returns 404 if the account is not found.

ParameterTypeRequiredDescription
from_datestringNoStart of the date window to import.
to_datestringNoEnd of the date window to import.
limitintegerNoMaximum number of posts to fetch (1–1000). Defaults to 100.
curl
curl https://api.postfuze.com/api/v1/social-accounts/a1b2c3d4-…/imports \
  -H "Authorization: Bearer sk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "from_date": "2026-01-01",
    "to_date": "2026-06-01",
    "limit": 500
  }'
202 Accepted
{
  "id": "imp_3c2b1a09",
  "social_account_id": "a1b2c3d4-…",
  "status": "pending",
  "from_date": "2026-01-01",
  "to_date": "2026-06-01",
  "imported_count": null,
  "error_message": null,
  "started_at": null,
  "finished_at": null,
  "created_at": "2026-06-09T12:30:00.000Z"
}

List imports

GET /social-accounts/{accountId}/imports

Returns the import jobs for an account, newest first.

curl
curl https://api.postfuze.com/api/v1/social-accounts/a1b2c3d4-…/imports \
  -H "Authorization: Bearer sk_live_…"
200 OK
{
  "data": [
    {
      "id": "imp_3c2b1a09",
      "social_account_id": "a1b2c3d4-…",
      "status": "completed",
      "from_date": "2026-01-01",
      "to_date": "2026-06-01",
      "imported_count": 312,
      "error_message": null,
      "started_at": "2026-06-09T12:30:05.000Z",
      "finished_at": "2026-06-09T12:31:40.000Z",
      "created_at": "2026-06-09T12:30:00.000Z"
    }
  ]
}

Subscribe to the import.completed and import.failed webhook events to be notified when a job finishes instead of polling.