Browse the api reference

Create New Graph Database

post/v1/graphs

Part of Graphs.

Creates a graph asynchronously. Returns an OperationEnvelope with operation_id for SSE progress at /v1/operations/{operation_id}/stream. Entity graphs require initial_entity. Supports Idempotency-Key header.

Authentication

Authenticate in any one of these ways — not all of them:

  • API key in the X-API-Key header.
  • Bearer token in the Authorization header.

Header parameters

NameTypeDescription
Idempotency-KeyoptionalstringIdempotency-Key

Request body

Required, application/json.

FieldTypeDescription
metadatarequiredGraphMetadata

Graph metadata including name, description, and schema extensions

GraphMetadata fields
FieldTypeDescription
graph_namerequiredstring

Display name for the graph

descriptionoptionalstring

Optional description

schema_extensionsoptionalstring[]

Schema extensions to enable

tagsoptionalstring[]

Tags for organizing graphs

instance_tieroptionalstring

Instance tier: ladybug-standard, ladybug-large, ladybug-xlarge

Default: ladybug-standard

Constraints: matches ^(ladybug-standard|ladybug-large|ladybug-xlarge)$

custom_schemaoptionalCustomSchemaDefinition

Custom schema definition to apply. If provided, creates a generic custom graph. If omitted, creates an entity graph using schema_extensions.

CustomSchemaDefinition fields
FieldTypeDescription
namerequiredstring

Schema name

versionoptionalstring

Schema version

Default: 1.0.0

descriptionoptionalstring

Schema description

extendsoptionalstring

Base schema to extend (e.g., 'base' for common utilities)

nodesoptionalobject[]

List of node definitions with properties

relationshipsoptionalobject[]

List of relationship definitions

metadataoptionalobject

Additional schema metadata

initial_entityoptionalInitialEntityData

Initial entity for the graph. Required for entity graphs (when custom_schema is omitted). Omit only when providing custom_schema for a generic graph.

InitialEntityData fields
FieldTypeDescription
namerequiredstring

Entity name

Constraints: 1–255 characters

urirequiredstring

Entity website or URI

Constraints: at least 1 character

tickeroptionalstring

Entity symbol/ticker (e.g., 'HARB', 'NVDA'). Auto-generated from name if not provided.

Constraints: 1–10 characters

cikoptionalstring

CIK number for SEC filings

sicoptionalstring

SIC code

sic_descriptionoptionalstring

SIC description

categoryoptionalstring

Business category

state_of_incorporationoptionalstring

State of incorporation

fiscal_year_endoptionalstring

Fiscal year end (MMDD)

einoptionalstring

Employer Identification Number

entity_typeoptionalstring

Entity legal form (e.g. 'corporation', 'llc' / 'limited_liability_company', 'partnership', 'sole_proprietorship', 'non_profit'). Drives the graph's default Reporting Style at creation — partnership and llc get dedicated equity-form Styles; everything else defaults to corporate. Blank falls back to corporate.

reporting_style_idoptionalstring

Optional explicit Reporting Style Structure id to pin on the entity, overriding the entity_type-derived default. Leave blank to derive from entity_type. Change later via the change-reporting-style operation.

create_entityoptionalboolean

Whether to create the entity node and upload initial data. Only applies when initial_entity is provided. Set to False to create graph without populating entity data (useful for file-based ingestion workflows).

Default: true

tagsoptionalstring[]

Optional tags for organization

Constraints: at most 10 items

Example request

