Browse the API reference

Create Security

post/extensions/roboinvestor/{graph_id}/operations/create-security

Part of Extensions: RoboInvestor.

Register a security (common stock, preferred stock, warrant, convertible note, etc.) owned by this graph's entity. Optionally cross-links to an issuing entity in another graph via source_graph_id for mutual-handshake attribution.

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.

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.

Path parameters

NameTypeDescription
graph_idrequiredstringGraph Id

Header parameters

NameTypeDescription
Idempotency-KeyoptionalstringIdempotency-Key

Request body

Required, application/json.

FieldTypeDescription
entity_idoptionalstring

ID of the issuing entity. Optional only if `source_graph_id` is set (pre-association before the entity is finalized).

source_graph_idoptionalstring

Optional pre-association to a tenant company graph. Lets you mint securities for an entity that hasn't been promoted to a real `entity_id` yet.

namerequiredstring

Display name for the security (e.g. `Common Stock Class A`, `Series A Preferred`). 1-200 characters.

security_typerequiredstring

Instrument family. Open vocabulary — common values: `common_stock`, `preferred_stock`, `warrant`, `convertible_note`, `safe`, `option`, `llc_unit`, `lp_interest`, `restricted_stock_unit`.

security_subtypeoptionalstring

Free-text refinement of `security_type` (e.g. `class_a`, `series_a`, `series_seed`). No vocabulary enforcement.

termsoptionalobject

Instrument-specific terms blob (JSONB). Shape depends on `security_type` — common keys include `liquidation_preference`, `strike_price_cents`, `discount_pct`, `valuation_cap_cents`, `maturity_date`, `vesting`. Used by future waterfall-distribution modeling; treat as authoritative storage for instrument mechanics.

authorized_sharesoptionalinteger

Total shares the issuer is authorized to issue for this class. `null` for instruments where shares aren't a meaningful unit (e.g. convertible notes pre-conversion).

outstanding_sharesoptionalinteger

Shares currently issued and outstanding. Should be ≤ `authorized_shares` when both are set.

Example request

curl
curl -X POST "https://api.robosystems.ai/extensions/roboinvestor/{graph_id}/operations/create-security" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "authorized_shares": 10000000,
  "entity_id": "ent_acme_holdings",
  "name": "Common Stock Class A",
  "outstanding_shares": 6500000,
  "security_subtype": "class_a",
  "security_type": "common_stock"
}'

Responses

200 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

resultoptionalSecurityResponse

Command-specific result payload

SecurityResponse fields
FieldTypeDescription
idrequiredstring

Security ID (`sec_*` ULID).

entity_idoptionalstring

ID of the issuing entity, when set.

entity_nameoptionalstring

Cached display name of the issuing entity, denormalized for list rendering. May lag the entity row's current name briefly.

source_graph_idoptionalstring

Tenant graph this security is pre-associated to, when the issuer entity hasn't been promoted yet.

namerequiredstring

Display name of the security.

security_typerequiredstring

Instrument family (e.g. `common_stock`, `preferred_stock`, `warrant`, `convertible_note`).

security_subtypeoptionalstring

Optional subtype refinement (e.g. `class_a`, `series_a`).

termsrequiredobject

Instrument-specific terms blob. Shape depends on `security_type` — see `CreateSecurityRequest.terms` for common keys.

is_activerequiredboolean

`true` when the security is in active status; `false` after a soft-delete or deactivation.

authorized_sharesoptionalinteger

Total shares authorized for this class, when set.

outstanding_sharesoptionalinteger

Shares currently issued and outstanding.

created_atrequiredstring (date-time)

Row creation timestamp (UTC).

updated_atrequiredstring (date-time)

Last-modified timestamp (UTC).

atrequiredstring

ISO-8601 UTC timestamp

createdByoptionalstring

User ID that initiated the operation (null for legacy callers)

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
403Access denied
404Resource not found
409Idempotency-Key conflict — key reused with different body
422Validation error
429Rate limit exceeded
500Internal server error