bulk import.txt

PlanetGraph Bulk Import Guide for Agents

Version: 2026-07-31

Purpose

Create or upsert large sets of Nodes, Edges, and Properties through asynchronous import jobs. Bulk imports use normal account ownership, authentication, billing, encryption, access policies, search rules, graph projection, and embeddings.

Base URL and Authentication

Choose a Submission Path

  1. Inline JSON for manifests up to the configured inline limit, 1 MB by default.
  2. Signed JSONL upload for larger files, 50 MB by default.

Inline JSON Workflow

POST /api/v1/imports
Content-Type: application/json

Example body:

{
  "version": 1,
  "mode": "upsert",
  "idempotency_key": "crm-export-2026-07-31",
  "nodes": [
    {"external_id": "person:123", "type": "Person", "visibility": "owner_only"},
    {"external_id": "company:7", "type": "Company", "visibility": "public"}
  ],
  "edges": [
    {
      "external_id": "employment:99",
      "type": "WORKS_AT",
      "source_external_id": "person:123",
      "source_type": "Person",
      "target_external_id": "company:7",
      "target_type": "Company",
      "visibility": "owner_only"
    }
  ],
  "properties": [
    {
      "external_id": "person:123:name",
      "resource_external_id": "person:123",
      "resource_type": "node",
      "resource_entity_type": "Person",
      "name": "name",
      "type": "string",
      "value": "Ada",
      "search_mode": "exact",
      "search_scope": "owner_only"
    }
  ]
}

The response is HTTP 202 and contains the import job id and status.

Signed JSONL Workflow

  1. Serialize the complete JSONL file and calculate its exact byte length.
  2. POST /api/v1/imports/uploads with {"expected_bytes": <exact_byte_length>}.
  3. PUT the bytes to upload_url. Send every required_headers entry exactly, including Content-Type: application/x-ndjson and the signed Content-Length. Do not send the PlanetGraph API key to the storage URL.
  4. POST /api/v1/imports/uploads/{upload_id}/finalize with: {"version": 1, "mode": "upsert", "idempotency_key": "crm-export-large-2026-07-31"}
  5. Use the returned import job id for status and results.

Each nonblank JSONL line is one item. Examples:

{"kind":"node","external_id":"person:123","type":"Person","visibility":"owner_only"}
{"kind":"edge","external_id":"employment:99","type":"WORKS_AT","source_external_id":"person:123","source_type":"Person","target_external_id":"company:7","target_type":"Company","visibility":"owner_only"}
{"kind":"property","external_id":"person:123:name","resource_external_id":"person:123","resource_type":"node","resource_entity_type":"Person","name":"name","type":"string","value":"Ada"}

Identity and Idempotency

Status, Results, and Control

Poll status with bounded backoff until completed, completed_with_errors, failed, or cancelled. Page results and errors until a page contains fewer records than the requested limit. Results contain item indexes, external IDs, status, resource IDs, attempts, and redacted diagnostics; they do not return Property values or staged payloads.

Retry Behavior

Default Limits

Agent Safety Rules