How to Bulk-Import Content into the CMS

The internal reference for pushing batches of articles, reports and resources into the platform via the ingest API.

Packer LabsNovember 29, 20261 min read

The short version#

The content platform has a dedicated ingestion endpoint — the ingest Cloud Function. You POST JSON (or Markdown with frontmatter) to it, and it validates, dedupes, resolves taxonomy, and writes documents to Firestore as drafts for editorial review.

Endpoint: POST https://ingest-msr5tekcjq-uc.a.run.app Auth: Authorization: Bearer <INGEST_API_KEY> (stored in Secret Manager; a working copy is in /tmp/packerlabs-ingest-key.txt on the deploy machine) Contract: docs/CONTENT-CONTRACT.md in the repo

Example#

curl -X POST https://ingest-msr5tekcjq-uc.a.run.app \
  -H "Authorization: Bearer $(cat /tmp/packerlabs-ingest-key.txt)" \
  -H "Content-Type: application/json" \
  -d '{
    "strategy": "upsert",
    "source": "manual-import",
    "items": [
      {
        "schemaVersion": 1,
        "externalId": "my-article-001",
        "type": "resource",
        "title": "My Article",
        "body": "## Markdown body...",
        "categories": ["Artificial Intelligence"],
        "author": "Jeremy Packer"
      }
    ]
  }'

Payload options#

  • items — batch of up to 100 items, resources and reports mixed. A single contract item object also works.
  • markdown — a Markdown string with YAML frontmatter, for one-off imports.
  • strategy — upsert (default), create, update, or skip-duplicates.
  • autoPublish — defaults to false; everything lands as a draft. Set true to publish immediately.
  • source — a label recorded on the audit record (e.g. "notion-export", "quarterly-reports").

Behaviors to rely on#

  • Idempotent. Give every item a stable externalId. Re-running an import with upsert updates existing docs instead of duplicating.
  • Missing fields get generated. slug from the title, excerpt from the first paragraph, readingTimeMinutes computed automatically.
  • Taxonomy auto-resolves. categories and tags accept names or slugs; missing ones are created (noted in the response warnings). Authors must already exist in the CMS.
  • Rate limit is 120 requests/hour. Each item fails independently — check the results array in the response.
  • Audit trail. Every run writes an imports record, visible in the CMS under Imports.

Typical workflow#

  1. Export source content to the contract format (one JSON item per piece).
  2. POST in batches of 100 or fewer.
  3. Review the drafts in the CMS at cms.packerlabs.com.
  4. Publish from the CMS — the site picks it up within 5 minutes via ISR, no rebuild needed.

Related services

Work with us

Building something ambitious?

Packer Labs designs and builds high-performance software for organizations that need senior-level engineering. Let's talk about what you're working on.

Related resources