RoboInvestor

Create Portfolio Block

Create a portfolio with optional initial positions in a single atomic envelope. Each position references an existing security; this operation never mints securities (use create-security). Whole envelope validates before any write.

Idempotency: supply an Idempotency-Key header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

post/extensions/roboinvestor/{graph_id}/operations/create-portfolio-block

Request

  • Base URL: https://api.robosystems.ai (the document declares no server; this is the origin it was published from)
  • URL: https://api.robosystems.ai/extensions/roboinvestor/{graph_id}/operations/create-portfolio-block
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Path parameters

graph_idstring required

Headers

Idempotency-Keystring nullable

Request body

Example request

{
  "portfolio": {
    "base_currency": "USD",
    "description": "Mid-cap public equities",
    "entity_id": "ent_acme_holdings",
    "inception_date": "2026-01-01",
    "name": "Q1 2026 Growth",
    "strategy": "growth"
  },
  "positions": [
    {
      "acquisition_date": "2026-01-15",
      "cost_basis": 1850000,
      "currency": "USD",
      "current_value": 2010000,
      "quantity": 100,
      "quantity_type": "shares",
      "security_id": "sec_aapl",
      "valuation_date": "2026-04-30",
      "valuation_source": "broker_statement"
    },
    {
      "acquisition_date": "2026-02-08",
      "cost_basis": 2125000,
      "currency": "USD",
      "current_value": 2240000,
      "quantity": 50,
      "quantity_type": "shares",
      "security_id": "sec_msft",
      "valuation_date": "2026-04-30",
      "valuation_source": "broker_statement"
    }
  ]
}

Response

Successful Response

operationstring required

Kebab-case operation name

operationIdstring required

op_-prefixed ULID for audit and SSE correlation

status'completed' | 'pending' | 'failed' required

Operation lifecycle state

atstring required

ISO-8601 UTC timestamp

createdBystring nullable

User ID that initiated the operation

idempotentReplayboolean

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

Changes

No recorded changes to this operation across all 1 revision of this API.