Browse the API reference

Update Event Handler

post/extensions/roboledger/{graph_id}/operations/update-event-handler

Part of Extensions: RoboLedger.

Patch an event handler's match criteria, template, priority, or active state. Pass approve=true to approve an AI-suggested handler; approve=false to revoke approval. Only supplied fields are updated.

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
event_handler_idrequiredstring

The handler to update.

nameoptionalstring

New name. Omit to leave unchanged.

descriptionoptionalstring

New description.

event_categoryoptionalstring
match_sourceoptionalstring
match_agent_typeoptionalstring
match_resource_typeoptionalstring
match_metadata_expressionoptionalobject
transaction_templateoptionalTransactionTemplate

Replacement template. Whole-template replace — no partial patch. Omit to leave unchanged.

TransactionTemplate fields
FieldTypeDescription
transactionsrequiredTransactionTemplateItem[]

At least one debit/credit entry pair

TransactionTemplateItem fields
FieldTypeDescription
entry_templaterequiredTransactionTemplateEntry

One balanced entry (debit + credit pair) — the inner shape of entry_template.

priorityoptionalinteger
is_activeoptionalboolean

Toggle activation. False removes the handler from match-time consideration without deleting it.

approveoptionalboolean

Approval shortcut: True stamps approved_by/approved_at to the current user; False clears both.

metadata_patchoptionalobject

Deep-merged into the existing handler.metadata. Pass `{}` to leave metadata unchanged.

Example request

curl
curl -X POST "https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/update-event-handler" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "event_handler_id": "evh_01HVF8T0M2YTAY3BBNRH0V0",
  "is_active": false
}'

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

resultoptionalEventHandlerResponse

Command-specific result payload

EventHandlerResponse fields
FieldTypeDescription
idrequiredstring
namerequiredstring
descriptionoptionalstring
event_typerequiredstring
event_categoryoptionalstring
match_sourceoptionalstring
match_agent_typeoptionalstring
match_resource_typeoptionalstring
match_metadata_expressionoptionalobject
transaction_templaterequiredobject
priorityrequiredinteger
is_activerequiredboolean
originrequiredstring
suggested_byoptionalstring
confidenceoptionalnumber
approved_byoptionalstring
approved_atoptionalstring (date-time)
created_atoptionalstring (date-time)
updated_atoptionalstring (date-time)
created_byoptionalstring
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