workflow.succeeded
You will receive this event when a Data API workflow succeeds for an object.
Example Payload
Section titled “Example Payload”{ "type": "workflow.succeeded", "namespace": "users", "id": "user_12345", "request_id": "req_01h2m7qdmdjckc30e1mnq6xqfd", "url": "https://app.safetykit.com/t/example/data-api/namespaces/users/user_12345/execution_abc", "metadata": { "customer_tier": "enterprise" }, "output": { "actions": ["suspend_account"], "labels": [ { "label": "fraud.risk_high", "explanation": "High-risk behavior pattern detected", "confidence": "medium" } ], "fields": { "risk_score": 0.92 }, "label_changes": { "added": ["fraud.risk_high"], "removed": ["fraud.risk_low"] } }}Fields
Section titled “Fields”type: Event type (workflow.succeeded)namespace: Namespace where the object was processedid: Originalidprovided when the object was ingestedrequest_id: Request identifier from ingestionurl: Link to the object view in SafetyKitmetadata: Optional metadata derived from ingested object metadataoutput.actions: Actions produced by workflow/rulesoutput.labels: Labels produced by workflowoutput.fields: Optional structured output fieldsoutput.label_changes: Optional diff of label idsaddedandremovedby this run, compared to the object’s labels before the run
Label changes
Section titled “Label changes”output.labels always contains the final set of labels applied to the object. output.label_changes tells you what this run changed:
added: label ids that were applied by this run and were not present beforeremoved: label ids that were present before this run and are no longer applied
The field is omitted entirely when the run did not change any labels, or when the object’s prior label state is unknown.
Reliability guidance
Section titled “Reliability guidance”- process events by
(namespace, id)for object identity - use
request_idfor batch/request reconciliation - do not assume label ordering unless your own workflow enforces it
- treat
output.fieldsandoutput.label_changesas optional
Minimal validation checklist
Section titled “Minimal validation checklist”- verify signature and timestamp before parsing
- require
type === "workflow.succeeded" - require non-empty
namespace,id, andrequest_id - handle empty
actionsand emptylabelsas valid outcomes