RoboLedger: Ledger & Events

Create Agent

Create a counterparty record (customer, vendor, employee, etc.). The (source, external_id) pair is a dedup key — a second insert with the same pair returns 409. Use update-agent to patch fields.

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/roboledger/{graph_id}/operations/create-agent

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/roboledger/{graph_id}/operations/create-agent
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Path parameters

graph_idstring required

Headers

Idempotency-Keystring nullable

Request body

agent_typestring required

Relationship category: 'customer' | 'vendor' | 'employee' | 'owner' | 'supplier' | 'government' | 'lender' | 'self' | 'other'.

namestring required

Display name shown in lists and on transactions.

legal_namestring nullable

Full registered legal name (when different from name).

tax_idstring nullable

Tax ID (EIN / SSN / VAT). Used for 1099 / withholding reporting.

registration_numberstring nullable

Registry-issued company number (e.g. state corp file number).

dunsstring nullable

Dun & Bradstreet DUNS number.

leistring nullable

Legal Entity Identifier (ISO 17442).

emailstring nullable
phonestring nullable
addressobject nullable

Free-form address object (e.g. {"line1": "...", "city": "...", "state": "...", "postal_code": "..."}).

sourcestring

Provenance: 'native' (created in-app), 'quickbooks' / 'xero' / 'plaid' (synced from integration). Drives reconciliation behavior.

external_idstring nullable

Source system primary key — used to match on subsequent syncs.

is_activeboolean

Inactive agents stay in history but can't be picked for new txns.

is_1099_recipientboolean

Marks a vendor as 1099-eligible. Drives year-end 1099 reporting.

metadataobject

Example request

{
  "agent_type": "vendor",
  "is_1099_recipient": true,
  "name": "Acme Office Supplies",
  "tax_id": "12-3456789"
}

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.