curl · example 1 of 4
curl -X POST "https://api.robosystems.ai/v1/graphs" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "create_entity": true,
  "initial_entity": {
    "cik": "0001234567",
    "ein": "12-3456789",
    "name": "Acme Consulting LLC",
    "state_of_incorporation": "Delaware",
    "uri": "https://acmeconsulting.com"
  },
  "instance_tier": "ladybug-standard",
  "metadata": {
    "description": "Professional consulting services with full accounting integration",
    "graph_name": "Acme Consulting LLC",
    "schema_extensions": [
      "roboledger"
    ]
  },
  "tags": [
    "consulting",
    "professional-services",
    "production"
  ]
}'
curl · example 2 of 4
curl -X POST "https://api.robosystems.ai/v1/graphs" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "custom_schema": {
    "description": "People, companies, and projects schema",
    "extends": "base",
    "metadata": {
      "domain": "custom_graph_demo"
    },
    "name": "custom_graph_demo",
    "nodes": [
      {
        "name": "Person",
        "properties": [
          {
            "name": "identifier",
            "type": "STRING",
            "is_primary_key": true
          },
          {
            "name": "name",
            "type": "STRING",
            "nullable": false
          },
          {
            "name": "title",
            "type": "STRING"
          }
        ]
      },
      {
        "name": "Company",
        "properties": [
          {
            "name": "identifier",
            "type": "STRING",
            "is_primary_key": true
          },
          {
            "name": "name",
            "type": "STRING",
            "nullable": false
          },
          {
            "name": "industry",
            "type": "STRING"
          }
        ]
      }
    ],
    "relationships": [
      {
        "from_node": "Person",
        "name": "PERSON_WORKS_FOR_COMPANY",
        "properties": [
          {
            "name": "role",
            "type": "STRING"
          }
        ],
        "to_node": "Company"
      }
    ],
    "version": "1.0.0"
  },
  "instance_tier": "ladybug-standard",
  "metadata": {
    "description": "Custom graph demo with people, companies, and projects",
    "graph_name": "custom_graph_demo_1234",
    "schema_extensions": []
  },
  "tags": [
    "custom",
    "demo",
    "generic"
  ]
}'
curl · example 3 of 4
curl -X POST "https://api.robosystems.ai/v1/graphs" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "custom_schema": {
    "description": "Inventory tracking with products and warehouses",
    "metadata": {
      "industry": "retail"
    },
    "name": "inventory_management",
    "nodes": [
      {
        "name": "Product",
        "properties": [
          {
            "name": "sku",
            "type": "STRING",
            "is_primary_key": true
          },
          {
            "name": "name",
            "type": "STRING",
            "nullable": false
          },
          {
            "name": "price",
            "type": "DOUBLE"
          },
          {
            "name": "quantity",
            "type": "INT64"
          }
        ]
      },
      {
        "name": "Warehouse",
        "properties": [
          {
            "name": "identifier",
            "type": "STRING",
            "is_primary_key": true
          },
          {
            "name": "location",
            "type": "STRING",
            "nullable": false
          }
        ]
      }
    ],
    "relationships": [
      {
        "from_node": "Product",
        "name": "STORED_IN",
        "properties": [
          {
            "name": "quantity",
            "type": "INT64"
          }
        ],
        "to_node": "Warehouse"
      }
    ],
    "version": "1.0.0"
  },
  "instance_tier": "ladybug-standard",
  "metadata": {
    "description": "Inventory management system",
    "graph_name": "warehouse_inventory",
    "schema_extensions": []
  },
  "tags": [
    "inventory",
    "retail"
  ]
}'
curl · example 4 of 4
curl -X POST "https://api.robosystems.ai/v1/graphs" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "custom_schema": {
    "name": "customer_analytics",
    "nodes": [],
    "relationships": [],
    "version": "1.0.0"
  },
  "instance_tier": "ladybug-standard",
  "metadata": {
    "description": "Graph database for customer relationship and behavior analysis",
    "graph_name": "Customer Analytics Graph",
    "schema_extensions": []
  },
  "tags": [
    "analytics",
    "customers",
    "marketing"
  ]
}'

Responses

202 Successful Response

FieldTypeDescription
operationrequiredstring

Kebab-case operation name

operationIdrequiredstring

op_-prefixed ULID for audit and SSE correlation

statusrequiredstring

Operation lifecycle state

One of: completed, pending, failed

resultoptionalany

Command-specific result payload

atrequiredstring

ISO-8601 UTC timestamp

createdByoptionalstring

User ID that initiated the operation

idempotentReplayoptionalboolean

True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.

Default: false

StatusMeaning
400Invalid request
401Authentication required
402Payment required — add a payment method or check org graph limit
403Access denied
404Resource not found
409Idempotency-Key conflict — key reused with different body
422Validation error
429Rate limit exceeded
500Internal server error