API Documentation
Everything you need to integrate with PlanetGraph.
Quick Start
Start with these prompts in your preferred coding agent, then iterate with follow-up questions.
Sign up to get your API key
Interactive
Explore the live OpenAPI reference, authorize with an API key, and try requests directly against the API.
Open interactive API docs open_in_newAuthentication
Use X-API-Key for API keys. Authorization: Bearer ... is only for Firebase user tokens.
curl -H "X-API-Key: YOUR_API_KEY" \
https://api.planetgraph.ai/api/v1/nodes Account & API Keys
Inspect your account identity and manage API keys for integrations.
/api/v1/api-keysList Api Keys
/api/v1/api-keysCreate Api Key
/api/v1/api-keys/{key_id}Revoke Api Key
/api/v1/auth/mfa/recovery-codeUse Recovery Code
/api/v1/meGet Me
/api/v1/me/securityGet Security Status
/api/v1/me/security/recovery-codesGet Recovery Code Status
/api/v1/me/security/recovery-codesRegenerate Recovery Codes
Nodes
Create, read, update, and delete graph nodes.
/api/v1/nodesList Nodes
/api/v1/nodesCreate Node
/api/v1/nodes/{node_id}Get Node
/api/v1/nodes/{node_id}Update Node
/api/v1/nodes/{node_id}Delete Node
/api/v1/nodes/typesList Node Types
Edges
Create and manage relationships between nodes.
/api/v1/edgesList Edges
/api/v1/edgesCreate Edge
/api/v1/edges/{edge_id}Get Edge
/api/v1/edges/{edge_id}Update Edge
/api/v1/edges/{edge_id}Delete Edge
/api/v1/edges/by-node/{node_id}List Edges For Node
/api/v1/edges/typesList Edge Types
Properties
Manage properties on nodes and edges with granular access controls.
/api/v1/admin/rotate-keys/{account_id}Rotate Keys
/api/v1/edges/{edge_id}/propertiesList Edge Properties
/api/v1/edges/{edge_id}/propertiesCreate or Replace Edge Property
/api/v1/nodes/{node_id}/propertiesList Node Properties
/api/v1/nodes/{node_id}/propertiesCreate or Replace Node Property
/api/v1/properties/{property_id}Update Property
/api/v1/properties/{property_id}Delete Property
Bulk Imports
Asynchronously create or upsert Nodes, Edges, and Properties in bulk.
Import Format
The current import format is version 1. It supports upsert or create_only mode and uses stable external_id values.
Every import also needs an idempotency_key. This is a key you generate and is unique within your account. If you repeat the same logical import with the same key, PlanetGraph returns the existing job instead of creating a duplicate.
Inline JSON Imports
For small imports (up to 1 MiB, or 1,048,576 bytes, by default), send the complete import document as JSON to POST /api/v1/imports.
{
"version": 1,
"mode": "upsert",
"idempotency_key": "crm-export-2026-07-31",
"nodes": [
{
"external_id": "person:123",
"type": "Person",
"visibility": "owner_only"
}
],
"edges": [],
"properties": [
{
"external_id": "person:123:name",
"resource_external_id": "person:123",
"resource_type": "node",
"resource_entity_type": "Person",
"name": "name",
"type": "string",
"value": "Ada"
}
]
}The response is 202 Accepted and includes the import job ID.
JSONL File Imports
For larger imports (up to 50 MiB, or 52,428,800 bytes, by default), use the following signed JSONL upload flow.
- Calculate the completed JSONL file's exact byte count.
- Reserve an upload by sending the following JSON to
POST /api/v1/imports/uploads:{"expected_bytes": 12345} - The response includes an
upload_url, anupload_id, andrequired_headers. PUTthe JSONL file toupload_url. Include every returnedrequired_headersvalue exactly, includingContent-TypeandContent-Length. Do NOT send your PlanetGraph API key to the storage URL.- Finalize the uploaded file by sending the job metadata below to
POST /api/v1/imports/uploads/{upload_id}/finalize.
Example JSONL File
Each nonblank line is a complete JSON object. The kind field identifies the item type:
{"kind":"node","external_id":"person:123","type":"Person","visibility":"owner_only"}
{"kind":"node","external_id":"company:7","type":"Company","visibility":"public"}
{"kind":"edge","external_id":"works:123:7","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"}Finalization Metadata
This finalization request describes the import job. The imported items remain in the uploaded JSONL file and are not repeated here.
{
"version": 1,
"mode": "upsert",
"idempotency_key": "crm-export-2026-07-31"
}The finalization response is 202 Accepted and includes the import job ID.
Check Progress and Results
Use the import job ID returned by either submission method:
GET /api/v1/imports/{import_id}
GET /api/v1/imports/{import_id}/results?limit=1000&offset=0
GET /api/v1/imports/{import_id}/errors?limit=1000&offset=0Poll the status endpoint until the job reaches completed, completed_with_errors, failed, or cancelled. Page through results or errors by increasing offset until the response contains fewer records than limit.
Imports preserve normal ownership, billing, encryption, access, search, projection, and embedding behavior.
Endpoint Reference
/api/v1/importsList Imports
/api/v1/importsCreate Import
/api/v1/imports/{import_id}Get Import
/api/v1/imports/{import_id}/cancelCancel Import
/api/v1/imports/{import_id}/errorsGet Import Errors
/api/v1/imports/{import_id}/resultsGet Import Results
/api/v1/imports/{import_id}/retryRetry Import
/api/v1/imports/uploadsCreate Import Upload
/api/v1/imports/uploads/{upload_id}/finalizeFinalize Import Upload
Search
Find searchable properties and semantic matches while preserving visibility and returnability rules.
/api/v1/search/propertiesSearch Properties
/api/v1/search/semanticSemantic Search
/api/v1/search/vectorVector Search
Queries
Execute Cypher queries and access query history.
/api/v1/queries/historyQuery History
/api/v1/queryRun Query
Billing
Manage your token balance and view transaction history.
/api/v1/account/balanceAccount Balance
/api/v1/account/purchasePurchase Tokens
/api/v1/account/transactionsAccount Transactions
/api/v1/admin/pricingCreate Pricing
/api/v1/pricingGet Pricing
Access Control
Define and manage access policies for your data.
/api/v1/access-policiesList Access Policies
/api/v1/access-policiesCreate Access Policy
/api/v1/access-policies/{policy_id}Update Access Policy
/api/v1/access-policies/{policy_id}Delete Access Policy
/api/v1/feedback/{feedback_id}Update Feedback
/api/v1/feedback/{feedback_id}Delete Feedback
/api/v1/properties/{property_id}/access-policyAssign Access Policy
/api/v1/properties/{property_id}/feedbackList Feedback
/api/v1/properties/{property_id}/feedbackCreate Feedback
/api/v1/properties/{property_id}/purchasePurchase Property Access
/api/v1/searchability/property-search-rulesList Property Search Rules
/api/v1/searchability/property-search-rulesUpsert Property Search Rule
/api/v1/searchability/property-search-rules/{rule_id}Delete Property Search Rule
Audit Logs
Review account-scoped activity for traceability and compliance workflows.
/api/v1/audit-logsList Audit Logs
PlanetGraph Login+
Login your users through PlanetGraph and gain additional insights
Read the PlanetGraph Login+ guide arrow_forward