Event Types
Webhook events sent by SafetyKit
Once you set up your webhook endpoint, SafetyKit will send POST requests to notify you about important events in your system. Each event follows a standard format with an event_type field and a data object containing event-specific information.
Decision Completed Event
Section titled “Decision Completed Event”You will receive this event each time a decision is successfully completed.
Event Type
Section titled “Event Type”decision.completed
Example Payload
Section titled “Example Payload”{ "event_type": "decision.completed", "data": { "decision_id": "example_01h2m7qdmdjckc30e1mnq6xqfd", "decision_status": "SUCCESS", "metadata": {}, "result": "violating", "labels": [ { "name": "Counerfeit brands", "applied": true, "explanation": "The product is stated to be a Burberry item, a well-known brand" }, { "name": "Illegal drugs", "applied": false, "explanation": "The product is a handbag, and does not contain any illegal drugs" } ] }}Fields
Section titled “Fields”decision_id: Unique identifier for the decisiondecision_status: Status of the decision (e.g., “SUCCESS”)metadata: Any custom metadata associated with the decisionresult: The outcome of the decision (e.g., “violating”, “non_violating”)labels: Array of labels evaluated during the decisionname: Label nameapplied: Whether the label applies to this decisionexplanation: Reasoning for the label application
Batch Completed Event
Section titled “Batch Completed Event”You will receive this event each time a batch is successfully completed.
Event Type
Section titled “Event Type”batch.completed
Example Payload
Section titled “Example Payload”{ "event_type": "batch.completed", "data": { "batch_id": "batch_01hf89meedvef6pc00njv3ezh0", "batch_status": "SUCCESS", "upload_url": null, "download_url": "https://safetykit-batch-downloads-production.s3.us-west-2.amazonaws.com/...", "batch_count": 2000, "success_count": 1998, "pending_count": 0, "error_count": 2, "cancelled_count": 0 }}Fields
Section titled “Fields”batch_id: Unique identifier for the batchbatch_status: Overall status of the batch (e.g., “SUCCESS”)upload_url: URL used for uploading the batch (if applicable)download_url: Signed URL to download the batch resultsbatch_count: Total number of items in the batchsuccess_count: Number of successfully processed itemspending_count: Number of items still pendingerror_count: Number of items that encountered errorscancelled_count: Number of cancelled items