Create Security
/extensions/roboinvestor/{graph_id}/operations/create-securityPart 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-Keyheader. - Bearer token in the
Authorizationheader.
Path parameters
| Name | Type | Description |
|---|---|---|
graph_idrequired | string | Graph Id |
Header parameters
| Name | Type | Description |
|---|---|---|
Idempotency-Keyoptional | string | Idempotency-Key |
Request body
Required, application/json.
| Field | Type | Description |
|---|---|---|
entity_idoptional | string | ID of the issuing entity. Optional only if `source_graph_id` is set (pre-association before the entity is finalized). |
source_graph_idoptional | string | 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. |
namerequired | string | Display name for the security (e.g. `Common Stock Class A`, `Series A Preferred`). 1-200 characters. |
security_typerequired | string | Instrument family. Open vocabulary — common values: `common_stock`, `preferred_stock`, `warrant`, `convertible_note`, `safe`, `option`, `llc_unit`, `lp_interest`, `restricted_stock_unit`. |
security_subtypeoptional | string | Free-text refinement of `security_type` (e.g. `class_a`, `series_a`, `series_seed`). No vocabulary enforcement. |
termsoptional | object | 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_sharesoptional | integer | 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_sharesoptional | integer | Shares currently issued and outstanding. Should be ≤ `authorized_shares` when both are set. |
Example request
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
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operationrequired | string | Kebab-case operation name | ||||||||||||||||||||||||||||||||||||||||||
operationIdrequired | string | op_-prefixed ULID for audit and SSE correlation | ||||||||||||||||||||||||||||||||||||||||||
statusrequired | string | Operation lifecycle state One of: | ||||||||||||||||||||||||||||||||||||||||||
resultoptional | SecurityResponse | Command-specific result payload SecurityResponse fields
| ||||||||||||||||||||||||||||||||||||||||||
atrequired | string | ISO-8601 UTC timestamp | ||||||||||||||||||||||||||||||||||||||||||
createdByoptional | string | User ID that initiated the operation (null for legacy callers) | ||||||||||||||||||||||||||||||||||||||||||
idempotentReplayoptional | boolean | True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions. Default: |
| Status | Meaning |
|---|---|
| 400 | Invalid request |
| 401 | Authentication required |
| 403 | Access denied |
| 404 | Resource not found |
| 409 | Idempotency-Key conflict — key reused with different body |
| 422 | Validation error |
| 429 | Rate limit exceeded |
| 500 | Internal server error |